4 ms·
I've had no luck learning a language on its own. But I've had a lot of luck learning languages as part of something bigger. Like C# via. Unity, Swift via. 2D
by Waterluvian 10y ago
I've had no luck learning a language on its own. But I've had a lot of luck learning languages as part of something bigger. Like C# via. Unity, Swift via. 2D game dev in XCode.
Any suggestions on what I should apply C to as a way to learn it?
- qwertyuiop924 10y agoPOSIX.
- pawadu 10y agoOr unix in general. I learned C by implementing my own versions of popular unix commands, starting with echo then cat and so on...
- slededit 10y agoIf your a fan of the terminal I recommend writing a terminal program that scratches an itch of yours. Perhaps theres a shell script that runs too slowly? Or something in inscrutable awk that would be better as its own program.
- Waterluvian 10y agoHmmm... Yes I'll have to give it some thought. I use Python for most of my scripting needs. I guess I've never had a need that's required better performance.
- slededit 10y agoEven though it may not make technical sense to choose C, you may want to just use it to learn.
- Waterluvian 10y agoYup. I'm going to make some scripts. Thanks. :)
- majewsky 10y agoThat's exactly why I wrote https://github.com/majewsky/xmpp-bridge https://github.com/majewsky/xmpp-bridge in C. It feels so different to me to program in C than, say, Go or Python. I become so much more mindful of every step that I take.
- debatem1 10y agoPython has an excellent C extension api. I'd suggest taking a C library that does something you want and writing Python bindings for it.
- kbart 10y ago"Any suggestions on what I should apply C to as a way to learn it?" If you are into hardware as well, get microcontrollers and do some home improvement projects. The easiest way is to get Raspberry Pi or similar, but if you also want to learn a great deal about system programming, try to bring up MCU on your own, starting with bootloader.
- dagw 10y agoArduino and other micro controllers. First of all it's really fun (YMMV). There is something about writing code that makes things happen in the physical world which is satisfying in ways that writing code that just affects bits on a computer isn't. Secondly it's one of the realms where C is still genuinely important. When you are working on problems where a few hundred bytes this way or that is difference between success and failure you really start to appreciate what C has to offer.
- uabstraction 10y agoIf you want to push this to the extreme, check out the MSP430 Launchpad and fiddle around with avr-gcc. Pick up a Bluetooth serial module (can be had on breakout board for ≈$40) and remote control something from any Android phone. Lots of fun to be had. Just be aware, microcontroller C programming is pretty far out compared to regular systems programming. Lots of tasks involve writing bits to seemingly random memory-mapped registers to change the state of the controller... and forget about including your favorite libraries. You're lucky if the standard library fits on the chip. Its very similar to OS kernel development in that regard.