2 ms·
I once wrote an extremely general and elegant piece of code for an extremely messy problem (some obscure CSV from a source system I cannot influence with a ton
by atoav 4y ago
I once wrote an extremely general and elegant piece of code for an extremely messy problem (some obscure CSV from a source system I cannot influence with a ton of inconsistencies and mistakes that I have to straighten out automatically).
I started out with straightforward and somewhat messy code, but after adjusting that 3 times, I ended up writing something that is more or less a toolset to deal with the problems that data had. The code of the tools is convoluted, but when I have to adjust some things every now and then I just use the tools I built anyways so who cares.
Abstraction in programming should be seen like certain devices, helpers etc. someone would make use of in woodworking. Of course it costs you some time to built them, but it can make your life a lot easier, because ot makes results more consistent and testable.