IanG on Tap

Ian Griffiths in Weblog Form (RSS 2.0)

Blog Navigation

April (2018)

(1 item)

August (2014)

(1 item)

July (2014)

(5 items)

April (2014)

(1 item)

March (2014)

(1 item)

January (2014)

(2 items)

November (2013)

(2 items)

July (2013)

(4 items)

April (2013)

(1 item)

February (2013)

(6 items)

September (2011)

(2 items)

November (2010)

(4 items)

September (2010)

(1 item)

August (2010)

(4 items)

July (2010)

(2 items)

September (2009)

(1 item)

June (2009)

(1 item)

April (2009)

(1 item)

November (2008)

(1 item)

October (2008)

(1 item)

September (2008)

(1 item)

July (2008)

(1 item)

June (2008)

(1 item)

May (2008)

(2 items)

April (2008)

(2 items)

March (2008)

(5 items)

January (2008)

(3 items)

December (2007)

(1 item)

November (2007)

(1 item)

October (2007)

(1 item)

September (2007)

(3 items)

August (2007)

(1 item)

July (2007)

(1 item)

June (2007)

(2 items)

May (2007)

(8 items)

April (2007)

(2 items)

March (2007)

(7 items)

February (2007)

(2 items)

January (2007)

(2 items)

November (2006)

(1 item)

October (2006)

(2 items)

September (2006)

(1 item)

June (2006)

(2 items)

May (2006)

(4 items)

April (2006)

(1 item)

March (2006)

(5 items)

January (2006)

(1 item)

December (2005)

(3 items)

November (2005)

(2 items)

October (2005)

(2 items)

September (2005)

(8 items)

August (2005)

(7 items)

June (2005)

(3 items)

May (2005)

(7 items)

April (2005)

(6 items)

March (2005)

(1 item)

February (2005)

(2 items)

January (2005)

(5 items)

December (2004)

(5 items)

November (2004)

(7 items)

October (2004)

(3 items)

September (2004)

(7 items)

August (2004)

(16 items)

July (2004)

(10 items)

June (2004)

(27 items)

May (2004)

(15 items)

April (2004)

(15 items)

March (2004)

(13 items)

February (2004)

(16 items)

January (2004)

(15 items)

Blog Home

RSS 2.0

Writing

Programming C# 5.0

Programming WPF

Other Sites

Interact Software


One Day To Go

Thursday 20 May, 2004, 10:40 AM

Yes, my cryptic countdown is almost over.

On the off chance that anyone other than me actually cares about this admittedly somewhat childish countdown, I should warn you that the very thing I'm counting down to is likely to keep me away from the computer for most of tomorrow, so I probably won't post about it until some time in the evening (UK time).

In the highly unlikely event that you really can't wait, Google will of course reveal the answer if you dig deep enough. Here's a cryptic clue: the mysterious letters 'SMG' are significant, as is something you might 'go to work on' (assuming you're British, and old enough to remember that).


It's The End Of The World As We Know It

Thursday 20 May, 2004, 11:50 AM

Craig has been doom mongering about the imminent demise of Moore's Law. (Or at least the exponential improvements in performance we associate with Moore's Law. Strictly speaking Gordon Moore merely observed that the number of transistors per integrated circuit grows exponentially. If Intel shipped a CPU that had twice as many transistors as the models of two years ago, but it ran at only one tenth of the speed of the previous model, they would still technically be keeping up with Moore's Law. It's just that we expect several things besides transistor count to grow exponentially - notably clock speed and hard disk size.)

While people have been predicting the demise of Moore's Law within two decades for at least thirty years now, I have to agree with Craig here. I like Craig's characterization of the usual denial as "an assertion of faith against physics - a typically human response." On the other hand, I can't help noticing that by agreeing with Craig that Moore's Law is surely doomed, I'm repeating behaviour that has consistently failed to be in accordance with reality, and expecting the outcome to be different this time, which I gather is one of the signs of madness. But I think we are now seeing signs of a slowdown. (And they said I was MAD!!!!)

