Archive for the ‘Technology’ Category

Preload to make Linux faster

Wednesday, February 27th, 2008

If you’re running Linux you’ll be aware that it’s crazyfastâ„¢ already. Want even more speed? Get Preload. If you’re running Ubuntu you can get it by opening your console and typing sudo apt-get install preload.

The Problems With MVC Frameworks

Wednesday, October 3rd, 2007

After experimenting with CakePHP, Zend, Ruby on Rails, Django, Turbogears, Pylons and DotNetNuke I have given up on lumbering MVC frameworks. The kind of work I do is either too small or too specialised and using a MVC framework is either massive overkill or I have to spend days trying to hack the code to join a database table in just the way I want it or connect to a webservice.

This kind of sweeping statement is not going to earn me a lot of friends. The people who are into these frameworks are devout to say the least.

Probably my biggest gripe is that the whole idea of a MVC framework is to have separation of Model, View and Controller but if you ever build a site using one of these frameworks and attempt to uncouple these components you’ll quickly see that the touted separation is not all it’s cracked up to be.

The idea of having a templating language is inspiring but the fact that there is no defined standard for templating means that Smarty only works with PHP, Kid only works with Python and so on. I take it back; XSLT is a standard but it’s got to be the ugliest, most convoluted language out there.

Defining your model is exciting when you’re starting a Hello World project from scratch but can be pretty tiring when you’ve had to make it fit an existing database that doesn’t conform to the pluralised, *_id-ised requirements of your particular framework. And on top of that you have to relearn your particular framework’s substitutions for the SQL you’ve already had to learn. “DRY” anyone?

Don’t get me wrong, the MVC way of working makes a lot of sense. I use mod_rewrite call a Controller file which in turn feeds data from my Model class to my View class. But I don’t make my Model speak anything other than SQL if I’m accessing a MySQL database and I use <?php ?> blocks in my templates if I’ve chosen PHP as my language du jour. Why learn two additional, less powerful languages?

I agree that there are many situations where you would be better off developing a large website using a traditional MVC framework but I would be under any illusion that it’ll be any more flexible a year down the track.

For me, redemption would come in the form of a standardised templating language and a standardised set of classes for models that easily integrate into existing databases as well as being able to generate new ones.

If you’re creating a small or a fiddly website then I would advise you separate your data from your logic from your presentation but steer clear of the lumbering behemoths that occupy the MVC space at the moment.

Windows Vista Popup

Tuesday, September 18th, 2007

User Account Control

Free Energy

Monday, September 10th, 2007

After a recent conversation with a friend who has been quite taken by a couple of the many water-powered car / free energy concepts I decided to research the topics properly.

Common traits amongst people who make free energy claims are:

  • There is a grand conspiracy – the CIA has been making people ‘disappear’ or some such
  • Scientists are too set in their ways to accept revolutionary ideas
  • Big industry is suppressing the technologies

Something else all of the free energy people have in common is that they are not willing to release their discoveries to the general public for verification.

Here’s my advice to any would-be free energy proponent: Make your discovery public.

It’s that simple. If you reveal your secrets all your problems with the CIA will go away, scientists will be put to shame for being so hard-headed and the big petro-chemical corporations will be brought to their knees.

You’ll win eternal fame. Your name will be held in higher esteem than Isaac Newton or Albert Einstein. You will change the planet (for the good) for all time.

I guess what I’m saying here is “Put up or shut up”.

9 Months of Ubuntu

Monday, August 27th, 2007

Nine months ago I downloaded the Live CD of Ubuntu 6.06 (aka Dapper Drake), burnt it to a CD, popped it into my CD drive, rebooted my PC and had my first experience with Linux.

My background is in graphic design. Originally in print but in the last seven years it’s been mostly new media and in the last two years I’ve moved almost exclusively to web development. I’d spent a little over a year working heavily in Visual Studio developing web applications and used Macromedia (now Adobe) Studio 8 Suite (especially Fireworks, Dreamweaver and Flash) for all things graphical.

I’ve always preferred Fireworks over Photoshop for web graphics. I like the ability to work with vectors and the amount of control you get for rendering them as images. I know plenty of other designers who love to use Photoshop for web graphics though and they seem to get on just fine with it.

For the times that I’d occasionally take on a bit of print work I’d use either Freehand or CorelDraw. Yes, yes, I realise that Corel doesn’t hold much esteem in the print design community but in my opinion it’s the best all-rounder for the PC. In my Mac days I used Quark and then later InDesign with Illustrator and Photoshop and while they’re a brilliant groups of products they’re not all they’re cracked up to be.

I became a registered Microsoft Partner a couple of years ago and benefited from the plethora of CDs with just about every Microsoft application. I used Project, Office, Visio, InfoPath, OneNote and Visual Studio on both XP and Vista. I also ran Virtual PC with various configurations of Windows Server 2003 and SQL Server.

I think what initially annoyed me about Microsoft was that I began to get into developing standards-based websites (X/HTML + CSS) and grew increasingly frustrated with Internet Explorer’s (and Visual Studio’s) blatant disregard for standards. If you’ve ever developed a website using standards-based CSS you’ll know exactly what I mean. This frustration pushed me towards the concepts of open source and before I knew it I had gone from being a strong Microsoft advocate to a rabid hater. And that was even before I discovered Slashdot!

