...more recent posts
Cool, slightly depressing, and thoroughly comprehensive tables highlighting the readiness of major browsers to correctly handle advanced web techniques from PNG alpha transparency to all the fancy CSS3 stuff. That must have been a ton of work to put together. Just glancing at the page is a pretty damming indictment of Internet Explorer.
Check out the final table for the grand scorecard for each browser. Note that Chrome has an advantage in the "Past" category since it's a brand new browser with no past. Otherwise Safari has a slight lead over Firefox and Chrome although they all do pretty well. Opera does okay and IE sucks.
Cross browser javascript vector graphics library:
Raphaël is a small JavaScript library that should simplify your work with vector graphics on the web. If you want to create your own specific chart or image crop and rotate widget, for example, you can achieve it simply and easily with this library.I like the js syntax - pretty intuitive:
Raphaël uses the SVG W3C Recommendation and VML (mostly equivalent Internet Explorer implementation) as a base for creatinggraphics. This means every graphical object you create is also a DOM object, so you can attach JavaScript event handlers or modify them later. Raphaël’s goal is to provide an adapter that will make drawing vectorart (similar to Flash) compatible cross-browser and easy.
Raphaël currently supports Firefox 3.0+, Safari 3.0+, Opera 9.5+ and Internet Explorer 6.0+.
// Creates canvas 320 × 200 at 10, 50Check the demos, they're pretty nice looking.
var paper = Raphael(10, 50, 320, 200);
// Creates circle at x = 50, y = 40, with radius 10
var circle = paper.circle(50, 40, 10);
// Sets the fill attribute of the circle to red (#f00)
circle.attr("fill", "#f00");
// Sets the stroke attribute of the circle to white (#fff)
circle.attr("stroke", "#fff");
WebKit is the browser engine behind Apple's Safari and a host of other browsers (on the desktop, and increasingly on mobile devices.) They are really pushing the boundaries of what can be done while making sure these new capabilities are defined as open standards (so, for instance, really pushing new ideas and technology into CSS3 and HTML5.) This post discusses new CSS animation capabilities which seem like another shot at knocking down Adobe controlled Flash (as well as a preemptive shot at Microsoft's somewhat similar SilverLight.) Presumably, if there is a free and open way to create some effect then developers will use that way rather than resort to a proprietary solution that costs money.
That's all great. And it's smart of Apple to be backing this sort of thing. But why oh why don't they leverage QuickTime better? If there were just decent javascript hooks into the QuickTime player it would take away the massive advantage that Flash has in terms of embedding media (especially video) into web pages. Absolutely everyone uses Flash to do this, even though (thanks to iPods and iPhones and iTunes) everyone has QuickTime installed on their computers. But there is just no reasonable and reliable way to create javascript controls for the player. I cannot understand why Apple doesn't fix this.
Appropriately ugly site of command line one-liners: commandlinefu.com.
These days I feel like computers and the web are in a period of cooling. We've gone through a highly innovative stage where change was happening at an amazing rate, and now we are trying to integrate all that and not much new is happening. Except this change to the client / server model is quietly becoming a big deal:
The HTML 5 specification provides a new mechanism for client-side data storage: JavaScript database support. HTML 5 is currently in development by the Web Hypertext Application Technology Working Group (WHATWG). JavaScript database support is available in Safari 3.1 and later, and in iPhone OS 2.0 and later. You should read this documentation if you are a web developer who wants to store data locally on a user’s computer in amounts beyond what can reasonably be stored in an HTTP cookie.Google Gears, of course, is doing very similar things.
Today I came across a sentence I would never write:
There have been many times since 2002 that I’ve regretted not building my own publishing system from scratch.For some reason reading that is very funny to me in a sort of "I can't believe I've been working on my publishing system since 1999" sort of way.
Finally. ClickToFlash is a Safari plug-in that disables auto play of Flash content. You can still view the content but you must click on the static Flash box in order to play. Since so many advertisements are Flash based, and it's not a huge problem for me to click on the rare Flash element I do want to see, this makes browsing *much* nicer.
And, if you control-click on a Flash element you get a pop up menu where you can add the present site to a whitelist. So if you always want your favorite music site to load and play Flash content you just put the site in the whitelist and CTF won't disable it.
Nice one liner to recursively replace all occurrences of 'foo' with 'bar' in all .html files in the current directory and below:
find . -name "*.html" -print | xargs sed -i 's/foo/bar/g'
Work has been busy, so I'm years behind on posting. Maybe later today I can try to catch up a bit. One of the many topics I want to hit is jquery which is a javascript library that helps with creating both javascript effects in the page (animations, fancy slide in/out menus, accordians, tabs, lightboxes, etc...) as well as facilitating AJAX (well, AJAX-y since it's not necessarily XML) requests to the server. I used to talk about EXTjs a lot when I was first learning about these libraries, but I've ended up settling on jquery for my uses. They aren't exactly the same, but they are very similar, and jquery just feels better to me. In any case, these libraries (jquery, EXTjs, MooTools, Prototype/Scriptilicious, etc...) are at the heart of most new sites on the web (so called Web2.0.) and as a developer all I can say is Hallelujah because they take away 90% of the pain in developing for so many different browsers (I'm looking at you IE6!)
But it is a bit of a learning curve since I used to think of javascript as something to be avoided along the lines of Flash. Everything changes though, and so this is now something you just have to know to be current.
This morning I really struggled with an issue involving submitting accented characters in data through a jquery $.post statement. Turns out, unlike when submitting a form the old fashion way, when jquery serializes the post values it always uses url-encoded UTF-8 strings. So on the server side you need to do a UTF8_decode on the data before you stick it in the database. Luckily this post got me the answer without too much trouble since that is one of those little things that you could waste a whole day trying to figure out.
Steve Jobs to take a health related leave of absence until June. He will remain CEO. Tim Cook takes over day to day responsibilities.
Will be interesting to see what happens to the stock. I think the market will over react.