Hello to the very few of you who take the time to read this. I have been on holiday recently and have come back to a full workload. The PHP vs. Rails thing has ground to a halt, not only because of all the stuff that happened (World Cup, holidays, work, other things), but also because I’m writing a lightweight framework based on XML/XSL that will assist me in my endeavour. I’m trying to cut down the amount of code I need in order to produce simple apps without compromising flexibility. This may be construed as “cheating” but:

  1. Rails is a framework and just because I initially tried to compare apples and oranges, doesn’t mean I can’t correct myself and
  2. I don’t care. This is my contest.

I knew getting into this that I would be building off some kind of framework. I initially wanted to use the simple framework we’ve been using at Netymology but got tired of repeating code all the time and decided to rewrite parts of it.

When it’s done I’ll post the framework here for download so that everyone can benefit from my buggy code.

No updates for a while, mostly because:

  1. The World Cup is on (Soccer for those who don’t know what it is)
  2. I’ve been reading the (rather morbid and deranged) “Why’s (Poignant) Guide to Ruby

Ruby is interesting. I like the way every variable is an object and every function is a method. It’s one of the things I like about Javascript. It has some neat shortcuts that programming puritans would probably scoff at (Such as the range ‘..’ operator and the rather puzzling ‘…’ which seems to include all the numbers in the range except the last one). There’s also the handling of regular expressions which is very similar to Perl’s (and come to think of it almost identical to Javascript’s).

It seems very easy to learn. If anything, my progress seems to have been hindered by Why’s very strange story-telling and I think I should start looking for another tutorial even though this one seem to have a weird “I shouldn’t look but can’t turn away thing going”.

In conclusion: Ruby looks promising but I’m not quite ready to hang up my PHP hat just yet. PHP has a lot going for it and is closer to Perl than anything I know. But Ruby does look promising.

Well, it’s been a couple of hours and I can say that Rails is starting to look promising for simple web apps. It’s very easy to create accessors for basic CRUD functionality. Also, although I don’t understand the syntax just yet it seems like there’s built-in functionality for most common web application stuff, like putting in notices for things like “Record updated successfully” on whatever page you load which can come in really handy (Especially if you can overload that functionality to use something like ProtoGrowl to display it). We’ll see what happens when I start implementing something more complex.

To be continued…

Today is the start of my own subjective experiment.

I’m a Perl (note: it’s not PERL) coder. I recently (some time last year) switched exclusively to PHP. PHP is great because it’s got all sorts of useful stuff built right into the language (like MySQL functionality) and it was built specifically for the web.

I have mixed feelings about Rails, mostly because of all the advocacy in the form of “it makes your development 10x faster. No - really!”. I dabbled briefly with Rails and found it a bit stiff in terms of customization of code. It seemed to be a bit too abstracted from the db for my taste, but then again, it was a VERY brief encounter and I have since read things that seem to refute my initial evaluation.

So… back to the experiment. Today I start a personal project that I will be coding in both Object-oriented PHP with a homebrew XSLT templating system *and* in Ruby on Rails. I will try to assign equal amounts of time to both and see how things go. I will try to post updates regularly and keep everyone posted (all two of you) about my progress.

Here are the ground rules:

* Both systems will be fully OO, with optimizations where possible/necessary.
* Both systems will pull data off the same database. The database structure will be the first thing built (today)
* Both systems will implement _exactly_ the same functionality
* Both systems will have as identical an interface as possible
* I will not disclose what the system is or what it does. I won’t demo it - until it’s done.

Here’s a scenario:

Person: I’ve got a great idea. I want to make a system that people will use to manage their internal computer assets really simply. There would be a database of hardware and people could just point the web browser on every PC in the company to a site to record what hardware that PC has. And we keep it really simple and can then make offers on related hardware or anything that’s missing that they may need.

Developer: That sounds great! We should do make it so that it’s really simple though. We would need to have a REALLY big hardware list though, which will be a problem. Also, the suggestion thing will be a real problem without having a Googleplex (data mining is very processor intensive) and we just don’t have the manpower to do the Java client to do the embedded app to detect the hardware.

Person: (Completely disillusioned) Ah ok… Well I wasn’t saying we need to do it right now, but it would be cool to do.

