<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>“code is never perfect, just varying degrees of less broken.”</description><title>brain bumping</title><generator>Tumblr (3.0; @brainbumping)</generator><link>http://brainbumping.com/</link><item><title>Blog moved</title><description>&lt;p&gt;Hey! This is old! This blog has moved to &lt;a href="http://timmywillison.com"&gt;http://timmywillison.com&lt;/a&gt;&lt;/p&gt;</description><link>http://brainbumping.com/post/3404915724</link><guid>http://brainbumping.com/post/3404915724</guid><pubDate>Sun, 20 Feb 2011 12:00:10 -0500</pubDate></item><item><title>Flash + IE = *&amp;^*</title><description>&lt;p&gt;So my colleague @blahed said I should write a blog post about this problem I had.  I said it would be short post and it would go something like this….”Don’t use Flash”.  But I guess I’ll expound.&lt;/p&gt;
&lt;p&gt;Let’s put it this way.  Flash is like your fist.  And IE is like the rusty nail that gives you tetanus and makes you die.  Working with one is bad…working with both causes infections in your intestines.  And it hurts.&lt;/p&gt;
&lt;p&gt;Recently, I needed to embed a swf and all I wanted it to do was play when it became visible and stop when it wasn’t visible.  But if you’ve ever had to write an actionscript interface for your swf (for instance play and pause functions you can call from javascript), you may have run into problems with ExternalInterface.addCallback.  There is a wonderful post that explains all of the pitfalls when using this function &lt;a href="http://waww.com.au/ramblings/externalinterfaceaddcallback-object-doesnt-support-property-or-method"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Basically it says you can’t put the swf inside a form (which wasn’t my problem), you should use something like swfobject to embed your swf (which I was through jquery.media), and, here’s the kicker, THE FLASH FILE MUST BE VISIBLE ON THE PAGE. That’s right.  If you’re functions aren’t working…it may be because the swf isn’t visible.  You might be asking, “Does this go for all browsers?”  Of course not dummie, only IE.  Instead, I made the swf autoplay whenever it is attached to the DOM and I had to just attach and detach it whenever it should play or stop.&lt;/p&gt;
&lt;p&gt;Here’s that jQuery (stopOldMovie starts out as the callback from $.media, then I can call it without params once the movie is saved as loopMovie):&lt;/p&gt;
&lt;pre&gt;    var loopMovie;

    /** Append the movie */
    function playOldMovie () {
        loopMovie.appendTo('#webcam-loop');
    }
    
    /** Stops/detaches the movie */
    function stopOldMovie ( orig, newDiv ) {
        if ( loopMovie === undefined ) {
            loopMovie = $(newDiv).detach();
        } else {
            loopMovie.fadeOut(400, function() {
                $(this).detach().show(); // fadeOut applied display:none so .show afterwards to remove this rule
            });
        }
    }
