DEV Community

loading...

Discussion on: What is the ideal length of a code for you?

Collapse
alekseiberezkin profile image
Aleksei Berezkin

I heard somewhere about “magic number 7” — it's considered that a human may keep in mind no more than 7 things simultaneously. Translating to programming, any piece of code at any level should work with no more than 7 concepts. This may be number of locals, methods, fields, lines in one method or block etc.