
What is a coder's worst nightmare? - spiffytech
https://www.quora.com/What-is-a-coders-worst-nightmare/answer/Mick-Stute?share=1
======
JohnBooty
Understanding unfamiliar legacy code with a bunch of kludges and "domain
knowledge" or "business logic" baked into it, when the original authors are
uninterested/unavailable and management has _zero_ respect or understanding
for the fact that it often takes an order of magnitude longer to
modify/maintain this stuff than it does to write it.

Oh, and there's no test suite.

That is my nightmare. I've been there a few times and it can be literally
impossible to shine in that role.

"What do you mean, it will take you ten hours to add a button? They coded this
whole module in one week and there are 100 buttons!"

aarrrrgh

Now, as an engineer, I understand and embrace the challenge of explaining this
sort of thing to management. I get it. That's the type of skill that separates
code monkeys from senior developers and architects. But, no matter how good
you are, you can't _force_ management to listen nor understand.

~~~
mikekchar
If you are on a legacy project, it's hard to know what to prioritise in terms
of improving code. However, getting requests to take somewhere within an order
of magnitude of how long people think it _should_ take is usually my guide. I
never tell people I'm going to refactor something. I just do it. Then after
the fact I say, "Remember when this used to take a week? Now it takes an
hour". Once you do that a couple of times, management gets the point
(usually). The only problem I've come across is when you get on a team where
they actively discourage code churn. On a legacy project, that's death, so
it's best to find another job in that case.

I really enjoy working on legacy code. Usually everybody else leaves me alone
because nobody wants to touch that code. I get a tonne of freedom. As long as
I don't break things (requires a fair amount of experience) I can quietly
improve things under the hood -- targeting areas where we get a lot of
requests. Legacy code is also great because usually nobody wants new features
just for the hell of it. You almost always get real requests from real users
that have real pain points. The biggest downside (as you imply) is that it's
hard to shine because the best you can do is make things acceptable. It's
difficult to hype the legacy project so you don't get a lot of recognition for
your work.

~~~
JohnBooty
I liked reading this! I'm glad you found happiness doing this sort of work!

One thing I'd say is that it's awfully tough to do this sort of work as a
contractor when there's a (direct) hourly cost for your time. It's tough when
you're on salary working on an internal project... but doubly tough (not
impossible) when you're a contractor! Theoretically, it would be in clients'
best interests to improve efficiencies, but it's _really_ hard to get a client
to sign off on hundreds or many thousands of dollars of work for a future gain
that's hard for them to grasp.

(Getting them to grasp it is part of our job, of course)

    
    
       Then after the fact I say, "Remember when this used to take a week? Now it takes an hour". Once you do that a couple of times, management gets the point (usually)
    

This is great advice. It's all about those metrics and demonstrating the value
of your work!

~~~
majewsky
Please don't use codeblocks for quoting. This quote is unreadable on most
screens (esp. on mobile) because the line doesn't break.

Just put a > in front of a normal paragraph to indicate a quote.

~~~
na85
I stopped leaving comments like this because I encountered some surprisingly
vitriolic resistance to making comments readable.

~~~
JohnBooty
Yep, I've been yelled at for both ways. Not putting any effort toward it at
this point.

------
neilv
> _I suddenly realize it 's in the compiler. It was the compiler. And every
> time you compile the original code and run it puts in the subliminal message
> code into the source code. I'd heard of this before._

Ken Thompson, "Reflections on trusting trust", 1984.
[https://dl.acm.org/citation.cfm?id=358210](https://dl.acm.org/citation.cfm?id=358210)

~~~
kazinator
However, I imagine that Ken Thompson hardly had in mind somem low-brow text
manipulation hacks that go as far as to clobber the textual _inputs_ to the
compiler.

------
codingslave
Coders worst nightmare is working at a company that could desperately use good
technology but whos management completely devalues it. The existentialist
feeling of expending hard mental labor on something that no one cares about

------
markbnj
Great story, but I don't think it qualifies as a nightmare. It's just a really
interesting and challenging puzzle. The fact that the author elected to work
on it for free ("This is nerd war") clearly places it in that category. If you
can exit a nightmare, you exit the nightmare. Speaking for myself the only
coder's nightmare I have is the one I think every coder has. It's the
universal programmer nightmare: you don't really _know_ your stuff works, the
way you can know that turning a key in a lock will open a door. Maybe you
missed something. Maybe you didn't test something. Maybe it's going to break
over the coming holiday weekend.

~~~
pzh
For some reason, I don’t find that story believable at all. It sounds like
somebody read “Reflections on Trusting Trust” and decided to exercise their
creative writing muscle by passing it off as their own experience.

~~~
imtringued
Yeah it's just fan fiction.

------
p1esk
My worst nightmare is I publish a paper, post the code on github, and then
someone contacts me pointing to a bug in my code that invalidates the main
result of the paper.

~~~
WrtCdEvrydy
> invalidates the main result of the paper.

Something like 30% of papers can't be reproduced, regardless of bugs.

~~~
p1esk
I'm fine with that as long as those are not my papers! :)

------
janpot
Being described as "_my_ developer" by a manager or designer.

It says a lot about how these people see themselves within a team, and it's
the kind of team I don't want to work in.

~~~
graphicsRat
Being called a coder.

It's one of my pet peeves.

~~~
makapuf
I understand that negative feeling. Coming from a non technical person or
role, what wording would be better ? Developer ? Software architect (its
different but let's assume non technical people don't understand the
difference), code monkey ? What would be the best term we can find for our
profession?

~~~
nnq
You have multiple options, this is how to choose one:

1\. "software engineer" (might drop the "software" for specific roles like
"front-end engineer" or "machine learning engineer" etc.) - _use this for
people who value their education /fancy-degree and/or who pride on code-
quality, low bug/defects rate, reliability etc. and they'll love it!_

2\. "software developer" \- _use this for people priding on craftmanship and
"ability to ship the right stuff on time" no-respect-for degrees etc. and
they'll love it!_

2b. feel free to mix up (1) and (2) and nothing bad will happen :) also using
(1) or (2) instead of others will tend not offend, just show that the person
using it is clueless a bit.

