3 ms·
When I started programming, I tried to get functions below one screen height, have one return and use mutations often. Today, I try to do big functions, multip
by k__ 7y ago
When I started programming, I tried to get functions below one screen height, have one return and use mutations often.
Today, I try to do big functions, multiple returns and const where I can. I still use code-blocks sometimes to scope variables.
I sometimes end up with a few hundred lines of code per function, but I can usally scroll over it and find what I need without jumping around.
Especially in JavaScript the addition of const and async/await helped much with this.