Live data from Hacker News

Absolute truths I unlearned as junior developer

monicalent.com

101–110 of 534 posts

Re: Absolute truths I unlearned as junior developer

#101

Overall a good article, but I completely disagree with the notion that "good enough is good enough". I've been in a lot of code reviews where developers push back because it's "good enough". You need to maintain a defined level of quality otherwise codebases go to shit very, very fast. I was recently told in a code review that a Cassandra read before a write (to ensure there were no duplicates) was "good enough" beca…

> You need to maintain a defined level of quality otherwise codebases go to shit very, very fast.

And it's that level that we call "good enough". Or, I would say, acceptably bad.

One of the most important lessons I've learnt over my career is that there is no such thing as "good" software. Everything could always suck less — anything that takes over 0.0 seconds is bad, more than 0kB of memory is bad, more than 0 lines of code is bad. However, your level of badness for each of these metrics might be something you're willing to live with.

It's like hygiene. What you call "nice and clean" for your toilet is not clean enough that you'd cook on it, and even your "immaculate" kitchen is unacceptable for, say, an OR. Hygiene is always "bad", you're just looking for a point where it's no longer unacceptably bad for your purpose.

Re: Absolute truths I unlearned as junior developer

#102
post #7

The big one for me was the realisation that the code doesn't matter . I mean sure, it does, to us. It's what we do. But really, code doesn't matter. To the end user, what matters is that we solve their problem. We let them do their job, and we make that job as easy as possible. And that's what they pay us for. And to the company we work for, what matters is that we solve the end user's problem, and that we do so in a…

The code doesn't matter to the end user. Sure. You can say that about any industry. Engines don't matter as long as you can get from point A to point B and gas is cheap, which it isn't anymore. Healthcare norms don't matter when you are young and healthy. You can get away with this kind of reasoning in the short term. Engineering and almost any industry have rigorous codes and norms you have to follow, but not software engineering. Many software engineers are not engineers, but more like unlicensed plumbers or electricians that can fix the leak, and perhaps throw in a bunch of extension cords to make to hookup some electrician devices. Extension cords may work well for a while because they fix the customer problem, but long term may cause outages and fires. I think Software Engineering as a whole would benefit from more rigor. Of course, there has to be the right balance, as too much rigidity can hinder creativity and productivity, but saying that code doesn't matter is a wrong message.

Re: Absolute truths I unlearned as junior developer

#103
post #63

Earlier quoted context omitted.

Tests are anti-agile. TDD is waterfall. Legacy tests add friction to making changes. Sometimes you want that friction but in a frenetic prototyping phase its detrimental. This is especially true when business goals are changing constantly (such as early prototyping). How do you know what you built works? The only thing that truly matters is that the user story is satisfied and to that end unit tests are terrible. At…

I still struggle to understand the real benefit of unit tests; the most intuitive tests that test real business logic that I've written always become something like semi-integration tests. Pure unit tests that test a small isolated function are almost never useful to catch bugs after they're written. The only legitimate use for them has been that it's easier to understand the purpose of the function and edge cases. A…

Depends on how you define a unit and what you're willing to mock. I treat a 'unit' as a piece of functionality. So one method on an API is a unit. if it does complex stuff then there may be more targeted tests down below. and depending on what sort of work it does i may not bother with unit tests because mocking a DB transaction isn't worth it.

In java land when I'm writing stuff i use unit tests mostly as a place where i can run code without having to compile the whole app. And any tests that come out of it just end up being a bit of regression protection. But there's always a bigger slightly more complex unit test i write which tests the bigger unit of function. And those really straddle the line between unit and integration testing but i find i get the most value from them because one you lock in and publish functionality you have a contract you have to honor.

Re: Absolute truths I unlearned as junior developer

#104

Developers are new factory workers. Pay is good now because industry is expanding and there's not enough of us but it won't be like that forever. And bottom line work is already being commoditized (WordPress ecosystem etc).

