25 points by 01-_- 2 days ago | 31 comments
fendy3002 2 days ago
Same with bakery, clean code doesn't means that you need to have no duplicates, solid, etc. You can work with dirty codes, until it gets too dirty to work on and you need to start cleaning, by which will takes considerable of time. Otherwise if you want to make it as clean and spotless as possible, it'll take considerable time and also you need to do that every time changes applies.
Consider renovation projects, you won't see they mop the floor everyday to the spotless level, they'll maybe sweep and clean it to the point where it's acceptable to operate. As you get better and with better tools, you can make less mess and less, but there'll be trash somewhere.
And same in code, you clean your code to an acceptable level, otherwise the code will be too dirty over time and hard to be worked on, and as you get better you'll make less dirty code. Problem is, nobody can know / agree on the acceptable level in programming which makes things hard.
skydhash 2 days ago
In my first year of professional programming, I tried to apply Clean Code to a side project. What I learned is exactly what you wrote. The result is very modular, but it’s a lot of code to write. But these are good ideas. What I needed to do was to develop my own philosphy and then to adapt it to the project’s context.
It’s the same with DDD. Which globally give the same guidelines: The use cases should drive your design; Push technical considerations out of the domain model; Cluster things that belongs together;…
But all of these is to balance speed (now), readability (near future), and maintainability (far future). These techniques and others will help you discern the equilibrium (which varies during the software lifetime)
notarobot123 2 days ago
> Clean Code repeatedly gives very strong advice in one direction without correspondingly strong advice in the other direction or any meaningful guidance about how to recognize when you have gone too far.
My take is that that Clean Code has some good advice for enterprise style software projects. It is incredibly prescriptive but sometimes that's not such a bad thing. In my experience it's worth it in uncoordinated/inexperienced teams who would otherwise produce an undisciplined mess of code.
Stick with it if it works for you as long as you don't go around bashing other people for not doing it the "right" way as many clean coders do. The dogma surrounding what amounts to a set of preferences and design trade-offs is what makes Clean Code so off-putting, especially if you have slightly different preferences.
[0] - https://github.com/johnousterhout/aposd-vs-clean-code/blob/m...
smt88 2 days ago
A lot of the "work" is automated these days anyway. Mainstream languages have hinters/linters or static analyzers that will catch many of these issues, and some (like TypeScript) have incredibly powerful static analyzers that will fix the issues automatically when they can.
Cheat sheet on Clean Code: https://gist.github.com/wojteklu/73c6914cc446146b8b533c0988c...
atlasduo 2 days ago
In general, software development is not a profession where you learn how to do things and do them, occasionally refreshing your skills. It is a perpetual problem solving field (not without its routines), and a continuous journey. Creativity, personal opinions and exchange of ideas play an integral role in this profession.