Developer: Don’t get me wrong, we can do it but it will take a long time.

Person: (Cautiously happy) Ok then, let’s do it!

Six months pass. While our developer above is still deep in Alpha release cycles, some startup comes up with exactly the same idea implemented in a really simple way and makes it big. The app doesn’t, say, have a massive hardware database, but users can add their own stuff in there which as it turns out suits them fine because they prefer calling it a “Maxtor 200GB HDD” instead of a “MAXTOR L01P200″. The app is free for schools which accelerates early adoption and gives good publicity. The Java detection app is done in partnership with a company that already does that. The whole thing was coded by a couple of guys in 3 weeks and doesn’t have half the functionality, but it works - now. And they’ll have lots of time to implement all those other features once that revenue starts coming in and they can outsource or hire more developers.

This is the cautionary tale of Idea Rot, the disease that kills too many good ideas to count.

It always starts out as a good, simple idea, but somewhere along the line it becomes the app to cure all corporate ills. All sorts of bells and whistles have been added to it, the system now integrates a scheduling system to remind admins to check their older hard drives, it also for some reason integrates a contact book to have all the suppliers’ numbers on hand and has a built-in warranty expiry tracker. The focus behind it becomes “We need to implement everything and get it perfect straight from the get-go”. The simple idea at the beginning is lost and has become a shadow of its former self. Simplicity was at the base. Simplicity was the key.

I’m guilty of having been a catalyst for Idea Rot. I find roadblocks when they are really easy to bypass and end up contributing to the decay of the original plan. Complexity always gets the better of me - maybe because I’m a coder and I find it more challenging to work on complicated things.

Well it ends now. From this day forth I vow not to participate in this practice and to point out to others when they are doing it. It will be hard. I don’t expect something I’ve been doing for 10 years to just disappear overnight, but I will try my damned best to quit.

The following is based on my experience installing our new replicated web platform in a London hosting facility. My driving companion for this trip was Andy (Thanks Andy).

(more…)



Trogdor burninating.

Originally uploaded by Tomatobrain.

It seems that Trogdor has been hired by Apple to showcase their latest Intel IMac. Check out his modelling debut on the IMac Graphics Specifications page!


The Honeybee

Originally uploaded by Tomatobrain.

Today I got this wonderful gift from my wife. This model helicopter looks GREAT! Although I didn’t get it off the ground yet (something wrong with the motors, I think it’s a wiring problem), I’m really looking forward to lifting it up a few centimeters off the ground (at first) and learning how to fly this baby!

Happy Holidays everyone!
Update: Turns out I didn’t read the manual properly. Rotors spin fine now, and it’s really scary when it goes out of control. First day I “flew” it at the office I nearly took out George’s PC.

As posted on Slashdot Futurama may be coming back!

I love this show, and every time I watch an episode again I find something I previously missed. Subtle geek jokes (”Are you gonna shrink us? - Of course not! that would require tiny atoms! Do you know how much those cost?”), 80s and video game references (”Space. It seems to go on and on forever. But then you get to the end and a gorilla starts throwing barrels at you.”) make this one of the most enjoyable shows I’ve ever watched.

Oh, and in case you didn’t know, a direct-to-video Futurama movie is coming out :)

As a follow-up to my previous post, I thought I’d get some ideas together in what a development framework should contain, and why. Here it goes:

- Database abstraction
A given for most newer development frameworks. Ideally, it should represent database queries with classes, thereby allowing multiple tables to be used seamlessly on interchangeable RDBMS.

- High level classes
To represent very commonly used objects, such as Users, Calendars, Permissions, Emails, etc. Eventually there could be dozens of classes to represent all sorts of stuff.

- XML/XSL
Every class must have a toXML method to allow direct piping to an XSLT. This will allow XSL to be used globally as a templating system.

- Development/Production environments
Ideally an arbitrary number of environments should be allowed. Parameters for each environment should include database mappings for the abstaction layer, caching toggles and paths.

That’s pretty much all I can think of right now, although I’m sure I missed out something big. I’ll post an update when I think of more stuff to put into it, but in the meantime, any comments will be appreciated.

Next Page »