26 Programming Languages in 25 Days
61–70 of 82 posts
Re: 26 Programming Languages in 25 Days
#62We 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 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
#63We 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…
Most languages have completely different idioms though. Sure you can write functions, loops, if statements the same in dozens of different language syntaxes, but that doesn't prove anything. I've seen loads of codebases written completely backwardly, eg when a C++ programmer writes their first Python app or a Java developer writes Javascript - they're just writing the same style in a different language, not writing i…
Re: 26 Programming Languages in 25 Days
#64Earlier 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.
Sure, but in university that can be a useful exercise, whatever the language. There are many commonalities in just about every language. Learning your first language is hard, you’re second is freeing. At least personally I’ve found that the more languages I study, the easier it gets to pick up a new one, specifically because of the commonalities. Sure, Haskell and Ruby are really different, but when you try to pick u…
Re: 26 Programming Languages in 25 Days
#65Earlier quoted context omitted.
"The goal was to see how similar code is, and how little it matters which language you pick." 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.
While I mostly agree, A program this "basic" is not going to go far enough to learn anything that pushes any language far enough to learn it's limits.
Re: 26 Programming Languages in 25 Days
#66Write up on the whiteboard in various languages to echo "Ho Ho Ho", preferably in shorthand, one-liner if possible.
Like python would be
("Ho "*3).strip()Re: 26 Programming Languages in 25 Days
#67The sleep trick is something I do with my hobby projects all the time, without really deliberately coming up with it as a strategy. By 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 act…
Re: 26 Programming Languages in 25 Days
#68Learning a programming language in 1 day to solve a particular problem isn’t the same as learning it over years to write actual production code. I doubt the author was writing “idiomatic” code and he probably transplanted paradigms from more familiar languages in the newer ones. But it’s still very useful and I’m sure he learned a lot and absorbed of some of the new languages’ programming styles. You don’t master idi…
From my personal experience of doing AoC in Julia this year, my Julia code started out smelling a lot like Python, but managed to adopt a bit more of the Julian way of doing things as I went along (not done yet though...)
Re: 26 Programming Languages in 25 Days
#69The sleep trick is something I do with my hobby projects all the time, without really deliberately coming up with it as a strategy. By 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 act…
Re: 26 Programming Languages in 25 Days
#70Next on HN: "Hello World in 100 languages, in just 2 hour"
Hello world is different from solving actual problems in AoC.
P.S. I'm somewhat surprised by this community's adoration of AoC and at the same time aversion to Leetcode and/or competitive programming in general. Arguably, many leetcode problems are more interesting (from an algorithmic point of view), are much shorter (although I guess for some, part of the fun of AoC is the elaborate story), and most importantly, have extensive test cases, that require generalized solutions.