* By “The Right Way”, I mean following the guidance and practices at the PHP: the Right Way website. I make no claims this is the “best” way 🙂

Works n my machine badgeMac OS X is a pretty good web developer OS. It comes as standard with PHP, Ruby and Apache all out of the box, and the underlying UNIX system makes it easy to add in other languages and components to suit your needs. On top of that, some of my favourite development tools are on the Mac, so unless I’m writing .NET code, nearly all my development is on an (ageing) Mac Mini.

Now, while all that stuff comes as standard on OS X, lately it seems Apple has made it harder to get to. The versions shipped with OS X also tend to be a little behind the latest releases. As a result, most Devs I know use something like MAMP to make the server-side of their environment as easy as running an app. Personally, while I think MAMP works, and is a good time-saver (and I’ve been using it for the last year or so), but I like to get into the nitty-gritty of the system and get things running “native”. So last night I fired up the terminal and got PHP set up on my Mac with the latest version, and following the Right Way Guidelines. As a result I have PHP 5.4, Composer, the PHP Coding Standards Fixer, and MySQL all setup quite slickly (i.e. to my preferences).

The whole process was pretty easy, but does involve the command line. If this makes you uncomfortable, then it might be best to skip the rest of this post.

This all worked on my Mac, but I make no guarantees about it working on yours, and I’m not responsible if you break something.

If you find any glaring problems with this guide then leave a comment/get in touch, and I’ll make any required edits.

Step 1: Setup Your PATH

Edit the hidden .bash_profile file in your home directory. If you use Sublime Text 2 you can use the following command:

subl ~/.bash_profile

TextMate has a similar mate command, or you can use vi(m)/nano/emacs/whatever.

It’s possible you already have a line defining your PATH variable. It’ll look something like export PATH=<something>. I’ve found it most useful to change the PATH so /usr/local/bin is at the start, making sure anything you install there is used over the system defaults in /bin. Add this as a line below your existing PATH definition (or just add it in, if you don’t have an existing line):

export PATH=/usr/local/bin:${PATH}

Step 2: Install Brew

Strictly speaking, Brew (aka Homebrew) isn’t required, but I used it to install MySQL later, and it does make it stupid easy to install stuff into OS X. I think you should install it. The best instructions are found on the Homebrew home page, so go have a read there. There are a few pre-requisites, but nothing too difficult.

Step 3: Install PHP-OSX

Now we’re beginning to get somewhere! PHP-OSX is the latest versions of PHP compiled for OSX by Liip. Installation is a real doddle, from the command line:

curl -s http://php-osx.liip.ch/install.sh | bash -s 5.4

Follow the prompts given, including entering your password. After a few moments everything will have installed. For convenience I created a symbolic link to the newly installed PHP binary in /usr/local/bin:

ln -s /usr/local/php5/bin/php /usr/local/bin/php

Step 4: Install Composer

Now we have PHP installed, it’s time to look at the nice-to-haves, like a good package/dependency manager. Composer is relatively new on the block, and allows others to download your code and automatically grab any dependencies by running a simple command.

You can install Composer in your project, or you can install it globally. I prefer globally. As with PHP, installation is simple, from the command line:

curl -s http://getcomposer.org/composer.phar -o /usr/local/bin/composer
chmod +x /usr/local/bin/composer

Step 5: Install PHP Coding Standards Fixer

Another nice-to-have, this little tool will try to find and fix parts of your code where it does not conform to one of the PHP Coding Style Guides. Installation is almost identical to Composer:

curl http://cs.sensiolabs.org/get/php-cs-fixer.phar -o /usr/local/bin/php-cs-fixer
chmod +x /usr/local/bin/php-cs-fixer

Step 6: Install MySQL

If you installed Brew in step 2, then you’re good to go with this little command:

brew install mysql

It’ll take a few minutes, but you shouldn’t need to intervene at all. Once done you will need to run two more command to setup the MySQL tables:

unset TMPDIR
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp

If you didn’t install Brew, then you will need to install MySQL through some other means, such as packages on the MySQL website. I can’t help you with that, I’m afraid.

For managing MySQL, I use the excellent Sequel Pro, which is a successor to the venerable CocoaSQL.

As a next step you should look into changing the root password of your MySQL setup. This is a local dev environment, and likely only used locally by yourself, but it’s the proper thing to do.

Errata

  • Pear doesn’t seem to work, which is slightly annoying, but (to me) no real biggie. I didn’t test this with the built-in version of PHP, so I don’t know whether it worked beforehand. I’ll post an update once I figure it out.
  • I’d like to make bash script smart enough to stop MySQL when the PHP web server stops, but my early attempts haven’t managed to get this working (most likely due to the Ctrl-C used to stop the web server also stopping the script).
  • Throughout this process we’re running scripts directly from the web. This is pretty risky behaviour, especially with unknown/untrusted sources. You should always take a look at the raw script before running it, so you don’t get hit by something malicious.

What do you do with all the ideas you come up with but for one reason or another are unable to follow through on? I’m thinking along the lines of those projects we all like to fill our time with – in my case it’s usually programming/computer related. It could be a lack of time, resource, or ability – it doesn’t matter; we all have ideas for projects which we think would be great but never take-off. Continue reading

I previously wrote about my search for the “promised land” of the electronic book. In that article I wrote about what I was looking for, why, and finished off looking at the top three contenders for my cash.

What I didn’t explicitly state (though I did allude to in the intro) was by the time of publication I had already ordered an eReader – the Amazon Kindle 2. As fate would have it, a couple of weeks later the new and improved version 3 came out, but we’ll skip over that bad bit of timing on my part.

Amazon Kindle eBook Reader

So, was it worth it? Are ebooks the future? Is the Kindle any good? Yes, yes, and yes. I can’t put it any clearer than that, really. I am not going to go into an in-depth review of features; that is something best left to others. I’m just going to give you my experience of using the Kindle these last three months. Continue reading

This entry has been in development for a couple of weeks. If you’ve been following my Twitter stream, you’ll probably know why it’s relevant I mention this. I have a follow-up entry in the works which will provide a better conclusion, but for now I think the bulk of the entry still stands.

