3 ms·
The content of the challenges aren't the focus. The main take-away is to see how Norvig does it after you've had a whack at it yourself. You can learn a lot by
by leblancfg 9y ago
The content of the challenges aren't the focus. The main take-away is to see how Norvig does it after you've had a whack at it yourself. You can learn a lot by seeing how he reads the problem, dissects it into different functions, documents and tests them, and keeps an eye out for performance and computational complexity.
His code is highly readable and elegant, and I wish every single person I'll share a codebase with will have studied him before.
- b0rsuk 9y agoHa, brilliant programmers can sometimes be hard to appreciate. They make problems look easy. But the simplicity comes from the complete understanding of the problem. I think it's a trait of brilliant minds. They simplify things. I don't remember the exact quote, but it was something like this: * a fool doesn't understand * a normal person can be taught * a in intelligent person can teach * a genius can simplify
- irrational 9y agoThis reminds me of the quote attributed to Albert Einstein “If you can't explain it to a six year old, you don't understand it yourself.” I really thing what Einstein is getting at here is the ability to simplify things to the level that a six year old can understand it. Of course, you probably can't simplify the mathematics to the level of a six-year old, but you can simplify the concepts so that they are understandable by a six year old. I've found this to be true in my own life. I think I understand something, but then I try to teach it to someone else and then I learn that I don't really understand it. So I have to go back and study and think about it so more until I understand it better. If I really understand thoroughly, inside and out, then I find that I am able to simplify things such that I can explain them to my young children.
- b0rsuk 9y agoThis is why rubber duck debugging works. You start explaining to a rubber duckie what problem you have, how you're trying to solve it and what happens. Posting a question on a hostile forum or snarky IRC channel also works. When I think how to formulate my question best, to cause no misunderstanding, I often stumble upon the solution. It is also why teaching people programming makes you a better programmer. Even if you're answering newbie questions, it often makes you re-evaluate your knowledge or realize you don't understand something as clearly as you thought. Even newbies have different needs and interests, so they ask different questions than you would.
- agumonkey 9y agoAnd a slight twist on it, if you find the problem too hard, you're looking at it wrong. We all had moments when we realized how stupid the solution was. Most of the things that eludes us trigger a chase for complexity when it's mostly trying simple stuff that aren't in our neural habits.
- posterboy 9y agoteaching involves didactic reduction, in other words: simplification; from the easy to the difficult, from the special case to the generalization.