|
|
|
|
|
by rbranson
5595 days ago
|
|
If you want to learn fundamentals, you need to master C. The language itself is very simple and readable, but what it will teach you is how memory works. Every algorithm & data structure worth implementing has been implemented in C and is probably available in an open source project. You can download Redis, which is fantastic code and covers all the basics. Take one of these projects and start trying to mold it to your will. Write specialized string parsers in C for doing simple things you'd normally do with a script. If you do it right, it'll be several orders of magnitude faster. Learn to use the GNU debugger. Take blocks of algorithmic code you've written, learn pthreads, make them concurrent, and actually able to achieve linear increases in speed as you add cores. Your greatest ally will be well-written open source code. |
|
Note that this ONLY makes sense in the context of a learning exercise. If it's simple and you'd normally do it with a script, the performance you'd gain from a C rewrite isn't worthwhile. The knowledge you'll gain from making C do something it doesn't make easy, though, is.