Finance, accounting, engineering, and many other careers have been around longer, have been commoditized to varying degrees, yet still enjoy good pay.

I think developers will still make good money for decades. I could, however, see an issue with junior developers finding less opportunities in the coming decade. I think there will be less need for juniors and the entry level jobs will be harder to come by. Some of those skills are more easily "commoditized."

Re: Absolute truths I unlearned as junior developer

#105
post #48
post #7

The big one for me was the realisation that the code doesn't matter . I mean sure, it does, to us. It's what we do. But really, code doesn't matter. To the end user, what matters is that we solve their problem. We let them do their job, and we make that job as easy as possible. And that's what they pay us for. And to the company we work for, what matters is that we solve the end user's problem, and that we do so in a…

This is true with basically everything. Game development attracts more than its fair share of truly horrid code, to the point where success seems almost inversely correlated to code quality. If you decompile Terraria (using CIL, which preserves the object design), for instance, you'll notice that its main class is over 40kLOC and that basically all of the business logic is encoded in one great big chain of if-stateme…

Maybe games can get away with more things because when they're done, they're (often) DONE.

There is no next release, maintenance, new features etc. Once Balloon Pirates is done it ships, and is never touched again.

Re: Absolute truths I unlearned as junior developer

#107
i think now more than ever, there needs to be a bridge mindset between technical and non-technical. i learned that very early on, and even spent some time in a customer-facing, non-technical role to hone my bridge mindset. the ability to have empathy for the end user, and everyone else upstream who will touch your logic, is paramount and takes care of a lot of issues.

it's up to us as technical professionals to care about both the "what" and the "how". the ability to pan in and out on a particular need was learned early on and i cannot be more thankful of that.

Re: Absolute truths I unlearned as junior developer

#108
post #68

Earlier quoted context omitted.

Nah, f that mess. If you find yourself in a place that promotes the weak because it's a buddy system, it's not a place to work long-term. It means your boss is in 'don't rock the boat mode' and that's going to hold you back long term. Your boss should be fighting for promotions for their best workers and enabling growth in responsibility as well.

Oh, in fairness to my boss, he did make a strong effort in the next promotion cycle to get me promoted, which in fairness was only 6 months later. The issue was the they had a limited budget for promotions, and basically limited it to one person per team. This, by itself wouldn't have bothered me too much, since the person who deserved it most on my team (someone with more experience than me, and was definitely under…

Yeah, that clears things up. I think every organization has those dead-weight teams. As long as you put tons of points on your stories in Jira, you look super busy and management gets to see your pretty charts.

Re: Absolute truths I unlearned as junior developer

#109
post #87

One thing I would say about the whole "good enough is good enough" mentality is that if everyone has that mentality in a company, your code quality will decline so far that it will be impossible to get anything done in the future. This has happened to my company because ten years ago people had this mentality and it did work for them, getting us a lot of market share and short term success due to high profit margin.…

It depends on what the bar for "good enough" is. I would tend to agree with the author, most comments I've gotten during code reviews have been around the things that don't matter, like style or extremely minor optimizations that don't actually speed anything up in a noticeable way. I'm typically fine with making those changes though, because getting approved is more important than keeping everything "my way".

On the other hand, there have been times when what I wrote was overcomplicated or not clearly structured, and when I got comments to that effect, it drove me to come up with something better. It can be a little difficult to hear that critique, but it feels so good when you hit on something truly better.

I do feel pretty strongly that at this point, we shouldn't be messing around debating style or syntax in PRs. Set up a linter and run it in CI. You can have those style discussions when you configure it and then forget about it after that.

Re: Absolute truths I unlearned as junior developer

#110
post #53

Earlier quoted context omitted.

This bothers me. As code continues to eat the world, this is akin to saying “building codes don’t matter”. That is dangerous. And it isn’t professional.

Experienced developers know when to spend time making sure code is actually good and when a terrible crufty hack is fine. If you think "All code must be perfect" then you're not a pro yet.

And often business owners won't allow you to make that determination alone.
Post reply on HN