Things said about the iPod Mini:

  • Competitors are cheaper
  • Competitors have more features
  • Competitors are smaller
  • It’s not “open”
  • It’ll never sell (or, my favourite: “the only people who’ll buy it are Apple ‘Sheeple/fanboi’s/posers’ with too much money”)
  • You’re paying an “Apple Tax” just because it looks pretty/has an Apple logo

Things said about the iPad Mini in the 24 hours since it was announced:

  • Competitors are cheaper
  • Competitors have more features
  • Competitors are smaller
  • It’s not “open”
  • It’ll never sell (or, my favourite: “the only people who’ll buy it are Apple ‘Sheeple/fanboi’s/posers’ with too much money”)
  • You’re paying an “Apple Tax” just because it looks pretty/has an Apple logo

Even though I doubt I’ll be buying one in the short-term, make no mistake – I think the iPad Mini will sell in droves, just like the iPod Mini went on to.

I confidently believe it will outsell the Google Nexus 7, and probably also the Kindle Fire (the biggest competition in my mind) this Christmas, despite the much higher price. Apple has shown consumers will pay that extra “tax” for the overall experience. Not only that, Joe/Jane Consumer can now see the name brand iPad on sale below £300 for the first time. That’s a really big deal for anyone not trapped in the Tech Bubble.

Dear Viewer,

By the time you read this, I will be dead.

When I started out in 1974, I was the future – TV’s first robot newsreader. But what once seemed cutting-edge is now regarded as hopelessly old-fashioned, and I have been frozen out by the powers that be, yet another victim of BBC ageism.

I can’t take it any more. It’s a struggle to get up for the nightshift, and my poor pixels are tired. My friend Oracle said it would end like this.

Goodbye, cruel world.

The Last Broadcast from BBC Ceefax.

* 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.

Today was a good day – I managed to hit one of my work goals, and when I did I made sure I gave credit those that helped me.

My current role is a mix of support and development. For the last year and a bit it has been mostly support because a) I was the only person who knew the technical-side of the application, b) documentation was lacking (so I was learning as I went along) and c) the application had a very large user base spread across the globe. Support queues were general pretty busy – 30 or so open issues was common, and with only myself able to work on things there was seemingly no end in sight. Further developments and bug-fixes were always being pushed back because I just couldn’t find the time away from support. I resolved that I would get things under control; one day, the incident queue would read zero.

Today, 10 months or so after making it, I hit my goal. I literally did a little jig of excitement in the office (thankfully very few people were able to see me) when I closed out that last support ticket.

It’s important to celebrate life’s little successes, and it would be a good highlight to give the client, so I decided to write an email to my manager about the milestone. It’s also important to give credit where it is due, so I wrote the email first and foremost to the two offshore colleagues I had been working with recently, thanking them for their hard work, copying in their line manager so they could get the recognition they deserved. To be honest, I’m not sure what I felt better about – to reach my goal, or to give someone the recognition for helping me.

Over the weekend I started a fun little project. I’m tracking down and integrating as much of my old blog content as I can, across all of the sites I’ve written over the years.

When You Were Young cover artI’m not going to integrate every last bit of content I find, just the “highlights” (some things are best left forgotten…). Linkblog entries, and projects with no relevance will be left behind. So far I’ve added around about 26 entries covering from 2003-2009. No doubt I’ll go back over these years and add more, as the content resurfaces. Where possible I am preserving the original formatting and links, though in some cases I will have to link to an Internet Archive page.

The impetus for this little personal project came from realising I had neglected and discarded a lot of my history. As I’ve moved from site to site, platform to platform, I’ve usually wanted to “start fresh”, to see if it gives me that impetus I need to keep the blogging habit going. So far that approach has rarely worked, so why allow the old content to disappear? It’s a shame I thought of this so late. There’s large holes in 10 years of content charting my growth as a person lost to the void.

