@madpilot makes

ByteMe!, PerthMassive and Freelancer Friday – take me where the web goes.

We are hurtling into the wacky end of the year – before you know it, we’ll all be drinking egg-nog and having seedy older men/women hitting on us at office Christmas parties (or vise-versa if you are said seedy man/woman). Well to celebrate, the Perth digital content community is throwing some awesome events over the next couple of weeks: Namely ByteMe! and PerthMassive,

ByteMe! is the brainchild of Kat “I must be taking something because it is impossible for one person to do the amount of stuff I do within a 28-hour day, let alone with in the bounds of current time” Black – it is a free week-long festival that will be show casing the best 1’s and 0’s of the Perth digital community. Not only that, there are some pretty god-damn kick-arse speakers (See for yourself). It it December 2-9 and did I mention free? Oh and AWIA will be running a BarCampNano on the Sunday from 1-4pm – so if you have anything you want to show the world in 20 minutes or less, rock up between those hours to the Perth Town Hall.

Speaking of AWIA, please note that there will be NO Port80 in December because of the biggest digital Christmas party this side of Omnicrone-4, Perth Massive is on! So free up your schedules for the 6th 4th of December 2007, and head over to the Library in Northbridge (The niteclub, not the repository of books) and meet-up with others that like to do what you do (Unless what you like to do is macrame – unless the macrame usergroup shows up). Also free. Free as in beer. And there is Free beer. Which is free as in – beer. Make sure you go and register though, so the organisers knowhow much free beer to get.

Oh, whilst I’m at it, We are having the next installment of our exciting Freelancer Friday initiative at the Silicon Beach house on Friday 30 November 2007. We had about half a dozen people last time which was awesome and since the last one have knocked down some walls and stuff (shh, don’t tell the landlord) so there is heaps more desk space now. If you are interested, drop me an email, or throw your name on the Work@Jelly wiki under Work@ Jelly Perth – Freelancer Friday.

So get your dancing frocks and red (Reebok) pumps and lets rock this Popsicle stand!

New version of Twitteresce available

After a long hiatus from development (I’ve been busy ok!) I’ve just released a new version of Twitteresce – a mobile client for Twitter. New features include:

  • The ability to delete your tweets and direct messages
  • A correct “sent from” string on the web site version
  • Other small bug fixes

So point you mobile browser at http://www.madpilot.com.au/twitteresce and download version 0.9.

String theory explained in two minutes

Well I’m convinced

AWIA’s very own OpenID server

I just deploying a new version of the AWIA website, which adds an OpenID service provider – so now AWIA members can use their member username and password to login to any OpenID-enabled website.

OpenID is a de-centralized authentication standard that allows you to use one username and password across any site that supports the standard. It can also send common information such as email address and username. The number of sites that support OpenID are steadily rising, which is why I added these functions to the site.

It is all very easy – login to your http://app.webindustry.asn.au/members/login click “Your details” then “Edit”. There is a new field labelled username. Enter a username here and then, when you come across an OpenID enabled site, just login in to http://app.webindustry.asn.au/user/[username]

Easy as you like it!

Podcamp racetrack’s in 10 days’ on

(Mental note: Work on better blog post titles)

Annnyway, as many of you know, Podcamp is coming to Perth on the 28th and 29 of October. A little birdie and my scouta on the ground tell me that we are getting some big names from over east to participate in this Australian first.

Now, there has been a bit of confusion over what can be presented at Podcamp – it isn’t just about Podcasting. Anything that fits in the realm of new media (I know – I hate that term too, but I haven’t got anything better at the moment) would be a worthy topic.

There will be shirts available on the day. It’s going to be a great couple of days, so make sure you mark em down in your diary.

And all that Meraki…

These little networking devices have created quite a stir amongst the twitterati over the past couple of days, even enough to make Lachlan Hardy revive his blog! :P

Anyway, as he mentions I’m taking some orders for any Perth peeps that would like a couple. The more people we get, the cheaper the shipping is (the shipping on one unit costs $US50 – 13 units, it come down to $US10 a unit – mob rules!).

Go check out Lachlan’s post for the low-down on what these things can do. If you want a couple, drop me a line – I’ll be getting them on Friday, so chop, chop.

Freelancer Friday – come and hang out with us!