I used to read. A lot. Not the bite-size, throw-away blogs and news you get on the internet; I read real, actual books made of paper, ink and glue. Sitting down with a good book is relaxing in a way sitting in front of a computer can never be. Continue reading

Thursday saw the public release of Windows 7, and as with any OS upgrade, it’s a chance for a fresh start, a chance to pair our software installs back to the minimum we need. It’s all with the good intention to keep our computer leaner and faster than before.

With this in mind I’ve been thinking about the software I use frequently; what I need, what I don’t, and what I can consolidate. I was quite inspired by Dan’s setup, with its focus on simplicity and “less”. From a developer standpoint I also referenced Scott Hanselman’s tools list, but not much of that makes it onto this list, which is more general.

Bare Essentials

I mean it when I say these are the very first things I install on any Windows PC:

  • 7-Zip: I’ve been a fan of 7-Zip for years now. It’s (in my mind) the best file archiver/unarchiver around. It supports nearly every format you can think of, it’ s free, and its own 7z compression format is the best around.
  • Firefox: Chrome nearly won out the browser war for my PC, thanks to its lean and fast nature, but Firefox beat it out by being so damn flexible. I won’t go into any detail on my Add-Ons just yet, as that’s subject enough for another post. Suffice to say, the browser is increasingly becoming the focal point of the computer, so having as much flexibility as possible is essential.
  • Cygwin: I love the command-line. There’s something about it that evokes all the wonder and mystery about computers I had when I was a kid. The standard Windows Command Prompt is under-powered, and Powershell has a steep learning curve, so for years I’ve relied on Cygwin to bring some Unixy goodness to Windows. For Windows 7, make sure to grab the 1.7 beta setup.
  • AVG Free: There are a lot of good, free, anti-virus packages around, that don’t have the bloat of the likes of McAfee or Norton. AVG hasn’t let me down yet, so it’s my personal choice.
  • Foxit PDF Reader: Faster and less resource intensive than Adobe’s Reader, Foxit is a fully featured, free alternative.

Staying Organised

I admit it – I’m bloody terrible at keeping myself organised. To try fix this I have a couple of tools in my arsenal.

  • Evernote: I have Evernote everywhere I go. Either through the desktop client, my iPhone, or through the web. I use it as a dumping ground for nearly any little snippet of information I think I might need later. One of my favourite tricks is to use the “Mail Tweet” function in Tweetie 2 to send interesting/useful tweets straight to Evernote via email.
  • App for the Milk: Like Evernote, Remember the Milk is a tool I (try) to use everywhere: through the web, on my iPhone, or on the desktop using my favourite (and newest) desktop client. App for the Milk is an Adobe Air application, which some people don’t like, but in my mind it’s no worse than needing the .NET framework for an application. If you don’t like Air, I can recommend the Windows port of Tasque.
  • Dropbox: If there’s any file I think I might need on another computer then it goes into Dropbox. I’m always losing pen-drives, but I can get Dropbox through either the synced folder or the web application. As an example, I keep my reference library of screen-casts and eBooks in Dropbox so I can access them from work or home.

New Media

Strangely, all the while I was running the Windows 7 RC, I found my favourite media video player to be Windows Media Player. This is certainly a change from previous versions, but that doesn’t mean there aren’t a few other bits and bobs we can install to make it even better. As an iPhone user, iTunes is pretty much required, but I’m not including it below because I’d ditch it if I could!

  • Shark007 Codec Pack: This is a gem of a codec pack. With this installed I’ve yet to come across a video I can’t play. There’s a load of options you can configure, but I’ve found I didn’t need to and just left things as the default.
  • MKV on Windows 7: This is a “Tech Preview” from DivX Labs that lets Windows treat MKV video files like native AVIs – you get thumbnails, proper file information, compatibility with WMP, and best of all you can stream the files to any DNLA device such as a PS3.

Getting Social

IM, Twitter, Facebook and the like all fit into our daily lives nowadays, so it’s useful to have a desktop client to manage these.

  • TweetDeck: Another Adobe Air application, TweetDeck is a popular Twitter desktop client which lets you track a lot of information on-screen at once thanks to its multi-column setup. TweetDeck will also handle your FaceBook news feed meaning you don’t need another, separate client.
  • Skype: Admittedly, I only really use Skype at work, or on my Netbook, but it’s an excellent tool for quick video calls, especially as the call quality is second to none.
  • Pidgin: Formerly known as GAIM, Pidgin is a multi-protocol IM program which can connect to just about any network, from AIM to Windows Live Messenger (MSN). Plug-ins help round out any missing features, and it is theme-able.

Utility Belt

These are the nice little extras that make life that little bit easier. They’re not essential, but they sure do come in handy!

  • Console2: One command prompt to rule them all! With Console2 I can tabbed command prompts, and combine Windows CMD, Cygwin and Powershell all into one console. The only thing which would be more awesome would be if I could pipe the output from one prompt into another (say pipe Cygwin output into Powershell)
  • A Good Text Editor: Notepad sucks, and sooner or later you’re bound to need a decent text editor. My personal, all-time favourite editor, Textmate isn’t available for Windows, but E Text Editor sets out to be as compatible as possible, right down to supporting the same themes and code bundles. Other great choices include NotePad++ and Sublime.
  • Jing: I nearly didn’t put this down, as it requires a free Screencast.com account, but since coming across Jing (from the same folks who make Camtasia Studio and Snagit) I’ve been using it nearly everyday. Jing is a free screen-capture tool which supports both capturing pictures and videos. With it you can capture the whole screen, a certain window (or part there of), or just a selection of your screen. Some basic annotation tools are also required. The “Pro” version adds in a few extra features like MPEG-4 video recording and more sharing options

Where’s the Rest?

I’ve purposefully made this list cover just what I consider the absolute bare essentials for my computer. There are other applications I could list, such a office suites, developer tools… heck, I’ve not even mentioned an email client! Developer tools will be covered in another post I have in the works, but the rest is down to personal preference. For both email and office needs I use Google Apps, where as you might prefer OpenOffice.orgThunderbird, or even Office 2007. Install what you need, just make sure you really need it, and try to keep it light-weight!

