4 ms·
Personal anecdata. I have been increasingly aware of my own mental patterns during development and I've noticed that often I've been sitting and mulling over re
by ihateolives 4y ago
Personal anecdata. I have been increasingly aware of my own mental patterns during development and I've noticed that often I've been sitting and mulling over refactoring to some sort of universal solution instead of getting on with the work and getting things done. There are instances when I could've finished the task twice as fast if I would've just went ahead and done it with repeating code instead of thinking of clever ways to DRY it.
Therefore for my personal projects I'm now firm believer of quick iterative building. Just get the first iteration done, get it working and save improvements for later. It may create a bit more work for the future me but it decreases the mental load quite significantly. I'll take less mental load with clear objective (refactor this because this) over more mental load with unclear objectives (make universal solutions taking into account things that may or may not happen in the future) any day.
- kristopolous 4y agoMy principles are "be as stupid as possible" write it for someone stupider and comment it for someone even stupider and then maybe you'll have something maintainable. (Important note: stupid is not incompetent - it's a proxy for clarity, composability and rational structure without becoming formal, rigid, overly orthodox or academic about it)
- st-keller 4y agoCan it be that you‘re using „stupid“ exactly what is meant by „simple“ in the KISS principle? ;-)
- kristopolous 4y agoSure. Related. It's an art. Generally the less code, the cleaner the conceptual execution. I always strive to remove and reduce conceptually deceits Here's some code I wrote earlier, probably a good example https://github.com/kristopolous/music-explorer/blob/master/web/get_playlist.php https://github.com/kristopolous/music-explorer/blob/master/w... It's self contained, not very big, not trying to be fancy, as direct as possible. It's worth noting a few things: Some things are repeated when there's no reasonable way to refactor it in a way that simplify things. No framework. No view/model/controller/provider/orm separation. It's not doing much and it does it fine Stuff is composed but intentionally not abstracted Here's a frontend https://github.com/kristopolous/music-explorer/blob/master/web/scripts.js https://github.com/kristopolous/music-explorer/blob/master/w... Again, no react or angular or other framework. Just direct modern code. As far as what it looks like, it's a music player frontend to some sprawling project Example https://9ol.es/pl/ https://9ol.es/pl/
- gcassie 4y agoI can relate to this. I think Casey Muratori coined the maxim "write usable code first". I often mutter that to myself when I'm trying to design some crazy system rather than just solving the problem at hand.