First of all, Moore's law itself appears to be slowing down. The original paper talks of doubling the transistor count every year. Later this got revised to every 18 months. Intel's page on Moore's law now says "every couple of years" (although maintaining even that is still a pretty phenomenal rate of growth). And of course there's this recent hitch that Craig refers to. But there seem to be tail-offs in other areas too.

Slightly over a year ago, Hitachi introduced the first 7,200rpm laptop hard disk - the Travelstar 7K60. If you google around for information on the equivalent of Moore's law for hard disks, most sites will tell you that disk storage has actually outstripped CPU clock speed and transistor count - disk storage is growing at Moore's original rate of doubling every two years, apparently.

So how come the largest 7,200rpm laptop hard disk you can buy today is still the same Travelstar 7K60? According to my calculations, this does not constitute a doubling of capacity in the last year...

(Obviously my goal is to prompt fate to embarrass me. I'm hoping that I'll be made to look a fool by an announcement being made seconds after I post this blog of some new 10,000rpm laptop hard drive with 200GB of storage that uses a third of the power of previous generations, and runs so quietly that your laptop is quieter with the hard disk on than off. I can cope with the humiliation though, so long as I get a better hard disk... My current one is rubbish - Dell shipped a 4200rpm unit with my year-old laptop, and I've been waiting for a bigger 7200rpm drive to come out ever since... I had assumed, what with Moore's law and everything, that a 7200rpm 80GB hard disk was surely going to come out within weeks. But apparently not.)

How to Win When Moore's Law Fails

Craig also points out that the trick is to work out how to profit from the sudden lack of progress when we do hit the wall. I'm wondering if IBM's withdrawal from the hard disk market (they sold their hard disk operation to Hitachi a while back) is related to this.

It is of course foolhardy to predict what IBM might be doing on the basis of their research activities because they seem to do vast amounts of research into all manner of things, but I'm feeling reckless, so here goes...

In a paper published around four years ago, IBM observed that magnetic storage was going to come up against some limits in about 2010. They have also been doing a lot of research into the alternatives, including, very pleasingly, the spiritual successor to the punched card that was so important to IBM's early history. Interestingly, both this and some of their proposals from half a decade ago on holographic storage share an important property: a seek time many orders of magnitude lower than a hard disk's.

Indeed, one of the proposed product scenarios was as an extension to DRAM - persistent media with a seek time of 10ns. (That's about a million times faster than today; hard disk seek times have barely changed in the last decade. Actually 10ns is pretty good going even for non-persistent memory!)

So even though exotic new storage technologies won't be able to stave off the end of Moore's Law forever (with exponential growth you're eventually going to run into the problem that you're trying to store bits than you have atoms...) the idea that these alternatives might radically change the cost of a 'disk' access is arguably a whole lot more interesting in the short term - given the choice between a disk twice as large as my current one, and one that's the same size but several orders of magnitude faster, I'd go for the latter.

In an awful lot of cases, execution speed isn't limited by the CPU - in most PCs the processor spends most of its time waiting for something to do. Replacing your hard disk with a device that didn't make you wait about 10ms every time you wanted something from it would have an instant and radical effect on performance. In some cases it would do more for your performance than a faster CPU ever could.

And this will of course change a shed load of performance rules of thumb. Right now, it's worth bending over backwards to avoid using the disk - if you can recreate the data from scratch by executing a million instructions rather than loading it back off disk, it could well be faster just to execute those instructions. But if we move away from today's data retrieval delays, which are on the order of the blink of an eye (i.e. abysmally slow), to something only slightly slower than DRAM, then all your heuristics for what's worth caching, calculating or storing change beyond recognition. Years of careful tuning in operating systems, databases and the like will suddenly be out of balance with the way real systems behave.

So that's two fundamental shifts on the radar: the end of exponential CPU performance increases, and a possible rule-of-thumb-destroying improvement in the response time of your mass persistent storage. Exciting times...


The Power of Vector Drawing

Thursday 20 May, 2004, 02:31 PM

One of the goals of Avalon is resolution independence. Flat panel display resolutions are increasing - my laptop has a pixel density of about 150ppi (pixels per inch); IBM offer a 200ppi display. Historically, GUIs have tended to rely on bitmaps to represent images, but because these are essentially big lists of pixel values, the resulting images get smaller as your screen resolution gets higher. At 150ppi I don't find it a big problem, although I almost always get comments about how tiny the text is when people see my laptop screen. (But that's mainly because I've always used 9pt for text editing...) By the time you get to 200ppi however, bitmaps designed for the 'standard' 96ppi resolution start to look silly.

We hit this problem long ago with printing - low end laser printers typically have resolutions of 300dpi, and it's not uncommon to see 2400dpi used in professional typesetting. (dpi=dots per inch; dpi is the usual term in printing. For LCD displays we tend to use ppi because with a colour display, individual pixels are subdivided into coloured segments; it wouldn't be completely clear what you meant with dpi applied to a flat panel - is that the pixel resolution or the segment resolution?) Bitmaps clearly weren't the way to go here. Consequently, the advent of high-resolution digital printing came hand in hand with the development of scalable fonts. Rather than storing typefaces as bitmap images, they are stored as sets of coordinates defining the shapes of the outline of the characters. These coordinates can be mathematically transformed to scale, or rotate the letter shapes before generating the final output bitmap. (That's what we mean by 'scalable' in a graphical context; this obviously has nothing to do with scalability in multi-user systems.)

