Categories: "Full Stack Dev & Design"

Development is an art!

There are two approaches to development.

Some regard it as a science and try to bend every development into a process called "Software Engineering".

Others regard it as an art, also known as "coding". :P

Unfortunately, the former idea is the most widely accepted. :| However, I can remember one of my professors at UPenn agreeing with me in these terms: "I do believe it is an art but... we're trying to make it look like science here" :)

Now, the good news: the art approach seems to be getting some consideration lately. Check out this post by Simon Willison [Link dead] ;)

XML vs. Relational Databases

Lately, I've seen quite a few people claiming XML to be the definitive way to store data, because it's supposed to be the most flexible format...

Others claim RDBMSes have been providing an efficient solution to data storage for years or decades and there was no need for something new.

This argument just doesn't make sense! XML and RDBMSes are two different solutions, both efficient... but solving two different problems!

Think about it. One tries to structure documents. The other one tries to structure relational but basicly tabular data.

Asking which of XML or an RDBMS is best, is like asking which of Word or Excel is best! :!: Best for what? :?:

I guess the whole confusion started when people started to use XML to exchange tabular data in the context of webservices. Don't get fooled: tabular data can temporatily be converted to a document (XML) when it must be transfered or exchanged, but there is still no reason to store it that way at one end or the other of that transmission...

IE 6 not refreshing

Just stumbled upon yet another funky IE6 "bug" (if I may say so...

When you want to automatically refresh to another page, you send a header that looks something like:

Refresh:0;url=http://blah.blah.blah

The funky thing is that if that header exceeds the maximum size of 263 characters, IE won't do the refresh!

Okay there's got to be a limit, but why so low? And why "263" ??

No need to say, auto refreshes work fine in Firebird with headers much longer than that.

I guess this is why you still need to put some dirty message underneath like 'if nothing happens, please click here! :/

PS: Please don't tell me to use a Location: instead. This would make it impossible to set cookies.

Successful Regular Expressions

Via John Lim: Tony Stubblebine has a nice article teaching Five Habits for Successful Regular Expressions [dead links]:

What? You can put comments into regexps? Why hasn't anybody said so before? :?: Worse: why isn't anybody actually doing it???

Hum... and these extremely useful lazy quantifiers... how could they have slipped out of my mind?

Internationalizing web applications using gettext in PHP

As I have said before, gettext is a very interesting framework for i18n and i10n.

Now the question is, how do I apply this to web applications? Actually, I'm going to restrict my discussion here to PHP since this is what I'm working with right now... but you should expect similar behaviour when using other web development tools that integrate gettext.

First of all, the good news: PHP fully supports gettext since version 3.0.7. So it's been used for a long time and you can even find tutorials on the net.

PHP/Gettext in action

Read more »