Christian Heilmann

You are currently browsing the archives for the General category.

Archive for the ‘General’ Category

More newsagent fame and a devastating review

Tuesday, August 22nd, 2006

I guess you have to take the good with the bad…

This morning I found out that there is a new issue of NET Magazine with an adequately loud mouthed orange man on the cover that features my opinion piece where I am Captain Obvious to the rescue and talk about the biggest trick in successful web development. I guess my free copy is in the mail…

My elevation of seeing my mugshot that big (No, it is not vanity that made me happy but knowing I can send this to my family and they’ll be proud as punch although they don’t know English or anything about computers) got a big dent though when I checked My book’s page on Amazon.com and found a new devastating review adding to the very positive one that’s been there for ages. I am really not sure how to react to something like that as I hate disappointing people and cannot really understand what that reviewer was on about. It is not as if there wasn’t enough material on the web to check the book before you buy it, and I spent a long time making sure that the web site for the book has all the code neatly sorted and easy for you to try out. You just cannot please anybody I guess, and I hope that not too many people get discouraged from giving the book a try. Writing a JavaScript book for beginners that does cover Ajax was a balancing act, I guess I’ll have to expect more of that.

Drew made me do it: Cover all your CSS class tasks with one small JavaScript

Monday, August 21st, 2006

Drew McLellan asked for a tool script for an upcoming project that would allow him to do all kind of tasks related to CSS classes.
He wanted to dynamically add, remove and check for classes and get all elements that have a certain class applied to them.

It is nothing fancy or new, but come in handy for you, too: Check the CSS class scanner tool

Unobtrusive Goodness for Ruby on Rails

Monday, August 21st, 2006

Dan Webb and Luke Redpath have released an Unobtrusive JavaScript for Rails Plugin. Well done! Now let’s do the same for Visual Studio and .NET!

Sneakily reading out your browser history

Monday, August 21st, 2006

Via Stuart Colville I got a URL that uses a sneaky trick to see where you have been surfing. Jeremiah Grossman shows how you can check for visited sites.

The common complaint of developers who don’t see the security and privacy issues with that is that you can read out the history of the window with JavaScript but you only get the amount of visited sites, not their URLs. With this trick, you can.

The trick is pretty easy: He uses a whole array of sites to check against, writes out a style for visited links to the page, writes out a list of these links and checks their computedStyle color attribute against the colour he set in the style. If it is the same, the page is in cache and has been visited beforehand.

I already commented that it may be more stable if you set a different style to the visited links like display block and a height and read the offsetHeight instead of computedStyle. In any case, it is a clever and worrying trick.

An unobtrusive interactive Flickr badge

Thursday, August 17th, 2006

Being bored yesterday night, I thought that it would be really cool to have a flickr badge that can be navigated (x pictures forward and backward), has a preview in middle size mode (lightbox style) and is generally nicely unobtrusive.

I cobbled together some code (dirty at times) and came up with this: Unobtrusive Dynamic Flickr Badge.

A dynamic flickr badge

What it does is turn a simple link to your Flickr stream with a certain ID into the badge, which means that users without JavaScript can still reach your images and you don’t need a server component to pull the images.

And guess what, it is not even Ajax!

Tell me what you think, and I may find some more time to spice it up with the YUI and make it cleaner.