&lt;/pre&gt;</description><link>http://brainbumping.com/post/2362340973</link><guid>http://brainbumping.com/post/2362340973</guid><pubDate>Sat, 18 Dec 2010 13:19:10 -0500</pubDate><category>jquery</category><category>flash</category><category>IE</category><category>ExternalInterface.addCallback</category><category>swf</category></item><item><title>VHF</title><description>&lt;p&gt;VHF&lt;/p&gt;</description><link>http://brainbumping.com/post/1578727536</link><guid>http://brainbumping.com/post/1578727536</guid><pubDate>Sun, 14 Nov 2010 23:37:42 -0500</pubDate></item><item><title>Friday Fun: Rapping puppets that are awesome.</title><description>&lt;embed type="application/x-shockwave-flash" src="http://assets.tumblr.com/swf/audio_player_black.swf?audio_file=http://www.tumblr.com/audio_file/881378853/tumblr_l6e51ljYiU1qbtooi&amp;color=FFFFFF" height="27" width="207" quality="best" wmode="opaque"&gt;&lt;/embed&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Friday Fun: Rapping puppets that are awesome.&lt;/p&gt;</description><link>http://brainbumping.com/post/881378853</link><guid>http://brainbumping.com/post/881378853</guid><pubDate>Fri, 30 Jul 2010 17:58:00 -0400</pubDate></item><item><title>password123 Version 1.1 with placeholders</title><description>&lt;p&gt;I was trying to think of problems that people might come across in using this plugin and the first thing that came to mind was placeholders.  They are getting more popular these days, especially since they’re so easy now with HTML5.  So, it took some work, but password123 1.1 will support any placeholders you put in the html.  Like so…&lt;/p&gt;
&lt;p&gt;&lt;span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&lt;input type="password" value="password"/&gt;&lt;/pre&gt;
&lt;p&gt;OR for the HTML5 enchanced…&lt;/p&gt;
&lt;pre&gt;&lt;input type="password" placeholder="password"&gt;&lt;/pre&gt;
&lt;p&gt;An option allows you turn off the placeholder functionality and just have a regular default value.  Another advantage is you can choose to have the placeholder masked or unmasked, and of course the virtues of gracefully unobtrusive javascript are still upheld.  I admit I had mentioned the word “placeholders” before, but they were just default values without the focuses and blurs.&lt;/p&gt;</description><link>http://brainbumping.com/post/773848965</link><guid>http://brainbumping.com/post/773848965</guid><pubDate>Mon, 05 Jul 2010 15:58:00 -0400</pubDate><category>password123</category><category>iphone</category><category>passwords</category><category>jquery</category><category>placeholders</category></item><item><title>password123</title><description>&lt;p&gt;As you know, I recently went a little berserk with iPhone-style password fields.  I was thoroughly invigorated by the challenge of this seemingly simple idea.  I wanted to write a plugin that would conquer and destroy the inadequate dPassword plugin from decaf (see link in previous posts)…mission accomplished my friends.  *applause and bashing of heads*&lt;/p&gt;
&lt;p&gt;Some fixes and differences from their version:&lt;/p&gt;
&lt;p&gt;1. Adding/deleting characters in the middle works&lt;/p&gt;
&lt;p&gt;2. Cursor position stays the same when you type or delete in the middle of a password.&lt;/p&gt;
&lt;p&gt;3. Cursor position stays the same if you put the cursor somewhere besides the end before the timeout changes the last character.&lt;/p&gt;
&lt;p&gt;4. When you do a select-all delete, it will not be buggy.&lt;/p&gt;
&lt;p&gt;5. I’ve taken out the interval and debug options.  If someone is knowledgeable enough to debug or change the interval, they can go into the code themselves so I don’t have to increase download size for everyone else.&lt;/p&gt;
&lt;p&gt;6. You can have default values in the fields if you want.  Just do it as you normally would, put it in the html…&lt;input type=”password” value=”placeholder”/&gt; and password123 takes care of it.  It was better to do it this way than have an option for all elements because you can keep element-specific placeholders.&lt;/p&gt;
&lt;p&gt;demo: &lt;a href="http://timmywillison.com/samples/password123/"&gt;&lt;a href="http://timmywillison.com/samples/password123/"&gt;http://timmywillison.com/samples/password123/&lt;/a&gt;&lt;/a&gt;&lt;br/&gt; github: &lt;a href="http://github.com/timmywil/password123/"&gt;http://github.com/timmywil/password123/&lt;/a&gt;&lt;/p&gt;</description><link>http://brainbumping.com/post/771262907</link><guid>http://brainbumping.com/post/771262907</guid><pubDate>Sun, 04 Jul 2010 22:58:00 -0400</pubDate><category>dpassword</category><category>iphone</category><category>jquery</category><category>password123</category><category>passwords</category></item><item><title>BUG FIXED (iPhone-style passwords)</title><description>&lt;p&gt;That bug I knew I had with the password fields is now fixed!  It was refreshing to veer away from the comfort of jQuery get my hands dirty in raw js.&lt;/p&gt;
&lt;p&gt;I thought this was an interesting bug, which was you couldn’t delete a character from somewhere in the middle of your entry and have it be correctly duplicated in the hidden field that actually gets sent with the form.  I needed to detect the position of the text cursor, which jQuery doesn’t do at all.  The solution turned out to be simple; this is what I ended up with:&lt;/p&gt;
&lt;p&gt;&lt;code&gt; // Gets the current cursor position in a textfield&lt;br/&gt; // to determine where to delete a character &lt;br/&gt; getCursorPosition : function(field) {&lt;br/&gt;&lt;br/&gt; // IE &lt;br/&gt; if (document.selection) { &lt;br/&gt;&lt;br/&gt; field.focus ();&lt;br/&gt; var sel = document.selection.createRange(); &lt;br/&gt; sel.moveStart ('character', -field.value.length); &lt;br/&gt; return sel.text.length; &lt;br/&gt;&lt;br/&gt; } &lt;br/&gt; // OTHERS&lt;br/&gt; else if (field.selectionStart || field.selectionStart == '0') &lt;br/&gt; return field.selectionStart; &lt;br/&gt;&lt;br/&gt; // Something went wrong &lt;br/&gt; else &lt;br/&gt; return -1; &lt;br/&gt;&lt;br/&gt; } &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;All that’s left now is turn it into a plugin and give people options.&lt;/p&gt;
&lt;p&gt;See the result at: &lt;a href="http://www.timmywillison.com/samples/iphone_passwords/iphone_passwords.html"&gt;&lt;a href="http://www.timmywillison.com/samples/iphone_passwords/iphone_passwords.html"&gt;http://www.timmywillison.com/samples/iphone_passwords/iphone_passwords.html&lt;/a&gt;&lt;/a&gt;.&lt;/p&gt;</description><link>http://brainbumping.com/post/671710668</link><guid>http://brainbumping.com/post/671710668</guid><pubDate>Sun, 06 Jun 2010 23:00:00 -0400</pubDate></item><item><title>Password Inputs, iPhone style with jQuery</title><description>&lt;p&gt;DECAF came out with a jQuery plugin last year called ‘dPassword’ for replacing password fields with iPhone-style password fields.  However, I find the plugin deficient and buggy.  I certainly give them credit for taking a crack at it because this is not a trivial problem to solve.  Nevertheless, I find it a little amusing that the live demo on their page is broken.&lt;/p&gt;
&lt;p&gt;And that was the best I could find.  So, I’m in the process of writing my own.  It’s not plugin style yet, but everything is functional.  &lt;/p&gt;
&lt;p&gt;I handle sending the real password a little differently.  I replace the password input field with a hidden input to keep track of the real value.  This hidden input gets the same ID and name as the original so this is the one that will get sent with the form.  And of course I add the text field that you type in.  The text field has a custom ID for any styling that may need to be affixed and is given the same classes as the original password field; it will simply get ignored since it doesn’t have the right id or name.  I won’t go through all the magic of changing the values.&lt;/p&gt;
&lt;p&gt;There is one known bug: you can’t delete a letter in the middle of the password and have it be represented correctly in the hidden input.  I can’t imagine anyone actually does that, but it should probably be able to do that.  That will be the next benchmark.&lt;/p&gt;
&lt;p&gt;DECAF plugin: &lt;a href="http://blog.decaf.de/2009/07/iphone-like-password-fields-using-jquery/"&gt;&lt;a href="http://blog.decaf.de/2009/07/iphone-like-password-fields-using-jquery/"&gt;http://blog.decaf.de/2009/07/iphone-like-password-fields-using-jquery/&lt;/a&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;My demo: &lt;a href="http://timmywillison.com/samples/iphone_passwords/iphone_passwords.html"&gt;&lt;a href="http://timmywillison.com/samples/iphone_passwords/iphone_passwords.html"&gt;http://timmywillison.com/samples/iphone_passwords/iphone_passwords.html&lt;/a&gt;&lt;/a&gt;.&lt;/p&gt;</description><link>http://brainbumping.com/post/662358657</link><guid>http://brainbumping.com/post/662358657</guid><pubDate>Fri, 04 Jun 2010 01:35:31 -0400</pubDate><category>password</category><category>iphone</category><category>jquery</category></item><item><title>condiment of choice</title><description>&lt;p&gt;I needed to post that I wrote a jQuery plugin providing an easy way to customize info windows and pins on a google map.  &lt;/p&gt;
&lt;p&gt;See &lt;a href="http://github.com/timmywil/jquery-google-bubbles"&gt;&lt;a href="http://github.com/timmywil/jquery-google-bubbles"&gt;http://github.com/timmywil/jquery-google-bubbles&lt;/a&gt;&lt;/a&gt; for more info.&lt;/p&gt;</description><link>http://brainbumping.com/post/608645896</link><guid>http://brainbumping.com/post/608645896</guid><pubDate>Mon, 17 May 2010 22:08:00 -0400</pubDate><category>jquery</category><category>google</category><category>info windows</category><category>bubbles</category><category>pins</category></item><item><title>Word is getting around: best HTML5 presentation</title><description>&lt;a href="http://apirocks.com/html5/html5.html#slide1"&gt;Word is getting around: best HTML5 presentation&lt;/a&gt;</description><link>http://brainbumping.com/post/535827275</link><guid>http://brainbumping.com/post/535827275</guid><pubDate>Tue, 20 Apr 2010 10:15:22 -0400</pubDate><category>html5</category><category>best presentation</category></item><item><title>Devchatt - Frank and Die Neue Javascript</title><description>&lt;p&gt;Devchatt is quickly becoming old news, but I wanted to go ahead and post these two presentations because I need a reliable place for refreshers.  &lt;strong&gt;Frank&lt;/strong&gt; by Travis Dunn and &lt;strong&gt;Die Neue Javascript&lt;/strong&gt; by Noah Burney were two of my favorite presentations.  &lt;/p&gt;
&lt;p&gt;Side note: My other favorites were about incremental development by James Long (&lt;a href="http://jlongster.com"&gt;jlongster.com&lt;/a&gt;) and an introduction to Haskell by James Sanders, but I won’t be posting about those for a few reasons.  They were both excellent, but Long’s would be long post I don’t have time for and Sanders only got 1/3 or so of his presentation finished (hoping to hear the rest sometime).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Frank&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As Travis eloquently put it, Frank is not a framework.  It is simply a tool for rapid static builds, written in Ruby.  It uses Tilt, so it comes with support for Haml &amp; Sass, LESS, Builder, ERB, Liquid, Mustache, and CoffeeScript.  It has a built-in local webserver and an excellent lorem ipsum interface.  You can generate a certain number of words, paragraphs, images, emails, names, and more on the fly to get your static build out quickly.  &lt;/p&gt;
&lt;p&gt;I played with frank a little bit and used it for a big online form I’m building.  Normally, even with Coda’s excellent autocomplete, this would take me at least 2.5-3 hours just to write the html for a form this size.  Frank cut that time in half and made it really easy to get together and compile the form into valid HTML and CSS in no time.  Another bonus: clear and concise error message made it easy to debug any problems on the way.  Also, the ducks are fun.&lt;/p&gt;
&lt;p&gt;Cons: I don’t like SASS, but it’s optional.  Besides that, there seems to be a problem with the haml compiler generating completely valid transitional xhtml, but that was easy to fix and not Frank’s fault.  All in all, Frank is no ugly duckling.&lt;/p&gt;
&lt;p&gt;Get Frank: &lt;a href="http://github.com/blahed/frank"&gt;&lt;a href="http://github.com/blahed/frank"&gt;http://github.com/blahed/frank&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Die Neue Javascript&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Ah, Noah.  Noah’s a 19-year-old genius who’s been doing javascript since he was 15 and teaches himself Korean while building letterforms in his spare time.  I loved his presentation on ‘the new javascript’.  &lt;/p&gt;
&lt;p&gt;He started off with one of the most important javascript conventions: don’t infect the global namespace!  He stressed the importance of the var keyword and explained that when you don’t use it, you’re make your variable part of the global window object.&lt;/p&gt;
&lt;p&gt;He then listed some little tricks to clean up javascript.  For instance:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Use commas to var a bunch of things at once.  var one, two, three;&lt;/li&gt;
&lt;li&gt;Objects are basically associative arrays in javascript and can be referred to as such.  alert(‘Hello’); window.alert(‘Hello’); window[‘alert’](‘Hello’);&lt;/li&gt;
&lt;li&gt;You can define functions with var = function(){};&lt;/li&gt;
&lt;li&gt;Use javascript’s ternary operator to make conditionals shorter and when you just want to return a value.&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;- Next, you can add to and modify native objects.  For instance, &lt;/p&gt;
&lt;pre&gt;Number.prototype.times = function( fn ){
  for( var n = 0; n &lt; this; n++ )
    fn( n );
};

