News for hackers. Stuff that matters.
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.
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.
Re:A quick look at the Redis source code by avtar on Tuesday October 15, 2013 @02:29PM (#6555316)
"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.
Re:A quick look at the Redis source code by avtar on Wednesday October 16, 2013 @02:59AM (#6558392)
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
Re:A quick look at the Redis source code by 16s on Tuesday October 15, 2013 @01:07PM (#6554616)
IMO, OpenBSD and tarsnap are other notable samples of clean C code.
Re:A quick look at the Redis source code by maurycy on Tuesday October 15, 2013 @01:28PM (#6554779)
I'd also mention FreeBSD kernel and Niels Provos' code.