DEV Community

loading...

Discussion on: Refactoring the Worst Code I’ve Ever Written

Collapse
jnschrag profile image
Jacque Schrag Author

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.

Collapse
andrewbrown profile image
Andrew Brown 🇨🇦

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

Forem Open with the Forem app