The same kind of technology has existed for years in Windows - GDI32 has always supported scalable drawing with the same Bezier curve primitives that most scalable typefaces. It is possible to draw in a resolution independent way with these APIs. It's just that few people bother because bitmaps were so much easier to use.

Fortunately, Avalon makes it trivial to use scalable primitives in your UI, so now there's no excuse. (And Microsoft is setting a good example by making its own controls scalable.)

Vector Scepticism

However, there seems to be a widespread belief that you just can't draw certain kinds of things with vector representations. People often seem to think that bitmaps are necessary to get anything looking at all realistic. This attitude is likely to be bolstered in the short term when people make their first forays into scalable UIs, and we see some truly dreadful-looking UIs. I'm guessing that a lot of the people investigating Avalon at the moment are, like me, technical people with minimal drawing skills. (There are of course notable exceptions.) So expect the early Avalon UIs to look just as good as the swathe of aesthetic crimes of the mid to late 1980s when home computers and PCs first started to ship with something better than character graphics as standard.

(I suspect there is a specific example in the WinHEC build (4074) of Longhorn. The icons in the games folder all have the look of being vector images. Note in particular that for some reason, the Windows Explorer view of that folder isn't anti-aliasing any of the images, but if you open a properties window on any of the games, you'll see the same icon appear, but with all the edges nicely smoothed. Unfortunately, these images don't look at all polished - to me they seem like a significant step back from the typical quality of your average Windows icon. However, it would be a mistake to assume that this is an intrinsic problem with vector images.)

The fact is that you can achieve amazing images with vector-based drawings. I recommend you take a look at some of the sample images on this site. (BTW, a very long time ago I used to work for these guys. They weren't called Xara back then - they were called Computer Concepts, and they were writing software for Acorn's RISC OS-based computers, not PCs. Some of their demo images were originally drawn on the Acorn version of their drawing program, which was called Artworks. The picture of the MG Midget dates back to then for example, as does the old-style Mini you'll find if you dig around the gallery.)

I think some of the demonstration pictures are of astonishingly high quality, and every single one of them is a vector image - a scalable, resolution independent image.

So don't be tempted to write off the viability of vector representations as a tool for photo realism simply because images that developers like myself might happen to produce are rubbish. Dammit Jim! I'm a developer, not an artist!

Copyright © 2002-2013, Interact Software Ltd. Content by Ian Griffiths. Please direct all Web site inquiries to webmaster@interact-sw.co.uk