I’m pretty OS agnostic. I’ll use the best tool for whatever the job is at the time. For my main computer I’ve switched between Windows and Linux, replaced the PC with various Macs for a time… just whatever is needed.

My Netbook has had Windows, Linux, and Mac OS X on it at various times. OS X works suprisingly well on such a little machine, but I wanted to try something designed specifically for working with the constraints of a netbook. Knowing I have some Linux/LAMP work ahead of me, I also wanted something Linux-based so I could refresh my CLI-Fu.

Enter Jolicloud

I’d heard mention of Jolicloud, as some sort of Netbook-centric Linux distro. The selling point was supposedly the very “un-Linux” GUI, optimised for a small Netbook screen, which in most of the screenshots posted around the web looks something like this:

Looks good, doesn’t it? The official site bills Jolicloud as “a cool new OS for your netbook“. Intrigued, I applied for an Alpha invite to try it out. A day later I had been accepted, downloaded the install image, and was ready to go.

Confusion Sets In

After installation I was presented not with a screen similar to the above, but with what looked, acted, even sounded like the Ubuntu Netbook Remix. Hrmmm. There was a Jolicloud “Get Started” icon, so naturally I clicked on that; up popped the dashboard I had been expecting to see at startup.

At this point, Jolicloud isn’t an OS; it now looks like an application installer/launcher with some “Social” features built in.

Speaking of those Social features, it appears Jolicloud has it’s own social network in the making to power the friends and notifications. It would be nice if I could instead use my existing networksinstead. However, I digress…

A computer is nothing without applications. Jolicloud presents a lot of applications for installation, a mix of “normal” applications with a heavy dose of web apps. Everything from Google Apps toZoho is available to install. This fits with the marketing pitch for Netbooks – processor doesn’t matter when your app is run “in the cloud”. Installing these applications is so simple it almost hurts.

Logically, one would expect to be able to launch the apps I have installed from the Jolicloud dashboard. Well, simply put, you can’t. Applications are launched from the Netbook home screen – the one we were given at logon.

So now Jolicloud isn’t a launcher/installer, it’s almost just a installer. An App Store for Web Apps if you will.

There’s a big difference between “a cool new OS for your netbook” and an installer.

So What Exactly is Jolicloud?

In the words of the Jolicloud developers:

“Jolicloud is an Internet operating system. It combines the two driving forces of the modern computing industry: the open source and the open web.”

In my words:

“Jolicloud is a simple means to add Site-Specific Browsers (SSBs) for your favourite web applications to your Netbook by utilising Mozilla Prism on top of Ubuntu Linux Netbook Remix.”

I guess my version isn’t as buzzword friendly as the official statement.

In Defence

Maybe I’m being harsh. In fact I probably am, as I’m feeling a bit grumpy today. Jolicloud is still alpha software (that’s pre-beta, for those who’ve forgotten), and will no doubt morph and change before it goes to wider release. I just find calling it an OS is a bit… wrong.

Next week on “Grumpy Netbook OS Ramblings” – Moblin.

So a Windows version of Safari is finally here. Hurrah, another browser to support. Cynicism aside, is it any good?

Now, bearing in mind this is a beta version, there are a few issues I have. These are only my personal annoyances, based on first impressions, and in no way a comprehansive list of bugs.

It’s Fugly.

Fugly in the sense of it dowsn’t fit in with the surrounding OS one little bit. Not even an iota. I give Apple credit for porting the thing in the first place, and I know there’s a kind of UI “branding” to stick to, but the window border looks awful.

Another issue is the font rendering. I have Windows ClearType turned on for font smoothing. Safari has its own font smoothing (which can’t be turned off – another annoyance). The combination of two font smoothing algorythmns makes text look almost bold. It needs sorted ASAP.

There’s the Aqua-style widgets as well, but there a minor annoyance.

It’s Inconsistent

I can middle-click on a link in a web page, and it opens in a new tab. If I middle-click on a bookmark, it does nothing. That irritates me no end. Off the top of my head, some dialogs open in OSX-style “slide-down” windows, others don’t. Maybe this is a OS limitation? Or am I imagining it?

No dotMac Sync

I know, I know… dotMac sucks. But it has one very useful feature which I use extensively – bookmark syncing. I had hoped the Windows version of Safari would include this, but alas, it’s not there. Maybe they’ll add it in before the final version? If not, I don’t know if Safari will be able to compete against Firefox + Google Browser Sync as my first-choice of browser. I’m giving it the benefit of the doubt for the moment, simply for the speed boost over Firefox, but speed alone won’t keep it in front.

So all round, Safari on Windows is a bit meh, hovering precariously close to pure dissapointment. For now, I’m willing to the give Apple the benefit for the doubt – it is a beta version, after all.

As one final note, how to do you bring up the web inspector panel I’ve heard so much about? Email chris@ this site with the answer, please!

On Saturday, I blogged about my experiences of buying Photoshop Lightroom the Adobe.com store. Tonight I came home to an email from Tom Hogarty, Product Manager of the Lightroom team.

I’m not going to quote the email – there’s no need to, really – but for a product manager of a big, giant corporation like Adobe to even notice a single blogger talking about some trouble with the store, let alone take time to personally respond to said blogger, was something which took me by surprise. (I hope Apple are listening – I’ve got a whole raft of issues to take you up on!)

By doing so, Tom humanized Adobe (just a little). It’s nice when someone takes notice of you.

Anyway, the end result is that I’ve phoned my card issuer(s) and tried again at the Adobe.com store. The credit card payment seemed to go through, but my order is currently listed as “Pending” (it’s a download only purchase). However I’m sure before long I’ll be enjoying some full Lightroom goodness again.

[Update] Order fulfilled, and serial codes received. Happy endings all round!

I own a Nikon D50 camera, which I’m slowly getting the hang of. One of the learning processes I’m going through at the moment is RAW workflow – taking the RAW files from the camera, processing them on the computer, then exporting them to whatever format/size/whatever I need.

