Live data from Hacker News

Ask HN: Projects for learning a language?

news.ycombinator.com

1–10 of 61 posts

Ask HN: Projects for learning a language?

#1
Hello HN.

I've read a few books for a couple of programming languages (go, rust), but I still need some kind of project to really see the big picture and think deeply.

What kind of project (besides some CHIP-8 emulator) would you recommend?

Thank you and I'm more than curious about your answers.

Re: Ask HN: Projects for learning a language?

#3
I always thought of Make A Lisp (MaL) as a great way to learn two languages at the same time. And some of what you learn about Lisp in the process will rub off on your use of the language you are working with. Ie: It might trick you into being a better programmer than you expected.

There are a lot of MaL examples written in Lisp even, which initially sounds redundant, but gets new Lisp programmers to learn Lisp's internals by writing them in the same language.

This is similar to the "old days" when people used to write a BASIC interpreter or C compiler to learn a new language (writing a compiler teaches you ASM programming, so it's a good comparison with the dual nature of MaL)

Re: Ask HN: Projects for learning a language?

#4
Depends on your skill level, the trick to a good practice project is that is big enough that you are learning the concepts about the language that will push your abilities forward. However, it also should be small enough that you don’t waste your time solving problems you don’t really care about and that are not increasing your skills. For me I am usually learning a language to take advantage of some feature that language has. I know Go makes it really easy to create and test web servers so if that is why you picked it up trying making and testing a simple API. Maybe one that just queries two other existing APIs on the internet and aggregates the results. Making an API in Go would be good because you will need to unmarshal the json from the other two public APIs and combine the object then marshal the object to json and return it to the user. Be sure to write unit tests.

https://golang.org/pkg/net/http/ https://golang.org/pkg/encoding/json/

Re: Ask HN: Projects for learning a language?

#7
I like Larry O'Brien's three-part series, "15 Exercises to Know a Programming Language," [1][2][3] mostly for the overall philosophy ("should be tough enough to require problem solving: try to embrace the language's idioms") and for the rationale that comes with each exercise (e.g. implement this to learn that about your chosen language). Note: the internal links between parts of the series are broken, so here are all three parts:

[1] https://knowing.net/posts/2006/06/15-exercises-to-know-a-pro...

[2] https://knowing.net/posts/2006/06/15-exercises-to-know-a-pro...

[3] https://knowing.net/posts/2006/06/15-exercises-to-know-a-pro...

Re: Ask HN: Projects for learning a language?

#9
I don't know if I would recommend it, but I've noticed that in the past, whenever I moved to a different type of computer/OS (Amiga, MS-DOS, Windows, etc.) or language (Java, Javascript, etc.), I ported my biorhythm program to the new system/language. It starts out simple - just strings, math, file/screen input/output, then progresses to graphical plotting of the biorhythm curves. It's a simple algorithm. Disclaimer, I don't know if I believe in biorhythms, it's just something interesting and a flashback to my childhood in the 70s.

Basically, I would say the easiest way would be to choose something you've already conquered in a language/system you already know. That way, you're only tackling one new thing.

BTW, it wasn't always biorhythms for me - I originally wrote my Mandelbrot program in Pascal, and taught myself C in order to convert it to C so it would run faster.

Re: Ask HN: Projects for learning a language?

#10
I have a "standard" project to work on for new languages, which has enough complexity to get me coding things idiomatically by the end, but since it's something I've done before I don't need to worry much about the topic at hand.

The project is a hurricane modelling and visualization program, which is pretty specific to my experiences, but having that to riff on has been my way of learning scala, python, c#, and (soon, in theory) Go.

Post reply on HN