Alex Hardy


Hello there!

Archive for ‘Development’

It’s nice to be Sociable

Wednesday, January 23rd, 2008

I thought I’d mention a Wordpress plugin that I installed today: Sociable. It’s an easy way to add social bookmarking links to posts in a similar way to the good ol’ Beeb.

Choose the networks you want to link to and you can also set the circumstances under which those little badges appear. I’ve set mine to only appear inside a post, because I think it looks tacky to have a page filled with icons.

I took the liberty of modifying the plugin to add support for Facebook and 9rules and have submitted the changes back to developer Peter Harkins for general release.

A quick guide to installing a local PHP MySQL development server on Mac OS X

Friday, December 21st, 2007

Mac users are sensitive little souls. Artistic types. We love our beautifully designed computers and software, but poking around in the guts of our operating system doesn’t come quite as naturally to us as to our PC using friends.

Sometimes though that can be a very worthwhile exercise, such as installing a dev server. Perhaps you have a laptop, and need to be able to work or present when you don’t have internet access (eg: while travelling). Here’s how…

Good news, everyone!

The Apache web server and PHP are already installed as part of Mac OS X and only need to be turned on. The MySQL database server will have to be downloaded and installed, but we’ll cross that bridge when we come to it…

This is an easier job than it used to be and doesn’t have to involve typing code into the Terminal. Marc Liyanage does a fantastic job of creating PHP installer packages if you want to keep your installation bang up to date, but for most purposes the instructions below should be sufficient.

Note: I have used Mac OS X 10.5 Leopard and MySQL 5.0.45 (the latest at the time of writing) on a MacBook Pro. I used TextMate to edit text.

Part 1 – Apache and PHP

  1. Go to Apache folder

    Start by editing the Apache config file to enable PHP. This file is hidden by default, but you can access it from the Finder’s “Go” menu. Enter /etc/apache2 and confirm to make the folder appear.

  2. Edit Apache config file

    Open httpd.conf in a text editor. Find the line that says:

    #LoadModule php5_module libexec/apache2/libphp5.so

    Uncomment it by removing the hash. Save the file (you will be asked to enter your admin password).

  3. System Preferences – Sharing

    Open System Preferences and go into “Sharing” (under “Internet & Network”).

    Turn on ”Web Sharing”. You now have an active Apache server with PHP. Test this by typing localhost into your browser. You should see the default Apache page.

  4. Turn on Web Sharing

    If you feel curious, create a PHP file with the phpinfo() function call in it to see the details of your installation.

    Place your own files in /Library/WebServer/Documents

Part 2 – MySQL

  1. MySQL Community Server

    First things first: Head on over to MySQL.com and download MySQL Community Server and the GUI Tools.

    As their names indicate, the former is the database software itself while the latter is a collection of graphical tools to make the task of administering MySQL easy for those of us that find the Terminal a bit too scary.

  2. MySQL GUI Tools

    I use an Intel Mac, so I got the Mac OS X 10.4 (x86) builds. Take care to download the most appropriate build for your computer and OS version.

    I recommend that you always use the latest GUI tools for the latest features and stability improvements.

  3. Mount the MySQL disk image and run the main package first, then install the startup item, finally the prefpane. I needed to restart before MySQL would turn on.

  4. MySQL prefpane

    Open System Preferences and go into “MySQL” (under “Other”). Tick the box to automatically start MySQL on startup.

    You can install the GUI Tools by dragging them from their disk image to your Applications folder. Nearly there now!

  5. It is crucial that you now set a password for the MySQL “root” account. Open MySQL Administrator and log into localhost with root (no password). Under “Accounts” you can assign a password to root, as well as create other database users.

    Avoid using the root account in your applications – use it only for administration.

    That’s it! You can start creating databases and coding the PHP applications that will run on them.

Recommended Reading

PHP and MySQL for Dynamic Web Sites

If PHP and MySQL are new to you, I recommend PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide by Larry Ullman. In common with other books in the series, this book gives you a solid grounding in the subject, with plain English examples.