The 2 big guns of the “digital darkroom” space on the Mac, are Adobe’s Photoshop Lightroom, and Apple’s own Aperture. Of these, my preference is definitely Lightroom. I’ve tried to like Aperture – really, I have – but I just can’t seem to figure it out. Lightroom on the otherhand, I had sussed in about an hour. I just couldn’t seem to find how to do what I wanted to do in Aperture (it’s unusual for me to find an Apple app to be unintuitive).

When the Lightroom trial ran out, I was happy enough to buy the full copy – despite the extra 50% premium just for living in the UK. The only problem was I couldn’t buy the full downloadable version from the Adobe store. They just wouldn’t let me. I tried to give them my money, but they just refused to accept it – not just once, but from three different cards. Apparently the details I gave them didn’t match those at the bank, even though I’d used the exact same details to renew some domains earlier this morning. Maybe if their store didn’t hardcode the UK as “GB”, the bank might have corroborated my details? It’s about the only thing I could think of.

My options then are to either

  1. Phone their customer support desk to place the order
  2. Buy a boxed copy from somewhere else
  3. Give Aperture another look.

None of these options are appealing at all. I don’t like handing out card details over the phone, assuming the order would work this way. Nor do I want another software box taking up space, or an install CD to lose. Then there’s Aperture. It’s maybe the lesser of the three evils, but it means relearning how to do all the stuff I just learned for Lightroom. That doesn’t exactly fill me with excitement.

Who knows, maybe the store will work tomorrow. Maybe it was just my day for gremlins (I had troubles with downloading Icon Shoppe purchases as well). Or maybe I’ll find a good book on Aperture which will show me how to do things properly.

Seriously.

After last weeks amazing, high-octane episode 4 (write-ups can be found at Binary Bonsai1 and Broken Kode2), this week’s episode had to be something pretty good to keep up the levels of expectation.

Thankfully it lived up to the expectation without having to fall back to more space battles or other big action sequences. If anything, episode 5 was he perfect slow-down to the frenetic opening to the season.

We all knew the resistance were going to start dealing with any and all Cylon “collaborators”. We also knew this was going to end up being to cause a lot of friction and fucked up feelings as people found out their friends helped the enemy. The writers (once again) and actors pulled things off beautifully. We can feel the lust for retribution in every scene. It may have been a bit predictable3having Gaeta sentenced to death, only to be saved at the last minute when it was revealed how he was passing information to the resistance all along, but we’ll forgive them that one.

And damn Starbuck is one crazy-ass, fucked-up (frakked-up?) woman.

1 Battlestar Exodus

2 Battlestar Galactaca Season 3

3 Similarly, my only real criticism of episode 4 was the predictable “Pegasus to the rescue” bit just as the Galactica was about to go down. But hey, it looked good!

So I’m writing my first serious bit of PHP in aaaages. This last few months, I’ve either been adapting existing systems to fit the bill, or I’ve been writing ASP (all while learnng Ruby on Rails).

I feel like I’ve been out of the game. Before I fell out of writing my own PHP every day, I was using the CakePHP framework. CakePHP is a wonderful framework. It greatly speeds up development and makes things so much easier.

Unfortunately, frameworks are only of use to the developer or your customer has someone who knows what they’re doing to set up everything for them. When you’re building a product for those who aren’t so technically minded, giving them something like CakePHP/Rails/Django, etc, to install – before they can use the product – is a big no-no1.

So anyway, I’m writing this new product. It’s not terribly exciting, nor should it be particularly difficult… but what looked a piece of cake on paper is going slower than I would like. I need to get my head around the fact I don’t have a framework or existing application doing 90% of the grunt-work for me. All those framework-specific shortcuts and existing functions I’ve grown used to don’t work any more so I need to do things manually2. Joyful.

On the plus side, this is probably the coding equivalent of getting back into shape for a World Championship fight, after getting slower and fatter from being too comfortable – a la Rocky in Rocky III.

Frameworks are a wonderful thing for speeding up development in large projects where you have control over your environment. Just remember not to rely on them too much.

  1. This isn’t to knock the work of the developers of frameworks like CakePHP and Rails, et al – not at all. I think they’re doing great, great work, which makes the lives of countless developers worldwide just that little bit easier.
  2. Another thing keeping me from top-speed is an insistence I’ve put on myself to follow best coding-practices all the way, and most importantly, document everything as I go. I usually write something then document it later once everything else is finished.

I’m a bit of a phone addict. I tend to upgrade my handset every 6 months or so, whether my contract is due for renewal or not. Ebay is a wonderful thing. That said, I was hoping to put off upgrading for a while yet. I do like my Motorola PEBL. It’s nice and simple, doing onlywhat I wanted it to (phone/SMS/camera), wrapped in a nice design. Horrible, horrible, horrible, UI – solved by setting up a heap of shortcuts – but an otherwise nice phone.

Unfortunately mine seems to be going on the blink. GPRS flat out refuses to work any more (so no media messages or web surfing), signal reception in general seems to be decreasing, the in-built speaker is a bit… spotty and it’s developed a nasty habit of switching itself off now and then when in my trouser pocket. The first two problems point to a failing internal aerial.

I have basic needs for a phone:

  • Good as a phone
  • Good at SMS/MMS
  • Fits comfortably in a front pocket of a pair of jeans
  • Good UI

A few other features are “nice to have”:

  • Decent camera
  • Bluetooth sync with OS X (Calendar + Contacts)

I like Sony Ericsson phones; good UI, robust and reliable… apart from their clam-shells. Great to sync with OS X and usually great cameras. The old s900i was a damn good (if rather chunky) phone.

I don’t really like Nokia phones anymore. The Nokia 3210 was probably the best phone I’ve ever had (going old-skool!), but with the exception of the highly-expensive N70, their recent offerings seem gimmicky and/or plain-old cheap. Build quality has been an issue with most recent Nokias I’ve seen.

I could get another Motorola, but as mentioned, I hate the UI. I also dislike the feel of theRAZR and SLVR handsets – too wide/thin for comfort – and there’s the issue of whether I’d want another Moto after the first one failed after 6 months? Hrmm. The RIZR looks cool though.

Samsung phones suck. I can’t put it any other way; from the design to the UI, they blow goats.

