Hacker News new | ask | show | jobs
by dimino 2401 days ago
I cannot overstate how important this concept is. Write code (and DESIGN SYSTEMS) that fit in your brain, because the faster you can reload it back into your brain, the quicker you can dispatch bugs and new features down the line.

Nothing in my professional career has caused me more anxiety than encountering complex code to solve a simple problem. It's infuriating, and has long lasting deleterious effects for the life of that code.

What's especially insidious about this problem is that for folks who value short term success over sustainability, they'll struggle with this for a long time, and have all kinds of reinforcement to be skeptical that any of this is even a problem. Once you get used to struggling with complex code some people start to think it's all that can be written.

1 comments

Artificially slicing up functions does not make the code fit in my brain, it just means that I have to load in more functions in order to have the required context.
Definitely, which is why doing it just to get small blocks of code won't work. It has to be part of the entire design, and sliced at real, logically separate spacings.

It's hard! But immensely rewarding if you get it right. You have to be thoughtful as you design and build.