4 ms·
Dijkstra commented on this multiple times (e.g., https://www.google.com/search?q=dijkstra+puzzle+minded+ewd+site:cs.utexas.edu https://www.google.com/search?q=d
by maxlybbert 12y ago
Dijkstra commented on this multiple times (e.g., https://www.google.com/search?q=dijkstra+puzzle+minded+ewd+site:cs.utexas.edu https://www.google.com/search?q=dijkstra+puzzle+minded+ewd+s... ).
"I still often hear that a successful programmer should be 'puzzle-minded' whereas I have the feeling that a clear and systematic mind is more essential. A modern, competent programmer should not be puzzle-minded, he should not revel in tricks, he should be humble and avoid clever solutions like the plague" ( https://www.cs.utexas.edu/users/EWD/transcriptions/EWD03xx/EWD303.html https://www.cs.utexas.edu/users/EWD/transcriptions/EWD03xx/E... ).
- yen223 12y agoHaving seen people banning list comprehensions from Python because they are "too clever", I am wary of people who instinctively avoid "clever solutions".
- maxlybbert 12y agoThe problem, of course, is that there are wildly different definitions/thresholds for clever. Dijkstra's comment was made when assembly language was widespread, and I suspect that his idea of "clever" involved the various ways people can famously make assembly language unreadable. In the introduction to "A Discipline of Programming," he asks if advanced language features belong to the solution set or the problem set, but he doesn't define "advanced," so I can't say where he put the threshold.
- wes-exp 12y agoFor me something like list comprehensions is simply a matter of learning and expertise, not cleverness. Somebody banning them for "cleverness" reasons should be called out for what they are really doing: setting a (sadly low) knowledge ceiling. The real problem of cleverness is when people are bored of being code monkeys and start inventing things that complexify their project without any legitimate justification. Like "a cron job and a two line shell script would do but why don't I design my own multi-tier scheduling cluster"
- userbinator 12y agoEvery time I hear the "cleverness" argument I can't resist posting this counter-argument: http://www.linusakesson.net/programming/kernighans-lever/ http://www.linusakesson.net/programming/kernighans-lever/