Live data from Hacker News

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

news.ycombinator.com

141–150 of 171 posts

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

#141

Pokemon games!! All of the algebra is solved, and you can dig as deeply as you like in any direction you like. Graphics? Check. And simple, top down, tilesheet or character maps work just fine. Battles? Check. You can leverage anything from purely functional, object oriented, websocket, long polling, SQL, you name it. Whether you use 3 elemental types or flesh out everything from multiturn, semivulnerable, exp/leveli…

wow this sounds incredibly complex

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

#142
post #37

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.

Plus Auth and publish and you will probably get followers. Annoying how many new things disregard Auth then CRUD is where 90% of monetization has existed on web to date.

Can you explain what you mean by publish? I'm assuming you mean publishing content (as in releasing learning material like a blog post or video tutorial) but some people as refer to publish as publishing (creating) events with an API.

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

#144
A rougelike dungeon crawler. It allows me to kick the tires on most new languages that I want to try out. In order to get going with it I need to figure out:

- What can I use to display? Is it a native app interface, TUI, web based display?

- What do the collections look like in the standard lib and what operations can I do on them?

- How good is the multithreading/multiprocessing?

- What paradigm is the language in? (OOP, FP, procedureal, etc)

- What developer tooling exists for the language? Is there an LSP available if I want to use emacs/vim/vscode? Is there a plugin for IntelliJ? What's the debugger situation look like, or am I going to have to use print debugging?

- How does project/package management work with the language?

- What is the echo system like for the language

All of that is in service to building out the first bits of the game.

(also I am a backend dev)

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

#146

Fastest way I learned was to rewrite an app I was intimately familiar with in the new tech. e.g. I wanted to move from Flutter and Firebase to Fullstack JS. So I rewrote a 20k lines app in NextJS ( typescript and everything I wanted to try out ). Not the best way to go if all you want to learn is 1 piece of technology though.

This is the approach I've settled on too.

I'm almost finished my first backend implementation of https://github.com/gothinkster/realworld and now that I've implemented it once I'm very familiar with it and could very quickly implement it again.

It's simple enough to be a short project, but with enough complexity to get you familiar with a wide variety of things you might care to know. One thing I like about it is you can kind of under or over engineer it as much as you want as a way to turn the dial either up or down on exactly how many different aspects of development in a certain language/framework it exposes you to.

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

#147
post #4

The thing that my job is requiring me to do. Trial by fire. But also after the 4th or 5th language and Nth framework, it gets much quicker to pick up new ones.

Basically the same for me, but for a different reason than sibling comments: Nothing sticks in my head with toy projects, I need to be solving an actual problem.

On rare occasion I do end up learning something outside of the job, like I learned basic perl writing an IRC bot, but for the most part it does end up being on-the-job.

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

#148
For learning a new language, I've enjoyed code golf problems. You are unlikely to use any of the same syntax/approaches in "real-world" applications, but it gets you to use the compiler/interpreter a lot and you learn about all different parts of the language.

For a project though, I think anything that you know the domain of really well and are interested in so that you are happy to complete it/go back to it makes sense. I find I often like to build some sort of crawler (APIs or page data) that can then be consolidated and distilled into concise information.

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

#150

A rougelike dungeon crawler. It allows me to kick the tires on most new languages that I want to try out. In order to get going with it I need to figure out: - What can I use to display? Is it a native app interface, TUI, web based display? - What do the collections look like in the standard lib and what operations can I do on them? - How good is the multithreading/multiprocessing? - What paradigm is the language in?…

I was surprised this isn't the most popular answer. IMO programming a complicated game such as a roguelike can get you a very well-rounded knowledge of a language.

But what makes RLs absolutely ideal for learning a language is that you will get your first version running with an extremely minimal amount of code (and no other resources), and you build up from there. It's very strongly motivating.

Post reply on HN