2 ms·
When I'm coding, I often find myself in a situation where, in order to reach my goal, I need to use a "bad" language tool (e.g. eval), violate some principle of
by harimau777 8y ago
When I'm coding, I often find myself in a situation where, in order to reach my goal, I need to use a "bad" language tool (e.g. eval), violate some principle of good coding (e.g. avoiding side effects), or just have to write ugly code. I've come to the conclusion that a lot of writing good code comes down to recognizing those situations and stepping back to find a way you can change your design or strategy to avoid needing the ugly code.
I've never quite liked OOP, but I struggle to say exactly why. I wonder if some of it is that the class structure and hierarchies makes it difficult to step back and change the design in order to avoid having to write ugly code.