Having thought about it a little while writing this entry, I think I might leave things a while. My PEBL isn’t quite broke yet and there aren’t any handsets I really want to upgrade to. Maybe if I wait a couple of months something awsome will come along. The iPhone, maybe? So um yeah, this entry has pretty much been an inconclusive waste of mine and your time… That said, if you want to give a shout out for your favourite handset, please go ahead!

Today I fired up TextMate to do my first bit of serious PHP coding since my stroke. I’ve been almost entirely XHTML/CSS since getting out of hospital last August, with a little light coding (ASP mostly) since then.

Probably the closest I’ve got to writing any real PHP in 8 months has been learning the basics of WordPress themes from Blog Design Solutions… To be honest, I’ve not had the same drive or determination to “Just Code It” as I once did.

I’ve been reading 37 Signals’ excellent book, Getting Real today. I’m about three quarters of the way through. I doubt I’ve ever said this about a “tech” book before, but it’s a real “page-turner”; Getting Real pulls you in and is real hard to put down once you get started. All the praise you may have heard about this book is justly deserved—it’s essential reading for developers… hell, it should probably be essential reading for anyone who has to work on just about any type of product or in a team.

While I’ve been reading Getting Real, I’ve been feeling like I want to write code again; I want to write something simple, elegant and real. I want to stop thinking about some of the ideas I’ve had over the last few month – no years – and actually do something. So I set-up a development site and database for one such idea, opened TextMate and created a new project.

It hit me like a slap in the face; I’ve forgotten how to do this. It’s like I’m back on square one… like someone sucked most of my programming ability out of my head. I can remember lots of stuff about various PHP functions, syntax and a million myriad details, but actually doing anything with any of it is another matter. I started thinking about the initial, basic class/data structure I would need and it was like the lights were on but nobody was home.

Looking on the bright-side: if I do have to relearn myslef this stuff, it means I’ll be able to do it with a clean slate and Be Real from the very outset…

That’s right, an ode to a bag…

I’ve only had this bag a few months, but it’s easily the best bag I’ve ever owned. It’s so good that I’ve liberated it from being “just a laptop bag” – this bag comes with me almost anywhere, carrying whatever “stuff” needs to come along; overnight clothes, cameras, books – all have been equally well stored and protected by the Crumpler. Starbucks coffee spills (I spilled an entire Grande Caramel Macchiato over mine this morning…); being dragged along the ground; snow, and even having a lit match dropped on it have posed no threat to my bag or its contents (most thankfully in that last example!).

The nice thing about the “Double Charge” is it comes with an additional, removable, laptop sleeve. This lets you throw your laptop (in the sleeve) into a suitcase for long-distance travelling – and not be worried it’ll be smashed to a million bits by the time of arrival – while keeping the main bag for carrying hand luggage.

It’s certainly not the cheapest bag in the world – I paid around £90 for mine – but it’s worth every penny. If you’re in the market for a new laptop bag, it comes highly recommended.

[Update, 19-Aug-2012] Believe it or not, I still have this bag, and while I don’t use it every day any more, I do still use it a lot. Apart from perhaps needing a bit of a wash it is still in very good condition. Not bad for a six year-old bag!

[Update, 23-May-2019] After a long and faithful service, the Double Charge finally succumbed to the ravages of time, and years of abuse. 13+ years is a very good run for a bag!

Something I like to do for each of my Macs, is keep a backed-up folder containing all the “essential” apps for both machines (along with all registration codes for easy reinstallation). I was updating my iBook copy this evening and thought I’d share. Some of these are generic apps that I’d use on either machine, while others are iBook specific.

Side-note – My iBook is pretty exclusively a web development machine.

Textmate. Textmate describes itself as “the missing editor for OS X”. I’m not sure what that’s meant to mean but hey, I’ll take their word for it! Textmate was the first Mac App I ever bought and is by far the best file editor I have ever used. Textmate handles just about any text file format you can throw at it, and above all else, lets you work without getting in your way. Seriously worth trying.

Ecto. Ecto is the best blogging client in the world. Especially on the Mac. I used to be a fan of MarsEdit (I own licenses for both), but Ecto won out in the end for its wider range of features. If you’re in any way serious about this blogging malarkey, I’d recommend you give it a try. Even the Windows version is recommended (although, naturally, it’s nowhere near as good as the Mac edition!)

Transmit. If Textmate was the first Mac App I paid for, then Panic Software’s Transmit was the second. It’s a S/FTP client with more features than you’re ever likely to need, but wrapped in a highly polished and intuitive interface. Transmit makes working with files on remote servers as effortless as working with local files in Finder. The synchronisation features alone are worth the price of the license.

Coconut Battery. More of a useful widget than an application, Coconut Battery can tell you near enough anything you need to know about the status and health of your battery. Ideal for checking if you want to know if you’ll be needing to buy a replacement any time soon.

Colloquy. Sometimes, the best – or only – way to get help on open-source applications/scripts, etc, is to jump into an IRC room. Colloquy is the best OS X IRC client I’ve found. As a rule, I don’t like chat or IM applications (they tend to be little more than a distraction), but Colloquy has helped me get access to the right answers on more than one occasion.

That’s really it for my iBook’s list of essential apps; I try to keep laptops “light”, hence the short list. My iMac list is probably huge in comparison. Besides, my other needs are either met by the apps bundled with OS X – Safari for web browsing, Terminal.app for command-line activity (remote sessions, etc.), iTunes and what-not, or by web applications –PHPMyAdmin for MySQL administration, Roundcube for accessing my IMAP email anywhere. Are there any applications you can’t live without on your Apple laptop? Please share!

Sometimes, Life really does turn around and bite you on the ass. Regular readers will know that back in the summer I had a stroke. Since I was released from Hospital care things had been going a lot smoother. I got married, I went back to work, and life in general was getting back to normality. Until yesterday morning, that is.

On Monday morning, before I started getting ready for work, I had an epileptic seizure (dislocating my shoulder in the process). Just as I thought everything was getting back to normal, this comes along to throw a spanner in the works…

At the end of the week I need to get a battery of tests done. Until then, the hospital are trialling me on some medication to try and prevent any repeat episodes.

