How do you algorithmically code like this? In my software engineering career, I am a plumber at best. Would fail hard at anyone who would ask me to code anything more than fizz buzz under time pressure. That said, I've built some incredible production worthy and robust systems that move mountains as a plumber. I am damn good at that.
I'd recommend taking a look at his book Paradigms of AI Programming [0]. It really shows his thought process in developing solutions to problems. The only other way is practice, and in particular practice with languages that offer functional features. Notice his use of lambdas, assignment of existing functions/constructors to more accurate names (Passport instead of dict, day 4), and higher order functions (quantify)…
Peter Norvig's “pytudes” for Advent of Code 2020
11–20 of 96 posts
Re: Peter Norvig's “pytudes” for Advent of Code 2020
#12Earlier quoted context omitted.
I'd recommend taking a look at his book Paradigms of AI Programming [0]. It really shows his thought process in developing solutions to problems. The only other way is practice, and in particular practice with languages that offer functional features. Notice his use of lambdas, assignment of existing functions/constructors to more accurate names (Passport instead of dict, day 4), and higher order functions (quantify)…
What kind of experience do you need for this book? For most ML you need linear algebra and whatnot, but this doesn't appear necessary here. If you've worked through something like SICP, do you think that would be sufficient?
Re: Peter Norvig's “pytudes” for Advent of Code 2020
#13In this case I think they work really well, and aren't stuck in places where they're not needed.
Re: Peter Norvig's “pytudes” for Advent of Code 2020
#14How do you algorithmically code like this? In my software engineering career, I am a plumber at best. Would fail hard at anyone who would ask me to code anything more than fizz buzz under time pressure. That said, I've built some incredible production worthy and robust systems that move mountains as a plumber. I am damn good at that.
For Scheme I think my thinking came from working through SICP many years ago while the other languages in the list force you basically to first think about a solution before you start typing.
I am not saying, obviously, people cannot think up these things straight in rust, python, c# etc, however, for me personally, it works much better if I first work it out in one of the others; it is way too tempting to grab for my plumbing wrench otherwise.
Re: Peter Norvig's “pytudes” for Advent of Code 2020
#15This is very well-written code. I don't think anyone would bring into question Norvig's technical skills, but I wouldn't think someone like him would spend much time at his job writing code, or have much free time to program as a hobby. As someone who aspires to a position similar to Norvig's (directing research at an organization that is frequently applied in real life), I think it's really cool to see him having ti…
Re: Peter Norvig's “pytudes” for Advent of Code 2020
#16This is another vote of confidence for type annotations. There still seems to be a debate between highly experienced Pythonistas whether typing is good or not. In this case I think they work really well, and aren't stuck in places where they're not needed.
Re: Peter Norvig's “pytudes” for Advent of Code 2020
#17How do you algorithmically code like this? In my software engineering career, I am a plumber at best. Would fail hard at anyone who would ask me to code anything more than fizz buzz under time pressure. That said, I've built some incredible production worthy and robust systems that move mountains as a plumber. I am damn good at that.
Re: Peter Norvig's “pytudes” for Advent of Code 2020
#18Love it. There's so many bits of Python I've written where I should have had something like this.
Re: Peter Norvig's “pytudes” for Advent of Code 2020
#19This is very well-written code. I don't think anyone would bring into question Norvig's technical skills, but I wouldn't think someone like him would spend much time at his job writing code, or have much free time to program as a hobby. As someone who aspires to a position similar to Norvig's (directing research at an organization that is frequently applied in real life), I think it's really cool to see him having ti…
If you haven't, you should check out the free course he gave at Udacity.
Re: Peter Norvig's “pytudes” for Advent of Code 2020
#20This is very well-written code. I don't think anyone would bring into question Norvig's technical skills, but I wouldn't think someone like him would spend much time at his job writing code, or have much free time to program as a hobby. As someone who aspires to a position similar to Norvig's (directing research at an organization that is frequently applied in real life), I think it's really cool to see him having ti…