Saturday, February 12, 2005

Falling in love again.

I have always been a "client side" kinda guy. Most of the work I do is fairly heavy graphics code and I'm reasonably good at problem solving when I can sit down in front of a good algorithm and bash out some code.
I am forced through circumstance to do work in HTML and I generally use FrontPage for my web site work but I can honestly say that HTML and presentation stuff of that nature is BORING BORING BORING so I tend not to put as much effort into it as I normally do my other work. I find that this reluctance is also affected by the fact that it's so dammned complicated to get a web site to do anything at-all interesting and the mix of script and the hokey way it fits into HTML coupled with the truly abysmal debugging options one has for working with it means that I do the minimum possible to make my sites work.
Up until recently, I had hosted my sites on cheap servers that didn't offer ASP.NET services so I was stuck with whatever active stuff I could be bothered to learn in the JavaScript fashion. About a year ago however I moved BobPowell.NET to a server at Brinkster because they had much more bandwidth than the godaddy servers I had been on before.
Now, I'm a great believer in "If it ain't broke, don't fix it!" so I have used the brinkster service as a high bandwidth home for my old site and not made that many changes to it. Within the last few weeks however I have got back into using ASP.NET beause I'm writing a complete licensing, support and customer management package for XRay tools. Of course, I knew how this all worked from a theoreical standpoint and had done lots of sample stuff on ASP.NET but never sat down to write an end-to-end application in it.
Well folks, I'm in love. What an excellent way to create an application. It has all the visual afdvantages of HTML with all the algorithmic advantages of client-side work. I can write my web-site in the same way that I'd write a Windows Forms application and it works so well!
I'll definitely be putting LOTS more active stuff on my sites from now on. GO ASP+!!!

Friday, February 11, 2005

Bitmap manipulations.

I keep having online conversations with people who bemoan the fact that their computers have a spot of bother dealing with images with pixel counts of 10,000 * 8,000 or 13,000 * 18,000. They complain that the image scrolls slowly and they can't drag an image about but they obviously haven't the faintest idea of the implications of such an image.

One bright spark complained of the poor performance of an image having 13000 by 18000 pixels so I sat and did a little calculation which, I think, brings home just how much information is stored in such an image.

13000 * 18000 is 234000000. Multiply this by 4 for the bit depth of images stored in memory on the computer and you get 936000000 (936 million). Ok, A page of type in a programmere reference book runs out at about 88 characters by 36 lines. Thats 3168 characters per side and 6336 for a single sheet of paper.

On my bookshelves I have several books over 1000 pages in length and a thousand page book works out to be somewhere in the region of two inches thick. Our 6336 characters goes into 936000000 about 147727 times. This means a book with 148 thousand pages, 2 inches per thousand remember, is 24.6 feet thick.

Now I don't have many bookshelves in my house that are 25 feet long but if I had one I'd know that that was one fat book!

Even given the power of todays computers that's one huge chunk of info to mess around with. Why don't people understand that before they start whining about the scrolling performance of their image viewer application?