Anyone who has ever freelanced knows that being your own boss is great, but it can also be lonely. Being able to work in your pyjamas is convenient but not being able to bounce ideas off other people can be frustrating. As many of you know, I work in at the Silicon beach house which is a shared office space and we have a board room table and some couches that are less than utilised, which kinda made me think – we should have a freelancer day! And so you, kind people of the intarwebs, I present Freelancer Friday.

The idea is simple – bring your laptop and bring your work. We all sit around doing said work, but we can bounce ideas off each other, try different things out or just generally find was to distract each other :)

It is really similar (if not exactly the same) as the Work At Jelly initiative, so if you have heard of that, you will know what we are talking about.

So we will be running the first Freelancer Friday in two weeks on 26 October 2007 at the beach house – Level 2 Kings St, Perth. There will be someone there by 9, so any time after that is cool.

Grant and I are feverishly plugging away at building a web site around the idea, and it should be up soon, but we don’t have to wait for that. If you are interested, please email me on myles@madpilot.com.au

Edit: Oops, nearly forgot – if you aren’t in Perth and think the idea of a Freelancer Friday is cool, start your own one up! Invites some freelancing mates over to your house and get to work. It’s really easy to do. They don’t even have to web type people ;)

Be a good netizen: Use the correct HTTP response code

Remember the good ol’ days back before dymanic websites where pages had .html extensions and when you tried to access a page that didn’t exist you got an ugly, yet reassuring 404 Not found page? The significance of this page is actually pretty important – not only does it tell the user that the page is not found but it returns a special HTTP status that tells web spiders the same thing. As web developers, sometimes we forget that humans aren’t the only ones accessing our pages, and as a result don’t use the correct HTTP response codes to denote what is going on.

What the hell is a HTTP response code?

When your web browser makes a request to a web server, the web server will return a status code as well as the web page, which tells your browser what has happened. This response is usually made up of two parts: a number (which is for any spiders or bots that might be accessing the web site) and a string (which is for humans) and back when everything was static the web server took care of everything.

Unfortunately for web developers, in this environment of database driven web sites, we often don’t have the luxury of letting the server take care of everything, so this article aims to show you that it isn’t that difficult to do HTTP responses correctly. As I will show later, this can adversely affect your ranking in your favourite search engine.

Let’s try it out

Firstly, lets see what happens when you actually make a request – you can see what is going on using another old school application: Telnet.

Open up command line or Terminal.app or terminal depending on you flavour and type the following:

telnet madpilot.com.au 80

You will get a prompt and type the following (Windows users might not see anything as the telnet client won’t echo what you type):

HEAD / HTTP/1.1
Host: madpilot.com.au

…and hit enter twice – you should see something like:

HTTP/1.1 200 OK
Server: Mongrel 1.0.1
Status: 200 OK
Cache-Control: no-cache
Content-Type: text/html; charset=utf-8
Content-Length: 4123

The first line of the response is the important bit – it tells the web browser that the response conforms to HTTP version 1.1 and more importantly the response code is 200 and the response type is OK! The 200 type is the most common response you will come across, it means that the page was found and served up correctly. Generally your web server WILL take care of this one for you. Let’s look at how you can change that status code.

I’ll use PHP as an example, because it is still the most common dynamic language – but you can do this in any language, leave a comment if you would like an example of how to do it in another dialect. It is all very simple – BEFORE you output any HTML, call the header() function as such:

header("HTTP/1.1 404 Page Not Found");

As you have probably guessed, this will tell the browser that the page it requested was not found. Why would you want to do that? Obviously if the script is being run, it has been found? Well, yes – that is true, however, when the HTTP specification was written, CMSs and dynamic product catalogues weren’t even thought about – so we need to think a little bit differently.

Let’s look at an example: Your customer has requested to see the details for product #10 by browsing to

http://www.yourcomany.com/products/view/10

Product #10 exists, so we serve up the details, but what if the customer decides to see what product #20 is? If product 20 doesn’t exist, then what should we do? One option is to print out “Product not found” which is fine for the user, but what happens if your favourite search engine tries to hit product #20? If you maintain the default action the search engine will receive a 200 OK status which makes it think that the product exists and it will index it! This just pollutes the search engines’ index and hurts your ranking, which is bad. So what we can do is serve up the 404 header from above and this let’s both the user AND the search engine know that what they have requested doesn’t exist.

