Re:A quick look at the Redis source code
by free652 on Tuesday October 15, 2013 @11:01AM
(#6553590)
Wow it's awesome, comparing to the most of the C code that I saw it's beautiful. I like the long method names, because I can actually understand what they are doing.
[ Parent
| on HN ]
Re:A quick look at the Redis source code
by matthiasv on Tuesday October 15, 2013 @11:55AM
(#6554029)
Maybe you haven't looked very often but nice code is out there for quite some time. Take a look at anything related to the GNOME stack (GLib, GTK+, all the applications) or the Linux kernel for example. And quite frankly, I stumble upon badly written Python way more often than C.
Re:A quick look at the Redis source code
by spullara on Tuesday October 15, 2013 @12:26PM
(#6554262)
The code for those might be great, but Redis is beautiful inside and outside. I'm not a fan of the actual output of the GNOME stack. I agree the Linux kernel code is generally great to read and to use.
"And quite frankly, I stumble upon badly written Python way more often than C."
I'm curious, which public codebases would you consider to be examples of well written Python?
Re:A quick look at the Redis source code
by matthiasv on Tuesday October 15, 2013 @05:05PM
(#6556333)
The often cited requests library, flask and Django. Some counter examples are high profile projects such as IPython and Matplotlib.
Thanks. I'll spend some time with Requests over the weekend. It looks like the person who maintains that library is also behind this http://docs.python-guide.org/en/latest/#writing-great-code
IMO, OpenBSD and tarsnap are other notable samples of clean C code.