News for hackers. Stuff that matters.
Re:Fast polling using C, memcached, nginx and libevent by aiurtourist on Saturday September 25, 2010 @01:46PM (#1727418)
Check the second comment on that post. I'm glad someone else looked at that guy's C and thought "Whoooaaa, oh no."

How can we take posts like this seriously?

Re:Fast polling using C, memcached, nginx and libevent by rgrieselhuber on Saturday September 25, 2010 @03:35PM (#1727617)
Zed Shaw's response was more helpful than yours.

He provided recommendations to fix the mistakes instead of just dissing the whole thing. If you want people to write better code, share what you know.

Makes me wish Zed had a "Learn C the Hard Way" to complement what he's doing with Python.

Re:Fast polling using C, memcached, nginx and libevent by vimalg2 on Sunday September 26, 2010 @01:44PM (#1729550)
I think thats a really great idea.

I sure would like a 'hard way' courseware for C. (in addition to my trusty copy of K&R C for reference)

Re:Fast polling using C, memcached, nginx and libevent by bsaunder on Saturday September 25, 2010 @02:03PM (#1727448)
Just because of some novice mistakes, you want to discount the whole post?

Thank you for calling attention to the second comment.

Re:Fast polling using C, memcached, nginx and libevent by jrockway on Saturday September 25, 2010 @05:20PM (#1727899)
The mistakes are harmful. When you mess up your string handling in Perl or Python, you end up with double-encoded utf8, or something. When you mess up your string handling in C, other people on the Internet get a shell on your computer.

C is serious business.

(Incidentally, I've written event-driven programs with libev in both C and Perl. My load is usually so low that doing it all in Perl does not affect the number of requests I can handle, nor does it impact latency. The IO is the bottleneck; the article even says it only uses 2% CPU. Why risk insecurity when you don't know C and it doesn't even improve throughput?)