Re:There’s No Such Thing as Clean Code
by matwood on Friday January 28, 2022 @07:35AM
(#30113805)
No code survives first contact with the user. Code is messy because of the impedance mismatch between the (mostly) precise world of computers and the real world. So, we do the best we can knowing that 'correct' is always just over the next hill.
[ Parent
| on HN ]
I think I’ve learned more about what makes good code by watching people trying to use code than from anything else. I have been doing this since college, when people would hear me helping my roommate finish an assignment so we could go home, and ask more questions. Some people are just out of their element. Some tools are just garbage even though they were written by clever people. Some tools are just garbage because they were written by clever people.
At least a third of the time if a promising junior doesn’t “get it” it’s because there’s nothing to “get”. The code I/we wrote doesn’t explain itself well, misses a useful behavior that would make it more obvious how to use it, or drastically simplify a feature. These people, particularly these situations, teach me more than I teach them.