jbablog.com

the personal blog of John BouAntoun


Webkit GTK (and QT) get plugin support

Another gem from planet gnome. WebKit GTK and QT are finally getting pluggin support (follow the link for screenshot bling). WebKit is fast becoming the little browser engine that could. I’m looking forward to seeing the GTK and QT pushes bring on an age that gets us native Win32 WebKit. I can think of tonnes of projects where I needed a light weight, easy to embed browser engine and instead resort to IE shell hacks.

Open source use of flash spec is now ok

According to this blog from planet gnome, open source projects are now able to use the flash spec to create their own SWF and FLV decoders. This is good news both for the open source projects that try to bring flash to linux and its ilk and for Adobe since there is no better way to put a spec to test than to have multiple implementations against it.

Actionscript 2 DateDiff function

Mostly a note to self for future reference. Not quite an implementation of the much loved datediff function, but close enough to get what I want:

// yearValue, monthValue, dayValue are assumed to be populated by the UI somewhere
startDate:Date = new Date(yearValue, monthValue, dayValue)
seconds:Number = ((new Date()).getTime() - startDate.getTime())/1000;
differenceInYears:Number = seconds / 60 / 525948.766; // google says a year is 525,948.766 minutes
The caveat here of course is that the date’s have to be after 1970, else the getTime() call won’t work.

Every language should have a date difference function and the ability to handle timespans as native types.

New header image, updated wordpress and cleaned theme

So I updated the header image on the blog. Took me a while to relearn my GIMP foo to get the grey-scale mask and desaturate the colour portions.

I also took some time to clean up the theme, ngatini 1.1, which had some malformed html in the footer. It’s been a long time since I hacked in PHP. I’m going to try and find some time to clean up the stylesheet in the coming days/weeks as the css seems a bit heavy for what it’s doing, in particular it seems to have some float overuse .

While I was at it I updated to Wordpress 2.5.1 and hacked on the output from the About-Me sidebar widget. It now has an extra option to turn the heading for the sidebar into a link to an about me page (to expand on the one paragraph intro). I’ll look to fill in that page some more in the coming days/weeks also.

Consolas: Awesome free developers font from Microsoft

Found this info about a new free developers (fixed width) font over on the IEBlog. The great thing about this is that it has ClearType support, so is a fixed width font that looks sexy, and they get the developer friendly versions of 0, O, 1, L and I.

Yay for developers. Hurry over and download it now.

Consolas free developers font

Silverlight 1.0 and Firefox 3, anyone?

Dear Lazy web,

Anyone out there actually know how to get Silverlight 1.0 to work with the Firefox 3.0 betas? I’m just starting the search for information and will update this post if I find the solution.

MySQL Enterprise to get exclusive features

So not quite as dramatic as slashdot put it, but annoying none the less. Sun has decided to add some new features to MySQL Enterprise only. Jeremy gives a very concise explanation of why this is a bad thing both for the MySQL Community and MySQL Enterprise users.

In the comments to Jeremy’s post, Marten Mickos tries to clarify that it is more specifically high-end enterprise type add-ons to the core MySQL system that will be only available to MySQL Enterprise and that the license for this is as yet undecided.

There’s no real way to effectively close source an open-sourced application, but developing new features in a closed source edition is very doable. It remains to be seen whether it will be a successful attempt as MySQL has gained much from it’s Community use in terms of both release testing (the shear number of MySQL users out there) and goodwill.

When Flash just aint flash - Part 1

So I’ve been working with the Flash guys in the design team at work now for a few months, trying to help them become more effective collaborative Flash developers. It’s not necessarily been the easiest process in the world as there have been a number of concepts that would be straight forward to most regular devs, but not necessarily Flash devs.

Some of the things we’ve gone through are concepts like:

  • Using SCM systems to store the code in a central location
  • Design Patterns (in particular the MVC and Command Factory seem to get allot of use)
  • Multiple simultaneous checkouts of text source files (or “how to develop without individual checkouts”)
  • Visually diffing two versions of a source file

And so on. Along the way I’ve actually had to learn a hell of a lot more Action Script than I would have thought I needed to and seen my fair share of Flash ugliness. I’ll probably do a whole series of these little rants, but this week in particular we kept coming across and trying to work around the same infuriating issue.

This has to do with Flash 8 (Action Script 2) and using the FileReference object to perform a multipart form POST to a server, that is, when you try to do a form submission that has a file upload in it and you care about the status of the submit. On most web systems this is probably a common occurrence; “Send us your picture and 25 words why you think you should win the …”. Sounds like a relatively straight forward thing to do in Flash, and in fact it’s not that difficult to code up.

The problem comes when your server tries to process the form upload/submission and send back some information to the Flash client about whether or not the submission succceeded (think form field validation). In theory a file upload is just another http request and the Flash client should have the ability to read the text in the response body. No such luck. It seems that in Flash 8, the FileReference object doesn’t expose the http response body upon completion, I don’t think the Flash architects thought it was useful. What the?

Why go to all the trouble to build a multipart form submission capability inside Flash and then decide not to pass on the response to the Flash client? What possible reason could they have for such a glaring omission of useful information in a standard web-type request/response scenario.

And just for clarity, we have a constant pressure to try and use the minimum version of Flash required to perform our particular task, so while this problem has been fixed in Flash 9, it’s rather annoying to have to change our system to use a whole later version of Flash for functionality that should have been there in the beginning.

No more click to activate in Internet Explorer

It seems sanity is back in the winds. Now I may be misinterpreting this but it looks like we won’t (in theory) need to do any more javascript insertion hacks to get active content on a page to actually be active in IE.

I certainly hope that this update gets some penetration amongst the windows machines out there, because catering for this issue when embedding flash has been a particular pain point for us.

Yay for sanity.

open source powershell implementation

Miguel tells us of pash. I was interested in this back when it was called Monad Shell, but never really got into it. The good thing about pash though is that it’s relatively cross platform (Linux, MacOSX, Windows and even WindowsCE). Might have to have another look at it.

Update: Apparently pash is still at the stage where it’s an open source re-implementation of Monad Shell and not quite a Power Shell replacement… yet.