It really sucks that until the tests are done, I’m not going to know how how any of this is going to potentially effect the rest of my life.

I guess I should apologise – I was actually discharged a week ago (which was a week earlier than expected), but as I’m sure you can imagine, everyone has wanted to come by and see that I’m OK. This is the first time I’ve had a chance to sit at my iBook for longer than the time it takes to download (but not yet read!) mail.

Thank You All

I’d like to share my appreciation for all the get well soon messages and all the support. Thank you.

So how Am I Doing?

I’m doing good. Definitely not 100%, but I’m improving daily. Simple things still tire me out real quick, but apart from the small matter of my wedding in 4/5 weeks, I have roughly 8/9 weeks of nothing but recuperation to get back to full health and fitness.

I’m glad to report that I have nearly full mobility back, with only a small amount of strength and dexterity missing from my left hand and wrist. My Occupational Therapist thinks that typing is as good an exercise as any for fixing these – which I suppose is a good thing?

I have a heap of other exercises to do at home that the physios gave me. So by the end of it, I should be fitter than I’ve ever been! I’ve already dropped 2 stone (28lbs if my maths serves me right) in weight, which was a pleasant surprise 🙂

The War Wound

for those with a morbid fascination for such things, I present the lovely scar that now adorns the side of my head:

It gets a bit itchy and uncomfortble at times, but I guess I’m glad it’s there at the end of the day!

4 weeks without an update? Dear me, that won’t do! No, I didn’t disappear because I became an online gambling addict. Instead, I’ve been spending time in hospital 4 weeks ago, I suffered a stroke that lead to a brain haemorrhage (Now there’s a fucker of a word to spell!) which required surgery. The upshot being that I’m OK (now, though I’m now sporting a lot less hair on my head and a lot more facial hair), though I have to go back to hospital tomorrow evening to complete my physiotherapy (I’m out for today and tomorrow morning on “weekend pass”) as the stroke let me temporarily paralysed on my left side – I’ve got most motion back, though my left limbs are pretty weak at the moment. typing is a fucker – this entry was almost done as a podcast from my hospital bed, but I couldn’t get peace on the ward to record it.

All change.

So I’m back in the outside world today, trying to catch up on all my communications/playing Blackjack. While I’ve been inside, heaps has gone on in the world. A new Harry Potter book. Bombs in London (and now Egypt) Mr Oxton has given up blogging – again. Can someone let me know why? The little ‘un is now a fully-fledged member of the terrible-twos club… Loud doesn’t even cover the half of it.

Some thank-yous

Before I sign off for another 2 weeks of therapy, I’d like to thank a few people: David Currie: the surgeon who saved my life, all the nurses on Ward 40 of Aberdeen Royal Infirmary for looking after me post-operation, and the Staff at the maidencraig unit of Woodend Hospital for helping me get mobile again. Until next time!

Star Wars was an integral part of my childhood. I was too young to see the films when they first came out (I wasn’t even born when A New Hope was first released), but my love of sci-fi from an early age pulled me towards them. Unfortunately, in my formative years it proved near impossible to get to see any of the original trilogy from start to finish, for one reason or another. Instead, I had to wait for the “Special Edition” re-release to the cinemas. Even if it wasn’t the true Original Trilogy, it was still a special moment for me. After that, school finally got in the way and the only real contact I had with Star Wars was at my friends’ house. His mother’s boyfriend was fanaticalabout Star Wars – he had so much merchandise you couldn’t see the walls. I used to sneak a read of his comics if he was at work.

When I first learned the prequels were being made, I was as giddy as a schoolgirl. It may have been a disappointment to most but The Phantom Menace marked a turning point for me and so will always be special. 1999 was the year I left school behind for the Jedi Academy University and started to really grow up.

Although on reflection Episode 1 is not the greatest, at them time I loved it and immersed myself in every scrap of information about the “new” universe. I was fascinated by this glimpse into what that Galaxy, Far, Far Away was like before the Empire and the Rebellion. I guess it was always the back stories that interested me. Not the What, but the Why.

Episode II was released just as I was leaving uni and starting work. I remember finishing a radio show (I helped out on a show on local radio for a summer) late at night (about 10pm-ish, I think) on the night before it was officially released and heading down to the cinema in the hope there were still tickets for the midnight showing left. I was in luck.

Despite Anakin Skywalker being played by a moody plank of wood, Attack of the Clones blew me away. An army of Jedi. The start of the clone wars (and the first glimpse of the future Imperial Army). Jango freakin’ Fett. You can pick holes in the acting/directing/plot/effects all you want, but Ep2 is just a damn fun movie to watch.

Which leads us to the present day. Episode III. “The Saga comes full-cirlce”. The fall of Anakin and the rise of Vader. The fall of the Republic and the rise of the Empire. The end of the old Jedi Order. The end of an era – the final part of a series that has captivated people for 28 years. When the end credits roll, there will be mixed emotions. Joy at finally seeing the final piece in the puzzle, the missing chapter that completes the story. Sadness that it is the end.

There won’t be any more Star Wars after this. There is talk of a TV series, but it could never do justice to the mythology George Lucas has created. Star Wars belongs on the big screen. You can’t fit it into 30 minute TV episodes. It’s too vast, too detailed and too complex. It would be condensing War and Peace into a single page comic strip.

Part of me hopes that this is the end. This year I will be getting married. I find it fitting that the final Star Wars film is released this year, the year I will be starting a new phase in my life, with my new family. It’s like some big karma thing telling me it’s time to move on. After all, Star Wars was an integral part of my childhood – and I grew up a long time ago.

What’s that? A bloody good game based on Warhammer 40,000? Are you sure? Well, wonders never cease…

It’s true. I’ve just finished playing the beta version of Warhammer 40,000 – Dawn of War… and by jove it’s good. Bit tricky to play on a laptop with just a touchpad, but damn good none the less!

It’s about time that the Warhammer 40,000 franchise had a decent computer game. It’s one of the richest fantasy worlds since Tolkien came up with Middle Earth. The back history is exceptionally compelling; the story of a massive yet fragile Imperium of Man that stretches far across the Galaxy – and of the Alien races that it rages constant war with. As the line goes: “in the grim darkness of the far future this is only war”.

