Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's not amazing code but that's not that bad. In the grand scheme of things, that's not code debt that would ever seriously make my life any harder.


Yup. At least it's self-contained and easy to step through and modify if something breaks or needs to be changed.

And, a my previous PM would point out, even the copy-pasting and verifying no mistakes were made was a solution that took a fraction of the time a modern "clean" approach would. She had a point; as much as I'm against writing this simple code in the general case, plenty of devs tend to err towards overcomplicating solutions when given a chance.

I mean, the modern, proper, Clean Code™ solution would have this split into multiple files (not counting tests), and across two or three abstraction levels. I've seen this happen enough that I can tell I'd much prefer working with code like this capabilities parser (and hell, it can be beaten into near-perfection in an hour or three).


Amen!

I think the more experienced you get in coding the more you appreciate straight forward code you can immediately look at and understand.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: