digibrown » web.software.design » Coding http://digibrown.com agile creative functional & fun software design Tue, 01 Dec 2020 08:09:01 +0000 en hourly 1 http://wordpress.org/?v=3.1.3 Google Developer Day and My presentation @Creative sandbox http://digibrown.com/2011/11/google-developer-day-and-creative-sandbox/ http://digibrown.com/2011/11/google-developer-day-and-creative-sandbox/#comments Tue, 08 Nov 2011 08:18:59 +0000 anubis2020 http://digibrown.com/2011/11/google-developer-day-and-creative-sandbox/

So I was off to Darling Harbour for the annual Geek-fest that is #gdd11, and was pretty impressed with the quality of the lunch boxes…the talks weren’t bad either. Actually the highlights were Timothy Jordan & Julia Ferraioli’s presentation on Using the Google+ APIs and also Eric Bidelman’s Bleeding Edge HTML5. I even managed to incorporate some new HTML5 features into SwipeStudy during the presentations!

Later in the evening Presented SwipeStudy at Google Creative Sandbox 2011, Carriageworks Sydney.
, a great night despite the stormy weather, I was almost electrocuted on the monorail trying to get there…

20111128-191855.jpg

Thanks to all you marketing types who gave me great feedback on swipestudy and it’s potential uses in training and education.

]]>
http://digibrown.com/2011/11/google-developer-day-and-creative-sandbox/feed/ 0
Why buzzwords like HTML5 are useful http://digibrown.com/2011/02/why-buzzwords-like-html5-are-useful/ http://digibrown.com/2011/02/why-buzzwords-like-html5-are-useful/#comments Wed, 02 Feb 2011 02:59:34 +0000 anubis2020 http://digibrown.com/?p=668

But I think there’s actually a very good reason why we should, in fact, embrace the term “HTML5” as an overarching buzzword for this latest round of web standards and specifications. Our industry has proven on several occasions that we don’t get excited about new, interesting, and useful technologies and concepts until such a buzzword is in place.

“AJAX,” of course, is the canonical example of this. DOM scripting, XMLHttpRequest, and dynamic Javascript all existed long before the term “AJAX”. But it wasn’t until the clever term was coined that anyone really cared. As soon as we had a single, simple word we could all get behind, Javascript really took off. A proliferation of frameworks and libraries hit the scene, and suddenly we were all building dynamic web projects. And the term was misused. Badly. Left and right. Much of the great code being written didn’t use XML. Much of it wasn’t asynchronous. But most of it was pretty great, and it was usually called “AJAX” wether it really was or not. And pedants went crazy. They argued about the semantics of the term “AJAX” until they were blue in the face. But in the end, no one would argue that “AJAX” wasn’t a good thing for our industry. Without that term, we wouldn’t be where we are today.

And it’s not just AJAX. If you want other examples, look no further then “Web 2.0” and “Microformats.” “HTML5” is today’s “AJAX.” Just as with “AJAX,” people are misusing the term all over the web. But it wasn’t until influential people and companies (notably Apple) started misusing the term that web developers at large (myself included) starting taking this new collection of web standards, specifications, and best practices seriously, as something that might be useful before 2022.

Sometimes we just need a word to rally behind. And put in job descriptions. And claim we “support” (another word that is mostly meaningless). It’s a language thing and a human psychology thing.

So be pedantic about the semantics of “HTML5” if you want, but don’t be surprised if no one really listens. This is something most people can understand and get behind. This, on the other hand, is not.

http://jeffcroft.com/blog/2010/aug/02/term-html5/

]]>
http://digibrown.com/2011/02/why-buzzwords-like-html5-are-useful/feed/ 0
Using Closures in Javascript to pass parameters to setTimeout() http://digibrown.com/2010/07/using-closures-in-javascript-to-pass-parameters-to-settimeout/ http://digibrown.com/2010/07/using-closures-in-javascript-to-pass-parameters-to-settimeout/#comments Fri, 30 Jul 2010 02:04:10 +0000 anubis2020 http://digibrown.com/?p=541

For the home page of my site I wanted to cause certain divs to fadeIn using jQuery after varying amounts of time. In javascript we can use setTimeout() to schedule an arbitrary function call for some point in future. However the function works differently between Firefox and Internet Explorer (MSIE).

In FireFox, you would do this:

setTimeout(myFadeIn(), 1200, "id1");
setTimeout(myFadeIn(), 2700, "id2");
setTimeout(myFadeIn(), 3500, "id3");


Except, MSIE doesn’t like this. And in fact the additional parameter is not even part of the official javascript spec.

So how can we work around this ?

Closures. In the below example I use closures to pass an anonymous function to setTimeout() that contains in its “frozen in time local scope” the id of the div to fadeIn.

// Return delayed fadeIn closure function 
function delayFadeIn(id){
    return (function(){
        $('#'+id+'_img').fadeIn(1000);
    });
} 

//Setup three delayed fadeIns by passing closures to setTimeout
function setupFadeIns(){
    setTimeout(delayFadeIn("id1"), 1200);
    setTimeout(delayFadeIn("id2"), 2700);
    setTimeout(delayFadeIn("id3"), 3500);
}


And this will work in both MSIE and FireFox :)

]]>
http://digibrown.com/2010/07/using-closures-in-javascript-to-pass-parameters-to-settimeout/feed/ 0