Login
Theme: Light Dark

What do programmers hate?

Tagged:

Home - Quora Link

I personally hate friction, and architectural problems that have acquired organizational inertia so they’re virtually impossible to solve, you just have to work around them. Also making humans do work that code is way better suited for. If you think about it the first two are just instances of the third.

When I see an issue, I have a wealth of knowledge and expertise to draw on to fix it. The first thought that comes to mind is latched onto and followed. If that thread doesn’t lead directly to a workaround, then fix, then to isolating the underlying architectural problem that caused the issue to come about in the first place, then I call that friction.

For example, I often work on a local server environment with a local database. We recently introduced authorization into the application. If I have to log in every time I need to work on the system, then that’s friction. I have to stop following the thread of the original issue and go hunt down the login credentials. It’s so annoying that I put in a conditional saying that if I’m local, skip login.

Well, when my team lead had to troubleshoot an issue with the auth, my local hack got in his way and he just removed it. I grumbled a little bit but didn’t fight him on it.

The next time I had to log in, I re-introduced a login workaround, but this time made it conditional on an environment variable that I could set so it wouldn’t get in his way. We’ll see if he ever notices it.

The environment variables themselves were a source of a lot of friction, it took me months to work out the constant friction it was causing me, but I still don’t consider the problem fully solved. The problem is that we have environment variables stored in the repo and we can’t get rid of them because they’re being relied on by one of the environments.

This is a violation of 12factor. Configuration isn’t code and doesn’t belong in the codebase. Just that should be enough to get enough internal support for a fix. But the team lead doesn’t take it seriously, so I have to work around the problem rather than fix it.

The friction was coming from the fact that, for various reasons, the values in that configuration file is getting changed by us and then those changes go and get committed to the repo. This screws with builds and has occasionally caused production issues. Production issues are far worse than architectural problems, you would think that just one of them would force a realization that this problem needs to be solved, but hey, what do I know?

Their solution was to be careful to stash changes to the environment variable file every time you switch the environment you’re developing on. This is stupid and you’re bound to make a mistake, and after banging my head against it enough times, went and researched the tech we were using and came up with a workaround and changed the code so it could work. That fixed it for me, but there are still other places in the code where that sort of thing happens and it still causes production issues. Not as bad as potentially accidentally overwriting the database, but still pretty bad.