Shareware Beach

Friday, 1 December 2006

Another Great Font for Programmers

Filed under: Software Development — Jan @ 17:24

Seems my love affair with the Consolas font may be short-lived! A reader pointed out that the Bitstream Vera Sans Mono font available on the Gnome website is also excellent for programming.

I installed it, and everything I said about Consolas also applies to Bitstream Vera Sans Mono. The font looks great with ClearType, but not so good without it. It is perfectly monospaced when mixing bold and plain variants, so your columns always line up. It’s a sans-serif font, so easy to read on the screen. Oh, zero, one and el are all easy to distinguish.

Which one to use is mainly a matter of taste. For a given font size, Consolas has smaller characters with more whitespace betweeen them, and a slash through the zero. The Bitstream font has larger tightly spaced characters, and a dot inside the zero. “Consolas” sounds like the name of a Spanish beauty, while “Bitstream Vera Sans Mono” is a mouthful.

The Bitstream Vera font collection can be freely distributed in its unmodified form, so you can download Bitstream Vera Sans Mono right here. To install it on your Windows PC, simply drag and drop the .ttf files from your zip utility into the C:\Windows\Fonts folder. They’ll be instantly available in all applications. Make sure to look under “B” for Bitstream rather than “V” for Vera.

The package also includes Bitstream Vera Sans which is a sans serif font like Arial, and Bitstream Vera Serif which is a serif font like Times New Roman. Both are proportionally spaced.

Monday, 27 November 2006

The Consolas Font for Programmers

Filed under: Software Development — Jan @ 10:04

Windows Vista includes quite a number of new fonts. The Segoe UI font has received a lot of press, as that’s the new default font for dialog boxes, etc. But the Consolas font is the one that’s captured my geeky heart. It’s without a doubt the best TrueType font for programming I’ve ever come across.

Courier New and Consolas are the only two TrueType fonts that have a property that’s vital for programming in a modern syntax-highlighting text editor: they’re not just monospaced, but their bold and plain variants have the same width. This means that columns will always align perfectly when highlighting keywords etc. in bold, without the editor having to squeeze the bold characters or having to stretch the plain characters. Other popular monospaced fonts like Lucida Console and Andale Mono use wider characters for their bold variants. This means they’re only monospaced if you don’t mix the bold and plain variants.

Consolas is a sans serif font, just like Lucida Console, Andale Mono, or Arial for that matter. Most people find sans serif fonts easier to read on the screen. Serif fonts like Courier New or Times New Roman are better suited for print.

But the key benefit of Consolas is that it’s designed for ClearType. ClearType smoothes fonts by anti-aliasing them using pixels of various colors, taking advantage of the physical characteristics of LCD screens. (ClearType looks bad on CRT screens.) I never cared much for ClearType, because many fonts, including Courier New, actually become harder to read when they’re smoothed this way. Consolas, however, looks perfect when rendered with ClearType.

If you’re not using ClearType, then Consolas doesn’t look nearly as good as Courier New. It has too many black pixels that seem out of place. Consolas is clearly designed to be smoothed.

To top things off: the character for the digit zero has a slash going through it!

Consolas ships with all versions of Vista, including Home Basic. The screen shot below shows EditPad Pro running on Vista Home Basic. If you’re using Visual Studio 2005, you can download Consolas from Microsoft. If not, you still may be able to use the font, though your mileage may vary. I was able to install it on a Windows XP SP1 machine that doesn’t have any version of Visual Studio. This PC does have the Microsoft .NET Framework SDK which creates various “Microsoft Visual Studio” folders under “Program Files”. These may cause the Consolas installer to think I do have VS 2005. I got no error messages, and the font was instantly available in all applications. If your PC has an LCD screen (or two), I recommend you turn on ClearType (Control Panel, Display applet, Appearance tab, Effects button, Smooth edges checkbox) and give Consolas a try.

The next free minor update of EditPad Pro will use Consolas by default on Windows Vista.

EditPad Pro using the Consolas font on Windows Vista Home Basic

Friday, 10 November 2006

Microsoft Does Have a Fine Download Manager

Filed under: Software Development — Jan @ 17:44

Last month I ranted about the download manager Microsoft uses for the public Windows Vista beta downloads. This week I found that Microsoft does have a download manager of its own that works just fine.

Microsoft File Transfer Manager

With the release of Windows Vista imminent, I coughed up the money for an MSDN Operating Systems subscription. When I clicked on the download link to the checked build of Vista RC2, the “Microsoft File Transfer Manager” automatically popped up (after the obligatory ActiveX warning). The next morning build 5744 x64 was sitting nice and shiny on my PC’s hard drive. No errors or complaints from the download manager. Same with the x86 build the morning after.

Since this could, of course, be due to a sudden dramatic improvement to my ADSL connection (hah!), I just did the ultimate test: I started another download, and unplugged the Ethernet cable going to the ADSL router. The download manager didn’t even blink. The status label changed from “active” to “trying to connect” after a minute or so. When I plugged the cable back in, the download silently resumed and the status label went back to “active”.

That’s how a download manager should work. I guess I’ll never know why Microsoft uses two different download managers to deliver the Vista previews to the public and to MSDN subscribers. It’s not a matter of getting what I paid for. Microsoft’s the one paying for the bandwidth of all those failed downloads.

Monday, 9 October 2006

World’s Worst Download Manager

Filed under: Software Development — Jan @ 19:10

The Akamai Download Manager that Microsoft offers on its web site to download the Windows Vista previews is one of the worst pieces of software I’ve ever tried to use.

An important guideline any user interface design book will teach you is that it’s better to ask for forgiveness than for permission. Instead of asking the user “Are you sure?”, provide a fool-proof undo mechanism instead. The user is always sure, until he changes his mind. Of course, this puts the onus on the programmer rather than the user.

The programmer of the Akamai Download Manager must have had a particularly lazy day. When my internet connection is interrupted, as invariably happens during an overnight download, the morning greets me with the following message:

Network error, cannot download. Check connections, and try again. Would you like to retry now?

Of course I want to retry! I want to retry until the cows come home! That’s why I’m using a download manager in the first place. If I change my mind in the morning, I’ll just delete the file.

But it gets better. When the download was completed, I was told:

The Download is complete.  However, the download integrity is questionable (MD5 mismatch).  Check the file and download a fresh copy if needed. Would you like to start over?

Ack! The good news is it actually does an MD5 check. This is not part of the HTTP standard, so Microsoft must be passing this along in the link to the download manager. My computer crashed this morning due to a power outage, so the integrity failure is not unexpected. But why do I have to download the whole thing again!? Why not use a list of MD5 hashes for each 1 MB or 10 MB chuck of the file, and re-download only the faulty chunk? Those 100,000 downloads of RC2 are going to be gone pretty fast this way.

Halfway through the second attempt, my internet connection acted up again. So did the Akamai stuff:

The Download Manager cannot handle this download.  The download will be canceled.

I clicked the mislabeled OK button (an expletive would be more appropriate), poof!, my download was all gone.

So I googled for “4 gb download manager”, found a link to Internet Download Manager, confirmed the page says it can handle 4 GB downloads, downloaded the thing, and restarted the download once more. Being a shareware product, this one will hopefully work a bit better.

With all the effort Microsoft is putting into Windows Vista, I don’t understand why they don’t try to make a better first impression. Microsoft could easily link to the 30-day trial of the download manager I just found. They could probably buy the whole company with some of their spare change.

Anyway, if you want to download Windows Vista, don’t use the “recommended” download manager. I feel better now.

« Previous PageNext Page »