0: https://www.reddit.com/r/adventofcode/comments/zwi0t4/2022_w...
26 Programming Languages in 25 Days
51–60 of 82 posts
Re: 26 Programming Languages in 25 Days
#52By the time I get the kids in bed at night, I'm often out of steam. Sometimes I try to make some progress on a project, but I usually don't have the willpower to push through a stumbling block. After many many nights of staying up late and losing sleep trying to power through but not actually getting anything working, I finally realized it's better to just go to bed.
But I also feel sad if I go to bed early without making progress on something I'm excited about. So I started tricking myself by telling myself, "Well, you can just think about the project as you fall asleep." That's usually enough to get me in bed early.
And, lo and behold, quite often, I figure something out as I'm drifting off. Then when I wake up the next morning, I can get it implemented while I have my morning coffee. It's a really pleasant routine.
Re: 26 Programming Languages in 25 Days
#53Nice!! I needed to understand some go scripts with work so I used Advent of Code as an opportunity to learn it as a new language and solve the next problem using it. Unfortunately that day's problem was more difficult than the rest so it took me more than a day to solve it, but it was a pretty nice way to ramp up on a new language!
I had a similar thought after finishing:if you wanted to really learn a new language in depth, you could solve all 25 days using that language.
The initial headline of your front page intrigued me because I had noticed in surveying my own institution (the one where I studied, both as an undergraduate and as a postgraduate, and where I now happen to work) that while most of the undergrad courses of study we offer that require mathematics include at least an opportunity to program, Medicine does not. I reasoned at the time that the Medics have to cram such a large amount of other material into their brief time that maybe there's just no room to teach them to write code if they are to sleep (in my country they certainly won't have time to sleep once they're junior doctors)
Re: 26 Programming Languages in 25 Days
#54Earlier quoted context omitted.
> The goal was to see how similar code is, and how little it matters which language you pick. I think that’s a pretty bad result of the exercise. The point of software isn’t just to do a thing. Good software should properly encode a domain or idea and communicate that to others. If one took the analogy of driving a nail into wood, there are many tools that can do the job, but only a couple that properly handle the jo…
You can write good software in almost* any language though. Encoding of domain and/or clear coding style is mostly orthogonal to language syntax. The OPs exercise is exactly to show that language choice is not all that important, since you can write good software in bad languages and you can write bad software even in the best languages. * Excluding some deliberately opaque languages like brainfuck and malbolge.
Anyone who's tried hammering a Java-shaped solution into an Haskell-shaped language will eventually see the folly.
Re: 26 Programming Languages in 25 Days
#55We did a similar assignment at University many years ago. I think it was the same assignment, one per day for two weeks. Each time in a different language. The goal was to see how similar code is, and how little it matters which language you pick. Obviously it's a constrained problem set (we didn't have to learn all the ins and outs of each language) but it really opened our eyes to the "commonness" of programming, a…
> The goal was to see how similar code is, and how little it matters which language you pick. I think that’s a pretty bad result of the exercise. The point of software isn’t just to do a thing. Good software should properly encode a domain or idea and communicate that to others. If one took the analogy of driving a nail into wood, there are many tools that can do the job, but only a couple that properly handle the jo…
I interview a lot of programmers and I often get told that one of my questions is just impossible because it’s slightly awkward to express in Java. (It’s only Java folk incidentally, even though it’s roughly equally awkward to express in most of the long list of languages we let candidates use.) By analogy these are folk that would have to sit around waiting for their hammer delivery rather than just make do with a mallet for a few minutes.
Re: 26 Programming Languages in 25 Days
#56Earlier quoted context omitted.
Curious which languages you used. If they were C, C++, Java, and Python then I could see how they could blur together if you squint. Different syntax, similar semantics. But if those languages are C, APL, Erlang, ML and Lisp then I would expect the lesson would be the design space of languages is much larger than the popular imperative languages would have you believe.
APL might be an outlier here. For the rest, I think the difference lies more in the standard libraries of those languages than the languages themselves. Yes, differences in core language design start to matter when you are considering performance, or structuring larger applications, but for simpler scripts, you're mostly dealing with the standard library. On the other hand, differences will start to show them selves…
And Java didn't, until relatively recently (oh god Java 8 was almost 10 years ago), have anonymous functions, which means that you'd be more inclined to express solutions in terms of vulgar loops rather than a map, filter, reduce type operation.
Which is to say, they'd definitely look different.
Re: 26 Programming Languages in 25 Days
#57We did a similar assignment at University many years ago. I think it was the same assignment, one per day for two weeks. Each time in a different language. The goal was to see how similar code is, and how little it matters which language you pick. Obviously it's a constrained problem set (we didn't have to learn all the ins and outs of each language) but it really opened our eyes to the "commonness" of programming, a…
I think this thinking is a mistake. If you learn languages superficially, you will end up writing the same code just with slightly different syntax. It can take a long time to really understand a language and ecosystem and use its capabilities.
Re: 26 Programming Languages in 25 Days
#58Earlier quoted context omitted.
I have been reading Matt' blog for quite long too. I read his post on his son condition but never really noticed if he really switch his academic careers for his son. I am pasting the really motivating video sharing the story [1] and a NY times article here [2]. [1] https://www.facebook.com/freethinksuperhuman/videos/15306506... [2] https://archive.is/l7pCA
I stopped reading his blog when we wrote about how to get tenure and completely omitted talking about all of his wife's stay-at-home work.
Re: 26 Programming Languages in 25 Days
#59Earlier quoted context omitted.
Both Clojure and Rust are not very fast to learn to the problem-solving level. Other languages like Java or C++ can substitute for them. APL probably too hard to learn in 1-day
I'm convinced a moderately intelligent person with good grasp of high school mathematics can learn the entire core of APL in 24 hours of study (which of course is more than 1 day) with appropriate tutoring. Lack of programming experience is a plus. Yes, I'm willing to tutor a student to test my claim.
Re: 26 Programming Languages in 25 Days
#60Earlier quoted context omitted.
> The goal was to see how similar code is, and how little it matters which language you pick. I think that’s a pretty bad result of the exercise. The point of software isn’t just to do a thing. Good software should properly encode a domain or idea and communicate that to others. If one took the analogy of driving a nail into wood, there are many tools that can do the job, but only a couple that properly handle the jo…
I think you read a comment that they didn’t write. But to take your argument there is still value there. Learning that the goal is to get the nail into the wood and give you a tour of some ways to do that provides different value to practising your memorised best practise of 3/8” 95% iron alloy hammer swings at 20 degree arcs 1.2 times per inch of nail bed. Maybe that’s valuable too but you need to know both. I inter…
I agree with your point though. I remember being asked a question and I blanked with how to model it in Java. Then I switched mid interview to python and it clicked for me.