Article 6455198878988Coding Habit Changes
Coding Habit Changes
Feb 15, 2016
A little (fairly random) list of coding habit changes I tried in my weekend projects (mainly Oryol) over the past few years and how they worked out, in no particular order. This is all strictly IMHO, don’t take this as ghospel / the-one-and-only-truth ;)
What worked well:
no setters/getters: I was used to make class members private and write public or protected setter/getter methods. One day I removed all setters/getters from Oryol to see ‘how it feels’, and it just felt right (still does). Class declarations in headers are much easier to grok, and code is more readable. Const-correctness still works, the only thing you lose is the ability to set a breakpoint into the setter/getter methods, but I can count on one (maybe two) hands when I ever needed that.
no more ‘big ideas’: I stopped long ago believing in ‘big architecture ideas’ that dominate an entire project (Oryol is one result of this, although the ‘old way’ is still visible in p