Archive for the ‘Uncategorized’ Category

Melbourne Web Developers

30 Aug

So I have decided to start yet another meetup…

Why you say?

Because I like to socialise and the current meetups in Melbourne are all specialised to one language or technology. I wanted a higher level meetup where developers from different backgrounds can come along and share ideas. In addition I reckon Melbourne is the Silicone Valley of Australia and getting talented developers together will only solidify this statement!

What is it?

Melbourne Web Developers is a bi-monthly meetup that brings together Melbourne’s awesomely talented web development community to exchange ideas, have a beer and talk about all things interwebs related!

We cover web development topics including high scalability, user experience (UX), web frameworks and languages, social media, harnessing cloud tools and SAAS and anything else that makes web applications work!

When is it?

Its the last Wednesday of every second month… So the first meetup is on the 28th of September.

How do I join?

The group is listed on Meetup who takes care of all of that! Check out –

Comments Off

Posted in Uncategorized


Restoring previous versions of files in Dropbox

05 Jun

One of the most common questions I am asked now the WordPress Backup to Dropbox 0.8 has been released is, now that the zipping has been removed, can one still get an earlier version of a file that has been backed up? The answer to this question is, yes you can! Dropbox has this functionality built in and it is extremely easy to do.

Lets just say you botched a post and want to revert to a database a few days old. To do so go to the Dropbox web interface and navigate to the file that you wish to revert.

Once you have located the file all you need to do is click the little down arrow on the right hand side and select ‘Previous Versions’.

Note: You can also select ‘Previous Versions’ within the Dropbox folder on your computer by right clicking on the file and selecting this option in the Dropbox sub menu.

Once selected you will be presented Dropbox’s Previous versions page.

As you can see I dump my WordPress database every day so I can revert my SQL dump to any version within the last 30 days by selecting the day that I wish to revert to and clicking the restore button.

More information can be found in the Dropbox help page.

Comments Off

Posted in Uncategorized


JavaScript integer associative arrays

04 Oct

I was writing some JavaScript today and I came across some interesting idiomatic quirks with arrays and associative arrays. This is probably well know but I am going to blog about it anyway because it frustrated me for a little while.

I have learned that JavaScript associative arrays are not really arrays at all. I wanted to add an a set of integer keys based on a database unique identifier and post it using AJAX. Now because my key was a high end integer the function was causing my browser to hang!

Why can this be? I have only added one value to the array!

Well it turns out that JavaScript does not create an associative array with integers. Instead it pads the array with undefined for each unused slot up to the value you defined.

The code below it will create an array ten “undefined” elements followed by one element with the value “Ten”. Now imagine using a high end integer of, say 22351550! In addition it does not matter if you use arr[10] or arr["10"] because JavaScript still evaluates the 10 enclosed in a string as an integer.

var arr = [];
arr[10] = "Ten"; // or arr["10"] = "Ten"; 

After a bit of research I found out that keys in JavaScript associative arrays are not actually added array, instead the key is added to the Array object. Therefore in the following scenario the Array object is made up of a 5 element array containing five “undefined” elements and one element with the value “five” and an additional key value pair of “one” => 1.

var arr = [];
arr[5] = "five;
arr["one"] = 1;

document.write(arr.length); //Prints 6
document.write(arr[5]); //Prints five
document.write(arr["one"]); //Prints 1

Now the best way I could find to use integers as an index in an array is not to use arrays at all. Instead use objects like the code below.

var arr = {};
arr[22351550] = "Hello World!";

document.write(arr[22351550]); //Prints Hello World
document.write(arr.length); //Prints undefined

The only issue with this approach is that you will no longer have access to length because Object has no length property.

So basically changing two characters was all that was between success and failure here!

Comments Off

Posted in Uncategorized