Top
Bottom
Top

Scott's Column
VB 2005 Continues, Vista Returns and Special Characters

June 1, 2006
By Scott Lewis

This has been a bit of a crazy month for me. My first VB 2005 application had a couple of bugs that still need to be fully tested, and I have spent a lot of time on a new project. I also had to spend a lot of time on the swimming pool.

Gaming

A friend lent me Lara Croft: Legend. I briefly mentioned this game last month. My friend brought me to his apartment so see the difference in the graphics from the "Next Generation Content." I was totally blown away by the water effects more than anything else. With NGC off the water has a steady shimmering all the time. With NGC on the water in an indoor pool is extremely still and you can see very clearly reflections off the water. Plus the water looks far more transparent than I have ever seen before. Jump in that pool and the splashing looks better, but nothing to write home (or on the web) about. However, get out of the water and look back and you see the ripples that you made while in the water. You can also see the ripples bounce back when they hit the other side, and they fade in a very realistic way. 

Shadows and lighting are also much more realistic. Lara's skin tone is much better done, with more graduation and highlights. However, some of the shadow and lighting seems over the top. It is really cool to see the lines that divide the panes of a window each cast a shadow on the floor, but sometimes it seems too deliberate. Like they were showing off. Granted, they have a lot to be proud of in creating such a detailed environment, so I forgive them for this gloating. But it did look just a tad too realistic.

The overall result leads me to believe we just may see computer animation in a game that will look like a filmed movie. Like you are really controlling a camera to a real world and directing the movement of the main character. I can't wait to see what they do in another ten years.

Alas, the game only plays with the DVD disc in the drive. So I returned the game after looking at it for about 5 minutes with my son. He was impressed by the difference in detail that the "Next Generation Content" provided.

When my friend finishes the game I may borrow it. I don't care enough about the game to buy it. If you have a killer gaming machine (512 MB of video memory) then you might want to check it out. I downloaded the demo, but alas it does not run with the Next Generation Content. No easy way to see how it looks without buying it. Borrow it if you can, just to see how it looks.

Swimming Pool

I don't want to get into a long story here (really!). Between the trip to New York in April and Mother's Day in May I let the pool slack. Big mistake. When I went to clean it the weekend after Mother's Day the dirt and algae was stuck on. I was left with only one solution... drain the pool and scrub the floor by hand. Ouch. I also took this time to pull back the lining on the far side and fix the cove (the smooth part between the walls and the floor) which had fallen out the bottom when the road base beneath it eroded away in a bad storm a couple years ago. It was a lot of work, but the pool finally got back in shape.

Visual Basic 2005

My first Visual Basic 2005 application almost went to production. Unfortunately a couple of serious bugs showed up in final testing. I had to re-write the code that calculates boxes of an order. The numbers like 1 of 3, 2 of 3, etc. It worked for most items, but it failed when calculating it from an order that was being remade. The code expected orders to come in as 1 of 1, and the code would split it into the appropriate number of boxes. This worked great, but it failed miserably if an order was being made again, and already had a number other than 1 of #.

Ultimately I had to come up with three methods of calculating the number of boxes. One for normal orders, another for remade orders (basically I read the boxes from the input rather than calculate something) and finally I had to do different math when the order didn't have a valid start number. If the start number is normal it was used to help calculate which box was being worked on. Each box normally gets it own start number. Without a start number I had to count the records and go from there.

I still need to do some more testing before moving this to production. Hopefully soon. It is a large change to make to the existing system, so caution in warranted.

Special Characters

I have been rewriting the code that handles special characters. These are characters like ñ. Our mainframe cannot handle these extended ASCII characters. If you (the reader at home) wants to generate this character you could use the Character Map applet (Click on Start, All Programs, Accessories, System Tools, Character Map). From this applet you can copy and paste special characters into your own documents. You can also get many of these characters by keying their ASCII value. For instance, to get the ñ you can hold down the Alt key and type 0241 on your numeric keypad. When you lift the Alt key the ñ will appear.

