2008-06-27

Firefox 3 SVG Performance Improvement

I did a quick check of my SVG Game of Life demonstration with Firefox 3 and found that it ran much faster compared to Adobe's ancient SVG Viewer 3.03 (ASV). The performance ratio used to be roughly 3:2 in favour of Firefox. Now, it's close to 5:1!

The raw numbers on the same computer: 24-27 fps on Firefox 3, 5-6 fps for MSIE6 + ASV.

2008-06-25

Event 7000, DS1410D service failed to start

Windows Event Viewer kept reporting error event 7000 each time I restarted my computer:

The DS1410D service failed to start due to the following error: 
The system cannot find the file specified.

The error is caused by Windows trying to load a file called DS1410D.SYS. This file is part of an application called FlexLM but since I've uninstalled FlexLM, the file has also been deleted.

The fix is find all instances of .../services/DS1410D/Start in registry and set it from 2 (Auto load) to 4 (disabled). See Microsoft KB 103000 article for more information.

2008-06-24

Gawk Print Last Field

gawk script to print the last field of each line:

gawk -F <delimiter> "{ print $NF }".

-F defines the separator in the command line, otherwise you would prepend "BEGIN { FS=<delimiter> }".

NF is the number of fields in a line and $n is the value of the n'th field, so $NF outputs the last field.

See Also

2008-06-23

Firefox 3 - Second Impressions

