Live data from Hacker News

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

news.ycombinator.com

11–20 of 171 posts

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

#11
I usually code standard library functions in it. So implementing functional stuff like map/reduce, implementing data structures like lists, implementing string utility functions etc.

The goal is to learn how to create abstractions and how control flow works, once you got that down you can think freely and just code whatever you need.

When learning a new API just implement some basic program in it, taking input in some way and creating output in some way. Like click button to display a text, or take command line argument and write a file saying hello world etc.

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

#15
I always like to port L0pht’s hphack.c as my first project.

It’s quick but it covers string handling including some weird stuff, sockets, and networking pretty well.

I even do this with GUI programming as it involves callbacks.

https://github.com/druid628/hpHack/blob/master/hphack.c

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

#16
I’m a web developer, but I mostly work on foundational/common middlewares and libraries, and research distributed system patterns for API developers to use.

I have a CLI app that I make that calculates microtonal pitch lattices. In a lot of languages, it ends up being a few hundred lines. I’ve done it in Rust, Clojure, CL, Scheme, Python, C#…

As far as frameworks go, I’ll reach for one if I feel like I need one. With web frameworks, I’ll do a GET and POST route to get a feel for the mechanics.

After several years of going in deep on the JS hamster wheel, I’m kinda done with it. I’ll jump into a SPA framework if I need one.

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

#18
Something that I, or someone else, can and will use. Toy projects bore me, I like having something that actually solves real problems be the result of the time and effort I put into learning a thing.

Every once in a while, I'll think "it would be nice if I could do X" and that's perfect project material that will keep me motivated.

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

#20
I'm a backend developer and one project I've written a simple HTTP server a few times in different languages. I like it because it's not too complicated but at the minimum you're exposed to the string processing and synchronous IO features of the language, and if you want you can do things like write an async server or multi-threaded server.
Post reply on HN