[SlugLUG] Question on C

Erich Blume eblume at ucsc.edu
Tue Oct 10 01:55:18 PDT 2006


I know this is a linux mailing list, but since I bet most of you are not
only linux users but also programmers to a degree, I think it's relatively
pertinent.

I like to keep myself well-versed in programming while I am in my "larval
stage" - I give myself little programming tasks and assignments that force
me to learn new things. For the past four or five months I've been in love
with perl, learning all sorts of neat tricks and things you can do.

Problem is, while doing that, I completely forgot how to write C. I've
re-trained myself up to the basics, but what I really want to do now is
write a hash table implementation in C. I can't for the life of me figure
out how to get started, though. I've written a few half-hearted structs,
slapped down some frivolous typedefs, and even put in a few useless
prototypes.

So my question is: where can I get started for this particular project? Who
knows of a good resource for easy to understand implementations of hash
tables in C? If it's a book, that's fine, but it'd be better if you could
point me to a web page or something.

Also, something that's been bugging me is whether or not I should learn C++.
Ever since I learned perl, I've been reluctant to learn C++, being as more
or less the only time I ever plan on writing compiled code now will be to
optimize. I'd rather optimize in C than C++. But I've been doing a lot of
reading and it sounds like maybe that wasn't such a good appraisal. From the
context of a computational biologist, what's the safer bet?

Thanks,
Erich 




More information about the Sluglug mailing list