So what other response codes can we use? There is a complete list here, but I’ll run through a couple of the common ones:

301 Moved Permanently: This response code means the resource that has been requested USED to live here but has now moved somewhere else and will never return. Returning this status code is extremely important if you are changing the structure of your website, as you can tell the browser where it needs to go to get the resource. More importantly, it also tells your search engine to update it’s index with the new URL. You need to supply the new URL as part of the request, so it looks something like this:

header("HTTP:1/1 301 http://www.yoursite.com/new-url");

302 Found: The 302 is actually generally used incorrectly. The most common use is to redirect a user to another page TEMPORARILY which is actually what the 303 code is for. unfortunately, not all browsers support 303 and actually expect a 302 in this case. So who are we to argue? If you are a PHP developer, you have probably used

header("Location http://www.yoursite.com/somewhere");

before – this is exactly what this does.

403 Forbidden: If you wanted to really play HTTP right, you would return this code every time someone tried to access a private URL when they weren’t logged in. It means the server knows what you are trying to do, but isn’t going to let you do it.

404 Page not found: This has been covered – basically if the resource the agent wants doesn’t exist, you serve this up.

410 Gone: This page you are looking for used to exist, but it doesn’t anymore. In fact there isn’t even a new URL, so if you are a search engine, just forget about it. Whether search engines listen to this, I’m not sure, but it can’t hurt.

500 Server Error: Something went wrong with the server. I would throw this up if there is an error that is stopping the page from loading, such as a missing database or a broken web service or similar.

Don’t forget that you can also server up content to the browser (in fact, if you don’t humans will just get a blank page), so it is recommended that you serve up a nice friendly message to your visitors explaining what happened.

So there you go – now there is no excuse for serving up errors to your users and forgetting about our automated friends. So when you are writing your next kick-arse web app, spare a thought for the visitors that aren’t so good at parsing human talk.

Sleepless in Sydney – Web Directions begins…

Here we are again at Web Directions and the drinking, erm, learning has begun.  Last night, we had Port80 Sydney at the Quarryman Hotel which was conveniently across the road from our hotel. The usual Perth suspects where there (as was expected, most of them are staying at the same hotel across the road) but we also had a number Port80 noobs who can along, probably for the free beer. Unknown to us, the Quarryman has a quiz night on a Wednesday night, so we entered two Port80 teams, one of which can second!

Once again, Grant and I were up to our usual shenanigans, and we decided to ignore the advice of the others and headed to a late night pub until 3am, so I’m feeling a tad seedy now. BUT that dd mean I managed to get some sleep last night. Unfortunately, the friendly barkeep failed to mention that they had redirected M4 motorway to flow right next to my room. At about 5:30 it seems that every truck in NSW drives along Harris St, which has a metal plate in the room which plays an ever so sweet drumming noise as said heavy vehicles drove over them. Nice.

Anyway, we have now managed the get to the conference proper and we are just over half-way through the first day. We started off with Rashami Sinha from Slideshare speaking about the perils of popularity. It was very oriented around the different types of social networking. It is scary how many Facebook users there were in the room. I’ll rant about Facebook shortly.

I next went to Andy Clarke awesome talk where he looked at how web designers can steal techniques from comic books. Andy is an awesome speaker which I was silly enough to miss last year – but I’m glad I made it this time around. His slides were beautiful and he presented so smoothly. Enough gushing.

I wanted to see Cameron Adams, but the room was so full (there were people sitting in the hall) so I went and hung out with Rose and Adrian.

Now I’m sitting in John Allsopp‘s talk about the future of the web – looks like we agree – the mobile web is going to be the next big thing. I’m seriously thinking about going out to buy an iPod touch when they get released tomorrow so I can get developing on some serious mobile web sites.

Right, getting motivated – will probably start cutting some code soon :)

Gentlepersons, start your engines

I have just arrived at the Kirk on Harris in Sydney which has become the Perth head quarters for those who are attending Web Directions South 2007. Whilst Gary, Drew and Nick are at workshops today and whilst I wait for the rest of the Perthians to show, I’m going to go hang out with Tim and try to get a sneek preview of the version 2.0 of the Web Directions social networking tool – connections.

More to come…

Previous Next