Twitter released a new logo recently, and some branding guidelines
I had to do this
- Rotate or change the direction of the bird.
- Animate the bird.
- Duplicate the bird.
- Change the color of the bird.
When declaring an array with more than 5 elements,
make it a string and use the split function.
//48 bytes var a=["a","b","c","d","e","f","g","h","i","j"];
//39 bytes var a="a|b|c|d|e|f|g|h|i|j".split("|");
The split function in this case provides almost 20% less code. I recommend more than five elements for this process, because less than that you are worse off because of the added characters for .split(” “).
For every element you add in the first example, you add 3 characters to seperate the elements.
The second method uses only one character per additional element.
Just think how much you can reduce your code if you have arrays with a large number of elements.
With the launch of the new Google Drive, a lot of people are making the switch, myself included. The first problem I found very quickly though was that I have shared folders on Dropbox that others are still using and uploading to.
My solution, put dropbox inside of my Google Drive.
First step, click on preferences on the Dropbox context menu, the icon in your system tray.
Next, select the “Advanced” tab in the Dropbox preferences, and click on move.
Now, Google Drive is flagged as a system folder and Dropbox will not let you select it directly, you will have to add a sub folder.
That is it. You now have Dropbox inside of Google Drive (on this computer anyways).
http://diveintohtml5.info is the new home (well a replicate)
Mark Pilgram has vanished.
I guess I should be adding more content more often, eh?
The one thing that I really took away from his talk came in the Q&A part. The question was asked, “With HTML5, how do I build something that works in IE7?”. Great question right? Christian gave a great answer, that I never though off, and admittedly have ignored before, “Don’t, you don’t have to”.
Christian continued to explain you shouldn’t limit yourself when developing a site. If you have the ability to create an amazing WebGL application, DO IT! There are ways to check if the browser supports what your doing, and if it doesn’t then the user doesn’t see it. Use tools like Modernizer to do feature detection (not browser/device detection!). Build your amazing WebGL thing, and if the user is not using a browser with support put an image in it place; Christian’s idea was to put in an image with text that said “This could be so much cooler if you had a better browser”.
So with all that said, Go out and build your better sites, and just put in fall-backs, crappy fall-backs. Maybe then users will make the switch and we won’t have to worry about it.
Came across some great videos from Paul Irish, developer at Google, about some great features inside of Chrome DevTools. On the blog over at HTML5rocks.com, Paul describes how you can take advantage of great tools, like console.dir(), which helped out a lot. In the post he also talks about some new DOM Apis, check it out.
howtohtml5 is on twitter now! Ask questions, request tutorials, or just follow me. @howtohtml5
Well, it says it in the name anyways. If you haven’t been over to html5rocks.com yet, you may have missed out on some cool things. There is a code playground, where you can test code, and run it right in the browser. Lot of cool things over there.