HACKER Q&A
📣 shittycoder

When Quality Doesn't Matter


I am tired of the reality of writing code. When I decided to become an engineer, I thought the whole thing would be about the work you do and the results you achieve. However, after working 2 years in the industry, I've realized it's not about the work you produce but rather about relationships and simply showing that tasks are done. Nobody seems to care how the task is accomplished.

In the last month, I started writing really poor code, and everything has gotten better for me - better Jira efforts and performance metrics. But nobody knows how terrible the code I write is or how bad the existing codebase has become.

Another sad thing I'm really tired of is seeing mediocre engineers write subpar code and then easily become 'senior' in startup companies. The code I've seen in my current company's codebase is something I wouldn't even submit for my college assignments. I don't understand why this is happening, but I hate it. Coding was my hobby, the thing I liked most in my life, but now I'm starting to hate seeing or writing code.

I no longer think about design or clean code; I just try to finish the task. I think that's enough for my company. I don't know if it's the same everywhere, but I suspect the conditions are similar. Nobody cares about what they do - it's just poor code and moving on. Then we have a term called "technical debt."

I'm not talking about premature optimization; sometimes we need to be fast. But this isn't just about speed - it's about consistently poor code quality.


  👤 pkoird Accepted Answer ✓
You mention that there is no penalty for not writing a "proper" code, nor is there any incentive for writing one. But I'd like to argue that doing something right purely for the sake of doing it right should be the entire reason for doing it. In a certain way, this is adjacent to the age-old question of "why should one be good?" While I'd refrain from discussing philosophy at length, suffice to say that doing good work should not be purely driven by the desire of any reward or recognition. Doing it right is an incentive on its own. Besides, if you ever have to switch your current org for one with a better work culture, you may find that bad habits have an annoying property of being difficult to get rid of.

👤 JohnFen
I guess it's a difference in perspective?

The reason I make my code the best it can be isn't to please my employer or get some sort of recognition. It doesn't matter to me if the code is never viewed by human eyes again.

I do the best work I can because of a sense of pride of workmanship and personal accomplishment. Whether or not the company I work for recognizes that doesn't enter into it.

In this sense, anyway. There's a different angle that overlaps this: if I really think the company doesn't give a shit about the quality of their products/services, then I'm quitting that company because I want my employer to be at least as interested in quality as I am.


👤 metaloha
Agreed. My company puts out terrible code that only mostly works. I was literally laughed at when I suggested we start documenting things and adding tests. This is a dev team of around 30 people who still have to site through a morning "stand up" every day, who are never given enough time to do quality work, and where only 3 devs are trusted to merge code and make deployments. Until recently, they were also the only devs who were able to generate API keys for certain, necessary third-party APIs, so if your key stopped working and they weren't in, you were completely blocked until one of them showed up.

There are devs here who have been "junior" for 4+ years, and senior devs with less than 2 years of experience - all learning and teaching the same bad habits and bad code to each other. A few months ago I did a Lunch N' Learn showing some JS features and when I showed how to use `.map` in place of a for...each loop for certain situations, it blew more than one mind - which in turn blows my mind. These are "senior" front-end devs who never new that things like `map`, `find`, and `filter` existed. They haven't actually _used_ any of these features since then either, and I have been labelled "picky" when I point out how to change their 10 line block into a 3 line block during code reviews. I doubled-down on that label when I noted that converting observables to promises (these are Angular applications) was a bit of an anti-pattern, and all our inter-application communication is completely unsecured and 100% open for abuse.

This company is not interested in improving things and is actively in a code-based death spiral towards unmaintainable complexity caused by terrible management and ignorant (but friendly and likeable) product owners. When I put together a proposal or plan to improve something (like switching to a message service instead of relying on inter-iframe messages), the first question I get asked (by 3 different people, no less) is how I had time to put that together (it took about 30 minutes); didn't I have better work to be doing?

But I can't find another job, so here I sit, witnessing the slow tech-death of their little universe, doing what I can to not go down with it too far. I am atrophying and can't stop it.


👤 taylodl
When you say, 'subpar code', what do you mean? How are you measuring the quality of the codebase? Is it objective? Can a tool be run that will spit out a number and below a certain number the code can be deemed 'subpar'?

👤 shrimp_emoji
At my place, I would complain about your code in code review. Because https://youtu.be/9L3M2WC5LPA

And I've trained people who have been writing bad code into writing better code and into delaying all merge requests by also complaining about bad code! >:]

I'd be pretty depressed if I worked somewhere this weren't the case. So it sounds like either your workplace culture is very bad or like mine is very good. (I don't know how common either case is.)