Archive for June, 2006

Critical thinking on state of open source software

June 30th, 2006

Keith over at dotnetpimps (see trackback) has written a decent piece on the state of open source software and what it has and what it doesn’t. Really not anything that hasn’t been said before, but nicely summed up.

I’ve had discussions with mark on this topic over years (and with keith occasionally) and Mark’s take (which keith hit too) is that many open source projects lack management. Keith says ‘specs’ which is partly true, but not necessarily the root cause in all cases. I’ll post here some sketchy thoughts on this… and will probably touch on this later again :)

Heh… he actually hits a few nails on the head. I think more the point is that it’s not specifically that they lack a spec. Well, that’s part of it, but it’s a symptom, not the root, I think. The root is there’s not enough of a unified need in the community. The pain of not having easy shared calendars isn’t high enough for people to write something. To the extent that things are written, the pain of them not being interoperable isn’t high enough to do anything about it.

The pain of having potentially having different web browsers to talk to different web servers was enough to coalesce people around the idea of embracing commong HTTP specs.

For example, If the google calendar proves extensible enough, there will be migration to using that as a standard to build other interfaces around. However, the need for most people to have ‘shared calendars’ isn’t that high outside of businesses. And because something’s already written/existing in many businesses (exchange/outlook) the water of software development efforts flows downhill to other cracks in the people’s needs. Does that make sense?

I saw one other thing Keith posted which is correct, but yet wrong (or too narrow)…

I’ve said this over and over again when I taught Linux certification classes at the college level.

“The open source community is great at building things based on a protocol or an RFC.  If you don’t give them a spec, you never know what you’ll get.”

That’s a bold statement I know, but allow me to give a few samples.  The main reason this occurs is the developers don’t have to think about what they are building.
Replace “open source community” with “software developers” and you’re correct.  Name me one set of software developers in the non “open source” arena which have developed great projects/products without a spec.  Not sure you can do it.
At the heart of this whole idea is that ‘open source’ is essentially just a process or philosophy behind building software.  The primary tenents are that the software development should be open for review, possibly collaborative, open to contributions, and some other related concepts.  There’s nothing in ‘open source’ development which precludes developing project requirements, gathering user feedback, addressing specific business needs, etc.  It’s just that the overwhelming majority of ‘open source’ projects are done at a very small scale – tens of thousands of small one-off projects on sourceforge, for example, attest to that fact.  As mentioned, MySQL and Apple are two examples of companies harnessing the positive aspects of open source – transparency, bug reporting, testing, user contributions (whether code or feedback/ideas), increased user base due to lower costs (in mysql’s case anyway!), and combining those positive effects with specific business requirements into a full business model.
There’s no need to be so harsh specifically on ‘open source’.  Plenty of ‘closed source’ software companies have failed and will continue to do so for years to come, because the failure has little to do with open v closed and how well you can )or can’t!) run a business (and Keith knows I know this first hand!)

New word

June 29th, 2006

“aproposnent”  n.  someone who supports what seems to be the most pertinent idea or thing.

New antipattern? “Multi Master Data”

June 29th, 2006

I was discussing things with my brother the other day and I came up with a problem which he helped name.  I’m currently maintaining some code, and it’s quite a jumble.  One of the things I can tell is that one of my predecessors began adding new sections of code to clean up the logic in other areas of the code.  However, what never happened was the clean up of the old code, so now there’s two places where the same set of data is retrieved in different ways.
For example, to display a list of available categories for an item, there are chunks of code splattered around which all run an SQL query to pull from a table.  The data doesn’t change all that often, but it was all originally in that table.  The ‘cleaned up’ version returns an array which is hardcoded into a PHP file.  Because the data doesn’t change much, that’s not necessarily a *bad* way to do it either.  The problem comes in that *new* code uses the static array, but the old SQL calls are still scattered around.  Effectively there are two sources for this list of categories – an array from a file, and a list in a db table.  We have two ‘masters’ for this information now.

