Windows Vista, Visual Studio 2005, New Hard Drive & DVD Burner,
World Class Poker
February 1, 2006
By Scott Lewis
Well, January was a busy month. Actually some of what I am
writing about took place while I was on Christmas Vacation, and I was not in the mood to jam in into last month's column. Grab a cup of something because this will be a long one.
The main thing for this month was the purchase of a new hard drive and DVD burner with a gift certificate I received for Christmas (Thanks, Chip!). I wanted to setup my old drive with Windows Vista (still in beta) while loading the 64 bit version of Windows XP on the new hard drive. Just wait till you read this story.
Also this month I want to cover a little work I am doing with Visual Studio 2005.
Last month I told you that I could not get Indigo Prophecy to run using Virtual CD. Well I upgraded to version 7.1 of Virtual CD and Indigo Prophecy works just fine without the physical CD in a drive. It took me two tries to create the Virtual CD. The first was in my new DVD burner (more later), but that gave an error. I tried using the old CD-ROM drive and Virtual CD did its thing without any issues.
Unfortunately I have not played Indigo Prophecy. I have been hooked on World Class Poker with T.J. Cloutier. I picked this game up while my family was shopping using a Target gift certificate (Thanks, Bro!) for Christmas. This is the best 20 bucks I have spent on a game since FarCry. And since it is non-violent I can play it anytime without worry about the kids seeing it.
In fact, I leave it running on my computer along side my e-mail program. I play a few (or way too many) hands when I pass buy the computer. I like it a lot. It is the best poker simulator I have ever played. While at Target I saw a Poker game with Phil Gordon. It looked tempting. I don't remember what swayed my decision, but I do not regret it. WCP is an excellent poker game & tutorial. When you play the no limit games of Texas Hold'em TJ provides tips at every point in your hand, from the pre-flop recommendation down to the changes your hand can take as more cards come out.
This game has eaten A LOT of my time. I hope it is making me a better poker player. I can do well enough against the computer that I have actually gotten online and played a little. I managed to get into the "Main Event" of WCP. This simulates 2000 people with a $10,000 buy-in, just like on TV. I made it to the final table, but just barely. I lost two big hands taking me from about $1.3 Million in chips to $300,000 right before entering the final table. When I got to the final table T.J. himself is at the table... with over $14 Million in chips. I lost quickly, but still managed to win about $400,000 in the tournament. Cool!
I have been trying to get back to the final table ever since. Beginner's luck? No. I just play stupidly. After all it is not real money. If I can control myself and think of it as real money I go pretty far. But it always seems to get to me that I think I can bluff someone out and I lose. Then I get frustrated trying to make a comeback and get too aggressive and pay the price of getting knocked out of the tournament.
I have a poker game scheduled for Feb. 4th at my house. I doubled up the last time I had a house game. We'll see if I can do better after playing WCP.
New Hard Drive and DVD Burner
When I decided to buy a hard drive with my gift certificate I was planning on trying out Windows Vista, the new version of Windows due out late in 2006 (??). The Vista install is a DVD-ROM download, and I would need a DVD drive to boot and install it from. So I also bought a DVD burner while I was at it.
When I went to install the new 100 GB Serial ATA (SATA) drive in my computer I realized the power plug the SATA drive needed was not in my case. I would need a Molex to SATA power adapter. This was the perfect chance to install Windows Vista on my existing 20 GB hard drive. I was hoping I would be able to setup Windows XP 64 bit on the 100 GB drive later and dual boot between the two drives.
Windows Vista and Windows XP Pro x64
Windows Vista took two installs. It gave a weird error during the first attempt. To make sure everything was right I deleted all partitions and created them as part of the Vista installation.
Everything installed perfectly after that. It look a very long time. I guess this is to be expected now that it takes up over 2 GB on the DVD disc itself.
The real fun came when I tried to install Windows Vista on the SATA drive after I picked up the power adapter ($3.79). Windows Vista went through its initial install (the part before the first reboot). This used to be the "DOS" style character mode part of the Install of Windows XP. Now the character mode is gone. After the first reboot the screen flashed a blue screen of death and rebooted... over and over.
I tried installing Windows XP and it would not see the SATA drive, only the old 20 GB ATA drive. I don't remember how many times I tried this, but it was a few. Eventually I learned online that I need to treat my SATA drive as a RAID setup. My motherboard can RAID two SATA drives together. In simple terms my motherboard can RAID two drives to look like one bigger drive, or it can mirror two drives. Making two drives appear as one big drive (RAID 0) means that half your data is on one drive and half on the other. Theoretically this gives you a significant boost in disc performance since each drive handles half the data, but both work at the same time. When two drives are mirrored (RAID 1) you still only see one drive, but each drive contains a full copy of all the data. This is for data protection. With RAID 0 if one drive fails all you data is lost. With RAID 1 you have two fully working hard drives, either of which could be used stand alone in the event one drive fails.
Enough with all the techno-babble. I had to download the RAID drivers from my motherboard manufacturer. Windows XP will ask for RAID and other special disc drivers when you first boot from the CD-ROM. You need to put the drivers on a floppy. This meant I had to disconnect the SATA drive and install Windows XP on the old ATA drive just so I could copy the RAID drivers to a floppy. After all, this is the only machine in the house that has a floppy drive in it. Once I did this I was able to load Windows XP Pro 64 Edition bit on my machine. Unfortunately, I could not load the 64 bit sound drivers. This left my 5.1 system running in two speaker stereo mode. After facing a couple other frustrating moments I
decided to install the 32 bit version of Windows XP Pro. In other words... right where I started, but with more disc space.
Armed with 64 bit RAID drivers I wanted to install Windows Vista again. Sorry, I did some digging online and the latest build (5270 at the time) does not include RAID support. So now I am waiting for another build of Windows Vista to be available on MSDN.
If I had known I was going to go through all this trouble with a SATA drive I would have bought an old style ATA drive. Oh well, I will be looking to try and get a great deal on a second of these drives so I can make use of the RAID feature. I might as well get the performance boost to go along with the headache.
During the short time I had with Windows Vista I liked what I saw. I decided to
and run Windows Vista as-is. No cheating and setting any "classic" modes. It took me four tries to finally figure out how to mount my network drives. I actually found the answer in the help files. Go figure. I kept trying to setup a network and telling it the workgroup to connect to, but it would not change the workgroup. I started setting the workgroup on my server to the default name on Windows Vista, but it started causing other problems. The help file was actually helpful and told me how to change the workgroup and I was able to map drives to my server and install Vista drivers for my video.
Vista looks cool. I know, a lot of the eye candy is just that... candy. You don't need it. But it sure was pleasing on the eyes. I really like the "glass" interface when stuff behind the current window looks like it is behind blurry glass. Very nice. Overall I did not get a lot done with Vista, but enjoyed the experience. I managed to crash Explorer to the point of reboot three times in two hours. That's beta for you.
Overall I can't wait to get Vista running on my second drive. Oh, and in case you think I can just install Vista on my 20 ATA drive without worrying about the SATA/RAID drivers... that won't work. If the SATA drive is plugged in Vista crash when it boots. Even if Vista is not using the drive.
I will just have to wait for the next build, and hopefully it will have RAID support.
Visual Studio 2005
I mentioned briefly last month that I attended the launch event for Visual Studio 2005. I was very impressed with two new features, Code
Snippets and ClickOnce installations. There were some cool features in the "Team" version of Visual Studio, but that will have to wait until I can actually do that in a team environment. Plus, it looks like the team features will require a fair amount of time in establishing an environment to work as a team. I will save that for when all the developers are ready to work this out at my company.
I was pleased with the install of Visual Studio 2005. It was a huge
improvement over VS 2003. When you first get into the installation of VS 2005 it presents a list of things it is going to install. Here's the list:
Microsoft .NET Framework 2.0
MSXML 6.0 Parser
MS Document Explorer 2005
MS Visual Studio 2005
Shortly into the process my computer was reboot and the list of
components to install increased to these items:
.NET Compact Framework 1.0 SP3
.NET Compact Framework 2.0
MS Visual J# 2.0 Redistributable Package
SQL Server 2005 Mobile Edition
MS Device Emulator version 1.0
MS SQL Server 2005 Express Edition
I don't know if all those extra components are on the two CDs I burned from my MSDN subscription, but I suspect not. SQL Server 2005 Express Edition was the most noteworthy item. Microsoft has finally seen the light and is offering free versions of there development tools. The Express editions. SQL Server 2005 Express Edition was installed just so I could do SQL Server development, which should lead to programs that require SQL Server. There is a Visual Basic 2005 Express Edition. All very cool.
The install specifically asked me to close Internet Explorer during the install. I have read the classic "close all running
applications" as part of installs before, but this is the first time I was told to close a specific running application. I obliged.
During the long install they had their splash screen spew the
Kool-aid. I was impressed with three items:
1) Streamline application deployments and updates with ClickOnce deployment.
2) Detect and install missing prerequisites automatically using the new setup bootstrapper.
3) Use Code Snippets to insert and customize large blocks of template code.
My First Visual Studio 2005 Application
With Visual Studio installed, it is time to write my first application in Visual Basic 2005. I picked a winner of a project. Did you notice the sarcasm in my voice? The project is to re-write an old VB6 application that would update orders on our HP mainframe. It does this through a piece of software called NetBase. NetBase runs on the HP mainframe and we can make calls to it through a DLL on the PC. Unfortunately this is a DLL from the old days. Before the days of registering DLLs in Windows. Yes, I am talking about DLL Hell. To give you an idea how old this DLL is, it was compiled in 1998. Ouch!
The NetBase DLL uses data types and structures that are no longer supported by Visual Basic 2005. Parameters where the variables are passed as a type of "As Any." This is not allowed anymore because Microsoft finally wants people to program using strong data types. Using the "As Any" allowed people to pass all kinds of information... including invalid information that can
deliberately crash a program. These are the reasons behind many of the security threats you hear on the Internet. Internet Explorer was written without strong data types and it becomes possible to pass bad data to a module that does
unpredictable things... or worse, predictable things when the information passed is code that can be executed.
O.K. I am not going to jump all over Microsoft for writing Windows and IE with poor programming practices. There are thousands of people doing that already. I just want to get this one program working.
My predecessor wrote a "wrapper" DLL that contained the Netbase calls built into classes. He did not uses classes in the best way. In fact, I think he did it just because he could. I tried using his DLL attached to my project to act as a layer between VB 2005 and NetBase's DLL. It worked to the point I could read and delete records from our mainframe, but I could not write records.
I contacted the vendor, and they did not have a more recent version. In fact, they were having trouble finding the source code to the NetBase DLL to help me figure out what it was doing.
They did give me a couple of ideas, and together we
realized Visual Basic 2005 has change some data types. In Visual Basic 6 an Integer is a number from about +/- 32K, in Visual Basic 2005 an Integer is +/- 2.1 Billion. A Long in VB6 is +/- 2.1 Billion. Since some of the structures in the NetBase DLL were in integer and long, I tried using Short (like a VB6 integer) and Integer and I started getting proper error codes back from the NetBase DLL calls. Wow!
From here I had to figure out how to pass fixed length strings. VB 2005 does not support VB6's fixed length strings. I decided to try using the Char data type, which is a fixed character. Since I needed the data to be in a structure with two numbers (a short and an integer) I tried to create an array of chars. Unfortunately, you can't set the size of an array in a structure at design time. When I would ReDim (re-dimension) the array at runtime to the size I needed I would get errors trying to write to protected memory from the NetBase calls.
So I did the unthinkable, I created a structure with many chars. CHAR_0001, CHAR_0002, etc. I tried this with one fields and it worked. NetBase liked it. So, I did the entire data that way. 1,336 char variables in one structure. What a nightmare. Then I had to concatenate the chars into real variable so I could work with them. Of course I have to put the data back from the real variables into the char structure before writing the data back to the HP. This buffer structure works, and I do save a lot of coding by leaving the buffer alone and only updating the fields I actually need before writing the data back to the HP.
So, how many made it this far? Not many I am sure. I am well underway with my first application in Visual Studio 2005. I guess I am getting ready to drink the
Kool-aid on this one too. I hope to install Visual Studio on my machine at home. There are a couple of projects I would like to try at home, and I would love to take a stab at an Online Request Form application at work. We want to put our IT Requests online. I would love to work on such a project. All I have to do is learn this "thin client" stuff. Yea... web applications. So far I have been doing "smart client" apps. You know "fat" clients, standard Windows applications.
I would love to have a request system that could use User IDs, roles and statuses to work
autonomously. For instance, every time you logged into the system it would show you a list of all the requests requiring your attention. When you finished your task the system would automatically route it to the next status and it would show up for the next person. We would have a processes that runs daily or weekly that would check the status and dates of the requests and e-mail people reminders when their tasks were getting close to their due date. I love it.
I may try writing something as a windows application (smart/fat client). However, I am going to have trouble with the User ID thing. We use Active Directory (Windows technology for managing network resources, including user IDs) and I would have to tap into that to determine a person's manager for manager approval and such. That will not be easy... at least not until I learn it.
It has come up again. I told you a few month back that I turned down taking on a DBA position at my company. By boss is going to put it in the project plan of migrating off our HP that I need training. This will have my Oracle training in the budget, and the project pays for it rather that it coming out of IT's budget. Hokey stuff, I know. What it means is I might be able to get real Oracle training. I am hopeful, but I have not made any reservations yet. We'll see. My boss in planning on hiring a DBA, so this would make me the backup. Cool! Maybe if I keep telling him I don't want to be the full time DBA I can still be the only "acting" DBA and get a raise anyway. Hmmm. I'll keep you posted.
That was a lot of techno-babble. I know. I am not sure yet if next month will have more technical stuff or not. I should be finished with my VB 2005 app, so I will let you know how that goes. Other than that time will tell what I write about next.