If you are already familiar with HTML and maybe a scripting language or two, you should hit the ground running!

If this guide was useful to you or you would like me to elaborate further, please feel free to comment. I’m thinking about writing a series of how-tos in this manner and your feedback would be appreciated.

The Refresh project is not dead, it’s just frozen

Friday, November 23rd, 2007

There’s a chill in the air. Slade and Wizard are once again helping to sell sofas and toys. Yessir, “summer 2007” has come and gone with no sign of the Refresh project.

It should be obvious by now that Refresh is on indefinite hiatus. I don’t give space to unfulfilled ideas, so I intend to remove it from my portfolio. I’ll add a featured project panel in its place. I’ll try to relate my reasons for this change of direction.

I did quite a lot of research and development work on Refresh but as I did, certain things became more apparent. What else became apparent is that those realisations would apply to anything at all that I might choose to do:

Development

I would need to develop solutions for a great number of interface elements and internal processes in order to build Refresh. Handling payment transactions was going to be a project by itself.

Time is Money

The free time I have for independent work is limited, because it naturally competes with my personal life and other interests. When I sit down at my computer, I assign a real and specific value to my time – my freelance rate of £30 per hour. Time that I can justify spending on a project that doesn’t pay is in short supply.

I believe I have the staying power to work my way through a dip before a project rewards itself, but the time and energy it would have taken to make Refresh a reality was simply too much at this stage in my life.

Marketing

Shipping a product to no existing audience or buzz isn’t wise. A key reason for releasing the free version of simpleContact first was to patiently build a user base before the commercial release.

Anyone can buy attention through advertising, and I certainly will do so. What’s far more important is the kind that you can’t buy. Users have been generous and helpful in their comments. I will be able to make some announcements on this front soon.

What next?

My attention is now focused on other specific projects. Working this way allows me to break these challenges down into tasks that I can tackle within my available time.

Refresh has become an endgame, a byword for the Big Project that I’ll undertake at some point. Maybe the future of my career. The project I’ll be ready for when I have some smaller successes under my belt. It may bear no resemblance to the original idea (which I kept a bit of a secret) in form or function, but the fun is in the journey!

What Gordon Ramsay can teach developers

Tuesday, November 6th, 2007

While watching Kitchen Nightmares I’ve been thinking about writing a post. I think a lot of the advice Ramsay dispenses applies not only to businesses generally, but particularly well to web design and application development.

37signals have beaten me to it. They list some mistakes chefs and restaurateurs make, and draw parallels with our own field. I’ve abbreviated their list, so go read it there and come back for my two cents worth!

Everything to no one

Over-stuffed menu syndrome. Too many dishes, done poorly. You might compare this to the kitchen-sink approach that many developers adopt. A simple concept executed with flair is often the best.

Cook what you know

Or eat your own dog food. If you don’t use your product and others of its kind, how would you know what characterises an excellent product? When I started using simpleContact I soon realised that messages ought not to come from the admin address, because I was sending replies to myself. Version 1.1 corrected that.

Passion for your environment

If you don’t take pride in your work, or are unwilling to invest in a continual learning process, then you need to leave the industry to us professionals.

Here are a couple more that occurred to me and Kevin as we discussed it:

Seek user feedback

Sadly, this is done too rarely. Criticism is more useful than praise! It’s nice to think that a silent majority is happily using your product, but your dealings with users who have a problem or unsatisfied requirement are most valuable.

Is your product the equivalent of a sushi restaurant in a small Yorkshire village? A wise individual said: Just because there’s a gap in the market doesn’t mean there’s a market in the gap. Perhaps yours doesn’t exist?

Mistakes made in the kitchen, should stay in the kitchen

Test your work rigourously. This goes double for fixed media like CD-ROMs. You can’t un-burn a thousand discs because you fucked up (I had to use the F-word once, considering the subject!). Experience has taught me to stick to my guns here. My work is done when I say it is, irrespective of some arbitrary deadline.

Still, errors may slip through and this is when your recovery is all that matters. A swift and honest response may come in the form of an update, but often feels like more than 9/10 companies can manage in this life.