So, back to Ubuntu.

After trying the Live CD (which I contend has got to be one of the greatest selling points – it embodies the open source ethic perfectly, you can give it a go and it won’t go messing up your entire system) I decided to install it onto a spare drive I had lying around. It was a rather steep learning curve and I came close to throwing the towel in on a number of occasions. I’ve worked with dual screens for years and there was no way I was going to even consider doing any productive work without them. I’ve got an ATI dual head card and had to quickly learn my way around gedit and vim with the xorg.conf file whilst looking for technical support on the web via my intact laptop.

On a positive note, I loved the way you could quickly download free software via the simple Add/Remove button on the menu and felt quite special when I learned to use the terminal and sudo apt-get install. I was generally impressed with the quality of much of the free software available but many of them weren’t quite as good as the applications I’d been using in Windows.

I trialled – and subsequentially purchased – VMware Workstation which I then built a nice, clean install of XP (is that an oxymoron?) plus all my favourite applications on. At least this felt safe. I could go back to the ‘old familiars’ any time I wanted and do away with my anti virus applications at the same time (that’s the beauty of snapshots!).

At first I tried to use gedit for hand-coding all my ASP.NET applications and continued to run and test them on an instance of Windows Server but after the unadulterated beauty that is Visual Studio’s Intellisense (I’m not kidding) this seemed a huge step backwards. I had had a little experience with Python and so tried a couple of frameworks like TurboGears, Django and Pylons using the excellent Wingware IDE but couldn’t find a reliable hosting company and lacked the knowledge to set up my own Python+Apache-based server. I then tried PHP and found that it was far better supported by the hosting companies. It’s an ugly, ugly language but it’s widely used and there are a ton of PHP-based apps out there. My first website in PHP was pretty horrid but it’s been reworked a couple of times now and I’m using Smarty templates and a nice MySQL class along with URL rewriting (which is a pain to get working in .NET if you’ve ever tried). Recently I’ve started using Eclipse rather than gedit for my PHP website too. Oh, and I’ve also used Texy for the family forum.

So, where am I at with Ubuntu these days? I’ve rebuilt my PC once and upgraded twice. I’ve overwritten my old XP hard drive and am using it as my work drive along with a separate partition for my home directory. I’m now only occasionally starting up my VMware instance of XP to use Macromedia Flash or Firework and I have an instance with all the versions of browsers for testing my websites. I’m occasionally using the Gimp in lieu of Photoshop but it’s still got a long way to go. I recently discovered Inkscape and used it to design a logo for a fairly substantial customer – it’s a very nice application and I look forward to the day it’s able to handle print-quality tasks and perhaps even the vector-to-bitmap tasks that I love so much in Fireworks.

I’m happy with Linux. I may try a different distribution when I’m a little more confident as well. My experience has been much better than I was anticipating but there are still a lot of areas that need improvement before I recommend it to anyone else who isn’t willing or able to edit configuration files.

One thing that I’ve noticed is that the Linux community is over-represented by bad logos and stupid application names (having a K on the front of every KDE app is lame and recursive acronyms will never, ever be cool). I guess that’s the price of freedom. There’s not the same pressure from the market to enforce the survival of the fittest in the open source community.

Long live open source and all the splendid mutations it spawns!

Spam Filtering in Evolution

Sunday, August 26th, 2007

This is regarding the email application for Linux called Evolution, not some ethereal take on natural selection.

After hours of searching the web I found how to get spam filtering working properly in Evolution. First, make sure that the Spamassassin plugin is unchecked and that the Bogofilter plugin is checked. Now make sure you have bogofilter installed – go to the terminal and type sudo apt-get install bogofilter. You may have to restart Evolution for the new settings to take effect.

Now here’s the trick: Bogofilter needs to know what you define as spam and what you define as ham (not spam). I suggest you make a new folder and fill it with both real messages and spam messages. Mark all the genuine emails as important. Now select the all and hit Ctrl-J or mark them as junk. It’ll move them all to the junk folder and will remember that this is what you think spam is. Now you need to go to your junk folder and select all the ones you’ve marked as important (the ham emails) and hit Ctrl-Shift-J or mark them as not junk. It’ll now move all the good ones back.

I realise it’s really counter-intuitive but it’s the only way I’ve found to get it working. I’m not sure whether it’s OK to turn the Spamassassin plugin back on. If anyone has anything to add please let me know.

2001 Mars Odyssey Launch Video

Friday, August 10th, 2007

Last week the Phoenix Mars Mission was launched and it’s out there somewhere right now travelling at 16,000 miles per hour and will reach Mars on May 25, 2008 where it will rummage around on the northern icy plains. This video is from the previous Odyssey launch in 2001.

When AJAX goes bad

Wednesday, July 18th, 2007

There’s a disturbing new trend in the wacky world of Ajax where it is used for faux-pop-up-images. Check out this and this and click on an image to see what I mean.

The net result that it takes a lot longer to show the image and it breaks the back button (click it and you end up on two steps back rather than one).

When I say it takes longer I mean a lot longer. In FireFox 2 on Ubuntu 7.04 it takes 9 seconds to load an image where it only takes < 1 second with Javascript disabled.

Now, I’ve used Ajax on plenty of sites and am the first to admit it has its uses but how could anyone think a 900% performance hit would be in any way justified?

A fine example of self indulgent technomasturbation.