This came to light when I got a ticket complaining that the ‘update’ screen for an item had different values than the ‘create’ screen.  Sure enough, this problem showed its head (again – I’ve seen it before with this code and with previous projects I’ve taken over).

Does this qualify as an antipattern?  :)

New antipattern? “Multi Master Data”

June 29th, 2006

I was discussing things with my brother the other day and I came up with a problem which he helped name.  I’m currently maintaining some code, and it’s quite a jumble.  One of the things I can tell is that one of my predecessors began adding new sections of code to clean up the logic in other areas of the code.  However, what never happened was the clean up of the old code, so now there’s two places where the same set of data is retrieved in different ways.
For example, to display a list of available categories for an item, there are chunks of code splattered around which all run an SQL query to pull from a table.  The data doesn’t change all that often, but it was all originally in that table.  The ‘cleaned up’ version returns an array which is hardcoded into a PHP file.  Because the data doesn’t change much, that’s not necessarily a *bad* way to do it either.  The problem comes in that *new* code uses the static array, but the old SQL calls are still scattered around.  Effectively there are two sources for this list of categories – an array from a file, and a list in a db table.  We have two ‘masters’ for this information now.

This came to light when I got a ticket complaining that the ‘update’ screen for an item had different values than the ‘create’ screen.  Sure enough, this problem showed its head (again – I’ve seen it before with this code and with previous projects I’ve taken over).

Does this qualify as an antipattern?  :)

mysql replace into bug…

June 22nd, 2006

My friend Joe Stump ran into a problem today with MySQL’s REPLACE INTO functionality.  REPLACE INTO does a full-on DELETE of the record, then a new INSERT.  When you have triggers that do things based on DELETEing, the REPLACE INTO trips the DELETE triggers, which caused unintended consequences.

I first got excited when I heard about “ON DUPLICATE KEY UPDATE” functionality in MySQL, but realized that it’s just a way of letting you type in a full UPDATE command.  I realize there might be situations where you’d want a different UPDATE statement than the values in an INSERT statement, but it would be really useful if you could write something like