Second impressions after using Firefox 3 for a couple of days:

  • Smart Location Bar pretty much replaces the Search bar in most situations.
  • Faster than FF2 when rendering of pages with Javascript controls. Load http://msdn.microsoft.com/en-us/library/aa923541.aspx and select some of the menu links at the top of the page. In FF3, the menus expand immediately while in FF2, they used to take about a second or two.
  • Identity button is a great shortcut for checking the certificates of secure sites (try http://paypal.com and click on the site's favicon).
  • UI improvements:
    • FF3 is prettier than FF2 in Win XP and Vista. The toolbar buttons are clearer and brighter, and there's less clutter.
    • The Find dialog is shorter and less intrusive.
    • Password Manager prompt appears on top of page instead of a modal dialog. You can continue browsing or tell the Password Manager to remember your password.
    • Buttons with focus now have bright highlighting (FF2 drew a hard-to-see dotted line border around the button's label). Would be nice if all controls were highlighted the same way.

2008-06-24: The OK button in the dialog to open or download files now has focus when the dialog opens. In FF2, the OK button didn't get focus until the dialog lost and regained focus.

2008-06-21

Firefox 3 on ABC Radio National Breakfast

Firefox 3's release was reported on ABC Radio National Breakfast Tech review with Peter Marks - Firefox. The ABC doesn't seem to make transcripts of that programme (at least, I couldn't find any), so here's one:

Mark Bannerman: Well increasingly we do business, receive entertainment and socialize through the Internet. And the way we access the Internet is with a Web browser. This week, a new version of the popular Firefox browser was released, and it achieved a massive 8.3 million downloads in the first 24 hours. To explain all this interest, we are joined again by our technology editor, Peter Marks. Peter, good morning.

Peter Marks: Good morning, Mark.

MB: Well, let's start with the basics. 8.3 million downloads in one day. That's a lot of interest. But exactly what are they seeking? What is it?

PM: Well, the Web browser is the thing that turns the mark up language of the Internet, it's called HTML, it's a simple text mark up designed to just transmit ???. Originally it's just text, but it turns it into that beautiful rendered page when you go to Web sites, like the ABC's Web site for example. And the software you run to do that rendering on your screen is the Web browser. Originally, it was very simple text, but now we're doing applications like banking, bidding on auctions, we're arranging parties ... we're doing all sorts of things through the Web browser. And in a sense, the operating system underneath it, Windows, or the Mac or Linux or whatever, is becoming less important, and the platform that we work in is the Web browser. Different browsers are different. Some are faster than others, some are more secure and so on. So, you know, people like to have a bit of a choice about which one they use.

MB: So, in those terms, computers come with a browser, but what you're saying is that, or what we're clearly learning here, is that some people choose to install a different one.

PM: That's right.

MB: Why is that?

PM: Well, Windows comes with Internet Explorer, for example. The Mac comes with Safari, which I should add, is available on Windows as well. And Internet Explorer was incredibly dominant. That had well into the 90's of all browser impressions. So it became the dominant browser everyone was using. And that caused a number of problems a few years ago. The first one was that it had some quirks, and so Web sites were designed just primarily to work with Internet Explorer. If you were unlucky enough to use something else, you found that sites looked a bit strange. The other problem was that it had some security holes. And people, because it was the dominant browser, targeted it. And I can remember my kids would go to a Web site, that was kind of fishing for kids, and just by visiting that Web site in Internet Explorer, they would get a virus or a Trojan horse installed on their computer. So it had some bad things happening because it was so dominant. It's a bit like a monoculture and it can get diseased.

MB: So having a variety of them saves us from that?

PM: It's a good thing, yes. It's a bit like with farming that you have a variety of crops, then you're not going to be all wiped out.

MB: It's extraordinary isn't it, really?

PM: Yeah, it's the same thing. And we talk about viruses, it's very much like life. Firefox happily has started to appear as quite a dominant browser, and I think people had a good experience with versions 1 and 2, and they're recommending it to each other. Now, in fact, the statistics in Q2 2008 this year were that IE has 74% of the market share, Firefox has 18%, which is pretty good, given that it doesn't come with either of the computers. So people have actually got to make a decision to download and install it, which of course is a big thing. Safari on the Mac has 6% but the trend has strongly been against IE and pro-Firefox. It's been growing as IE has been shrinking. It's just great to see Firefox on all platforms. So now Web designers know that if they build a site that works in Firefox, they can say to a user, "Whatever you're using, go and get Firefox and it will work."

MB: So, without wanting to, sort of, you know, to do a total ad for this, what are the features that have made that many people rush to it within 24 hours?

PM: I should say that Firefox is free, so it's hardly an ad if you're talking about something that's free to download. Firefox 3 looks better than previous versions. It has native themes, so if you're on Vista, it looks like Vista, it fits right in. The old version looked a little bit odd. On the Mac, it looks like a genuine Mac application. It's really, really fast at rendering. It's much faster than IE, it's about 2 or 3 times faster than the previous version. So, when you go to a Web site, it pops. It just, bang, it's rendered. ??? which is fantastic. They fixed a lot of memory leaks and problems that were there in the past. My favourite feature is called, if I can do the voice, the Awesome Bar.

MB: [Laughs]

PM: Now, this is the address bar where you used to type URLs, so you would type, you know, H T T P whatever abc.net.au, and what people often do is that they can't remember it's a ".com" or ".org" and so they would typically Google for the URL.

MB: Right.

PM: In the Awesome Bar, it remembers where you've been in the past, and you can type in any part of the URL, any word in there, or any part of the name of the site or the page, and it will pop up this list of suggestions, and, I can tell you, it really works. You will find that the site you want is right there, and you can choose it. I love the name.

MB: It's scary, isn't it? Because it almost does it before you think of it. Now you were saying, though, that Firefox is free, so how do they make money?

PM: Well, they're paid with ... it's got this little search box that defaults to Google. When you do a search through Firefox, Google sends them over some money. I think about half of their funding does come from Google. And that of course raises some questions. It gives Google a lot of leverage to say, "Hey, Firefox team, you know, can you put this feature in for us and so on." But it's generally a good thing. There's no money changing hands. It's an open-source project and various companies do participate with it. IBM contributes code and ??? codes for it. So it is kind of a community project. It's fantastic to see it's getting such dominance.

MB: All right then, Peter Marks. We'll leave it there. Thanks very much for that.

PM: Thanks, Mark.

MB: That was our technology editor, Peter Marks, talking to us about the new Firefox Web browser.

Firefox 3 Gmail Problem Fixed

Upgraded from Firefox 2.0.0.14 to Firefox 3.0 and found that I couldn't load the default Gmail client (Firefox displayed the progress bar and then stopped). Same problem with using the HTTPS URL. The plain HTML client and older Gmail client was OK. I worked my way through the Firefox Basic Troubleshooting guide and the problem was fixed only after making a new profile.

2008-06-18

Creating UML Composite States in Sparx Enterprise Architect

How to create a UML composite state element using Sparx Systems' Enterprise Architect application:

  1. In a state machine diagram, create a new state element.
  2. Select the state element's context menu item Advanced / Composite Element.

The selected state element is converted into a composite state element (the image has a infinity symbol) with its own state machine diagram (check the Project Browser). Now you can draw a transition line to and from this composite state and include it in state transition tables.

Annoyingly, Enterprise Architect's on-line help describes a composite element but doesn't show to make one!

2008-06-10

Visio 2003 Cannot Resize Shape Directly with Keyboard

Microsoft Visio 2003 doesn't provide keyboard shortcut for the user to resize a shape instance. You have to use the mouse pointer or (shudder) enter the required height and width of the shape in the Size & Position window.

2008-06-04

Match Multiple String Patterns

To find multiple string patterns in an input file or stream, these commands are equivalent:

  • sed -n -e "/pattern1/p" -e "/pattern2/p". -n suppresses printing all input lines.
  • sed -n -r -e "/pattern1|pattern2/p". -r enables extended regular expressions.
  • grep -e "pattern1" -e "pattern2"..
  • grep -E "pattern1|pattern2". -E enables extended regular expressions.
  • findstr "pattern1 pattern2". You have to delimit the patterns in a single string argument. To find strings containing white spaces, you have to use the \s (whitespace) character class in your pattern.