Live data from Hacker News

Peter Norvig's “pytudes” for Advent of Code 2020

github.com

21–30 of 96 posts

Re: Peter Norvig's “pytudes” for Advent of Code 2020

#21
post #4

Always look forward to these so I can compare my solutions afterwards. Sometimes it's almost frustrating to see how clean and concise the mess I made could have been, but I do learn a lot. It's like he gets as close to golfing as possible, without the obfuscation. Too bad he punted on 20... one of the few difficult problems this year. Usually the hard problems are where you really see the contrast between his solutio…

> Do I sense a hit of frustration in his comment? ;)

Yeah, I too smiled at his comment last week.

Re: Peter Norvig's “pytudes” for Advent of Code 2020

#22
Even as a software engineer who studied mathematics, I just can't get excited about the type of problems found in Advent of Code and other such things, like Project Euler. Those problems amount to little puzzles and tricks and algorithms that have little to no context. What I find interesting about computing and programming is the representation and exploration of ideas.

Also, I can't help but wonder. Why does the Director of Google Research and a computer scientist use his personal time to code, what looks like exclusively, in Python rather than other interesting languages? Is it a bit of marketing for Google and/or his book, or does he just like Python?

Re: Peter Norvig's “pytudes” for Advent of Code 2020

#23
post #22

Even as a software engineer who studied mathematics, I just can't get excited about the type of problems found in Advent of Code and other such things, like Project Euler. Those problems amount to little puzzles and tricks and algorithms that have little to no context. What I find interesting about computing and programming is the representation and exploration of ideas. Also, I can't help but wonder. Why does the Di…

I find it fascinating (in a very good way) that he does find time to code. Python is not a bad language, in all fairness, any programming language which picks your interest enough to spend time working with it is a good choice.

The added benefit of Python is the ease of using something like Jupyter notebooks, which make it trivial to iterate.

(disclaimer: I coded more in Ruby than in Python, but I still enjoy both)

Re: Peter Norvig's “pytudes” for Advent of Code 2020

#24
post #22

Even as a software engineer who studied mathematics, I just can't get excited about the type of problems found in Advent of Code and other such things, like Project Euler. Those problems amount to little puzzles and tricks and algorithms that have little to no context. What I find interesting about computing and programming is the representation and exploration of ideas. Also, I can't help but wonder. Why does the Di…

Is Python uninteresting?

Re: Peter Norvig's “pytudes” for Advent of Code 2020

#25
post #22

Even as a software engineer who studied mathematics, I just can't get excited about the type of problems found in Advent of Code and other such things, like Project Euler. Those problems amount to little puzzles and tricks and algorithms that have little to no context. What I find interesting about computing and programming is the representation and exploration of ideas. Also, I can't help but wonder. Why does the Di…

He is writing such programs, essays etc since long time on his website norvig.com, I don't think he only like python and definitely not the marketing at all.

My favorite essay is http://norvig.com/21-days.html after reading this essay you might change your opinion about he finding only python interesting.

Re: Peter Norvig's “pytudes” for Advent of Code 2020

#27
post #22

Even as a software engineer who studied mathematics, I just can't get excited about the type of problems found in Advent of Code and other such things, like Project Euler. Those problems amount to little puzzles and tricks and algorithms that have little to no context. What I find interesting about computing and programming is the representation and exploration of ideas. Also, I can't help but wonder. Why does the Di…

Here's his (Norvig's) previous answer on "Why Python" as a HN comment he made ~10 years ago: https://news.ycombinator.com/item?id=1803815

Also: https://norvig.com/python-lisp.html

Re: Peter Norvig's “pytudes” for Advent of Code 2020

#28
post #22

Even as a software engineer who studied mathematics, I just can't get excited about the type of problems found in Advent of Code and other such things, like Project Euler. Those problems amount to little puzzles and tricks and algorithms that have little to no context. What I find interesting about computing and programming is the representation and exploration of ideas. Also, I can't help but wonder. Why does the Di…

Why do we speak in english instead of other interesting languages? Between java, python, and haskell (which are the linguae francae of the papers which I tend to read, the first and last having replaced C and lisp during my lifetime) I think python is a defendable choice for minimising boilerplate while maximising potential readership.

Re: Peter Norvig's “pytudes” for Advent of Code 2020

#29
Norvig's code is gold, even back from the times of PAIP (which is still definitely a must read).

His "poker" course (on YouTube) is also golden standard.

Why? The background in math, basic data structures and logic, so one know the range and boundaries of what is possible. Plus careful attention to details, like it is in any art.

Re: Peter Norvig's “pytudes” for Advent of Code 2020

#30

> cat = ''.join() Love it. There's so many bits of Python I've written where I should have had something like this.

If a mathematician is someone who knows that

    0 = 0 + 0
then would a pythonista be someone who knows that

    ''==''+''

?
Post reply on HN