( 5 ).times( function( x ){
  say(
    x + 1 + ' Hello' + ( x &gt; 0 ? 's' : '' )
  );
});&lt;/pre&gt;
&lt;p&gt;- Use call and apply for adding arguments to functions you call.  The first being the context.  Normally, this would just be null to have the window as the context.  However, “you can use Native object methods on other objects by using call, and passing the object in as the context.”  &lt;/p&gt;
&lt;pre&gt;var list = [ 1, 2, 3 ];&lt;br/&gt;Array.prototype.push.call( list, 4, 5, 6 );&lt;/pre&gt;
&lt;p&gt;Function.apply is similar to call, but takes an array for the function arguments, which can be very handy.&lt;/p&gt;
&lt;p&gt;- Inside of every function, lives the ‘arguments’ variable, meaning any arguments passed to the function that were not named in the function declaration.&lt;/p&gt;
&lt;pre&gt;function echo2(){
  say( arguments[0] + arguments[1] );
}
echo2( 'POW!', 'BOOM!' );&lt;/pre&gt;
&lt;p&gt;- Javascript Progress Bar.  As we know, Javascript is single-thread, meaning it chugs through the code one line at a time.  In order to implement a progress bar in Javascript, the magic line is in the setTimeout.  Doing a setTimeout(f, 0) will ensure that f, any function, will get executed last as it just pops f to the bottom of the call stack.  Check it out:&lt;/p&gt;
&lt;pre&gt;var counter = 0,
    total = 0;

