IE9 Beta - bug with modifying transformations on SVG elements

Click here to download:
zsvg.xhtml (6 KB)

Mini self-contained HTML doc with embedded SVG to illustrate a
possible issue with IE9 Beta (logging it with the team).
Not the prettiest doc or bit of code internally, but this way it's a
single file - display updates as expected in Opera, Firefox, and
Chrome, but only updates for the first change under IE9 beta
(v9.0.7930.16406) on Win7 32-bit.

IE9 Beta - quick test and review from an SVG developer's perspective

I tried the "IE9 Platform Preview" last month, and blogged my biggest complaint (lack of foreignObject support), but of course that was not even a beta, and had no real UI on it.

So the IE9 beta has now been released, and it's worth giving a try.. so I did.

DISCLAIMER: This is on a VM (admittedly with plenty of CPU and 8Gb of RAM), so some things like the sluggish responses below might be caused by that - I disabled the GPU rendering options in the advanced options and it made things run.. differently...

First impressions - the UI is much cleaner than previous facelifts they've done, of course it still pushes hotmail and bing and associated sites as defaults, but at least they keep them out of the way until you go looking for them. Looks quite chrome-like without being a pure and simple copy ("inspired by" perhaps), and hopefully they've ditched all that skinning nonsense (yeah Windows Media Player - that's you I'm looking at).

The search settings and home page(s) seem rather more complex than you'd think would be needed - what with "Search Providers" and "Search Accelerators" - I dare say the distinction is important but if it's too many terms for me to be bothered even to look into, I hate to think what the average home user or enterprise user will make of it. And as for the search provider, I don't mind giving Bing a try, but just as an exercise trying to change Bing for Google took several attempts (I found the settings box doesn't seem to update when you change settings, so you have to keep on closing it and re-opening it to see if anything has happened after you choose to add something).It just doesn't feel simple and transparent, to be honest it feels almost like they're trying to discourage you from changing such things.

Notifications (about default browsers, add-ons, extensions and the like) are nice and subtle, but putting them at the bottom of screen seems maybe overly subtle - I missed a few of them down there, but will have to keep a peripheral eye open.

What about my SVG complaints ? Well first off, I won't revisit the foreignObject issue (unless someone has a nice surprise for me) but gave my heavily SVG dependent app (lots of SVG content but not necessarily complex) a try.

It rendered all the outer HTML (ExtJS GUI) parts quite well, and where it doesn't (popup menus in the wrong place, element sizing wrong), I expect that'll be because the ExtJS framework is making "corrections" for previous versions of IE. I tried turning on IE8 Document Mode (inside the developer tools) to check this, but of course then my SVG breaks completely. I hope tweaking the framework (or a new version from sencha.com) will fix much of this once everyone gets their hands on (and head around) IE9.

