It's OK if your code is just good enough
shiftmag.dev
It's OK if your code is just good enough
1–10 of 149 posts
Re: It's OK if your code is just good enough
#2Re: It's OK if your code is just good enough
#3Getting 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
#4That looks like an absolute nightmare and not an example of very good code.
Re: It's OK if your code is just good enough
#5If 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
#6However, 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
#7It'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.
Re: It's OK if your code is just good enough
#9Your users don't care how clean your source code is, but they definitely care if it's slow and buggy.
Re: It's OK if your code is just good enough
#10I wonder what's the median life expectancy of a piece of code.