← Back to context

Comment by rightbyte

2 years ago

> I didn't have to hunt in a different part of the source tree for where something was done. It was all 'right there'. YMMV.

This is my take too as I have gained experience. The way I did code from the get go, was the overall best way. Long function that did the stuff one thing at a time. Like no functions called from different parts of the call tree. I breeze to debug and understand or modify.

Until it’s not. Nobody wants to read your 100,000 line file called main that only has one function. As with everything, moderation.

  • LOL. Yup. And I've been in a company that had a product like that. One man, one file, one function. Scads of GOTOs. It was a state machine, managing ports on a terminal-to-ethernet box circa 1987. Oh my.