Live data from Hacker News

Ask HN: Projects for learning a language?

news.ycombinator.com

21–30 of 61 posts

Re: Ask HN: Projects for learning a language?

#21
For learning Rust I just picked a random, reasonably sized C++ project and spent a few weeks porting it to Rust. Was more than enough to get a grip on the core language features and tools and start receiving interview offers for a Rust position (though I ultimately decided to stay on the JVM track). The project was a face detection library: https://github.com/atomashpolskiy/rustface

Re: Ask HN: Projects for learning a language?

#22
If you've already been programming for a while then a great project is to reimplement the language in itself. You'll reinforce a lot of aspects of the language while you do this (since you'll be looking up what syntax exists and what it means exactly, all the time). Plus, building language implementations is always fun.

Re: Ask HN: Projects for learning a language?

#23
For me, there is no single go-to project that fits all languages. Each language has it's own purpose.

Go and Rust are fairly similar in terms of parallelization and performance. Both are general purpose languages and are great at solving system problems. Choosing a toy project that requires these perks will yield the most satisfying results and enables you to get a good grasp of why those languages exist, and where their differences are.

Both languages empower you to build inter-system applications, both languages are highly performant and both let you build safe and tested programs. A distributed ray tracing engine comes to my mind - it would allow you to let both languages collaborate, compare solutions to problems between the languages and get into the nitty gritty details of memory management, allocations, garbage collection etc.

This would probably be my pick, because you can build and improve it for years if you really want to put the effort in it.

Here's a great primer on that topic - it's still actively developed and made me look at modern ray tracing technology in awe.

https://raytracing.github.io/

Re: Ask HN: Projects for learning a language?

#25
post #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 al…

That is an interesting problem set, but with some serious difficulty spikes due to specific problem domains. I use C++ and Go professionally and think I'm pretty competent at both, but I've never had to write a GUI, and wouldn't really know where to start, other than to go read the docs for Qt, try to put together a build script, and then cry a lot - but if I had to do it with a gun to my head, what I'd probably do is write a web server and let the browser be my GUI engine. And then the whole third set... HTTP server/client are both scalably difficult depending on how much library support you lean on (raw sockets to HTTP is approachable, but I'd rather use Boost), but I'd have absolutely no idea where to begin with the email client.

Re: Ask HN: Projects for learning a language?

#26

Advent of code is an interesting set of challenges, with a generally rising set of complexity. There are 6 years worth of 25 challenges. https://adventofcode.com/

+1

In the past I have made a point of doing AOC in a language I didn't know or was planning to learn. Maybe rust this year...?

Re: Ask HN: Projects for learning a language?

#27

Games of course! Doesn't have to be fancy with graphics at first but the beauty here is graphics/frontend/UI is definitely on the table if you want to pursue it later. In the same spirit, it's very easy to add features/mechanics to it. Get creative! - Simplest game ever is a number guessing game. Obviously solvable by binary search on the player side. It's like an exciting counterpart for Fibonacci for learning PL fl…

There is a debian package called 'bsdgames'[0] that contains several simple text-based games for people looking for some ideas.

[0] https://manpages.debian.org/stretch/bsdgames/index.html

Re: Ask HN: Projects for learning a language?

#28
I don't think there's a good universal project that you can keep reimplementing in different languages and getting a good grip of the language. In your paricular case, go is more of a general purpose language so anything that involves simple filesystem and network operations(cache, databases, apis and all that) would be fine. In theory rust can do the same things but it's a systems language and trust me, it's not suitable for such things at all: poor ecosystem, the help you will get online is not preally great: what you will commonly get when you hit a wall when playing with something like actix is "this is bad practice" responses without an example of good practices. With that said, I've been playing around with robotics in my spare time lately and even for a beginner, I think this could be a great choice: you can pick up a decent robotics kit for 20-ish bucks and a raspbberry pi and you will have tons and tons of fun, even if you've never touched rust before in your life. And even if you have, it's still tons of fun.
Post reply on HN