3\. "programmer" \- _this is the most direct / no-bullshit term for people who
hate fancy extra words and pride on practicality and getting stuff done_ (but
it might offend ppl with fancy degrees or make them feel devalued - never use
it for a PhD unless you know beforehand he/she would approve)

4\. "software architect" (this is a dangerous one) - _can be used to boost the
self-confidence of smart but terribly insecure people_ (use it sparingly bc
some might be pushed tot he other extreme and end up with over inflated egos
bc of this... better add "senior" before "engineer", it's more honest, what we
call "architecture" in software is closer to "structural engineering planning"
or smth, very far off from what building architects do) ...also practical
senior no-bullshit people might be offended if someone junior to them gets
this title!

5\. "code monkey" ...the '99 bubble is over man, like 20 years ago, forget
about this, unless you're in SV or other hip place and some club/group uses it
for nostalgic-value _...otherwise it 's offensive, and God have mercy on your
soul if you mistakenly use it in a place where ppl are unused to it and at the
same time to refer to someone with non-white skin color!_

6\. "coder" \- might be acceptable in some places, but it's also cunningly
devaluing (see sister comment for details)... unless you have the malevolent
intent of "placing a hint of their personal irrelevance in someone's mind
while at the same time avoiding to offend them" please _avoid it!_ (might be
the worst of all actually, bc nobody can complain but at the same time you
spray them with a depressing hint of their inferiority while mildly boosting
your superiority and subtly lowering everyone's morale at the same time... and
then as a manager you end up asking yourself in the end why it all turned to
shit despite you being "such an awesome and nice guy")

~~~
Haga
Ugh, code monkey my boss is heavy into that lingua

~~~
makapuf
This one was definitely tong in cheek, as a clear not to use example of
course.

------
segmondy
When you realize your code has caused grave injury to someone, physically,
cost their life, ruined them financially or ruined a relationship.

Everyone pays attention to plane or space craft crash. But bad software in
cars, air bags, trains, medical equipment have cost lives. Bad software at
financial institution have occasionally ruined people financially. Bad social
media software have ruined relationships. Bad localhost software that has
crashed and taken data could ruin people in ways many people can't imagine.

Someone out there is using something as simple as a text editor to write their
favorite book or keep track of their finances and run their businesses. if the
editor screws up their data, you can't imagine the hardship.

You never know how your users will use your software, don't take it for
granted.

------
murphy214
Deleting the production database on your first day:

[https://www.reddit.com/r/cscareerquestions/comments/6ez8ag/a...](https://www.reddit.com/r/cscareerquestions/comments/6ez8ag/accidentally_destroyed_production_database_on/)

Obligatory (poor guy): [https://github.com/MrMEEE/bumblebee-Old-and-
abbandoned/commi...](https://github.com/MrMEEE/bumblebee-Old-and-
abbandoned/commit/a047be85247755cdbe0acce6f1dafc8beb84f2ac)

~~~
Starwatcher2001
"Today was my first day on the job as a Junior Software Developer..."

And he has permissions to delete the production database? Heads much higher up
the tree need to roll.

~~~
lightbritefight
This was the general consensous on r/sysadmin when the post made it over
there.

If you can destroy a buisness on your first day, or even severly hobble it,
you have larger issues than a green dev.

------
harryf
Surprised to see no one has mentioned 3rd party APIs yet. Especially half-
baked, poorly documented SAAS APis where you're left wondering whether is was
designed by malice - to protect some vague business interest - or simply by
incompetence / lack of care / lack of time.

I've found the best mental defence in such situations is to assume the worst
from the outset, by expecting to have to burn untold hours figuring out how
this black box _really_ works and then be pleasantly surprised some parts
actually work OK. Better that than assuming "this can't be that that hard" and
ending up frustrated.

~~~
nshm
Exactly, also a frequent API changes for no reason. Tensorflow is a good
example of this. Looks like every month they schedule a meeting on what they
gonna break next. They seem to enjoy thousands of github issues about cryptic
messages on renamed nodes in the neural network models.

~~~
gauku
Struggling through their newly released tensorflow-graphics library right now.
They wrote it, published some simple, single google-colab tutorials and left
it at that. No documentation anywhere else

------
kazinator
What is the basis for the belief that there was a single person, who wrote the
program for the psychologist, and perpetrated the compiler hack?

This could be a case that person B was innocently working on the curses-based
questionnaire program for the psychologist. Person A was aware of this work
and hacked the compiler to recognize and doctor that program (including
squashing it down to one line), in addition to /sbin/login and possibly
others.

I'm curious how the program managed to include various headers, like
<curses.h>. That requires multiple lines. I'm thinking that the hacked
compiler took the _preprocessed_ original innocent program and then output it
as one line not requiring any preprocessing directives. Not even necessarily
to obfuscate it, but because the division into lines was gone at the point in
the compiler where this was done; i.e. this was a manipulation of the token
stream of the program, and the tokens were just converted back to text and
output as one line.

Could even be that this was all done in the C preprocessor rather than the
compiler proper, by recognition and replacement of token sequences. Though
modern compilers integrate the preprocessing phases of the language, this
sounds like it was in a classic Unix environment, in which cpp was still a
separate program.

~~~
leoh
It is strange to think that someone with this level of skills was in a
graduate program in psychology (as opposed to working in industry as an
engineer).

~~~
kazinator
Better that than making another NewLisp, I suppose.

------
geoffmunn
Spending ages debugging javascript with alert boxes, publishing the final
code, and then hearing that the homepage has an alert box that says "hi" on
it.

~~~
u02sgb
Not "hi" it usually says "this should never happen" :)

