Live data from Hacker News

It's OK if your code is just good enough

shiftmag.dev

1–10 of 149 posts

Re: It's OK if your code is just good enough

#3
Unless the code is running on critical systems that put human lives at risk, good enough is the perfect amount of good.

Getting things done is more important. Excluding above scenario, either you will make mistakes, or you are not tackling meaningful tasks. And that's okay. Allocate time for clean up when there's less ambiguity. The more you explore the problem, the better the issues become.

First implementation will always be bad, so throw it away and build something that's good enough to get the job done and uses what you've learned as you explored the space.

Re: It's OK if your code is just good enough

#5
I think there's a pretty wide range between 3 and 4 that is worth exploring. Maybe the real problem I have with this article is that once you peg 3 as "good enough" and 5 as unachievable, then there's a whole mess of interesting quality levels squeezed between the 3..5 range.

If we peg 3 as "good enough to ship and stand behind it", then I'm immediately thinking about getting the code to somewhere in the 3.5 range. After you ship, you're in a good position to revisit some of the decisions you mode. Everything's fresh, and you can go in and squash some bugs that you know are in there, expand some tests that you knew weren't as thorough as you wanted, and trim some of the crap that you realize that you don't need. Maybe it's time to do some refactoring, now that you have the big picture. Maybe it's time to chase after some performance improvements. Maybe it's time to make the integration tests faster and better.

Re: It's OK if your code is just good enough

#6
Upfront, I mostly agree with the post.

However, I may be a tad famous about striving for perfection in my code. [1] [2]

Why? If "good enough" is good enough, why do I go further?

For a few reasons:

1. I want the industry to be more professional [3] where it matters, and I need to set an example.

2. The kind of software I write already has alternatives, so mine needs to be far better to get adopted. And it does. [4]

3. Also, I am just a perfectionist. It's a problem.

Anyway, "good enough" is good enough most of the time; just make sure that your situation doesn't require more.

[1]: https://gavinhoward.com/2019/08/why-perfect-software-is-near...

[2]: https://git.gavinhoward.com/gavin/bc/src/commit/22253a3a6/ME...

[3]: https://gavinhoward.com/2022/10/we-must-professionalize-prog...

[4]: https://gavinhoward.com/2023/02/my-code-conquered-another-os...

Re: It's OK if your code is just good enough

#7
Yes let's happily dive & swim in the sewer of mediocrity that is the modern software industry. Our hardware keeps getting better and better and our devices become slower and slower, while the apps keep glitching and crashing at an ever increasing rate.

It's like the fat acceptance movement "it's OK if you're plus sized, or plus plus plus sized, or I guess multiply exponent factorial sized".

But it's really not OK. Not just apps but even our operating systems have turned into layer upon layer of unfinished and half forgotten features that sum up into something literally worse than what random natural selection wrote in our DNA. That's right. Random chance, throwing crap at the wall is better than our "software engineering".

Be better.

Re: It's OK if your code is just good enough

#8

> Take a look at the infobip-spring-data-querydsl library. That looks like an absolute nightmare and not an example of very good code.

That's also what I thought as well. This is the kind of overabstracted code Java gets a bad reputation for and I would not want to maintain that.
Post reply on HN