3 ms·
This explained a few things very nicely which I had in my mind for what makes readable code, but had never grasped well enough to be able to describe it so neat
by indentit 6y ago
This explained a few things very nicely which I had in my mind for what makes readable code, but had never grasped well enough to be able to describe it so neatly. So thank you to the author and the submitter - I have bookmarked it and will be able to refer to it when I am writing code or reviewing pull requests :)
Specifically, I always have in mind that a function should "only do one thing", so having multiple layers of abstraction in the same function would be picked up by that rule generally, but I like the explanation given with "if a welcome email has not already been sent, send a welcome email". This approach also makes it easier to test parts of code in isolation.
- anaerobicover 6y agoIf you're interested in more like this, check out the book "Code Complete" by Steve McConnell. It's an absolute treasure trove of detailed examinations of code quality. Like you said, it really helped me put words to my intuitions so I could discuss them with teammates.