Tag Archives: Development

IE 9 For Developers

By

There are some innovative features in IE 9 that I had previously been extremely excited about. These are mostly regarding the browser’s integration with the operating system (especially Windows 7), which is something that Microsoft is in a unique position to provide in an efficient manner.

Some of these features are enabled through a JavaScript interface window.external. While this was all well and good, I previously had concerns with this as I had not been made aware of a method of detecting whether or not the features were available in the browser the page was being rendered by. This clearly would cause problems on multiple browsers, and you can’t just go around executing scripts for a single browser as this will cause errors in all the others. There is, however, a section on the MSDN documentation for this browser feature which describes how to perform a test to see if the browser supports the Pinned Sites feature.

The more serious issue I had was with the descriptions for various Pinned Sites features which required the use of Meta tags with extremely long property names to describe to the browser the various images, URLs and options the developer wanted. My point was that there are other technologies available in the HTML 5 specification which would be more suited to this, such as the HTML manifest (which is already used to specify options for sites such as client-side file caching, storage and other bits and pieces). According to the team, they decided to use the meta tags as it would be error-free cross browser, and it is not unstable like they claim the manifest specification is which may risk breaking the feature if the spec changes.

Many thanks to my friend Giorgio from the IE 9 team who was able to clear up these issues and provide the Microsoft team’s perspective on them.

Building Robust JavaScript

By

I absolutely adore writing JavaScript. Like many things with many people, I’m not very good at it and probably shouldn’t be allowed anywhere near it, but I just can’t get enough of doing it.

I was fortunate enough to spend about half of the past few days at work (while not testing a massive number of bug fixes) writing a big pile of JavaScript. You may have seen me present the TweetMeme Chrome Extension a few weeks ago now at the Chrome developer event in London.

I’ve been taking the opportunity to brush up on my JavaScript knowledge and techniques. One thing I have discovered is that building robust, reliable, bug-free JavaScript is a lot more difficult than in a lot of other languages.

A More Advanced Simple Server

By

You may have seen my post a while back featuring a Python webserver in less than 50 lines of code.

I was tinkering with it a little bit this evening, and decided that I could actually make this pretty useful.

What I’ve done is that if it can’t find what you’re looking for, it dumps out a directory listing with links in it. You will probably be familiar with this kind of behaviour from Apache, nginx etc. (if you don’t turn it off that is), so it’s fairly standard stuff.

Think Big

By

The past few weeks has been equally worrying and exciting times for the Twitter developer community.

Along with numerous announcements of exciting new APIs, tools and dedicated sites for developers, Twitter has been making purchases and announcements which “fill gaps” in the service.

This was pre-empted by an inspirational blog post by one of Twitter’s investors. In it, Fred Wilson implores developers to stop filling holes in Twitter’s platform, and instead concentrate on building new and awesome apps that take Twitter in an entirely new direction.

That blog post, the announcements, and the challenge from Chirp, “think big”, combined with a number of events I have recently attended, have really inspired me to start thinking a lot more outside the box (even more than I usually do) when it comes to ideas, and not just related to the Twitter platform. I think it’s really improved how I work, and brought about some big changes in what I do on a day-to-day basis.

This is possibly the single biggest thing I love about the Internet. That I, with a laptop and a mobile phone sat on a field at the University, can start coming up with awesome ideas that extend other companies and developer’s ideas and platforms, can come up with anything I like, build it, and share it with the world.

But to do something meaningful, you need to think big. Without thinking big, your idea will just be lost in the ether that is all of the content on the internet.

Google thought big, and despite their professors laughing when they proposed indexing the entire internet, they did it, and now provide hundreds of millions of search results a day. People thought Bill Gates was crazy when he wanted to put a computer in every home – now I personally have 4, let alone the rest of my family and housemates. And who would imagine that 140 characters would become so ubiquitous?

So now I’m challenging myself to think big. The world isn’t going to change itself, you know.

A Webserver in 50 lines of code

By

I’ve been playing with python over the past few days, and have grown quite attached to it.

A number of features, such as ranges and the separation of lists and dictionaries, have endeared the language and it makes a lot of sense.

I thought I would have a bit of fun with it, and see how hard it was to write a web server. This may seem like a big step, but when you consider that reading from a URL is as simple as reading from a file in python, it is not a daunting task.

I managed to find a tutorial online, and after a bit of tinkering I got out a web server that responds to HTTP GET requests and serves files (not dynamically!) in just 50 lines of code (including my somewhat liberal whitespace – this indentation thing is taking a bit of getting used to).