News for hackers. Stuff that matters.

Ask HN: What is your go-to project when learning a new language/framework?

When reading HN I've seen people saying that they will often re-implement the same small-but-not-too-trivial project in multiple programming languages. This also helps them pick up a new language fast, and compare the different approaches to solving the same problems.

A recent comment suggested implementing the Snake game [0]. Conway's game of life seems to be another common one. I think some people have even mentioned implementing hackernews clones.

[0] https://news.ycombinator.com/item?id=21414791

( 9 comments | 13 points | on HN )
Re:Ask HN: What is your go-to project when learning a new la... by peruvian on Friday November 01, 2019 @04:40PM (#21423470)
I mostly learn web frameworks, backend.

I mostly go with a file uploader - sort of like Imgur but for anything. Solves the following "issues":

* MVC architecture * Relationships (files belong to user) * Authorization (user can only see files they uploaded) * Talking to third parties (store files in AWS?) * General UI/UX like displaying the files in a nice way, providing direct links or embedding, etc

Lastly, you can turn this into a API-only backend and then go crazy with any frontend framework you want!

Re:Ask HN: What is your go-to project when learning a new la... by kick on Friday November 01, 2019 @03:11AM (#21416783)
An RDBMS! Very simple once you get the hang of them, and it's a very easy way to benchmark your effectiveness in a language because they have quantifiable and (very) perceivable performance differences between implementations.
Re:Ask HN: What is your go-to project when learning a new la... by fouc on Friday November 01, 2019 @03:14AM (#21416793)
Oh that's a nice idea. I bet the parsing and handling of the relational algebra could vary quite a bit depending if it's a functional programming language or C-like.
Re:Ask HN: What is your go-to project when learning a new la... by samuraiseoul on Friday November 01, 2019 @01:11PM (#21421201)
A early facebook clone can work well. If you're learning a new frontend tech, reuse the backend from one you did before, or if it's new backend, reuse the frontend from a different one.

I say early facebook cause I feel that doing a login, and feed page, and allowing status updates, friends search and confirmation, and a profile page with photo uploads to be a pretty good intro stack.

That said for a new language I ALWAYS look for a modern koans exercise to do. Some langs have them, some don't.

Re:Ask HN: What is your go-to project when learning a new la... by LarryMade2 on Friday November 01, 2019 @09:47AM (#21418694)
I do calendars, where it displays a month grid with days of the week at top, calculates the start day of the month, changes box colors for non-month days, month days, current day, etc. I add more bits if the language is more robust like filling in sample events, add in a month pager for control testing, etc.

This provides me enough math, control logic, looping and display logic to see what's what.

Re:Ask HN: What is your go-to project when learning a new la... by jjjbokma on Friday November 01, 2019 @08:59AM (#21418210)
I have a static site generator, already written in Perl and Python [0]. I am considering a Go version and maybe, maybe, a Haskell version.

[0] https://github.com/john-bokma/tumblelog

Re:Ask HN: What is your go-to project when learning a new la... by wkjagt on Friday November 01, 2019 @09:06AM (#21418267)
Sudoku solvers are nice to rewrite in several languages.
Re:Ask HN: What is your go-to project when learning a new la... by maxencecornet on Friday November 01, 2019 @07:49AM (#21417789)
For back-end tech, it's almost always a job board
Re:Ask HN: What is your go-to project when learning a new la... by unlinked_dll on Friday November 01, 2019 @12:53PM (#21420957)
JSON serializer, helps me get familiar with most of the syntax.