| Here is your 10x programmer: https://norvig.com/sudoku.html "In this essay I tackle the problem of solving every Sudoku puzzle. It turns out to be quite easy (about one page of code for the main idea and two pages for embellishments) using two ideas: constraint propagation and search." If you gave this task to an "average" developer, how long would it take for them to implement? How many lines of code would it be? Would the implementation be correct? How long would their code take to execute? % python sudo.py
All tests pass.
Solved 50 of 50 easy puzzles (avg 0.01 secs (86 Hz), max 0.03 secs).
Solved 95 of 95 hard puzzles (avg 0.04 secs (24 Hz), max 0.18 secs).
Solved 11 of 11 hardest puzzles (avg 0.01 secs (71 Hz), max 0.02 secs).
Solved 99 of 99 random puzzles (avg 0.01 secs (85 Hz), max 0.02 secs).
Does the average developer know what "constraint propagation" and "search" mean in the above sense, or remember enough about them from their CS class to recognize them as the right tools and how to implement them?Also, can the average developer implement a spell checker from scratch on a single transcontinental flight? https://norvig.com/spell-correct.html So Norvig is always the paradigmatic example of the 10x developer, for me. Having a broad range of CS techniques at your disposal and knowing how and when to deploy them, is almost a super power. |
(It seems likely to me that there were some false starts, because eliminate() returns either `values` or False, when both of its callers would be just as happy if it returned True or False.)