by euroclydon · 15y ago · 0 comments
I've got the books sitting front of me, and I've written some trivial visualizations of sorting algorithms using terminal output, but damn if I can find a way to use C as a web developer. If there were just some use case where C would help me get something done, I'd be all over it.
Then, a funny thing happened and I started playing with the Arduino.
And, while they go to great pains to hide it from non-technical people, the whole Arduino stack (ignoring the IDE) is based on C/C++. So then I began writing C again and learning C++. (I always find it slightly odd that I'm using C++ on a microcontroller--admittedly it's very small subset of C++, mostly just used for the object encapsulation/abstraction. (Insert handwavy, "yes, yes, I know it's not strictly C above library level" here.))
So, you might like to take a look at playing with the Arduino if you want to get into C. And if nothing else it's fun playing with tangible things that interact with the "real world".
Write a C-extension for infrastructure-level ruby gem if you're a rubyist, or fix a bug / add a feature in your favorite scripting language.
(+) Yes, yes, programming languages are not written in anything. Their implementations are. I know you know what I mean.
It might not be a good idea to actually use your fast C function in production (if you're new at C you might have a security vulnerability in there, and there could be maintenance headaches). But you'll have learned a lot.
I found that hard to do as a starting developer who didn't know what was actually a bottleneck in my code, but I did have a particular library/gem that I wrote myself that did a few things I constantly needed (think of authentication in a web app, it's almost always included). So I rewrite it in C. It didn't really make it faster, or better, but I learned a bunch of C.
Particularly, libraries search their catalogs using the z39.50 protocol. Ruby 1.8 has a gem ruby-zoom[0] that does this using YAZ[1] however there is not a ruby 1.9 version. If anyone has a guide that explains native extensions for Ruby, please advise.
[0] http://ruby-zoom.rubyforge.org/ [1] http://www.indexdata.com/yaz
This was the final project in the C class I took in college. It's not a bad idea.
Write a web app in C? ;)
But yeah, in most cases C won't improve your productivity as a web developer. But it will certainly make you understand the computer better.
So maybe start a recreational project in C? A command line utility, a demon, a music streaming server - something not really web-dev related.
Probably not very fun, with all the string manipulation involved.
(See also: raphters, which was featured on HN not so long ago.)