Since our mainframe does not support these extended ASCII characters we use a trick. We allow the people taking orders to type n~ (n followed by a tilde). The tilde is above the Tab key on your keyboard. The software that prints this will translate n~ into what the print engine wants. The print engine uses XML, so it wants to see ñ in the data. So, if your name is Peña we will key Pen~a and it will be translated into Peña. And Bob's your uncle and you get Peña.

I was doing this project because we were adding special characters to our engraved products. As it turns out the engraver wants ñ. Since we are in the process of migrating off our mainframe I decided to take this time to standardize all the special characters we can support.

On the web people will copy and paste all kinds of special characters such a copyright symbol (©), registration symbol (®), even an inverted question mark (¿). I have built a master table that will cover every special character we can support. If a device does not support the special character I will put in the safest non-special character. For example, our engraver cannot create the Latin A with a tilde over it (Ã). So in the engraver column of the table I put A. This way we can produce all products from a single record with each output device getting what it is capable of producing.

Windows Vista Beta 2 (Build 5384)

I know I have talked about Vista before, well it is coming. The last I read is that it is scheduled for a January 2007 release, but that it might slip to February. In the mean time Microsoft posted Beta 2 on the MSDN site on May 23rd.

I understand that Windows Vista Beta 2 will become the public beta. You can visit the Windows Vista home page to see when it will be available as part of a Customer Preview Program (CPP). Until then you will need a MSDN subscription or similar method to get it.

This time I downloaded and installed the x86 version of Vista (the 32-bit version). I did not have much luck with the 64-bit version of build 5308 running the 64-bit version of Far Cry. Since that is the only 64-bit application I have I decided to try the 32-bit x86 version first. This way I can make sure all my hardware is supported before dealing with a bunch of 64-bit beta drivers.

The system requirements for Vista have been published and are as follows:

A Windows Vista Capable PC includes at least:

A modern processor (at least 800MHz).
512 MB of system memory.
A graphics processor that is DirectX 9 capable.

A Windows Vista Premium Ready PC includes at least:

1 GHz 32-bit (x86) or 64-bit (x64) processor.
1 GB of system memory.
A graphics processor that runs Windows Aero.
128 MB of graphics memory.
40 GB of hard drive capacity with 15 GB free space.
DVD-ROM Drive.
Audio output capability.
Internet access capability.

My system meets the Vista Premium requirements. I have an AMD Athlon 64 3000+ (2.0 GHz), 1 GB of system memory and a nVidia GeForce 6600GT video card with 128 MB of graphics memory. Yippie!

My MSDN subscription provides me with a Windows Vista Ultimate version. This is the top dog and includes all the stuff in the Home Premium and the "business" versions. Note: I only downloaded one disc image. The key you provide at installation time determines what gets installed. I am completely sure there will be ways to upgrade a lower end "version" to a higher one... for a fee.

I noticed in the above requirements that they did not mention a DVD-ROM drive for the Capable PC. I wonder how people are supposed to install Windows Vista Basic without a DVD-ROM Drive. Will there be a multiple CD-ROM based install for the low end machines?

Downloading Vista

Downloading Windows Vista brings a little story. The last time I downloaded Vista I used my file server. It had plenty of space (well more than enough), and it was where I store all my downloads. If I had downloaded from my PC to the shared directory on the server Windows would first download the file (multiple GBs) to a temporary folder then copy the file across the network to the server. It would not save it directly to the server. That's why I log onto the server and download direct to it. When I burn the disc image  I point Nero (my burning software) at the file on the network and it works quite well.

However, last time I noticed that my server could not get on the Internet. I determine the problem to be that my server was using a fixed IP address (within my own network). I did this to force my router to point to it to host my web site (which you are reading now). Apparently setting up the machine to a fixed address killed its access to the Internet. So I changed the server back to a dynamic IP address (it will get one from the router when it boots).

Over the next couple of months I noticed my server changed addresses and the router couldn't point to it. Basically you lost the ability to see my web site. I managed to figure out how to setup the server with a fixed IP address and get on the Internet. I just had to add the router's address as the gateway for the server.