On the surface, the game itself seems a pretty standard RTS. Be thankful they didn’t go for a turn-based game like the table-top game. That would’ve been a disaster. By going realtime, the game is far more exciting and faster to play. There are a few neat tricks to it though.

Graphically the game is gorgeous. Everything is in complete 3D. You can zoom right in on an individual trooper if you want and marvel at how detailed he is. Explosions and weapon effects have a good feel to them – you can really appreciate the rain of fire tearing through an enemy squad when your Space Marine Heavy Weapon Squad let loose a volly.

A fairly novel difference to most RTS games is the resourcing aspect. To gain more resources for building more troops or getting upgrades you must capture and hold onto sections of the game map. These are either “Strategic” points (run-of-the-mill areas that it’s good to control) or “Critical” points. Critical points tend to be the basis for some mission objectives.

There are four races available in the full game: Space Marines, Orks, Eldar and Chaos. Only the Marines are available to play as in the demo. Space Marines are the finest troops of the Imperium; genetically modified, heavily armed and armoured. They have the most balanced and versatile troops and heaps of killer vehicles. The Space Marine Dreadnought is absolutely lethal against most troops and vehicles. Space Marines also tend to not run away much – another vital aspect in the game.
Orks fight in huge mobs and use low-tech weapons salvaged from scrap left on battlefields. Ork tactics tend to be to grind the opponent down with wave after wave of troops, backed up by their “Big Gunz”.
Eldar are Elves in space. Highly advanced technology but not many of them around to use it. The Eldar have tend to use fast troops that hit hard then get away before you can retaliate properly. They can also upgrade squads to specific tasks such as close combat or ranged fighting.
Chaos are the real baddies of the game. The legions of Chaos are Imperial troops seduced by the Gods of Chaos. As such, they fight much like the Space Marines but with one big difference – Daemons!

I’ll stop rabbiting on now. I’ve already gone into far more detail than I planned to! This has turned into a mini-review… Suffice to say that I’ll be going out later today to buy the full version of the game.

Sometimes you just can’t ignore the temptation to tweak and tinker with your work, especially when it’s a personal site…

One thing about web development that I have a love/hate relationship with, is the desire to constantly tweak and fiddle with what you’ve done.

Even something that you’re immensly proud of and happy with; you’ll get the urge to go back and change a little bit here, improve a bit there.

This is especially true of blogs/personal sites. Because it’s yours, you can do what you want with it.

Take here for example. A few days ago I had a design I was reasonably happy with. Then for some reason I decided I wanted to try my hand at porting Kubrick to TXP. Boom-baddah-bing and here we go. Most of the site now uses the Kubrick style (albeit with a number of changes) and I’ll be moving the rest over as and when.

Once I get this distraction out’ve my system, I’ll get back to the XML-RPC script. Promise.

Now that I’ve got the awkwardness of the first post out’ve the way, we can move on…

Ever since moving into the new house (about 3 months ago), I’ve been rethinking my computing needs. I’ve got a pretty big under-stairs cupboard that’s being eyed-up for conversion into an office. While it may be larger-than-average, cupboard wise, it’s not quite big enough to accommodate all of my hardware, so something has to go.

Deciding what was to be turfed out meant evaluating exactly what I use a computer for when at home. Do I need a big, gaming orientated desktop, when I have two games consoles that aren’t exactly getting worn out by over use? Do I need a high-spec Centrino laptop when I’m never more than 2 meters from a power socket? What about that Epia-based Media Center that’s gathering dust in the removal box?

It’s all a bit OTT, really.

Once you start looking at the hardware, attention inevitably turns to the software/OS side of things. Do I like WinXP? No, definitely not. Does it have good software? Yes. Do I like Linux? It’s better, but a pain to setup/manage – particularly on my laptop. Does it have good software? I guess, but not so far as web development stuff goes, IMHO. What about Mac?

Ah. Mac. I’ve never used a Mac before. I know nothing about Macs. Other than they look pretty. Really pretty. Actually, I do know something – they have a fair bit of good web development software. If all else fails, Macromedia Studio MX is available on Mac.

A Mac is sleek and sexy. A Mac is powerful. A Mac is… how much…? A Mac is expensive. Or maybe it’s just me. Getting onto the bottom rung of Apple systems will cost £600. That’s the very bottom, barebones eMac. Prices then go astronomical once you start adding features like AirPort, Bluetooth, SuperDrive or even just bigger RAM or harddisk. But that PowerBook looks so damn sexy…

It’s all a muddle and no mistake. What would you do in my position? Stick it out with the laptop + whatever OS you think is best? Get a new PC/laptop? Get a Mac? I need help choosing people – influence my weak mind!

There is one thing on the internet that is – without a doubt – causing more buzz than anything else at the moment. No, not the new Harry Potter film (worth going to see, by the way). I’m talking about Gmail.

For weeks since it was announced, the blogosphere has been buzzing about it. Some have snorted in derision, some have placed it high upon a pedestal. Gmail isn’t even fully open to the public yet – it requires an “invite”.

These invites are highly desirable, so it would seem. All over the place, I’ve seen various contests to win an invite. Some ask you to come up with something funnyOthers just want a link (so can I have my invite now? 😉  ). The slightest mention of having a spare invite prompts a deluge of people you don’t even know asking for it. Googling for “Gmail Invites” returns page after page of people pimping this strang type of gold dust.

I guess it’s this process of invitation only accounts that are making everyone want Gmail so badly. To be in an “exclusive club” is quite a draw for some.

If it’s not that though, what is the draw? Is Gmail any good? I’ve put out the feelers (ooh-er) for an invite, so I’m hoping to be able to find out for myself, but maybe someone could enlighten me?

Isn’t just another web-based email service?

Last Updated: 27/May/2004

The Samsung X10 was, for a long time, the thinnest notebook available. It’s also silver and all shiny. Obviously, I just had to have one! Specifically, the XTC1400 which boasts a Pentium-M 1.4GHz, 512Mb RAM, 40GB disk, CD-RW and wireless networking (it’s a Centrino notebook).