loadup( plug, chug, plug, function(){ alert("WEEEEE!"); }, chug, plug );

function loadup(){
  var fns = Array.prototype.slice.call( arguments );
  if( typeof fns[0] === 'function' )
    total = fns.length;
  else
    fns.shift();

  fns.shift().call();
  fns.unshift( 'Not first' );

  if( fns.length &gt; 1 )
    setTimeout( function(){
      loadup.apply( null, fns );
    }, 0 );

  say( ++counter + '/' + total );
}

function plug(){
  for( var n = 0; n &lt; 3000; n++ )
    $('').appendTo('body').remove();
}

function chug(){
  for( var n = 0; n &lt; 5000; n++ )
    for( var o = 0; o &lt; 8000; o++ )
      n % o;
}&lt;/pre&gt;
&lt;p&gt;- To conclude, he ended with an example from John Resig’s &lt;em&gt;Secrets of the Javascript Ninja &lt;/em&gt;where computationally expensive functions can be optimized by storing computed values instead of recalculating every time.  Like so:&lt;/p&gt;
&lt;pre&gt;// Ripped from John Resig's Secrets of the JavaScript ninja
Function.prototype.memoized = function( key ){
  this._values = this._values || {};
  return this._values[key] !== undefined ?
    this._values[key] :
    this._values[key] = this.apply(this,arguments);
};

Function.prototype.memoize = function(){
  var fn = this;
  return function(){
    return fn.memoized.apply( fn, arguments );
  };
};

