3 ms·
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 Pro
by bmitc 6y ago
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?
- zeroDivisible 6y agoI 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)
- bmitc 6y ago> The added benefit of Python is the ease of using something like Jupyter notebooks, which make it trivial to iterate. Although, other languages do have better REPLs, allowing easier iteration than Python's REPL. Some languages, have both a better REPL and notebook-style programming, such as F#. But I was really more curious rather than saying which language would be "better".
- djur 6y agoIs Python uninteresting?
- bmitc 6y agoI personally don’t think it is because in the face of many modern languages, it doesn’t do any one thing the best and doesn’t present an interesting paradigm. Is there something it does interesting that I can’t find in languages like F#, Racket, or Elixir? But my question was trying to understand if Python has some hidden mojo that Norvig really likes or if he uses it like this publicly because he’s a top leader at a company that also uses it heavily. People listen to people like that in positions like his, and if he did all his solutions in Julia, F#, or whatever, that’d probably route a good amount of attention to those other languages that Google and his book doesn’t really use or hire for.
- madhadron 6y ago> it doesn’t do any one thing the best and doesn’t present an interesting paradigm That's absolutely true. But once you've been through the language paradigms, written Forth and Prolog and Haskell and APL and Lisp, you don't gain much by immersing in a new language. At that point you start looking for languages where the things you loathe about them intersect minimally with what you work on. Python has relatively little to loathe and is very convenient. I still reach for it by default as well, and I was at one point best known for my Haskell work. It has nothing to do with Google marketing. Norvig's established enough where he lends luster to Google, not vice versa.
- jp42 6y agoHe 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 http://norvig.com/21-days.html after reading this essay you might change your opinion about he finding only python interesting.
- nl 6y agoHere'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 https://news.ycombinator.com/item?id=1803815 Also: https://norvig.com/python-lisp.html https://norvig.com/python-lisp.html
- bmitc 6y agoThanks for those, but I have read them already. His comments on his book and Python are not really relevant in today's world and are more of a historical interest. Also, I don't really understand the timeline from his comment and am not familiar enough with the book to know its history. Did the first edition use Python? (I am aware of his and Russell's prior AI book.)
- kgwgk 6y ago> Did the first edition use Python? I think you may be somewhat confused there. What book are you talking about? Edit: I also wonder why his remarks ten or twenty years ago about Python being close to pseudocode "are not really relevant in today's world".
- bmitc 6y agoWhat am I confused about other than what I asked? There’s two books. The first is Paradigms of Artificial Intelligence Programming, which used Common Lisp, and the second is Artificial Intelligence: A Modern Approach, which to my knowledge primarily uses or encourages Python. I was trying to place what time Norvig was referring to in the linked comment. He mentions his book, which I assumed to be the modern approach one. The first edition came out in 1995 and the second in 2003. Python came out first in 1991, and he joined Google in 2001. His comment makes it hard to know when he was referring to (and thus even what book), and what I don’t know is if the first edition of the modern approach book used Python or if that came later in the second edition (without going and finding copies of the editions myself).
- kgwgk 6y ago
- 082349872349872 6y agoWhy 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.
- bmitc 6y agoLearning a programming language isn't anywhere near the difficulty of learning a new spoken and written language.
- myle 6y ago...Because he finds it fun? We don't have to all enjoy the same things. In this particular case also, if you read his code, I would be surprised if you don't learn something.
- bmitc 6y agoThat's fine, but it addresses a bunch of things I didn't say. I'm sure I would learn something if I read through the code in more detail, but that's true of a ton of things and time is what it is. I merely commented on what I personally find interesting and uninteresting. Also, even I, a non-Director of Research at Google and non-computer scientist, don't particular enjoy using the language I use on a day-to-day basis for fun in my personal time.
- RandomThrow321 6y agoWhy should we care what you find interesting or uninteresting?
- bmitc 6y agoYou’re of course free not to care. That’s absurd. But isn’t this a website designed for people to say what they find interesting or not? Why are these comments so hostile?
- trisiak 6y agoI think it's because you sound condescending when sharing your opinions and seem to be insisting that others should agree with your sentiment.
- bmitc 6y agoMind pointing out where? I asked a pretty simple question and got answers insinuating I said things I didn’t. Of course we all enjoy things for different reasons. I don’t insist on anything. People are free to disagree on whatever and have their own stance. If people like Advent of Code, that’s great. I have looked into it before, and it’s not for me. And I was also simply curious why Norvig seems to like Python so much. He either likes it or it’s convenient as a marketing tool or both (i.e., it fits all his needs). None of those are bad or wrong or whatever.
- Barrin92 6y ago>what looks like exclusively, in Python rather than other interesting languages? probably because he cares more about the problems and less about the language and python is a pleasant general purpose language (and ubiquitous in AI research) I never understood why many software developers are so focused on languages rather than on problems, the language at the end of the day doesn't really matter, unless the problem is in a very peculiar domain.
- bmitc 6y agoIt is less about hyper-focus on language and more of a curiosity. Yes, I personally don't like Python, but I would have the same curiosity if he used <x>, had written a book using <x>, and if Google heavily used <x>.
- foxes 6y agoAs someone who has studied maths Proj Euler is infinitely more interesting especially in the harder questions. For me, most of time spent in advent of code is basically about parsing a blob of text. Project Euler inspires much more interesting ideas. Mostly it is number theory and algebra.
- smcl 6y agoThe same could be said for actual advent calendars - if you go around any supermarket you could get much better chocolate for a kid than any advent calendar will have and it'll doubtless be cheaper too. But when you're a certain age there's something particularly magical about the experience of waking up in the morning, finding the little door for today, opening it up and having the little (vaguely) christmas-themed chocolate shape. As an adult, I have to say that for me doing AoC brought back a little of that magic. It helped that the problems unlocked at 6am in my timezone so I'd wake up, hack on the problem for an hour or so then walk my dog and get ready for work. It was also nice having a collective experience, knowing that not only 5-6 of my colleagues but thousands of other people across the globe were all going through the same problem at the same time. I really liked that feeling. So yeah Project Euler has very compact, well-written, well-designed, challenging problems in spades ... but AoC is a very specific sort of event that I must admit I look forward to more and more each year :-)
- qart 6y agoNorvig is a teacher. His first choice was Lisp for a long time. He chooses Python because it is a good enough alternative for his teaching. You can find his motivation here: http://www.norvig.com/python-lisp.html http://www.norvig.com/python-lisp.html