Hacker News new | ask | show | jobs
by VexorLoophole 2961 days ago
I am no developer but like to toy around, build small tools and automate stuff. So i often can't wrap my head around programming stuff promoted on HN (also i simply can't wrap my head around rust since i never really learned programming from the ground up...).

But stuff like this, some Binding Generator really amazes me and i am also able to understand the code. Had the same feeling when i was working on some REST API Binding in Elixir, and was looking at other Repos and found a generated Slack Package. Out-of-the-box solutions like this are great (myself would start to write every function by hand and probably stop half through and try something else...). Thank you for making something like this open source so beginners like myself can take a look :)

3 comments

> (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.

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!

Hey man, you ARE a developer! And if your atleast trying to understand hn stuff, you are on the road to becoming a good one. Never to late to go back to basics.
> (also i simply can't wrap my head around rust since i never really learned programming from the ground up...).

C is a good language for learning this. Just don't use your resulting programs on untrusted input; you _will_ make mistakes that _will_ result in security flaws.

Once you've shot yourself in the foot enough times (everybody does), you'll be able to come back to Rust and understand what it's doing. Many design choices in Rust won't make any sense until you've experienced the problems they solve.

For example, lifetimes in Rust make explicit what you would normally need to track implicitly in C.

Already took a look at C. But my problem is: Working with all these modern languages (Clojure, Go, Elixir, ...) i got really comfortable with all these nice toolchains and package managers. I also really like the Rust toolchain. So i tried my luck at rust more often as on C ;)