Archive for August, 2007

PHP is an Auto-Mountian Bike

August 18th, 2007

After someone posted this article to the dZone site they were quick to spot that it missed one crucial language from the list: PHP.

So here’s my take on what PHP would be like if it was a car:

PHP was a mountian bike that got crow barred into car-dom.  Its had a lawn mower engine strapped to its rear wheels and a turbo made from washing machine ducting kitted round the front.  To keep it all going a set of stabilisers and prayer beads have been chucked on.  It’ll get you from A to B but its not as reliable or friendly as that Python and Ruby model that just hovered past.

Firebug for the Impatient

August 5th, 2007

Firebug LogoI installed Firebug a long while back and didn’t think much of it. Granted I never read the docs or even the description. I like to just try things out and if I don’t figure it in 10 seconds flat it normally gets ignored. Unfortunately that meant I missed an absolute goldmine and looked a prat in the process.I’ve since attained ‘Firebug Enlightenment’ and so I thought I’d throw together a ripspeed post on Firebug for the un-initiated and un-convinced:

See the response of Ajax calls
This was what really hit me when I delved a bit deeper into Firebug. Its a shame its so hidden away but by opening up your Firebug console and selecting the “Net” tab before clicking “XHR” you will get a listing of all the Ajax calls made so far since the last full page load. If you click on a particular listing then it’ll expand to give you information on the headers sent and any server response. This is invaluable to debugging your Ajax apps!

Edit HTML and CSS live
When you eventually get out of the habit of pressing F5 for every change you make to your page and start using this feature you’ll become a whizz. You can inspect and modify the entire DOM on the fly with all changes appearing live.

Debug Javascript
Not only will Firebug notify you with a statusbar area the number of errors in your document but you can open the Firebug console to get further detailed information on any errors, including their location and debug messages.
You can even execute any javascript commands from the Firebug console allowing you to tweak and experiment with the page on the fly.

More info…

Logging
You can enter anywhere in your javascript code the logging commands to get information on a variety of variables and objects as your code runs. Which is so much more freindly and efficient than the old school “alert()” method.

console.log(myVar); //echos the var to the console
console.dir(myObject); //echos all the variables and methods of the supplied object

More info…

Getting info on objects and variables
On the console you can type a variety of commands but my most heavily used is:

dir(myObject);

It doesn’t look like much but its incredibly useful as it allows you to see all the methods, values and state of the object you pass to it. You can do it with anything in your document, including the document itself.

Mind Mapping

August 4th, 2007

Image:Cosmological Argument Mind Map.pngI’ve been using mind maps now for well over 10 years on and off.  It started off from just the general spider diagrams I used at school to the elaborate, colourful drawings and more recently the online or application based maps such as Mind Manager or Mind Meister.

One thing I’ve come to realise in that time is that mind maps are absolutely revolutionary in what they can achieve.  It seems to sort my thoughts out and helps in following paths and getitng things done.  I’ve used them for planning a day, week, year.  Writing blog posts, reports, long emails, taking notes and managing projects.

Mind maps fit very nicely with my development too with my notebooks being filled with project plans, notes, code layouts, UI ideas all in mind map form.  Another area I’ve found them really useful is mapping books.  I’ve found no better way of studying, learning and reviewing books than with mind maps.http://www.brianmicklethwait.com/education/archives/MindMapSmaller.jpg

If you’re not a fan of the paper and pen approach then you may prefer one of the apps like MindJet Mind Manager or an online app called Mindomo.  Both offer a lot although Mindomo is free and Flash driven.

I’d seriously give it a go – does anyone else use mind maps and if so what for?

What I’d kill for is someone to build a mindmapping todo platform.  Like Remember the Milk + Mindomo.

Y Your Pages Are Slow

August 4th, 2007

Firebug already comes with solid profiling built in showing times, averages and call frequency for files but Yahoo have now released a plugin for Firebug (yes Firebug) that gives even greater detail on page performance and rates it based on Yahoo’s own performance criteria.You can grab the addon from the Firefox addons site (you’ll need Firebug first) and you can see Yahoo’s info over at their development site.