Ask HN: What do you code when learning a new language/framework?
1–10 of 171 posts
Re: Ask HN: What do you code when learning a new language/framework?
#2If 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?
#3Re: Ask HN: What do you code when learning a new language/framework?
#4Re: Ask HN: What do you code when learning a new language/framework?
#5It'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?
#6Re: Ask HN: What do you code when learning a new language/framework?
#7I 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?
#8I 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?
#9Re: Ask HN: What do you code when learning a new language/framework?
#10I’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.