←back to thread

165 points chbkall | 10 comments | | HN request time: 1.137s | source | bottom
1. matt3210 ◴[] No.44471515[source]
Find a series of small irritations on your computer and write scripts to solve them.
replies(2): >>44471997 #>>44472218 #
2. notepad0x90 ◴[] No.44471997[source]
Solid advice. I would just add to write C. There is a thing about finding a problem that really annoys you that focuses and tunnelvision's you.
replies(1): >>44472224 #
3. chbkall ◴[] No.44472218[source]
Would you give me a small example of the kind of small irritations you are talking about here?
replies(2): >>44472358 #>>44473572 #
4. chbkall ◴[] No.44472224[source]
I tried learning C a while back. I would like to review it again and build / solve some problems using C.
replies(2): >>44473276 #>>44473612 #
5. surgical_fire ◴[] No.44472358[source]
For example - I wrote a script that automatically rsyncs a bunch of folders I care about to one external HD, and then replicates the backup to a different external HD for backup purposes.

That sort of thing that would require you to run a bunch of commands and that you have to do from time to time. Automating it to a single script is cool.

I have a friend that wrote a bot to track the prices of stuff that he wants to buy and messages him on Telegram the current price and the min/max since it started running. Another fun little project.

replies(1): >>44472396 #
6. chbkall ◴[] No.44472396{3}[source]
Ah. This definitely sounds exciting and makes me think.
7. greengrass42 ◴[] No.44473276{3}[source]
Give Arduino a look. C plus hardware for about $60 for a good starter kit.
8. Disposal8433 ◴[] No.44473572[source]
Not OP but when I was way younger I had some trouble learning programming languages. Following tutorials was boring and gave limited instructions. Someone on the internet gave the same piece of advice, i.e. to do something useful in your life.

I was at the time downloading a lot of porn pictures but the internet connection was slow and unreliable. And that's how I learned the Ruby programming language with its regexes, how to parse HTML with those regexes, parsing CLI arguments, and how to download files and put them in proper folders. It was the cleanest and best script/framework I have ever written.

The moral of the story is to find something to do, and it will show you a lot more.

replies(1): >>44474774 #
9. UncleEntity ◴[] No.44473612{3}[source]
I know C fairly well and the only time I really use it is to write some python extension code to wrap a C(++) library to solve some problem using python.

For example, I've been using json as a database (instead of just, you know, using an actual database) and the python json module was annoyingly slow so I wrapped the boost::property_tree library in a python module. Every once in a while I'll use it to learn some new python C-API thing so now it has all sorts of bells and whistles which are totally unnecessary for my use case. I just looked and I've been poking at that thing for almost six years now, huh.

One thing I've been having a lot of fun doing lately is arguing with to robots to try to get them to write good code for some projects I've always wanted to do but never gotten around to. Not saying this is a good way to learn C but they are pretty good at answering questions on why they did something in a certain way -- which isn't always a good way or even the right way -- so I've been learning a lot more about C doing that. Though, honestly, it would be faster to just write the code myself a lot of the time but...

If I were to start over (I learned to code "for reals" in my mid-30s) I'd probably learn one of the fancy newfangled languages like Go. The only real reason I know python is blender uses it and I used to hack on blender so, ipso facto, I learned python. While knowing how to hunt down segfaults like a truffle pig is a good skill to have I'd say it's one of those things which you don't really need to know anymore, I've shelved quite a few things before I learned to do that and it's more fun to end up with a working project than a broken, I'll get back to it later, project.

10. kbelder ◴[] No.44474774{3}[source]
Way back when, before it was very feasible for the general public to get internet access (in the Mosaic days, maybe 94 or 95), I found that I could access my local college library with my dial-up modem. Their system let you connect to the lending services of other university libraries. I found one (maybe Oregon State?) that let you access Gopher. That was pretty interesting in it's own right, but there was no ability to display images, and the functionality to download files was removed, so pornography was frustratingly hard to obtain. You could look at ascii art...

But you could dump uuencoded binary files to the screen. Capture it, read it from the text buffer, reformat it, decode it, and then... a glorious 25kb jpg of a scanned Playboy image. (In HAM mode on my Amiga.)

I spent so much time doing that stuff. Wasted time, in a sense, but it motivated me to learn much I might not otherwise have bothered to. The desire of a young man to see a woman in her glory should not be underestimated; societies suffer if they point that energy in the wrong direction.

As a 37-year old married man, the OP has probably acquired some other motivations, though.