Saturday, December 23, 2006

Skunk Projects..

"Significant progress doesn't come from the formal planning process of an American corporation. It comes from a couple of guys doing something that hasn't been set down on a list."

– William McGowan, executive

Sunday, December 17, 2006

Careful with case insensitive searches

I was looking at optimizing a slow login script and narrowed it down to the following slow query:

% select p.party_id from parties p where email ilike ''

ilike does a case insensitive match on the email column.
Although email is indexed, the case insensitive version is not so
the database therefore has to look at the whole table to
narrow down the possible match.

Next step is to add a funcational index:

% create index parties_lower_email on parties (lower(email));

The query was still slow. (the postgres documentation alluded that ilike would
use the functional index, but when I asked for the query explanation, it didnt').

% explain
% select p.party_id from parties p where email ilike '' QUERY PLAN ------------------------------------------------------------
Seq Scan on parties p (cost=0.00..20766.76 rows=1 width=29)

Filter: ((email)::text ~~* ''::text)
(2 rows)

Postgres (7.4) was still doing a sequential scan (10 seconds)

The query became lightning fast when I queried on lower(email) directly:

% select p.party_id from parties p where lower(email) like ' '

And the explain plan showed it was now using the index.

% explain
% select p.party_id from parties p where lower(email) like ''
QUERY PLAN --------------------------------------------------------------------------------------
Index Scan using parties_lower_email on parties p (cost=0.00..232.62 rows=58 width=29)
Index Cond: (lower((email)::text) = ' '::text)
Filter: (lower((email)::text) ~~ '

2 lessons:
a) If you are restraining by some variation of a column, make sure you have a functional index
b) Make sure it is used

Thursday, November 30, 2006

What is Web 2.0?

O'Reilly's What is Web 2.0?
The Leading Web 2.0 Explanations
The State of Web 2.0
Visualizing Web 2.0
Web 2.0 Is Here
Wikipedia Entry for Web 2.0

Beyond 2.0

The image “” cannot be displayed, because it contains errors.

Source: Dion Hinchcliffe

Birmingham To Buy More, Not Less Open Source

Slashdot "Last week, the press ( and Slashdot) reported that Birmingham City Council had decided to ditch its open source project because a report said its trial had cost £100,000 more than it would have cost to buy Windows. However, Techworld has discovered that the opposite is true, and the Council is actually planning to use more open source software as well as to roll out Linux in the next few years. The head of IT was interviewed and he gives a fascinating rundown of the problems he had getting open source working with his systems. More interestingly, he points out that now the trial is over and he and his staff have the technical skills, they expect to save lots of money in future by going open source. Oh, and the report's figures were based on the special rates that Microsoft gives Councils just to make sure the short-term budget look worse — £58 for a Windows license as opposed to the normal £100."

Saturday, November 25, 2006

Scholarship Available for Web Applications Design Training

ACSPropel is offering one scholarship for training on their web application design framework. Apply here.

Friday, November 24, 2006

One is bound to be good...

"The best way to have a good idea is to have lots of ideas."

– Linus Pauling, chemist

Monday, November 20, 2006

Pretty Good Privacy

PGP (short for Pretty Good Privacy) is a public key encryption program originally written by Phil Zimmermann in 1991. Over the past few years, PGP has got thousands of adherent supporters all over the globe and has become a de-facto standard for encryption of email on the Internet.
Another RSS reader I heard some good things about today. This one integrates blogs and podcasts into Outlook.

attensa button

Sunday, November 19, 2006


IFRAME - a remarkable way to the content of one site inside a
page on another site:

Saturday, November 18, 2006

OpenACS Virtual Training Dates

A virtual (webinar) OpenACS training is starting right after Thanksgiving. More information here.

Webinars are lecture format (topics are described in the syllabus). Homework exercises will be assigned. The Chats are for general questions and answers (homework, personal projects, etc; the table is open)

Mon (Nov 27) - Webinar 1
Tues (Nov 28)- Webinar 2/Chat 1
Wed (Nov 29) - Webinar 3/Chat 2
Thurs (Nov 30) - Webinar 4/Chat 3

Mon (Dec 4) - Webinar 5/Chat 4
Tues (Dec 5) - Webinar 6/Chat 5
Wed (Dec 6) - Webinar 7/Chat 6
Thurs (Dec 7) - Webinar 8/Chat 7

Mon (Dec 11) - Webinar 9/Chat 8
Tues (Dec 12) -Webinar 10/Chat 9
Wed (Dec 13) - Chat 10

Friday, November 17, 2006

Selenium is a Disruptor

This video will show you Selenium in action and also ACSPropel's methodology for managing test suites.

Selenium is a test tool for web applications. Selenium tests run directly in a browser, just as real users do. And they run in Internet Explorer, Mozilla and Firefox on Windows, Linux, and Macintosh. No other test tool covers such a wide array of platforms.

It used to be that we didn't even do browser-based functional testing.... the tools were way to flakey and cumbersome. Selenium is a jump ahead.

He's missing the point

"Thailand's newly appointed Information and Communications Technology Minister has slammed open source software as useless and full of bugs: "With open source, there is no intellectual property. Anyone can use it and all your ideas become public domain. If nobody can make money from it, there will be no development and open source software quickly becomes outdated... As a programmer, if I can write good code, why should I give it away? Thailand can do good source code without open source." This marks a sharp u-turn in policy from that of the previous government."

The Thai IT Minister is missing the point.... open source is all about CONTROL.