re: Refactoring the Worst Code I’ve Ever Written VIEW POST

re: At a glance, I would say your original code, while not dry is actually better in terms of long term maintenance and easier for people to jump into....

Thanks for the comment! I think I’m going to disagree. Although I concede that at a glance, reading the hard coded version is easier to jump into, from a long term maintenance perspective it isn’t better. I’ve had to update the data for this interactive twice now, and both times something went wrong at first because I forgot to fully implement the new year. I’ve built a lot more interactives using the data driven approach that don’t have that same problem and can be updated just by uploading a new file. Yes, it takes longer for a new dev to read the code to understand how it works, but it’s straight forward enough that I think that extra mental effort pays for itself.


There are so many unknowns still unanswered so the best reply I could give was 'at a glance'.

code of conduct - report abuse