65535 no longer a big number.

Posted in Uncategorized at 4:46 am by Toby

I came across rather an interesting thing yesterday. I provide support for some local businesses near me and I got a call from one to say that Adobe Acrobat on one of their machines was no longer working.

I didn’t worry about it too much, assuming that I could come in take a look, maybe reinstall Acrobat and all would be well. This business is one that has a regular need to view pdf files, so this was a problem rather than just a nuscience.

I arrived at the clients offices and got started. First off after some initial investigation, I downloaded the most uptodate Acrobat from the web and reinstalled it. No luck. Uninstall, shut down , Reinstall. No Luck. It kept hanging on startup, just got to the rather funky splash screen that Acrobat has and no further. After all the reinstalls I realised there was something more going on. A quick search on google let me to this discussion, by people who were having the same issue. I glanced through it until I came to what was probably the root cause of the problem. Temp files.

Like many of the people chatting in the discussion this computer had 65,000+ files in the root folder of the temp directory. 65,000 of which were acrobat *.tmp files. A possible cause for the problem was suggested by one of the participants in the discussion. 65535 is FFFF in hex, all the tmp files in the directory created by acrobat had 4 letter hex number ie, acr****.tmp. One more file and an overflow occurs, preventing the application from ever starting again.

This raises several questions.

  1. How did Acrobat manage to generate 65535 tmp files in a realatively short period of time? The pc was only 6 months old – thats approx 360 tmp files a day. Even in a pdf intensive office thats a bit excessive.
  2. Why didn’t acrobat delete its temp files?
  3. Why not just overwrite acr0001.tmp when you reach acrffff.tmp?
  4. Why not fix the problem in the next version?

Needless to say I followed the advice of the participants and deleted all these files. Low and behold Acrobat worked again. We’ve all made the mistake of assuming that a ‘magic number’ we place in our code will never be reached, but we should all write code that ensures it never is.


Non Standard UI features

Posted in Uncategorized at 11:00 am by Toby

After a couple of days of using firefox, I have switched it to my default browser. MYIE2 will remain as a backup moving forward, but I’ll see how I get on with firefox for a while.

However one this I have noticed about it already. The developers seem to have decided that OK buttons to close dialogs are superflous. OK buttons, or even Done if you wish are a very fundamental part of the Windows UI experience. Not all users are aware of the fact that you can click the X in the right top to close a window.

This is the download dialog in firefox. We are being asked if we wish to clean up.

So we do, but now what.

A ‘Done’ button here beside the cleanup button wouldn’t go amiss.

Joel has a lot to say about trying to change Standardised UI.


Another Reason

Posted in Uncategorized at 6:55 am by Toby

I remembered another reason why I origionally changed to myie2. When I was testing web pages etc, if you open a url from within an application, it opens the url in an already open browser window. This is really annoying if you have something in the browser window that you wish to look at. Myie2 opened a new tab when asked to open a url as your default browser.

Another Browser Story

Posted in Uncategorized at 3:09 am by Toby

Here comes another boring browser story. You know the kind,

“What are all you idiots doing using browser X, browser Y is so much better in every way that you need to be in bed with browser manufacturer Z to actually use their rubbish browser, in fact I can tell you’re so stupid purely based on your choice of browser, that I’m not even going to talk to you anymore.”

Well actually no. I’ve found firefox thanks to public virtual MemoryStream: Firefox again a short blog post by Luke Hutterman telling the world why he is using firefox, and what extension (more about those later) he uses to make it the finest browser he has ever used. See the problem with most boring browser stories is the bit about ‘in every way’ which is completely untrue, there is always a reason why a new browser is worse in some way to our old browser, whether it works differently when you ctrl-click, doesnt display your favorite site quite right, doesnt have multiple tabs or just looks silly. This has been the case up until now for me, so let me take you on a short browser journey.

I’m guessing at the dates, so no doubt some will be wrong.

1984 – Never heard of browsers!

1994 – Studying Artificial Intelligence in college and get my first view of a browser it was NCSA Mosaic, I knew this was funky. (side note: I’ve always firmly believed that it was not Tim Berners Lee who was responsible for the web and all its associated benefits. It was the team at NCSA who came up with mosaic. The web had been around for a long time before they produced mosaic, but it was only when the web got given a friendly face that things really began to happen)

1994 – 1997 – Due to the appaling state of modems 14.4 k being the norm at this time didnt do much browsing outside of college. When I did though, it was with the netscape program.

1998 – Still on Netscape. IE 4 was the most hurrendous browser to ever be developed, primarily due to its desire to take over your entire windows machine and crash it on a regular basis.

1999 – IE 5 released, and despite my desire to continue to use Netscape, they seem to have abandoned me. Microsoft has finally realeased a working browser and Netscape have run away (not to be heard from for about 4 years!)

2000 – 2002 – Move through successive versions of IE 5 -5.5, 6 . I thought they were a fine browser, but what really annoyed me was having 15 windows cluttering up my start bar and screen.

2003 – I find MYIE2

2003 – I wax lyrical about myie2 (now Maxthon for some reason). MYIE2 is my browser of choice and still is. It is IE with tabs. That for a long time was all I needed. IE rendering so I can develop my sites knowing that what they look like in myie2 is what they will look like in IE, but with multiple tabs so I can have 15 sites open (not an uncommon occurance) but only have one window shown in my start bar. If a site opens a new target windows, it opens as a new tab. And more than anything else, and the one this that I now could not live without having in a browser is a system of displaying favorites that means you actually use them. It may not have been the first browser to do this, but it was the first I came across. All your favorites are provided as menus on your toolbar.

This as far as I’m concerned mean that I use my favorites, whereas before I never did.

2003 – During my love affair with myie2 (sorry guys I refuse to call it Maxthon) I has a brief flirtation with firebird, but it didnt do some things right. It had an annoying habit of opening new window links in a new window rather than just a new tab. Also it never really grabbed me. Myie2 continues to be my browser of choice.

Nov 2004 – I’d been hearing a few people talking about firefox (and I couldnt quite remember whether that was different to firebird (whats with all the fire anyway)). And then I read the article above. And what caught my eye, was not a new browser hurray, but the extensions. These seem to be bits of code that anyone can write that extend the functionality of firefox. Primary among these he points out are a web developer extension which allows you to do all sorts of funky things like edit the css for any page your viewing, highlight table cells, view form fields – loads of really cool things. And once your download a tabbing extension it handles new windows and tabs, fairly much the same was as MYIE2, and it allows you to have your favorites sitting on the tool bar (a little bit more cumbersome to set up though).

All in all firefox is looking fairly promising, though it will need a bit more testing before it knocks myie2 off its perch as my default browser.


A bit better today

Posted in Uncategorized at 4:22 am by Toby

The fog is begining to clear today. 5 days without a wiff of nicotine, and my brain is begining to get back to normal. Its begining to seem like less of a struggle, a bit of light at the end of the tunnel.