By default, it comes with WinXP Professional. Obviously, that just will not do! Unfortunately, it’s not the easiest laptop in the world to install Linux on. I’ve done a number of installs with several distros and have had wildly differing results – even between reinstalls of the same distro! Eventually though, Gentoo won the day…

Not that it was an easy process, mind you. Indeed, as I type this, a few features are still not working (read: ACPI). But by and large, the laptop is fully usable for day-to-day tasks. Even my Girlfriend can use it, so it must be ok!

Here’s a quick run-down:

  • Kernel – currently 2.6.6 love4. Seems very stable and relatively nippy. Edit 27/May/2004 – Now using 2.6.1 + a handful of patches.
  • Display – The biggest stumbling block for the X10 at one point. Using XOrg X11 + the latest Nvidia Kernel & GLX (5336) from Portage works a treat.
  • SoundALSA’s a bit temperamental at the moment. I had it fully working at one point, but forgot the fix when I did a reinstall. Normal users get a “Cannot find /dev/mixer” error. I know it’s fixable though, but I want to get other pieces working first.
  • Networking – The wired LAN card works a treat straight off the bat. The WiFi card took a bit of work though. Read this post on Centrino Wireless + Gentoo to get it working. I’ve had no need to use the modem, so I don’t have a clue if that works or not… From what I’ve read, it might only work with a 2.4 kernel.
  • ACPIThe major stumbling block at the moment. Some things are working, others aren’t – at the moment, only the AC adapter and battery aren’t being picked up. The problem lies with the common (missing?) ECDT error. I’ve tried adding the several potential patches to the kernel, but none have ever installed properly. Edit 27/May/2004 – fixed by reverting to 2.6.1 kernel + patches. Guide Coming Soon.
  • Speedstep – I’m not going to try the CPU frequency scaling until I’ve gotten ACPI properly working. Just in case.
  • Touchpad – Using the Synaptics touchpad driver, everything works apart from the scrollwheel/middle button. No matter of tinkering could get this to work. The driver does provide features that make up for this, but in the end, I installed a MS Bluetooth mouse instead… (guide coming soon)
  • Keyboard – Not tried to get the extra keys going yet. Last time I installed I couldn’t get them working, but I didn’t exactly try hard.

Currently I’m running Gnome 2.6 and find it very responsive. Apps load up quite fast, although I’ve not been doing anything particularly strenious with the machine since I installed Gentoo.

This page will be updated as I get more things working (and write the guides for the fixes)

Centrino is the big thing in laptops at the moment. Longer battery times despite more powerful processors and inbuilt 802.11b wireless. Unfortunately, Intel have yet to provide Linux support for the wireless component of Centrino and are a little cagey as to when it will be available.

Thankfully, the open-source community is a crafty community. NdisWrapper provides a method of loading Windows drivers to enable the wireless card.

At the time of writing, there are ebuilds in portage for NdisWrapper (latest version is 0.6-rc1). Unfortunately, they seem to be quite buggy and I’ve yet to get them to work. Instead, what I found to work best was to get the latest version from the NdisWrapper site and compile it from that source. At this time, the latest version is 0.7. Then follow the steps below to release yourself from your cat-5 tether!

Note 1: as a prerequisite, you need to emerge wireless-tools.

The Driver

  1. Download the latest source tarball to your system from the Ndiswrapper Sourceforge Project and unpack the archive.
  2. For the Intel PRO/Wireless 2100 (standard Centrino wireless card), download this driver. Otherwise, consult the NdisWrapper homepage.
  3. Open up a terminal and su to root then cd to the directory you extracted the source to.
  4. make install
  5. Unpack the Windows driver and check for a .inf file. In the above package, it should be “w70n51.ini”.
  6. ndiswrapper -i /path/to/win/driver.inf
  7. Once that’s done, type ndiswrapper -l. The name of the inf file should be listed. If not, you may have mistyped the path, so try again.
  8. modprobe ndiswrapper to load the driver. Providing there are no errors, typing dmesg should return “wlan0: ndiswrapper ethernet device…”

Configuring Your Card

The next bit will either be straight-forward or trial and error. It just depends on your setup. I had a bit of bother getting the right combination of authentication settings before I got my card to work.

iwconfig should list your card and its current settings, which will be all empty. To change this, you need to do the following:

  1. iwconfig wlan0 mode Managed if you use and access point. Otherwise, set mode to “adhoc”.
  2. iwconfig wlan0 key restricted <wifi key> will set your authentication key (hex format). Pass the -s option after key to type the key in ascii format. Depending on your setup, you may have to subsitute “restricted” for “open”.
  3. iwconfig wlan0 essid your_essid sets your network ID.
  4. ifconfig wlan0 up should now bring your wifi card online. If not, fiddle around with the settings above. Also take a look at the other options you can set through iwconfig.
  5. DHCP users should type in dhcpcd wlan0 to assign an I.P. to your card.
  6. Alternatively, to assign a fixed I.P. you need to copy /etc/init.d/net.eth0 to /etc/init.d/net.wlan0 and edit accordingly. Then type in /etc/init.d/net.wlan0 start.

If you were to ping Google or similar, you should see your connection working.

Final Steps

The tricky bit is now out of the way. All that should be left to do, is to get the card to come back up at boot time:

  1. Add ndiswrapper to /etc/modules.autoload.d/kernel-<kernel version>
  2. If using DHCP, add the five steps in “Configuring Your Card” (above) to /etc/init.d/local.start.
  3. Otherwise, you’ll probably want to add the net.wlan0 file to startup with rc-update add net.wlan0 default.

That should be it! I’ve been happily connecting with the card in my Samsung x10 since I reinstalled Gentoo about a month ago.
One point – DHCP users might want to try the net.wlan0 method of configuring/bringing the card up/down instead of using local.start. It seems to be the “correct” way to do it and a lot “cleaner”.However, I had no success getting this method to work with Ndiswrapper 0.7 (0.4 worked, IIRC). That’s not to say it won’t work for you, it just didn’t work for me… Give it a try by all means, then let me know how it went by leaving a comment.