3 ms·
There is an element of relativity to this though. I guarantee that there are programmers and teams for whom nested list comprehensions are much more comprehensi
by cwp 7y ago
There is an element of relativity to this though. I guarantee that there are programmers and teams for whom nested list comprehensions are much more comprehensible than 10 lines of loop code that could be doing anything and have to be carefully analyzed to be understood. This holds for just about any programming technique that you might encounter.
Of course, Kernighan's law still applies, it's just that the definition of "too clever" recedes with skill and experience.
- Gibbon1 7y agoA counter is a saw a blog post by a CS professor picking apart of a single line implementation of the Sieve of Eratosthenes. She points out the first clue is that it's performance is bad, like really really bad. And then shows it's not actually implementing the Sieve of Eratosthenes. I might just be dumb but I've been bitten so many times I'm dubious anything can be verified by inspection.
- tyurok 7y agoI have experienced this. The most brilliant programmer I've ever worked with wrote hardly comprehensible code since they could understand other's code easily, so they didn't feel the need to write readable code because, in their word, "What do you mean you don't understand it? It compiles, it runs, it works, you don't need more than that".