Somewhere along the way I was jockeying files around as my server was starting to run low on disk space. It turned out I had moved all my downloads to my main PC (which has plenty of drive space... for now). Since my downloads were now located on my main machine, complete with a DVD burner, I no longer need to download files directly to my server.

Oh Well!

Vista - Running Full Time

This time I decided to really drink the Kool-Aid, and I installed Vista to run full time. I installed my copy of Office 2000. I thought about installing Office 2007 Beta, but I don't know if it includes FrontPage which I use to maintain this site. Also, I still have to share documents with the other computers at home running Office 2000. I have a copy of Office 2003, but I have not used it yet. It will require an activation, and I only get one activation for it. So I have been holding out. I certainly do not want to install it on a beta operating system because eventually I will get rid of the beta for the real deal. Office 2000 is still standing. I may try to install Office 2007 over Office 2000 and see if FrontPage still works. But that will be later.

Overall I have noticed that Vista is more stable than before. Except for installing software that required a reboot I have not had to shut it down yet. Granted that has only been a few days at this point, but it is saying something as I have had trouble with application... some of which hung pretty badly. Vista does seem better at recovering from a serious hanging. It takes a while, but if you give it enough time it will bounce back without a reboot.

I installed FarCry (the 32-bit version) and although it is giving me some issues with auto detecting on startup every time, it is running. I have to reset the video inside the game every time, and it tells me I have to restart the game for the change to take effect. Fortunately it does not need the restart, which re-launches the auto detection thing. I put in a request for information from Ubisoft (makers of the game) to see if there is a way not to launch the auto detection, but there answer was long, and I feel mostly frivolous. Suggesting I update my video drivers and DirectX... which are updated. This is not a big deal, as I can play the game and I already finished it a long time ago. It was just a test of a seriously graphic intensive game.

I also installed a couple of my kid's games so they can still use the computer for their stuff, so far all is well there. I installed Halo, just to see how Microsoft's own game would work. Apparently they were paying attention. When I first went to play Halo it told me there were known compatibility issues with the game and I needed to download a patch. It then provided a link to the Halo web site where I could download the latest patch. Once I installed the patch it ran just fine.

The same thing happened when I tried to run Max Payne, however it never provided any information on getting an update. I manually searched for and downloaded the latest patch to the game, but it still will not run on Windows Vista. I even tried running it in "Compatibility Mode" for older versions of Windows. After all, the game was written in 2000 (I think) and the latest patch was dated 2001. I then tried to install and run Max Payne 2. This installed and ran, but it would not run without the CD in the drive. It would not recognize Virtual CD's copy of the disc. What was different was that I never received a message about the disc. In fact, it looked like nothing was happening at all. I had to use Task Manager to see that the MaxPayne2.exe started up then went away after a minute or two. I tried putting the CD in and all went well.

I can't blame Microsoft for the way Max Payne 2 works with Virtual CD, but I can blame Microsoft for not letting Max Payne 1 work. Game play is one of the big things Microsoft is emphasizing with Windows Vista and if it can't play slightly older games than that will not fly with me. I will test some more games between now and next month and will let you know what other compatibility issues I come up with that I feel Microsoft should be taking care of. After all, why have a Compatibility Mode if it doesn't work.

I installed LimeWire and Vista told me... in its own words... that the Aero Glass interface was shutting down temporarily and would return after the program ended. It takes a little time for all the Aero elements to come back once the application closed, but it worked well. Overall I was impressed with how it handled the job.

pcAnywhere does not work, however Vista tells me "this product has known compatibility issues" so I can hardly complain. Without pcAnywhere I cannot connect to my server. For the time being I will just have to do server maintenance from my laptop, but I will need a way to remotely control my server from Windows Vista eventually.

