Live data from Hacker News

Ask HN: What is the coding exercise you use to explore a new language?

news.ycombinator.com

1–10 of 73 posts

Ask HN: What is the coding exercise you use to explore a new language?

#1
What is a good sample program or project to work on to explore the primary aspects of a programming language? Something that can be worked on for a couple hours or days. Something that will give exposure to most of the basics of a particular language. Would love to know how people go about trying out a new language in this way.

Re: Ask HN: What is the coding exercise you use to explore a new language?

#5
If I'm looking for problems I always like to try Advent of Code problems, it's a good chance to learn basic io, sample the standard library, and learn how to idiomatically handle common problems.

But before that I prefer to get a book and work my way through all the examples, otherwise I'm just making up what "idiomatic" means.

Re: Ask HN: What is the coding exercise you use to explore a new language?

#9
I try to explore a language using different problems every time. If you've already done a project or solved a problem, I think your previous solution will detract from getting a feel for a language's features and conventions by inspiring you to follow a certain pattern.

There's a pretty causal relationship between starting my unfinished side projects and me trying a new language or library.

I use advent of code to really dig deep into a programming language I sort of know but want to learn to use more. I plan on learning modern C# this way this year, it's been almost a decade since I taught myself the language at this point.

Re: Ask HN: What is the coding exercise you use to explore a new language?

#10
post #4

I don't think a try-this-language-project makes sense. Just build what you wanted to build.

Adding to this, a lot of projects these days will rely upon some external libraries and APIs. So a new language in this case is just a sauce to consume the utilities.

As for the practical aspect of picking up a new language (for a purpose), I'd shamelessly look into an already existing projects along with following whatever language textbook.

Learning syntax is likely a simplest step, picking up an idiom is more involved and is often specific to objectives.

Post reply on HN