And the SVG ? Well mixed results - it rendered them mostly fine for a first attempt. Some of the text flowing seems to have gone all over the place (the logic works fine under Opera, Chrome, FF 3 and 4, Safari etc), but I expect it'll be something silly like checking bounding box units or the like. And some text has just rendered as a solid filled black rectangle - again I expect it'll be reasonably trivial (of course I wanted all my text to actually be embedded XHTML with markup and CSS and proper flowing of text etc but that's the 'foreignObject' topic again).

The mouse interactions seem very sluggish, so using the debugger I started firing some calls straight into my code, and got some very strange results. Where I have a couple of transforms over an area (a scale and a translate), if I change the scaling then nothing seems to happen for about 3 or 4 seconds.. then it changes, but text items that ought to be scaled don't change. Similarly the translations don't show until a few seconds delay (at least the text moves here). Other browsers do this very snappily. Might be something I'm doing wrong (but again it works on the others) or caused by the VM (see disclaimer above) but looks like I'll need to draw up various testcases and maybe implement special handling for IE if I decide to support it at all - bother.

Until I can get the scaling, transformations and mouse interactions working fine I can't say much about speed, but I will say that the delay from start of page load to rendering the first screen (involving several AJAX calls and a lot of on-the-fly DOM construction) seems pretty snappy... comparable to Chrome, quicker than FF3.x

Other points of note ?

Well there's no bookmarks bar that I can find other than putting an entire favourites panel down the left - my bookmarks bar mostly holds bookmarklets these days (bit.ly and the like) and the bar seems a bit too bit to justify keeping open all the time. Chrome has the bookmarks bar disabled by default but lets you turn it on if you want, which seems a reasonable approach - I couldn't find a similar option in IE9.

Developer tools seem slick (again Chrome sets the bar for me here) - I don't know if everyone in Microsoft has double widescreen monitors but again it seems to prefer putting, for example, the javascript console alongside the script window rather than underneath it which seems a perverse use of screen space. I'll have to use them a while to see how well they stack up - Chrome does have a problem for me with losing breakpoints between reloads, and the developer tools sometimes seem to lock themselves to old versions of a page in the cache so I have to regularly close the tab and start a new one. And the 'find element by click' (Ctrl-B under IE developer tools) seems to work properly with SVG whereas this tends to fall down under Chrome a bit (the bounding box is rarely correct). The network profiler seems comprehensive, but I miss Chrome's filter (see all resources, or just CSS / Images / XHR etc) when I've got lots of AJAX calls and small bitmaps and the like to manage. But overall the devleloper tools look impressively comprehensive.

So will I exclude IE9 ? Probably not.. I won't bend over backwards to support it before at least the first service pack or two, but I'd like to make it work before then if I can (does it sound too patronising to say something like 'if only to recognise what they've achieved in a very short time' ??). It's a good start, and my guess is that it'll force the pace of browser development forward again (actually I'd say FF3 and Chrome have done that and stung IE into responding), but the measure will be how well they react to 'real world' cases rather than potted compliance tests, automated unit tests, and performance benchmarking suites - it would help if we could post feedback and access the bugtracking system without more "you need a microsoft LiveID account etc" stuff, but I can't expect the dog to lose all its fleas overnight.

Roll on SP1 and IE10...

 

Failing to get on with python ("have a nice day")

So I'm a longtime perl hacker, and never really bothered to learn
python - I couldn't see that it would give me anything too different
to justify me using it (cf knowing languages that fill different
niches - F#, C++, javascript, C# [yuck], smalltalk, prolog etc).

But then I started using Google App Engine, which provides a Java or a
Python API, and so I figure it's time to get acquainted.

And bits of it I like - the builtin library is much larger and cleaner
than perl, I can live with whitespace-instead-of-braces (altho without
the functional constructs of F# I fail to see significant benefits and
it doesn't half make some refactoring operations very error prone),
and for the most part it's not too different. Some things are just
typical "context switch" annoyances in a multi-language project and
are not a fault in python (remembering to use "&&" or "and", quoting
keys in object/dict literals, "self"/"this", "false"/"False"/"FALSE"
etc).

But the bits that annoy most are it's like they've copied perl, but
not caught what it's about, where "regularity" seem to have ground out
"humanity" - like "pydoc" vs "perldoc".

perldoc gives me something first off. It might go on to give me to
much, or have to go on about how something changes in different
contexts, or I might have to "perldoc perlfunc" to find builtin
functions by category, but generally I can find what I want and it
tries to put the most important stuff first and the more obscure stuff
later.

pydoc on the other seems perversely geared to first telling me all
sort of internal admin gubbins. Trying to remember something dumb like
how to check if a key exists in hash/dict/object I can do "pydoc
dict", but what do I get first up ?


-- Help on class dict in module __builtin__:

class dict(object)
| dict() -> new empty dictionary
| dict(mapping) -> new dictionary initialized from a mapping object's
| (key, value) pairs
| dict(iterable) -> new dictionary initialized as if via:
| d = {}
| for k, v in iterable:
| d[k] = v
| dict(**kwargs) -> new dictionary initialized with the name=value pairs
| in the keyword argument list. For example: dict(one=1, two=2)
|
| Methods defined here:
|
| __cmp__(...)
| x.__cmp__(y) <==> cmp(x,y)
|
| __contains__(...)
| D.__contains__(k) -> True if D has a key k, else False
|

First off I get constructors, sort of useful, although not as useful
as a brief word on what the class is and does.
The explanations are that great computer science invention -
explanations that leave you knowing less, so now I have to look up
what "iterable" and "mapping" objects are - are these vague concepts,
interfaces, base classes, generic terms, duck-typing style interfaces
etc.
But hey, I didn;t even what these, so what follows .... hmm, lots of
methods that start and end with "__" - a classic sign of "These are
internals, don't use them, don;t fiddle with them unless you REALLY
know what you're doing, please pretend they don't exist". So why are
they at the top of the helpfile ?
And then after these somewhere come the normal methods

| clear(...)
| D.clear() -> None. Remove all items from D.
|
| copy(...)
| D.copy() -> a shallow copy of D
|
| get(...)
| D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.
| has_key(...)
| D.has_key(k) -> True if D has a key k, else False

Explanations of the fewest possible words, well ok, these are the
basics, but written in pseudo-code in a mixture of the language and
bits that aren't in the language (is "->" part of the function
definition syntax like some functional languages - not that I've seen)
- pardon my WTF !

The documentation looks like it's been generated (spare me please from
the default output of doxygen and javadoc and the like - it's like
reading the code with all the helpful bits removed) and in that
brain-dead way of 'here's all the details in alphabetical order, we
have no idea of any structure or importance so we've sorted it, just
to be sure that if there was any logical groupings in the source then
we've destroyed that tiny little accomodation of human-to-human
communcation too'.

Consistency, regularity, homogeneity are all good, but when it comes
at the cost of practical use, human accomodation, communication,
navigation - well then it sucks.

I'd draw a comparison with the contrast between a shopping mall where
all the malls are identical in size, colour, decoration, all the shops
are the same size, and all the shop assistants have that same glazed
"have a nice day" look (but can't actually do anything like look in a
stock room or contact a supplier) and a city with nonsensical road
layouts, arbitrary names, some rubbish shops, some sullen assistants,
but in general the "big bright" shops are on the major thoroughfares
and the specialist places are in pokey back streets. You might have to
look for service, but you can get it, and you can remember the streets
by their look, their feel, their smell. And when you walk into your
favourite tech shop and the new guy behind the counter grins and says
"have a nice day", well, you turn on your heel and walk out pretty
damn smart to find somewhere different.

Good old rock and roll

Few phrases scare me more than an aging rocker declaring he's "going back to good old rock'n'roll", what usually follows is a miserable boring plodding track so instantly forgettable that I struggle to name names (except for the obvious "anyone who had a hit before 1970") but made me think all through my younger years that "good old rock and roll" must be some incredibly steaming pile of whatever.

What they actually mean is "I done run out of ideas" and "I don't understand all this new stuff and am spending increasing amounts of time reminiscing about my younger days" and "wouldn't it be good if these things that resonate with me had the same effect for everyone".

But without the mass of people who think "yeah, that reminds me of when we thought that was new and exciting" then it simply fails.

Nice to see that the trap can be avoided, usually by those whose who didn't achieve mass-appeal in the first place, meaning I can finally enjoy a Nick Cave album for more than 7 minutes...