INSERT INTO foo (id,name,email) values (4,’mike’,'mgkimsal@gmail.com’) ON DUPLICATE KEY UPDATE;

and have MySQL replicate mSQL’s old ‘INSERT OR UPDATE’ functionality.

mysql replace into bug…

June 22nd, 2006

My friend Joe Stump ran into a problem today with MySQL’s REPLACE INTO functionality.  REPLACE INTO does a full-on DELETE of the record, then a new INSERT.  When you have triggers that do things based on DELETEing, the REPLACE INTO trips the DELETE triggers, which caused unintended consequences.

I first got excited when I heard about “ON DUPLICATE KEY UPDATE” functionality in MySQL, but realized that it’s just a way of letting you type in a full UPDATE command.  I realize there might be situations where you’d want a different UPDATE statement than the values in an INSERT statement, but it would be really useful if you could write something like

INSERT INTO foo (id,name,email) values (4,’mike’,'mgkimsal@gmail.com’) ON DUPLICATE KEY UPDATE;

and have MySQL replicate mSQL’s old ‘INSERT OR UPDATE’ functionality.

namesbot – aimbot domain name checker

June 21st, 2006

I’ve been wanting to do an aimbot for years. I haven’t done one since around 2001 or so, and all I remember is I kept getting kicked off the network. Perhaps I will get kicked off again! If so, I think yahoo is better about opening up their network these days…

Anyway, if you have AIM, hit the ‘namesbot’ handle to check a domain name availability. Use ‘check domainname.tld’ as the syntax. Right now it’s not fancy – just a yes/no response. If a domain is available, there’s a link to a registrar where I’ll get a small referral fee. Please register through them if you’d like to support this proof-of-concept project. Feedback is appreciated. :)

PHP 4 vs 5

June 21st, 2006

Gary over at thephpgrind.net posted about slow PHP5 adoption.  I posted a couple thoughts on why PHP5 hasn’t been adopted as quickly as people would like, but forgot another reason: concurrency.

When going from PHP3->PHP4, it was possible to run both mod_php3 and mod_php4 in Apache at the same time – .php3 files would be run under PHP3, and .php files could run under PHP4.  You can not do this with PHP5, which I think has been another reason why people have been slow to adopt it.  You can’t upgrade at your own pace – your entire app has to be upgraded at one time.  Control panel providers like Plesk and Ensim would quickly provide PHP4 and 5 simultaneous running, which would allow millions more to upgrade and plan a migration, but it’s simply technically not possible.  This is a huge hindrance, and will continue to be until someone comes up with a way to run both at the same time (both as modules, not a modphp/cgi mix).

OS X Tab Preview extension broken? HELP!

June 18th, 2006

I can’t believe I’m the only person experiencing this, but I haven’t found *any* mention of it in the 20 billion + documents google has indexed.

As I wrote earlier, my wife recently got a new Mac – (NOTE – IT’S AN INTEL MAC!!!) – we’re now running OS X 10.4.6. We’re using the latest Firefox (1.5.0.4 I believe), and the “tab preview” extension is hosed. Well, given that it’s using an internal Firefox ‘canvas’ system (I think), it might be that there’s a larger Firefox issue going on. OR, it could just be that our system is configured wrong, but there’s not a whole lot of configuration that’s gone on in the last week (except for networking – that’s another post for another time).

Take a look below and tell me if that’s ‘normal’ for Firefox on the latest macs. All ‘tab preview’ tabs come up in almost 100% shades of blue. I’ve uninstalled and reinstalled both Firefox and the extensions, together and separately with no luck.

Hosed up tab preview firefox os x picture

Is he Chinese?

June 15th, 2006

I’ve had more than a passing interest in foreign languages over the years. I took the requisite Spanish in high school (4 years), including a summer abroad in Spain (hola la familia espinosa!). While I was never fluent in Spanish, I could passably read basic texts (newspapers, etc) and function overseas as a tourist :) . I was confident in my skills and interest enough to take 2 (or 3?) years of Spanish in college, but I realized I was simply not that good/interested to be that diligent about the study part.

I thought perhaps it was Spanish that was difficult, so I tried my hand at Japanese – 1 year in college – and that was worse. The different writing system and language made it doubly hard to get ahead. I can successfully say ‘hello’, ‘goodbye’, ‘thank you’, ‘please’, and a few other basics, as I can in Spanish.

I was inspired to begin trying my hand at Chinese, at least to understand that basics, by my brother Mark. He’s simply amazing with languages, having taught himself both Chinese (mandarin) and Japanese. He’s been to Japan, and can speak fluently with native born Chinese. He’s also great with computer languages – java/c/python/php/etc. Just has a knack for languages, I guess.

Another brother Matt (no link) recently surprised me by going to Russia, and apparently he’s studied Russian for awhile. And he’s decent with Spanish as well. So everyone in the family seems to know and be more fluent in multiple languages than me!

In the interest of trying to be able to be polite in multiple languages, I thought I’d at least learn hello/thankyou/please in as many languages as I can. I know I won’t have much chance to use them, but I did have a chance at the local Chinese Buffet restaurant the other day. I paid for my food and said ‘thank you’ in Chinese to the checkout girl. She looked a bit surprised that I did that, so I explained that my brother spoke Chinese and I was just learning a few words. She then asked me where my brother was from. “Detroit” I said. “Is he Chinese?” she asked me.

Now, while I understand that there are mixed race families, and that I or my brother could be half-brothers, adopted brothers, step-brothers or something else, I still found the question extremely out of left field. When I related this to Mark, he mentioned that many Chinese people (and Japanese) here in the States don’t really believe many native-born Americans can speak or really understand their language, and are a bit distrustful of non-Chinese (or non-Japanese) people who speak the language. Perhaps that’s an oversimplification, but no one has ever asked me if I or anyone in my family was Mexican simply because I could say “gracias” or “adios”.