------
eindiran
Reminds me of this story: [https://www.teamten.com/lawrence/writings/coding-
machines/](https://www.teamten.com/lawrence/writings/coding-machines/)

------
billrobertson42
Realizing that "coder" is largely a pejorative term and most people have no
idea and appreciation for what you do.

~~~
gurkendoktor
Is this a regional thing? I haven't ever perceived it that way over the
internet or here in Europe, but I've seen several comments who agree with you
on HN.

~~~
tensor
I'm in NA and also don't understand why coder is negative. I remember it was
very common in the old demoscene days. I've never even seen someone non-
technical use the term. Usually non-technical people use programmer.

The one that irks me is engineer. I've met very few developers who have the
sort of professionalism that the term engineer requires. Most developers are
more like cowboys whose primary goals are making other developers and
themselves happy. An engineer needs to instead feel responsible for serving
the users of the application, which includes maintenance by others as a
subgoal. No doubt my definition of engineering is not popular here.

------
meddlepal
Carpal tunnel or losing ability to use my arms/hands.

~~~
Causality1
Yeah, my first thought was of the guy who blogged the whole time an inoperable
brain tumor was killing him. Over the course of multiple years I watched as it
robbed him of his intellect. The cleverness faded. The subtlety faded. His
posts started getting shorter, and then started getting sloppier. His grasp of
grammar was failing. Shortly before he died his final post was "love you kids.
love you wife."

That's my worst nightmare.

~~~
wwweston
I'm not sure there's objectively worse things than that.

But I think one could make a good argument his final post indicates he had
people who probably cared for him during his deterioriation, in part because
love for them had been a north star for him.

Maybe suffering such an end without that would be worse.

------
Washuu
Mine: Being forced into management. Which is happening.

~~~
pivo
It happened to me about a year ago. I hated it at first but began to like some
parts of it eventually. I'll never like the "paperwork" and the chores
navigating inscrutable internal applications and processes, but having real
influence over the direction of products is very satisfying.

------
kylec
Data loss. Behavioral bugs can be fixed, but if you hose your customers' data,
it's gone forever.

------
Marazan
Having a project transfered to you that is "nearly finished"

------
swedish_mafia
Low iq MBA manager with insecurities charged with delivery. Usually vindictive
and on a power trip, and has social leverage on some senior exec.

~~~
etripe
I'm living that right now, except he has no MBA, is a consultant, has the
dogged determination of an elderly employee on his last ever career project
and used his leverage to bring in a bunch of unqualified architect yes-men.

------
PebblesHD
Bugs that you can reproduce perfectly in production but not at all in any of
20+ non-production environments is my usual one... and it usually winds up
being some updated Oracle binary...

~~~
larkeith
Better or worse than a bug that appears once every few months in Prod, but
only when it's raining at the customer's location, and never on Sundays?

(This is an actual issue I've encountered. It had to do with code scraping
weather data for a horse racetrack, specifically if the page was updated while
the scraper ran. It was buried in a PHP monolith with no tests. The track
didn't run races on Sunday.)

------
MichaelMoser123
Working as a programmer for Amazon (at least that was my experience)

~~~
zerogvt
Strange thing to hear. Can you expand a bit?

~~~
MichaelMoser123
Search for "Median tenure at Amazon" (they say that is 13 months)

------
lallysingh
Code reviews complaining that your code isn't cargo-cult enough.

~~~
ljm
I would add 'unforgiving use of linters' to that, where 'unforgiving'
generally means that straying even a hair's breadth from the default settings
is forbidden.

Especially so when you can't adjust those defaults, thus making your post-
listed code substantially more abstract and less readable than it would have
been at first.

Case in point: forcing your simple 11-line function to become something more
complicated that has to maintain state through each call.

~~~
silversconfused
Been there. Other dev on my team INSISTED on limiting to 80 char lines in a
codebase with many long strings. It just wasn't appropriate.

------
AnanasAttack
How about infringing on a patent for inventing something independently without
knowing it?

------
l0b0
Being asked to "improve" a piece of internal software with not a single hint
of what actually needed doing. After two meetings where nothing more concrete
than "make it better" came up, I quietly continued working on actually
achievable stuff until I left a few months later. When I checked up on my
colleagues a few years later the damn thing was still in limbo.

------
synthc
Writing a stupid bug in a critical system that causes people to get injured or
killed.

------
camtarn
The rest of the answers to this question can be found here, for the curious:

[https://www.quora.com/What-is-a-coders-worst-
nightmare/](https://www.quora.com/What-is-a-coders-worst-nightmare/)

------
amriksohata
Obtaining poor requirements, then being accountable for maintaing the feature
and codebase having had little influence on decisions, especially if the
people behind the requirements have now left the organisation.

------
craftoman
>What is a coder's worst nightmare?

Hired by a company and realize afterwards that you must work on a project
that's designed and built on potatoes using potato languages and potato tools

------
yoodenvranx
My personal nightmare:

Working in a company where I have only one monitor and a PC without SSDs. And
I am not allowed to bring my own mouse/keyboard. And I don't have admin rights
for the OS.

~~~
Const-me
I totally agree with the general idea. Especially the mouse.

However, since I’ve bought my 27” 4k monitor I pretty much stopped using extra
ones. Unless I have to for something very specific, like debugging an app
which output to multiple monitors.

------
ex3ndr
Interesting hacking task and free time is a nightmare?

------
readams
This story of course makes obligatory a link to Reflections on Trusting Trust,
Ken Thompson's Turing award lecture, which first popularized this concept.

[https://www.archive.ece.cmu.edu/~ganger/712.fall02/papers/p7...](https://www.archive.ece.cmu.edu/~ganger/712.fall02/papers/p761-thompson.pdf)

------
Roritharr
Having to refactor the IRS.

[https://youtu.be/qL5ut8o5pfs](https://youtu.be/qL5ut8o5pfs)

------
chungleong
A manager who engages in circular reasoning is a nightmare that never ends.

------
dstola
Going viral on the internet for an embarrassing situation .. if that ever
happens I will finally realize my dream of becoming a hermit in the wilderness

------
retiredcoder
Changing jobs is very stressful for me. I have put up with a lot of BS to
avoid that stress, can seem to get better but worse actually.

------
RcouF1uZ4gsC
Mine is being drugged and hit with a $5 wrench in order to get me to give up
my password

[https://xkcd.com/538/](https://xkcd.com/538/)

~~~
Havoc
This plus TSA demanding passwords to corporate laptop. Mountains of
confidential client data compromised...or in custody. hmm...which to pick

------
diamondo25
Deploying something on friday and figuring it out its broken production monday
morning.

------
daodedickinson
We're always finding something tainted about memories taken for granted. A
fine story.

------
bencollier49
Ah, this old chestnut. Has anyone analysed the cycle time for stories on HN?

------
triplee
Being forced into a management job with no direction or mentoring.

------
m_ransing
"What crash? It is working fine on my machine."

------
mothsonasloth
"Hey X, mind if I push this quick hotfix to live?"

------
codesternews
I will loose my job because of AI epidemic :D

------
matz1
Asked to reverse binary tree.

------
yknx4
PHP, period

------
jjtheblunt
obfuscated Perl?

------
andrewstuart
Stuff that doesn't work, leading to days of problem solving.

