4 ms·
> flirt with it on and off for years > self contained puzzles These hit pretty close to home. The thing is, at any given time I either don't have an actual pr
by np_tedious 6y ago
> flirt with it on and off for years
> self contained puzzles
These hit pretty close to home. The thing is, at any given time I either don't have an actual project I'm eager / able to start, or if I am motivated to "get stuff done" then I don't want to complicate the effort with something new so I reach for more familiar tools.
I've considered building a simple CRUD REST API or small CLI script in haskell. Do you really suspect I'd learn much more than I would with Advent of Code (which I have done before)?
On the one hand, stuff like learning Hesod, database interaction, and I/O generally would be a real skill. On the other hand, one time I attempted to hack Postgrest to work for Redshift. It mostly worked (read only, no bells and whistles) and that was cool but I didn't really feel i learned much
- yakshaving_jgt 6y agoI think it's different for everyone, though it seems to be a common theme that people need to throw themselves into the deep end and do something more meaningful like a CRUD app or CLI tool in order to be invested. I think people need to be invested if they want to learn, because otherwise there's always other day job or life stuff that's way too easy to be distracted by. In a way it's very similar to adding user stickiness to a product you're selling, except in this case you are your own user and you have to add your own stickiness. If you're doing a CRUD thing, I'd suggest supporting both JSON and HTML representations of your responses (and Yesod works great for this). I think the art is in the details between the language parts you know and the libraries you end up interfacing with. Once you start doing this for real, that's when the details you learned in isolation in the beginning all begin to fit together.
- np_tedious 6y agoMakes sense. Thank you, I think I'll give this a shot sometime! My main candidate for this right now involves webscraping from a relatively small single source, structuring the data, and serving it in a different manner. If I may tag on a semi related question: does https://hackage.haskell.org/package/tagsoup https://hackage.haskell.org/package/tagsoup look like an OK html parsing library? Any general advice on choosing packages?
- yakshaving_jgt 6y agoI think it looks OK! I haven't used it directly, but I have done a number of growth-hacking/web-scraping tasks with scalpel[0] which actually uses tagsoup under the hood. It worked great, and it has a nice API. [0]: https://hackage.haskell.org/package/scalpel https://hackage.haskell.org/package/scalpel
- bulte-rs 6y ago> I think people need to be invested if they want to learn, because otherwise there's always other day job or life stuff that's way too easy to be distracted by. Thanks for this, I'm socially committed now ;-) For what it's worth, I've dabbled with Go for about two years, doing the matasano crypto challenge and an AoC using it, before I actually started using it for "real work"TM.
- kingaillas 6y agoMy go-to project for fiddling around in a new language is to write a hex dump utility. The goal is to replicate the output of "xxd -p -c 16 <thefile>", and perhaps allow a few more options. So yeah, self contained puzzles like AoC, Project Euler, Rosalind, etc is the migration path. It's hard to find something reasonably educational and medium level to work on; meanwhile I'm not exactly free to arbitrarily switch to langX at work. I'm also a roguelike fan and every year I think about trying out a very simple 7DRL in some language I'd like to learn, but without libtcod bindings I'd spend all the time working on i/o and display and not any actual game logic. However, something along these lines is probably my best bet for a medium educational "fun" project for language learning so I should figure out how to use libtcod from langX! The puzzle projects do let me get familiar with parsing command line args, reading/writing files, splitting input and strings, etc. So that's definitely valuable.