Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> but damn if I can find a way to use C as a web developer

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.



Listening to you, I'm thinking about just reading the C books and nothing more. If C's usefulness to non-C-programmers is simply that it gives them greater understanding of how computers work, then reading might suffice.


I'd encourage you to write some code, too. There's a lot of intuition you gain by manipulating the bits that you can't get by reading. You may think you know what a pointer is, but until you've had to debug a double-free segfault or a memory leak, it's hard to understand the ramifications of the concept. The standard string handling functions look trivial in documentation, but when you actually use them you'll find yourself forgetting to add null bytes or not realizing that some of the functions mutate the string you're working on. I'd argue it's that process of figuring out how to make things work that gives you the famed understanding of how computers work.


I don't think sufficient understanding of how computers work can come from just reading a book. If it could, you should read a book about how computers work, instead of trying to glean that through the lens of C programming. Understanding comes from doing.


If you have read the K&R C book I am not sure you would say that. It's great no matter what you do with it.


Personally, I don't agree. I think a majority of the value of K&R actually comes from the exercises.

K&R gives you a very good, clear and detailed explanation of the topic at hand and then immediately gives you several exercises to practice it. If you don't do the exercises the information will just fall out of your short-term memory whereas if you actually do them your long-term memory will get engaged as well as general muscle-memory for C coding.


That's a bizarre thing to say. Do you think the K&R book is a great way to learn French?


No offense but are you just being obtuse? Clearly I meant something other than what you are suggesting.


> Write a web app in C? ;)

Probably not very fun, with all the string manipulation involved.


C is pretty flexible. Just write a create_pool() function, an sprintf()-workalike that allocates memory from the current pool, and a destroy_pool() function that deallocates the current pool. Use one pool per request. It's not Perl, but I'd imagine it's not that inconvenient - and very fast.

(See also: raphters, which was featured on HN not so long ago.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: