Because only then, i don't fear refactoring later.
So i'll get my goal: Easy refactoring for fun and profit.
Refactoring is often underrated. Actually i learnt more from refactoring rather than "just make it work perfectly since day 1.
Because only then, i don't fear refactoring later.
So i'll get my goal: Easy refactoring for fun and profit.
Refactoring is often underrated. Actually i learnt more from refactoring rather than "just make it work perfectly since day 1.
I had a boss once who was dumbfounded that I actually wanted to refactor code. I guess a lot of people want to write things "perfect" from the very start, but that perfection seems to be a delusion most of the time. The best way to know perfection is to see it in hindsight.
The first thing that's drilled into a new programmer is DRY. It's easy to understand and it works reasonably well. The next step up seems to be knowing when _not_ to roll stuff up, and how to tell when you're looking at a distinct piece of logic that needs to be reified into it's own entity or function.
EDIT: The Sandi Metz talk I mentioned: https://www.youtube.com/watch?v=8bZh5LMaSmE
It's more about having only one place where the logic is defined than anything else.
It's why I can't really take a regular job. There is no relationship between the quality of my work and what I get paid.
It's about how we could improve our life as a developer in general.
Lately, however, I've been trying to shift my approach to design when doing paid work: I try to make things that seem like they should be easy, easy. This is quite challenging in itself, but it's subtly different than trying to write high quality code. My goal is not so much highest possible throughput, or even programming ease. It's to make the process of programming less surprising to the paying customer. Of course, most paying customers have expectations far above what I could possibly achieve, but I see this has allowing myself room to improve.
I believe that if you are able to consistently achieve a result of "projects with this person tend to have fewer problems than projects without this person", it will translate into more $$$.
Bingo.
https://maximilianhoffmann.com/talks/programming/the-art-of-...
I think that the ability to partition code in such a way as to think about each bit in isolation is the mark of high quality code.