In the content I have found I have noted a marked difference to how I am now. I used to be quite open, generally had a more upbeat, less formal tone, and was more inclined to create something for the sake of releasing it to the world. Entries were generally short, and more frequent, but punctuated occasionally by something more in-depth. It’s interesting, and definitely something I’m going to reflect on.

As a side-note, with the content moving over, I’ve redirected traffic visiting the old domains to a landing page on this site. Although most of the sites had been inactive for a while, or the content otherwise not available, it would be wrong to just leave them to expire without giving someone the chance to find what they were looking for. Besides, Fickle Me might decide to reuse the domain in the future!

Of course, if you want to check out the “historical” content, head on over to the Archive page.

MG Siegler has – much like myself – converted to using the iPad full time as his mobile workstation:

A couple weeks ago, I wrote a quick note signaling my intent to predominantly use my iPad as my main computer when I travel going forward. What started as a successful two-day experiment led to a long weekend away last week. That went well enough that I’m confident in my choice. The iPad is my new road machine.

MG went for the Logitech Ultrathin Keyboard Cover, which was my second-choice after the Apple Wireless Keyboard. He believes Apple will eventually release their own “keyboard in a cover” accessory, citing the Microsoft Surface as a potential reason/influence. I don’t think Apple will release their own accessory – for one, it’d be a bit “me too”, with several options available on the market for quite some time (not to mention following in the wake of the Surface announcement); secondly, as one of the most-touted features of the Surface, I’m pretty sure Microsoft would see their “Smart” keyboard cover falling under the “don’t copy” patent licensing agreement held between the two companies.

After getting fed-up of not being able to read sites in Reeder on my Mac without getting bombarded with ads I looked around for a good hosts file I could use to block the buggers at the network level, rather than rely on plugins such as AdBlock at the application level.

I tried a couple, but the file available at Someone Who Cares was the most comprehensive and most up to date I could find.

So what does it do? Basically it takes a (huge) list of known ad/spy/malware domain names and tells your computer their IP address is 127.0.0.1, i.e. your own computer, rather than their actual IP addresses, so their scripts/ads/viruses/trackers/etc won’t ever load. As a side effect, ad-enabled websites should load faster.

Did you know you can use custom PHP extensions on Heroku? Neither did I, cos I can’t find it in the documentation. But you can:

https://gist.github.com/1288447

I came across this while searching for a way or workaround to use the MongoDB PECL extension on Heroku (don’t get me started on that…).

If you can’t be bothered checking the link, the summary is this:

  1. Create a folder in your app called ‘ext’ or similar.
  2. Copy your extension into this folder.
  3. Create a php.ini file with the following contents:
    extension_dir = "/app/www/ext/"
    extension=mongo.so
    
  4. Deploy

the CodeIgniter logoMost of my small personal projects tend to get built with CodeIgniter (CI), which is a simple to use, fast, lightweight PHP5 MVC framework.

the Facebook logoFor a while now I’ve had an itch to build something fun against the Facebook API so I can start learning how Open Graph works, and as a primer to building a “proper” Facebook integrated application. I also realised I hadn’t actually tried using CodeIgniter 2.x since it was released (quite some time ago). With an abundance of free time this weekend it seemed like the perfect time to get hacking!

Before I could build anything I would need to know one thing: just how do you connect a CodeIgniter app to Facebook?

Continue reading

Battery_usage

Android phones generally don’t get a lot of battery life. Judging by some of the forum threads and blog posts I’ve read, 20 hours or so is about the average. With the stock I’ve occaisionally had it scrape past that, but not by much. Using a lighter-weight Sense-based ROM I was able to get around 36 hours of charge

If you switch the Desire HD to a ROM without HTC Sense (such as CyanogenMod 7)you’ll find your battery life reduced even further. There is a battery drain issue with all custom, non-Sense ROMs for the DHD, due to a bug in the open-source code controlling the aic3254 chip used for processing sound (the closed-source HTC driver doesn’t have the issue). Once the chip comes on it doesn’t switch off, consuming power at a steady rate. Continue reading

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