… but there’s nothing he can teach us about swearing :)

Daisy and Friends

Monday, November 5th, 2007

Daisy and Friends

The Foundry’s recent run of Flash sites continues with Daisy and Friends. Daisy is a cow who would you believe, loves nothing more than making toasted sandwiches. She and her friends live on a farm where you can download recipes, wallpapers and play the “Crazy Daisy Challenge” game. The range of products starts with a rather cute toastie maker with cow print on it.

On my recent quiet spell

Friday, November 2nd, 2007

I think it’s fair to say that I’ve not posted much this last month. This is mainly because I’ve been very busy. Busy at work, with a significant update to Symphony and with projects for d3creative and MC2. Yessir, I’ve had rather a lot on.

I’ve managed to clear the decks of freelance work, so I’m able to focus on personal projects. I’ve fought down the urge to buy one of these (for now). My immediate task is to back up all my stuff because I’m going to give my trusty iMac G5 a fresh start on Mac OS X Leopard. After that I’ll start work on simpleContact 1.2.

Version 1.2 will include admin account editing and inbox paging in addition to a raft of compatibility and interface improvements.

I will endeavour to get back to regular posts from here on. I think a report on the status of the Refresh project is long overdue.

My website is one year old!

Tuesday, October 16th, 2007

First birthday

I thought I’d take a moment to observe the first birthday of my website. A year ago today I went live with a basic WordPress install. So far the site has undergone:

On blogging…

It’s still very early days for me on this score. I’ve been slowly narrowing my focus and finding my style. I think the quality of my writing has come a long way this last year, but still leaves a great deal to be desired. I want this blog to have worth (rather than just an account of my activities), so I am thinking about fleshing out some previous posts into articles and tutorials. I am open to suggestions in this matter.

On design…

I don’t feel an urgent need to change the basic design of the website, since this look-and-feel is only eight months old anyway. It has held up under additions without any signs of creaking, so I think it will be good for another year.

When I come to redesign the site I’ll be paying close attention to my statistics. I’ve gained some interesting insights into how this site is used (ie: what is popular and what is not) and these factors will be taken into account. One result is likely to be a blog that is more visual, with less categorisation.

On projects…

I have lots of ideas going forward. I plan to release simpleContact 1.2 in November, and version 1.3 is pencilled in for February. I’ve made no secret of my intention to release a commercial product next year, which will exist alongside the free version and offer more sophisticated functionality (custom fields, for starters).

I’ll start work on simpleContact 2.0 “Pro” in the new year. Watch this space…

This period of focusing solely on a free version is proving immensely valuable, because it allows me to gauge people’s opinions. I can get a feel for what people need, how much active support I will have to perform and respond to bug reports or compatibility issues (which I’m pleased to say have been very few).

As always, I am open for feedback and support. I have a roadmap in place for the application, but will give requests due consideration. Contact me with yours…

Back to work!

Moving home

Monday, October 15th, 2007

I mentioned in a previous post that I registered alex-hardy.co.uk with the intention that it should become my new (and permanent) home. Well I’ve poked with this and prodded with that, and now I’m as ready as I’ll ever be. I’m going to sit myself down in front of the computer tonight and move things over.

That means this site will be down / intermittently available later on, but hopefully the move shouldn’t take too long. There may be some glitches over the next couple of days, which I will do my best to sweep up as quickly as possible.

Thanks to redirection magic, existing links and bookmarks should continue to work.

See you on the other side :)

Learn the “way of the monkey”

Monday, September 24th, 2007

Cheeky Monkey Business Solutions

A new website by The Foundry went live this morning. Cheeky Monkey Business Solutions deliver “a human approach to innovation and change.”

Designed by our very own Mital Daya and built by myself, we had lots of fun working on this one.

Explore the site and see how many secret animations you can find!

In keeping with our accessibility guidelines, a HTML version will follow soon.

Just claiming my blog…

Wednesday, August 15th, 2007

… for my Technorati Profile. As you were…