var isPrime = function( num ) {
  var prime = num != 1;
  for ( var i = 2; i &lt; num; i++ ) {
    if ( num % i == 0 ) {
      prime = false;
      break;
    }
  }
  return prime;
};
var isPrimeM = isPrime.memoize();&lt;/pre&gt;
&lt;p&gt;Check out his presentation and play with his code: &lt;a href="http://presentation.royowl.com/#slide-0"&gt;&lt;a href="http://presentation.royowl.com/#slide-0"&gt;http://presentation.royowl.com/#slide-0&lt;/a&gt;&lt;/a&gt;.&lt;br/&gt;&lt;a href="http://royowl.com"&gt;See his homepage&lt;/a&gt;.&lt;/p&gt;</description><link>http://brainbumping.com/post/496264471</link><guid>http://brainbumping.com/post/496264471</guid><pubDate>Sun, 04 Apr 2010 15:16:54 -0400</pubDate><category>devchatt</category><category>frank</category><category>die neue javascript</category><category>travis dunn</category><category>noah burney</category></item><item><title>Easter Fun</title><description>&lt;p&gt;In the terminal: type emacs, enter, esc, X, then type ‘snake’ or ‘tetris’, enter.  Two games you never knew you had!&lt;/p&gt;</description><link>http://brainbumping.com/post/496015621</link><guid>http://brainbumping.com/post/496015621</guid><pubDate>Sun, 04 Apr 2010 12:56:31 -0400</pubDate><category>easter</category><category>snake</category><category>tetris</category></item><item><title>The Wonderful World of HTML5</title><description>&lt;p&gt;I’ll make this short and sweet — here’s all the slides and such from my DevChatt presentation on HTML5. Hell, let’s go totally mental and post EVERY link in the slides to go with it.&lt;/p&gt;
&lt;p&gt;All the source code is available under the MIT License. Slides are licensed CC-BY-ND.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px;"&gt;
&lt;p&gt;The Important Stuff&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a target="_blank" href="http://www.slideshare.net/ghostfreeman/the-wonderful-world-of-html5"&gt;The slides&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://ghostfreeman.net/p2/DevChattHTML5/"&gt;All the demo pages&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://github.com/ghostfreeman/DevChatt-HTML5-Code"&gt;Source code (GitHub)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a target="_self" href="http://ghostfreeman.net/p2/DevChattHTML5/DevChatt-HTML5-Code.tar.gz"&gt;Source code (.tar.gz)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;All the “Reference” links&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a target="_blank" href="http://bit.ly/94Ycl1"&gt;Canvas&lt;/a&gt; (Mozilla Developer Center)&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://bit.ly/bDkXOh"&gt;Audio&lt;/a&gt; (Mozilla Developer Center)&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://bit.ly/bDkXOh"&gt;Video&lt;/a&gt; (Mozilla Developer Center)&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://bit.ly/c3i7nY"&gt;Geolocation API&lt;/a&gt; (Mozilla Developer Center)&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://bit.ly/b1EfnM"&gt;Geo.js&lt;/a&gt; (Geo.js Documentation)&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://bit.ly/d4CaSL"&gt;HTML Web Storage&lt;/a&gt; (Mozilla Developer Center)&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://bit.ly/dwNL80"&gt;HTML SQL Web Storage&lt;/a&gt; (WebKit Blog)&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://bit.ly/btoTEl"&gt;Web Workers&lt;/a&gt; (Mozilla Developer Center)&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Select HTML5 Resources&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a target="_blank" href="http://html5doctor.com/"&gt;HTML5 Doctor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://doctype.tv/"&gt;Doctype.tv&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://reddit.com/r/html5"&gt;Reddit’s HTML5 Subreddit&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://dryan.com/articles/5-ways-embrace-html5-today/"&gt;dryan - HTML5&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/span&gt;&lt;/p&gt;</description><link>http://brainbumping.com/post/478393159</link><guid>http://brainbumping.com/post/478393159</guid><pubDate>Sun, 28 Mar 2010 00:07:24 -0400</pubDate></item><item><title>DEVCHATT (and a post about current)</title><description>&lt;p&gt;Asking all devchatt presenters to post about their presentations here!  Or, send me a short summary of what you talked about so I can post it here if you don’t have a tumblr account.  &lt;a href="mailto:shearbox@gmail.com"&gt;shearbox@gmail.com&lt;/a&gt;.  I enjoyed all of the presentations I went to.  I’ll be posting about all the ones I went to, so I apologize to the ones I missed.&lt;/p&gt;
&lt;p&gt;I’ll go chronologically and being with the first presentation I went to (current built with node.js by Rob Righter).&lt;/p&gt;
&lt;p&gt;(wow that was three ‘I went to’s)&lt;/p&gt;
&lt;p&gt;I’m sure I will butcher his presentation, but let’s do it anyway.&lt;/p&gt;
&lt;p&gt;Basically, node.js is an evented server built with javascript (which makes sense for keeping track of events), meaning instead of the usual back-and-forth communication between client and server, you send a request, if the server doesn’t have anything yet, it will tell the client to &lt;em&gt;wait&lt;/em&gt;, keep the connection open, and send back the requested data when it is updated.  The server can handle many concurrent connections and the client is the one who keeps track of its own progress.  If it has no progress, it gets everything, if there are updates, it gets those after passing the server a data address of sorts in its request.  &lt;/p&gt;
&lt;p&gt;Current is a great example of this.  All it does is pull the favicons from sites that people at Medium headquarters visit and you’ll see a flow of tiny images running across the screen as pages are visited in real-time.  Pretty sweet, and I’m sure you can see how this could be useful in web applications.  Apps that look the same for everyone, but are updated in real time and something every user can interact with.  This makes me think of google wave, but they’ve got their own crap.&lt;/p&gt;
&lt;p&gt;Please comment to add something or feel free to correct me.&lt;/p&gt;
&lt;p&gt;&lt;a target="_self" href="http://current.thisismedium.com"&gt;See current in action.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;See it on &lt;a href="http://github.com/robrighter"&gt;Rob’s github&lt;/a&gt; (as well as the comet AJAX long polling project that makes current possible).&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.slideshare.net/robrighter/robrighters-nodejs-presentation-for-devchatt"&gt;See his slides (easy read).&lt;/a&gt; (These will be gone someday) &lt;/p&gt;
&lt;p&gt;((more parentheses))&lt;/p&gt;</description><link>http://brainbumping.com/post/477726257</link><guid>http://brainbumping.com/post/477726257</guid><pubDate>Sat, 27 Mar 2010 17:55:00 -0400</pubDate><category>devchatt</category><category>current</category><category>rob righter</category></item><item><title>Comments coming</title><description>&lt;p&gt;This blog is meant to be a community blog.  I really should have comments on here, but didn’t realize when I chose tumblr that they don’t support that natively (which I think is dumb).  I’ll be hacking in some disqus so we can all here from the masses (and those loving trolls).&lt;/p&gt;</description><link>http://brainbumping.com/post/470374625</link><guid>http://brainbumping.com/post/470374625</guid><pubDate>Wed, 24 Mar 2010 11:30:53 -0400</pubDate></item><item><title>devchatt cometh, pre-devchatt goith, i write something..ith</title><description>&lt;p&gt;I can think of no better way to start off the this blog than to talk about devchatt presentations.  First, if you don’t already know, DevChatt is a free developers conference in Chattanooga, TN.  pre-devchatt was today and was a taste of things to come.  We had Chris Mills from Opera come and talk to us about HTML5 and CSS3.  His project list and titles are vast, but he is involved in web education, opera evangelism, and other stuff.  Plus he plays in a metal band, has a cool English accent and the best goatie short of this guy…&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;&lt;img src="http://media.tumblr.com/tumblr_kzkcywsr8k1qb6nvy.jpg" width="250"/&gt;&lt;img align="right" src="http://media.tumblr.com/tumblr_kzkdk6F9wI1qb6nvy.jpg" width="250"/&gt;&lt;/p&gt;
&lt;p&gt;To the point, his presentation was fairly basic.  He touched on many of the generally supported features of the two specs.  Much of it you may already know, but I’ll show you some of the cool stuff.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1.  Less code and easy accessibility for common structures.&lt;/strong&gt;  Notice the lack of divs:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_kzkembQl8M1qb6nvy.gif" width="400"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2.  Machine readable timestamps&lt;/strong&gt; - &lt;/p&gt;
&lt;p&gt;&lt;code&gt; &lt;time datetime="2010-06-27"&gt; 27 June 2010 &lt;/time&gt; &lt;/code&gt;&lt;br/&gt;&lt;code&gt; &lt;time datetime="2010-06-27"&gt; Chris's 32nd birthday &lt;/time&gt;&lt;/code&gt;&lt;br/&gt;&lt;code&gt; &lt;time datetime="2010-06-27T020:00Z"&gt; 8PM on my birthday &lt;/time&gt;&lt;/code&gt;&lt;br/&gt;&lt;code&gt; &lt;time datetime="2010-06-27T020:00+09:00"&gt; 8PM on my birthday—in Tokyo &lt;/time&gt; &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3.  New Input Types( range, date, url, email ) plus validation&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt; &lt;input type=date&gt; &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_kzkf6mJrbm1qb6nvy.png" width="250"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt; &lt;input type=email &lt;strong&gt;required&lt;/strong&gt;&gt; &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4.  &lt;canvas&gt;, &lt;video&gt;, and &lt;audio&gt;.&lt;/strong&gt;  I group these together because I suspect everybody has heard about these.  Yes, they rock.  I get down on my knees and thank the Lord Almighty we don’t have to use flash anymore.  That is, if they can ever work out which codec to use.  &lt;/p&gt;
&lt;p&gt;       The fun fighting part where people get bloody noses and then nothing happens: Basically, there are two main video codecs being argued over for video playback in HTML5.  Mozilla and Opera want Ogg Theora (an open source codec), Microsoft and Apple want H.264 (patented) having both had a hand in creating it.  Google has come into the ring (as they always do), with a solution proving yet again that they might take over Venus after this world.  They acquired one called On2.  &lt;/p&gt;
&lt;p&gt;Now if they open it up for free use to everyone, they might just get their codec in the HTML5 spec.  If not, we’ll keep fighting until Microsoft and Apple give in to open source, every company except Microsoft and Apple pays $60 million to use H.264 in their browsers, or, like I said, Google expands their enterprise to Venus, enslaves the aliens on that planet, finds a way to jump over this argument, and then provides all of us with a universal &lt;video&gt; element built by white apparitions from another planet who hypnotise Microsoft into dropping IE6 for good.  YAYYAYAHAHAAYAY!&lt;/p&gt;
&lt;p&gt;      I got carried away….&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5.  Related to that last part, IE doesn’t support crap. &lt;/strong&gt; IE9 is showing some improvement but Paul Irish ran his test on the most recent beta release and got 50% as a grade for support.  That’s about 3 or 4 times better than IE8, but still….it fails by academic standards.  Segway: we can use &lt;strong&gt;excanvas&lt;/strong&gt; for simulating a canvas element in IE and &lt;strong&gt;raphael js&lt;/strong&gt; with svg for vector graphics, but hopefully these workarounds won’t be needed much longer (at least not before Google gets back from Venus!  We bitches are goin down!)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6.  Let’s move on to CSS3.&lt;/strong&gt;  &lt;br/&gt;       a. &lt;em&gt;text-shadow&lt;/em&gt;: #444 2px 2px 2px;&lt;br/&gt;        -multiple shadows assignable       &lt;br/&gt;      b. &lt;em&gt;box-shadow&lt;/em&gt;&lt;br/&gt;       c. &lt;em&gt;opacity&lt;/em&gt;: 0-1 (use filter: alpha(opacity=1-100) in IE)&lt;br/&gt;       d. &lt;em&gt;rgba&lt;/em&gt; (a for alpha (opacity)) - color: rgba(255, 255, 255, 0.5);&lt;br/&gt;       e. haven’t used, but i hear designers like this: &lt;em&gt;hsl&lt;/em&gt; colors.  Rather than using rgb, you can use hsl format to specify how much light you want in your color.&lt;br/&gt;       f. &lt;em&gt;border-radius&lt;/em&gt; (this is the one im most excited about being in IE9, that one did make it)&lt;br/&gt;      g. &lt;em&gt;multiple background images&lt;/em&gt; (yup, not just one)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;7.  Transitions(duration-set animation abilities) and transforms (rotating, scaling, moving things around, skewing)&lt;/strong&gt;- there’s a lot here.  We’ve got 2D animations.  Webkit is experimenting with 3D.  We’ve got a guy building video games on a canvas with CSS animations.  super mario, super mario kart, wolfenstein.&lt;/p&gt;
&lt;p&gt;&lt;a title="Play super mario in 14kb javascript" target="_blank" href="http://blog.nihilogic.dk/2008/04/super-mario-in-14kb-javascript.html"&gt;Play super mario in 14kb javascript&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;8.  Typography &lt;/strong&gt;- This is very much needed in the world of web development.  siFr is slow and buggy and there’s really no good way on the web to do custom web fonts, especially if they’re dynamic.  This is the solution: @font-face.  &lt;/p&gt;
&lt;p&gt;Fonts usually come in ttf, otf, or eot format.  This all works right now in IE.  You just need the right syntax for your download declarations, then whenever you want to use a custom font in your css, it’s the same as before: font-family: ‘My Font’.  Check out Paul Irish’s &lt;a target="_blank" href="http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/"&gt;post on bulletproof, cross-browser syntax&lt;/a&gt; for @font-face.&lt;/p&gt;
&lt;p&gt;The only disadvantage to @font-face is licensing.  Some fonts are free, others require a license to use.  When you use @font-face, you make your font available to the public for download from wherever you download it.  That doesn’t make the font creators very happy sometimes, so just make sure you have the proper permission before using @font-face.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;9.  Attribute Selectors - Hey!  You got a little regex in my css.  yum.&lt;/strong&gt;  &lt;/p&gt;
&lt;p&gt;&lt;code&gt; a[href^="mailto:"]&lt;/code&gt; - select all mailto anchors&lt;br/&gt;&lt;code&gt;a[href$=".co.uk"]&lt;/code&gt; - select all anchors ending with .co.uk (british links)&lt;br/&gt;&lt;code&gt;a[title*="chris"]&lt;/code&gt; - select all anchors that have chris in the title&lt;br/&gt;&lt;code&gt;a[title*="chris"]:before {&lt;br/&gt; content: url('images/heart.jpg');&lt;br/&gt; } &lt;/code&gt;- before and content tags. Stick some content before all the anchors that have chris in the title. &lt;br/&gt;&lt;code&gt;tr:nth-child(even)&lt;/code&gt; - select all even tr’s&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;10.  &lt;/strong&gt;Lastly, isn’t there a way to check if a browser supports a specific HTML5 or CSS3 feature?  YES!  Faruk Artes and Paul Irish created &lt;strong&gt;Modernizr&lt;/strong&gt;.  Check it out at &lt;a target="_blank" href="http://www.modernizr.com/"&gt;&lt;a href="http://www.modernizr.com"&gt;www.modernizr.com&lt;/a&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Thanks to Chris Mills, Medium, and all of the sponsors of DevChatt.  Expect many posts next weekend when all the mischief and craziness happens.  DevChatt is March 26-27.  See &lt;a title="devchatt.org" target="_self" href="http://devchatt.org"&gt;devchatt.org&lt;/a&gt; for more info.&lt;/p&gt;
&lt;p&gt;Chris Mills’ blog on Opera: &lt;a title="http://my.opera.com/chrismills/blog/" target="_self" href="http://my.opera.com/chrismills/blog/"&gt;&lt;a href="http://my.opera.com/chrismills/blog/"&gt;http://my.opera.com/chrismills/blog/&lt;/a&gt;&lt;/a&gt;&lt;br/&gt; His slides for his presentation can be downloaded in a pdf here: &lt;a href="http://my.opera.com/ODIN/blog/university-talk-resources-march-2010-html5-css3-slides"&gt;&lt;a href="http://my.opera.com/ODIN/blog/university-talk-resources-march-2010-html5-css3-slides"&gt;http://my.opera.com/ODIN/blog/university-talk-resources-march-2010-html5-css3-slides&lt;/a&gt;&lt;/a&gt;&lt;br/&gt; All the cool stuff Opera is doing for us developers can be found at &lt;a title="dev.opera.com" target="_self" href="http://dev.opera.com"&gt;dev.opera.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;On a side note, thank you to wyattdanger (Stephen Bush) for the first outside contribution to this blog.  Check out the videos on python.  Much appreciated.&lt;/p&gt;</description><link>http://brainbumping.com/post/460483191</link><guid>http://brainbumping.com/post/460483191</guid><pubDate>Sat, 20 Mar 2010 02:44:00 -0400</pubDate><category>HTML5</category><category>CSS3</category><category>Chris Mills</category><category>DevChatt</category><category>Opera</category></item><item><title>This is part of a great series of Python screencasts.  This...</title><description>&lt;iframe width="400" height="320" src="http://www.youtube.com/embed/FmRzE3ZG_eA?wmode=transparent&amp;autohide=1&amp;egm=0&amp;hd=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;showinfo=0&amp;showsearch=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;This is part of a &lt;a href="http://python.secsup.org/?p=70#"&gt;great series&lt;/a&gt; of Python screencasts.  This particular video discusses some basic python list functions (filter, map, and reduce).&lt;/p&gt;</description><link>http://brainbumping.com/post/460243253</link><guid>http://brainbumping.com/post/460243253</guid><pubDate>Sat, 20 Mar 2010 00:24:12 -0400</pubDate></item><item><title>Audio</title><description>&lt;embed type="application/x-shockwave-flash" src="http://assets.tumblr.com/swf/audio_player_black.swf?audio_file=http://www.tumblr.com/audio_file/460064882/tumblr_kzk80aPgoE1qbtooi&amp;color=FFFFFF" height="27" width="207" quality="best" wmode="opaque"&gt;&lt;/embed&gt;&lt;br/&gt;&lt;br/&gt;</description><link>http://brainbumping.com/post/460064882</link><guid>http://brainbumping.com/post/460064882</guid><pubDate>Fri, 19 Mar 2010 22:52:00 -0400</pubDate></item><item><title>about</title><description>&lt;p&gt;Let me explain what this is.  I intend this blog to be a community blog about technology.  Anyone with a tumblr account can post here (see ‘submit it’ below).  I realize ‘technology’ is rather general, but I think through the vicious process of natural selection, the theme will eventually become more specific.&lt;/p&gt;
&lt;p&gt;I’ll be posting coding tutorials, quotes from Noah ‘the sex’ Burney, and philosophical tidbits basking in the glory of front ends and back ends (you heard right).  If you ever have a question, feel free to ask it (see below).&lt;/p&gt;
&lt;p&gt;In addition, I am concerned about the pretentious, self-admiring nature of blogs (hence the community aspect) so I will aspire to allow this concern to influence what I write and what I approve to be posted.  For instance, I will not be posting about my dog’s strangely sideways and aerodynamic genitals….again…..maybe.&lt;/p&gt;
&lt;p&gt;So let’s do some brain bumping and maybe we’ll learn something.&lt;/p&gt;</description><link>http://brainbumping.com/post/460058703</link><guid>http://brainbumping.com/post/460058703</guid><pubDate>Fri, 19 Mar 2010 22:49:00 -0400</pubDate></item><item><title>"get ready for some brain bumping…"</title><description>“get ready for some brain bumping…”</description><link>http://brainbumping.com/post/457884588</link><guid>http://brainbumping.com/post/457884588</guid><pubDate>Thu, 18 Mar 2010 22:17:37 -0400</pubDate></item></channel></rss>

