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

Yeah, if you get over a thousand lines of code you need to be building and documenting it in a way that makes it intelligible in a modular way.

FP can be good for that but I often find that people get so carried away with the pure notion of functional code that they forget to make it obvious in its design. Way, way too much “clever” functional code out there.

The data structures are the key for many things, but a lot of software is all about handling side effects, where basically everything you touch is an input or an output with real world, interrelated global state.

That’s where correctly compartmentalising those state relationships and ample asserts or fail-soft/safe code practices become key. And properly descriptive variable names and naming conventions, with sparse but deep comments where it wasn’t possible to write the code to be self documented by its obvious nature.



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

Search: