Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Peter Norvig's sudoku solver is beautiful on all levels. http://norvig.com/sudoku.html

It's clearly explained code that's shorter than you would have thought. Norvig showcases his expertise in manipulating both the basic data structure of the Python language, and a deep understanding of the underlying problem and methods for solving it.



Ouch. I admire Norvig, but that's one of the most horrible pieces of code I have ever seen. I've read that page several times, I've even translated it to C# - https://github.com/mdpopescu/public/blob/master/Sudoku/Sudok... - but I still think it's incredibly ugly. I will admit that my knowledge of Python is very basic but still, if I had to maintain that code without the entire description around it, I'd give up and rewrite it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: