Alvaro Lopez Ortega    
Archives
« November 2009
MonTueWedThuFriSatSun
      
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
      
Today
XML
Search

Links
 

Today's Page Hits: 339

« Win32 compilation... | Main | MySQL asynchronous... »
20080816 Saturday August 16, 2008
Grover on clean code

Yesterday I spent some time testing an idea on Cherokee and MySQL integration. It is actually quite unusual - do not think of the bleeding edge "I want to store my virtual servers list in a MySQL table". However, quite sadly, it did not success at first try because of a couple of API problems. (I will try a different approach today, though.)

Anyway! There was something quite scary that I wanted to write about. When I was reading the MySQL source code trying to find out how to reuse a connected socket (opened from outside the MySQL client library), I saw something scaring. Have you guys read the cli_mysql_real_connect() function? It is definitely worth reading. Geez, what a mess!!

So, allow me play Grover here of a second! Kids, if you want to learn to write good code, go and read clean sources like SSH or Cherokee; do not ever read pieces of code like the function I pointed before - even if, as a matter of fact, works alright. :-)


Aug 16 2008, 09:58:06 AM GMT+00:00 Permalink

Comments:

Post a Comment:

Comments are closed for this entry.