One thing that completely through me for a loop, and caused me to reboot thinking something was wrong with Vista was a shortcut problem. Here is the deal. I installed Microsoft Office 2000. After doing so I copied the shortcuts from the Start menu to the desktop. A few hours later I was organizing the shortcuts in the Start menu. They can get too long and out of hand for me. I right clicked on the Start button and selected Explore All Users. This opens Explorer looking at the folders and shortcuts that make up the Start menu. I created a folder called Applications, and a folder in that called Microsoft Office. I moved all the Office related shortcuts there. I also cleaned up a number of other shortcuts to provide some organization to the Start menu in general. I always do this after a dozen or so installations.

Later I was going to make the above comments on the Max Payne games and my FrontPage shortcut didn't do anything. I thought maybe Vista got unstable with the game testing I was doing so I reboot. The reboot didn't do anything. I then tried the Excel shortcut I created and it didn't work. Now I was confused. I tried the Paint Shop Pro shortcut and it failed too. So it was not exclusive to Microsoft's products. I don't know why, but I tried clicking on the Start button and navigating it to the Office folder of shortcuts and launched FrontPage from there. It worked. O.K. I will just re-copy the shortcuts from the start menu. It did not work. What I had to do was navigate to the folder the actual programs were installed and manually create shortcuts to the executables. I have never had to do this before, and I have setup Windows 95/98/Me/NT/2000/XP so many times it is not funny. This is a major annoyance.

The Sidebar utility of Vista is getting better, but it still has a major problem with showing the desktop. If you click the Show Desktop shortcut in the group of icons in the Quick Launch toolbar (by default the icons to the immediate right of the Start button) then the gadgets will all be minimized. I can understand this. However the problem is getting the gadgets back. I tried right-clicking on the Sidebar icon in the system tray (by the clock on the right) and selected Bring Gadgets to Front, but this only made them appear briefly. If you click on the desktop background the gadgets all disappear again. I also tried right clicking on the Sidebar icon and selecting Hide Sidebar, followed by right clicking and selecting Show Sidebar. Apparently, the Sidebar utility does not know it has been hidden by the Show Desktop. Regardless, this has the same effect, it shows the gadgets, but they do not "stick" to the desktop. I am forced to double click something in the system tray, in essence launching another program, to get the gadgets to come back and stay on the desktop. This needs a little cleaning up. Otherwise I have been please with the gadgets. I will be even more please when I right my own, and more are available.

Windows Vista also has a lot of pop up dialog boxes built around security. This is supposed to get you to manually respond when things happen. If you did not initiate them you would say no to allowing things to run. I think this will fail. Eventually people will become anesthetized to the pop-ups and just answer yes to all of them. As a developer I can nott tell you how it annoys me when users call ten minutes after they got an error and say they got an error and clicked OK without even writing down the error message. How am I supposed to know what went wrong? People will get so used to the extra click it takes to say yes it will not be meaningful in the long run.

Granted, I don't have a solution, but I think there needs to be a better way to segregate what needs approval verses what does not. For instance, while moving the shortcuts around in the Start Menu I would have to provide three confirmation clicks for an simple shortcut move. Is that really necessary. It's just a shortcut. I could understand if I was moving a shortcut into or out of the Startup folder that could effect something that is or is not supposed to run at startup, but not every shortcut. And none of the confirmations required that I provide a password. In fact, there is no "generic" administrator password. I still think there should be an all powerful Administrator ID that gets its own password, and when you mess with the system (not just moving shortcuts, and running basic installs) then you need to provide the real administrator password. I know the password thing won't fly, but I know that just slamming people with confirmation after confirmation is not going to be secure in the long run. People will eventually say yes to everything.

Conclusion

Overall I am pleased with Windows Vista. I plan on testing more game compatibility. If it can't play my old games then I might want to go to a Mac. I know that seems out there for a Windows Developer. I am tempted to get my kids a Mac, but they too have a lot of games for Windows. If there were enough games for the Mac I would get them a Mac for the increase in security (Macs are much less a target for viruses, spyware, etc.), especially with the new Boot Camp software that let's the new Intel based Macs run Windows XP.

Until next month...

Bottom