Archive for Programming

Benchmarking RIA’s

James Ward has created a nice little application for benchmarking Rich Internet Applications. And Flex sure is the winner, when it comes to separating content and layout. Serverside-generated table loading via AJAX is fast too, but that is not a very nice solution to many’s opinion. Thus, Flex clearly wins overall, and AJAX JSON comes in second place, if you cannot go the flash way.

Google Calendar TODO list for GreaseMonkey

I’ve discovered GreaseMonkey. Yes, I am a bit late, but once I finally installed it, I sure love it. Though the script, that I needed, only existed in a very simple version.

I have thus taken the initial version of the Google Calendar TODO list by Matias Pelenur and the modified version by Gimite Ichikawa and created a brand new version that I submitted to UserScripts.org.

First thing this new version does is, that it uses the eventStatus-field for setting whether the todo has been done or not. And then there is a flush button to flush (remove) todones. And finally the todos and todones are sorted using the status and title. This will be a work in progress and will be developed further upon.

Read the rest of this entry »

A UTF-8 decoder with ISO 8859-1 failover

It took me quite a while, but I finally managed.

On IRC, the Danish Wikipedia channel on freenode, we have a bot running (built on Linky again built on PircBot). This bot’s primary purpose is to extend socalled wikilinks. That is, when someone writes Someone wrote silly stuff in the [[USA]] article again the bot replies http://da.wikipedia.org/wiki/USA - it expands the bracket-style links to proper URL’s.

The problem was the character encodings. Some use UTF-8 in this channel and others use ISO 8859-1. And how can you make the bot expand links for the Danish term [[Kødpålæg]] when written in either of the two encodings? The correct URL for this word is K%C3%B8dp%C3%A5l%C3%A6g The built-in UTF-8-decoder in Java will replace the “bad characters” with the Unicode replacement character U+FFFD, and thus the previous term written sent by a ISO 8859-1 client with Linky in UTF-8 mode would become K%EF%BF%BDdp%EF%BF%BDl%EF%BF%BDg, and in the reverse situation with Linky in ISO 8859-1 mode, the UTF-8 clients messages would be interpreted to K%C3%83%C2%B8dp%C3%83%C2%A5l%C3%83%C2%A6g. Both are very wrong.

Read the rest of this entry »

I strongly support HTML 5 adoption by w3

Apple, Opera and Mozilla has expressed their support for the new HTML 5 specification as outlined by WHAT Working Group and chief spec-writer Ian Hickson and especially the adoption of this specification by w3 as the new HTML recommendation.

Read the rest of this entry »

Google Maps is great, but some hacks are needed

I’m currently working on an AJAX-driven site also using Google Maps’ externally accessible API. But I have as several others been frustrated about the fact, that the GMarkerManager-class does not contain a clearMarkers method. So I combined the open-sourced source with the latest closed-source release, and mashed stuff up like this:
Read the rest of this entry »

Using ActionScript without MXML in FlashDevelop

Most people using ActionScript 3 uses MXML. I don’t like that very much, as Flex is a strange proprietary language, and ActionScript 3 is a regular, Java-like programming language. MXML is fast for setting up a GUI using standard components in a RIA and the like, but most of my projects will not use standard components, but will be simple scripting experiments or customly designed games and apps.
Read the rest of this entry »

The Beach is the best

Not Leo’s silly movie, but Flash on the Beach 2006.

I got many interesting contacts, talked to many interesting people and in particular told Branden Hall, that his ancient Flash 5 add-ons (including string.as) is still in use in some of our old Flash 5 projects still being updated.
Read the rest of this entry »

I’m going to Flash on the Beach

I won’t be the one Flashing though, but I’ll very much enjoy the many speakers at this years Flash on the Beach in Brighton early December 2006.
Read the rest of this entry »

Apollo has been launched

Adobe representative, Phillip Miller, recently guested Copenhagen, and during his visit he gave further insights into the upcoming client, Apollo.

When first introduced at MAX 2005, Kevin Lynch talked about Apollo being a browser substitute for offline browsing of HTML and Flash. Since the merger with Adobe, Acrobat Reader has of course been introduced into this project. Philip Millers recent talk about this stated, that it would be available for all platforms (Win, Mac and *nix), and that a beta was to come within the next year.
Read the rest of this entry »

Parsing an URI

I recently promised, that if I couldn’t find a valid URI-parser in ActionScript 2, I would create and release my own.

I’ve thus created my own built on simple string parsing functions (as opposed to using some regexp implementation, which is still not natively supported until AS3). It does not properly handle invalid chars of an URI (like spaces, special characters and more), but assumes an URL-encoded URI of some sort.
Read the rest of this entry »