The W3C mobileOK Checker

Woohoo, W3C created a new validator for us. Is YOUR site mobile-friendly?
Mine only reached 62/100, most penalties i got because of not using XHTML markup, using a table for layout and using absolute units in my CSS. I should improve, even microsoft.com scores 80 :)


SVG support in 2008

As I mentioned in an earlier post, I have been playing with SVG lately. I haven't done any SVG for many years and I was curious how the browsers support them by the end of 2008. The overall picture would be quite satisfying, if our good old friend Internet Explorer wouldn't ruin it all.
The root of all problems is that IE6 and IE7 (i have no info on IE8) do not support SVG natively but by using the external Adobe SVG Viewer, which is going to be discontinued BTW.
Other problems you will face as an SVG developer:

1. HTML and SVG, now put them together
W3Schools created a page explaining the various methods, they are only wrong with the inlining. Inlining IS possible and it works in all modern browsers (ie not IE :) ). After spending some time on it, you can even make it work in IE6, thanks to this guide. Inlining in IE7? If you know how to do it, feel free to share with the rest of us.

2. Create elements dynamically
To create SVG elements on the fly, all modern browsers have the createElementNS method. Explorer doesn't have this, you can NOT create SVG elements dynamically, no tweaks, no tricks. If you want something like that, fell free to use VML (bah).

SVG is great, you can do pretty cool things in pretty cool browsers, if you dare:)

Save the developers - dead

Earlier this year i blogged about a website called www.savethedevelopers.org (link missing on purpose). Originally the site was recommending other browsers than Explorer 6, namely: IE7, Firefox, Safari and Opera. As for today the site redirects to a Get Internet Explorer page, more ironically if you do a google search for "save the developers", the same site appears on the top of the list.
To restore the healthy ecosystem of the Internet, I suggest all of us remove our links from this site:)


Geolocation solutions on the web

...ok, so you want a killer web app that will locate the position of the current visitor? No problem. Here are the tools of the trade. (Your requirements may vary, for me, i want Lat/Long information, with regards to the KISS principle)

1. IP to location databases
Typical providers include ip2location, ipligence, maxmind. They are usually expensive, static, and just too big. The concept is that you have a big database downloaded and monthly updated, and you can open that database to get the location info from whatever platform you want. Since IP addresses change dynamically i just don't see this method viable. You might consider them, if you need the information in an offline environment. Note that some of these providers offer a webservice also, to query results online. More about this later.

2. REST based services
You send an HTTP request and you get a parseable result with the information. I just tested NetGeo of these kinds. It is not maintained for several years thus giving pretty bad results (putting my Budapest location to Amsterdam).

3. REST based javascript APIs
I didn't really know how to name these. The principle is that you include a remote javascript file, and based on the requestor's IP the returned javascript code will contain a few function calls with the results already built in. For example in my case it will contain lets say a function my_city() {return 'Budapest';}. Extremely simple to use, maxmind and geoplugin offers such services.

4. The W3C API
It is expected that in the future all modern browsers (not counting IE ;) ) will conform to the emerging W3C standard. How will they do it? Its their problem, you just simply call a javascript function and have your Lat/Long info ready. At the moment the upcoming Firefox 3.1 seems to support this natively(!), while older Firefoxes can have the Geode plugin to produce similar results. I only tested Geode, but as it exclusively relies on WiFi positioning, without any fallback method, either it gives you some results (i never saw one), or it just flatly fails.

5. Other browser extensions
Gears have the ability to tell your location, so if you expect your visitors to have the Gears extension, you might as well rely on this. Simple and gave me a good result.

6. Combined methods
An interesting approach can be found here. It first tries to use the native API, secondly one of the extensions (including Gears), lastly it falls back to Google loader ClientLocation. Although the code is not very elegant and it has to include a lot of external files upfront, it is an approach that can gain some ground pretty soon.

7. Fire eagle [UPDATE]
Yahoo created fire eagle with the purpose to control what applications can access what level of location information (You have the same control with #4). Both the user and the consuming application has to be registered at the fire eagle website. The user is "responsible" to keep his location up to date either manually or with the use of an external application, and whenever an application tries to access this information, the user has to allow it through the fire eagle website. Under the hood FE tries to locate you automatically with method #4. I had one pain using FE: you cannot drag and drop the pinpoint of your location freely, and since it was not very confident with my address (Yahoo maps apparently has a typo in my street name), i couldnt set my exact location.
UPDATE2: There is an article on how to build an app to use FireEagle, you might find it useful.

Any other methods? Feel free to comment. For me, i will stick with #3 for now.
Happy geolocating!


The Julie Amero case

...ever thought of being a substitute teacher in the States? Forget it. Your life is endangered. Endangered by morons. I just came across this story today. A substitute teacher Julie Amero was prosecuted, because while she was substituting, some computers of pupils showed pornographic popups. Now she is a real talent to do that on purpose, since she cannot teach any more, someone please employ her as a computer security expert!