Live data from Hacker News

Ask HN: What do you code when learning a new language/framework?

news.ycombinator.com

1–10 of 171 posts

Re: Ask HN: What do you code when learning a new language/framework?

#2
Backend developer here

If it's a new language, I create a small CLI poker game. It allows me to feel out most of the important parts of a language, as well as how ergonomic it is.

New framework, usually a small wiki with a custom markdown parser. It lets me get dirty with routing, the database, rendering, user state, and injecting custom code.

Re: Ask HN: What do you code when learning a new language/framework?

#5
I've remade missile command in every language I've learned except COBOL (and node if you count it as distinct from Javascript). Not actually a programmer, electrical engineering (larger electrical gear for Datacenters).

It's also a nice touchpoint to look at general personal improvement at programming, since it's right at the point where it makes reasonable sense to use organizational schemes like design patterns and needs adapting for whatever language you're in. The first time I made it in high school was an utter nightmare that somehow printed to over 20 pages (I know better now), ended up multithreaded (early 2000s Java multithreaded), lacked many features like pause/titled screens, and had a memorable race condition where explosions could only start in pairs if they were both visible (so reserved top left of screen for that second explosion).

Re: Ask HN: What do you code when learning a new language/framework?

#6
I usually wait until I have an actual project need then dive in, googling syntax questions along the way. If I do a made-up project then never apply the learnings, then the knowledge will just slip away and I'll probably have been wasting my time. I've committed production code in languages I don't know more than once. They're all kinda the same.

Re: Ask HN: What do you code when learning a new language/framework?

#7
post #6

I usually wait until I have an actual project need then dive in, googling syntax questions along the way. If I do a made-up project then never apply the learnings, then the knowledge will just slip away and I'll probably have been wasting my time. I've committed production code in languages I don't know more than once. They're all kinda the same.

I actually do this too, sometimes I'm just waiting for a project to come along that's a good fit for the language i want to learn.

Re: Ask HN: What do you code when learning a new language/framework?

#8
Dice games, generators of random structures, REST servers, small compilers.

I mostly learn domain-specific languages where the use-case is more given.

With Ansible I created scripts for bootstrapping VPS'es and laptops with dot-files and some suite of default programs, scripts for hardening OpenSSH. For jq I went to IRC and StackOverflow and tried to solve other people's jq problems. Many years ago when learning regex, I'd solve a regex quiz.

For front-end web-frameworks I usually create a tamagotchi or a questionnaire.

(I mostly do back-end, compilers and DevOps, but I'm full-stack.)

Re: Ask HN: What do you code when learning a new language/framework?

#10
I’m a backend dev. To learn a new language, I’ll make some CRUD app with REST endpoints with some form of authentication.

I’ll pick the popular web framework, database library, json library, etc. and try to build it. I might even look at logging. This will help me expose all their popular libraries and features that’s relevant for my day job.

Post reply on HN