logoalt Hacker News

chbkalllast Saturday at 12:11 PM2 repliesview on HN

I tried learning C a while back. I would like to review it again and build / solve some problems using C.


Replies

greengrass42last Saturday at 3:08 PM

Give Arduino a look. C plus hardware for about $60 for a good starter kit.

UncleEntitylast Saturday at 3:57 PM

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.