Hacker News new | ask | show | jobs
by vardump 2961 days ago
> (also i simply can't wrap my head around rust since i never really learned programming from the ground up...).

If you want to learn, alternate between studying and doing.

Read up on the basics, then go to doing mode, study something a bit more advanced, rinse and repeat.

Start the doing part by modifying existing code; perhaps some command line utility, they tend to be simple. Then add some features in it. You could also cut out all the functionality and implement something different in the skeleton.

It's a good idea to use version control even for your experiments, so you can go back when you inevitably break something so that it no longer compiles or works correctly. Sometimes breakage is obvious only much later. One thing is for sure -- you will break things, and version control will watch your back.

I'd recommend git (or hg), because they can be used locally without a server. Or a github account. (But really even zipping the directory is better than no history at all. But seriously, use proper version control tools.)

This method will work for Rust or anything else that can be similarly iterated.

1 comments

Thank you for your tips.

Of course i am already using git. Working as a solo sysadmin i often automate stuff and need some scripts which i all version control. Since i like to work as a sysadmin i have of course also my own git server etc. :)

At the moment i try to focus on elixir, since i like the clean syntax and the REPL to try things (which is also a problem when i try to write something in rust. Since my programming workflow is pretty much based on try and error while i have the feeling a rust (or c) developer often knows beforehand what he puts into the function and what will come out). At work i often need to communicate with some kind of API (for example automatic sorting of pages in confluence) and all this GenServer Stuff helps me in Elixir.

But i think Rust would be a good choice if i need to write something more metal. Some small command line utility on one of the servers. Will try your "change an existing code"-approach!