I am now a 50 year old manager of a small piece of a very large company that purchased us about 1 year ago. Been into computers since grade school in the late 70's, having spent years working in the field, building, fixing, installing, selling, teaching, gaming, programming and now consulting on all the aforementioned topics. Computing life is good.

Sunday, November 19, 2006

New Display Toys

One of my tasks at my company is to develop new techniques and leverage new technologies in the development, design and use of our products. Though most of my companies development efforts are now handled by other company employees, almost everything my company now does, started as a project within my own computer. To that end I am always looking at new stuff and for one reason or another I tend to gravitate to techniques and technologies that can enhance the user interface experience. One of our most successful products ClaimsExplorer heavily leverages a flat time line style of UI element that shows Claim activity in data lined up with corresponding authorization, clinical notations, eligibility, and insurance premium payment information at the day level for our clients. I have always felt that the time line approach was a good one but has its limitations. There is only so much information you can cram into a little icon about the occurrences of the period. Diversity and pattern in a dataset as varied as a typical health care claims database become as blurred as the screens full of textual data in spreadsheet form that most claims browsing system present to the user. Its just a little more colorful perhaps in the time line.

The availability of development libraries that leverage the fantastic 3D rendering power of todays modern desktop/laptop pc's have existed for some time, and I have always felt that 3D was the direction to go to bring our visualization elements to the next level. The problem with these libraries has always been that they are squarely aimed at Gamers and Game development. Not that their is anything wrong with games, for I believe we would all be working on timeshared, green screen terminals if it were not for games continuously pushing the envelope for the rest of us more mundane developers out there. The problem has been that the display power does not play well with our boilerplate windows applications where grids of textual data mix with arrays of labels and buttons and text boxes, and check boxes, and other business like attire. (How boring but for me its what pays the bills) Another problem with these development libraries has always been that they represent themselves as a game engine. And they don't integrate well into a business application that has a familiar UI feel. They also typically required programming to them in C++ and as I said before I am a mundane developer not a C++ propeller head, having graduated from VB to VB.NET and C#.

Along comes Dark Basic....

A few years ago I bought Dark Basic Professional. (www.thegamecreators.com) and I really liked the power the language offered but it suffered the same issues noted above, I left it alone for anything work related. Windows Presentation Foundation has promise but its cookies are not done yet and the support for my favorite development environment Visual Studio is spotty and downright buggy at the moment. Given that Vista has taken so long to see the light of day I am not holding my breath. Then the other day on a lark I popped over to the Game Creators site again to see what was new. My eyes could hardly believe what they were seeing. These wonderful folks had actually taken the DarkBasic code base and made a COM Library exposing nearly its entire functionality to the .Net development environment of your choice. This new offering is called DarkGDK.net (http://darkgamesdk.thegamecreators.com/?f=dgdk_net)

DarkGDK.net (DGDK) is a Com library that interop's well with .NET either 1.1 or 2.0. As such you have a choice as to what development language you want to use when interacting with the DGDK library. I have exercised both VB.Net and C# in my exploration with DGDK. Because DGDK is a com library it allows the functionality to be used in a host of development environments.
  • The Express Versions of VB.NET and C#
  • Visual Studio 2003
  • Visual Studio 2005
  • Sharp Develop
There are also 2 versions of the development library with licensing ramifications and cost structures
  • Freeware License
    allowing development of freeware games only 60$ us
  • Full Commercial License
    allowing unrestricted development royalty free 200$ us
  • Upgrade a Freeware License to Commercial
    for those of you who succumb to the dark side and want to
    start selling your offerings 140$ us
Now that was a price point I could live with. So I sprang for the Commercial license ( We do write commercial applications after all ). After entering the Credit Card information I had to wait 2 days to get a link to download the product. Apparently the company hand checks each purchase to avoid fraud. So I had waited this long whats a few more days...

About 1 hour later I popped over to the website again and checked on the status of my order (So much for whats a few more days). So I spent the next few days spending all spare time looking at the forums and reading what I could about the product.
  1. One thing that struck me was that the product is very new. I had not seen any specific release dates but it feels like maybe 1 or 2 months old tops.
  2. Another point is that the website and forums seem to breed confusion over what product does what. Apparently they already have a product called DarkSDK which is a C++ product exclusively and this is a derivative of that item. The distinction is subtle on their web site, in their forums, and even in the name itself. To the uninitiated this breeds the confusion.
The library ships via the net as a single with or without Direct X support files. (74 or 19.5 megs respectivly) which installed on my Vista RC2 setup without a hitch. I then looked at the help file that ships with the library and found not a hell of a lot of help. The help documentation does have a fairly complete walk through for generating a simple .Net application in Visual Studio and in the Express editions of the development environments as well as for Sharp Develop. So I started there and crafted a new Visual Studio 2005 c# application.

The library is signed using a Private/Public keying mechanism that introduced some small additional complexities on development efforts.
  1. Manually add the necessary references to your application
  2. Manually add an existing c# (in my case) class that ships with the development library
  3. Tweak the build properties of the application to turn off Visual Studio Hosting for debugging. I don't believe this is required in the other development environments like Sharp Develop or even the Express editions but Visual studio is what I have.
  4. Configure the projects assembly information like Company, Version Number, Description and what not.
  5. Build the Application ( don't run it yet )
  6. Run an application they ship with the library called the Authenticator and point it at the .EXE file you just built.
  7. It crafts a file called {App name}.dgdk Add this file to your project and set its compile properties to embedded resource
  8. The authenticator also showed you a very long string in the public key box. This string needs to be cut out of the Authenticator interface and pasted into a specific spot in the above included C# class. (speaking from experience, be careful to get the entire string copied and pasted correctly otherwise it won't work)
  9. Finally build the application again now it should run.
(As a side note. acrobatics like the above mentioned exercise are exactly the reasons I tend to just write things I need for myself and the company I work for. At least the use of those items becomes an order of magnitude easier for the developer.)

On completing the above steps you have what is basically simple application loop where you have manually created a simple cube and, within a loop, are slowly rotating that cube about its geometric center.

Now the fun begins

The samples included with the product have a slightly more complex project that extends the tutorial project by creating a windows form that has a picture box. Within this picture box object, the 3D surface will be rendered. This ability is the primary reason for my interest in the library as its integration into established applications and UI's is visually seamless using this technique. Visual seamlessness and interactivity are two different things however, while the picture box object happily will show whatever objects you build into it, getting the ability to interact viathe UI with those things takes programming. Thats where the rich API provided by DBGK comes into play.

The DBGK API is broken out into a number of Classes that expose a number of methods organized into functional groups.
  • 3D.
  • 2D.
  • Sprites.
  • Sound.
  • Text.
  • Math.
  • etc.
One of the included source files that you add into your projects creates a set of static versions of these classes that you can then use globally within your application. Inheriting from this base class then allows you the flexibility to expand and further refine the functionality as needed.

As mentioned above, the documentation is a bit sparse. Many of the API calls are documented in name only without the benefit of any form of explanation or example usage. Think of Microsoft's MSDN documentation devoid of any examples and in many cases missing any of the explanatory text. In other words its bad. I don't want to beat them up to badly on this point after all I am sure the same can be said about our own documentation for the things we have written at Tidgewell Associates. I am also sure that the documentation will improve as time moves along. Until then however the forums are your friend.

There are also cases where an API call has several versions of the call with differing argument signatures that have subtly different names for example...
  • PlayObject(iID)
  • PlayObjectB(iID, Start)
  • PlayObjectC(iID, Start, End)
Fortunately its a simple matter to simplify these cases in C# or VB.NET by wrapping the PlayObject call in a proper overload for your own use.

The Library also supports the reading in of external media in varying formats depending on type. Image types can be accessed via the LoadImage API call contained in the oDBImage class (one of the static classes instanced by the included source files ). Supported image file formats are
  • BMP
  • JPG
  • TGA
  • DDS
  • DIB
  • PNG

Supported Sounds and Music in the oDBSound and oDBMusic classes are
  • WAV
  • MIDI
  • MP3

Supported 3D shape/objects can be read in via the LoadObject method in the 0DB3D class. Formats include
  • X (Direct X format)
  • 3DS
  • MDL
  • MD2
  • MD3

I will admit that many of my attempts to get anything but X objects to load in failed in one way or another, I am not sure if my 3DS exporting from my now ancient Lightwave 7.5 is broken in some way so I have had to stick with X format for my experimentations. Another thing I have noticed is that it helps to have your object composed of triangles, a simple enough task in Lightwave I just triple the polygons.

Putting it all together

In the end, DGDK makes it fairly easy to instance and manipulate the 3D realm and integrate that realm into standard .Net applications. In our case I have some particular needs that the library fulfills nicely after some experimentation.
  • I need to be able to ask the library to tell me if some object is under the mouse
    This is accomplished using the PickObject call within the oDB3D class. One thing I had to do was to keep track of the size of the picture box object as it shrank and expanded in anchor with the containing form. Then each time I asked about a mouse coordinate I had to scale the coordinates asked about by the current scaling factor of the canvas in relation to how large that canvas was at the time the 3d surface was initialized. (The canvas stretches and shrinks but the 3D context displayed within is a fixed size at startup)
  • I need to be able to clear the canvas of objects so I can reload with perhaps a different set of objects
    Use the DeleteObject or the DeleteObjects method in the oDB3d class
  • I need to have the objects placed anywhere within the 3D space
    Use PlaceObject in the oDB3d class
  • I need to have the objects animate in some way (Maybe rotate or scale down or up)
    Use the ScaleObject and RotateObject methods in the oDB3D class
  • I need to move the viewing position (camera) around within the 3D world
    Use the PositionCamera and PointCamera methods of the oDBCamera class

Below is a screenshot of my testing application that wraps up my experimentations to date and creates a simple scene with a number of objects loaded, instanced, and animating with mouse interactivity on the objects (The one under the mouse gets rendered as a wireframe, the others as solid objects).

Thursday, November 16, 2006

Windows Mobile Phone Tweaking


A short but sweet post today....

In my last post I mentioned a new toy I got from my lovely wife for my 40'th birthday. The Cingular 8125 Cell Phone/Pda/Camera. This little gem runs Windows Mobile 5 as its base OS and sports a number of cool features that endear it to me greatly.








  • Most notably being the side slide out thumb pad that is actually usable someone who has knuckles that scrape the ground (like myself). The display automatically flips from portrait to landscape mode when you slide the keypad out. The OS also support 4 other styles of writing recognition including something very close to my old Palm device.
  • A Mini SD expansion slot on the top (I have a 1Gig memory card in mine). Certainly useful for MP3 music files.
  • Bright full color screen (that I run at the second lowest brightness setting even outdoors) Like all of these devices the screen is touch enabled using the handy stylus that pops out of a hole in the bottom of the unit.
  • Wifi/Infrared/USB20/Bluetooth connectivity options as well as the gambit of cellular connections
  • 1.3 MP camera (useful but not of the highest quality) In fact it will often enough get your phone confiscated is various government places that I often visit as my job requires that I go to these places.

In accordance with my usual pattern I have most, if not all, of the options on this device active and this extends to the plan itself. I have the unlimited connectivity option on the account and use it all the time to check email when I am out and about. (In fact at a family funeral a couple of weeks back I was reading and responding to some rather important messages during one of the, ahem, dead moments...). The one thing that I found is that Cingulars service is SLOW. In fact painfully so, I actually found myself hankering for the days of yore when modems where the norm and speeds where a speedy 9600 bps by comparison. At these rates my IMAP in box on taisoftware.com takes forever to update.

Then, as I was browsing some posts on the subject, I hit upon a fellow who noted that it appeared that the cingular DNS servers were woefully underpowered. At that moment I had an epiphany, "Why not set it up to use OPENDNS..." http://www.opendns.com/

Basically this means bypassing the Windows Mobile 5 dns settings of ( let my server tell me what dns to use) and configure it manually to use opendns's own dns servers. So i pointed the dns settings at

208.67.222.222 and 208.67.220.220

Edit - 11-23-2006 A note about OpenDNS:
The service offered by openDNS is a good one. They provide DNS lookup with some protections against common fat fingering of URLS that leads to known phising sites. This alone is a good reason to use them in a comprehensive program of good web practices (To paraphrase my Toothpaste tube)

(complete instructions on how to configure various devices to use open dns can be found at the opendns website)

I can now say that the phone works a hell of a lot faster using opendns rather than the cingular dns servers. definitely worth the minimal effort...

Tuesday, November 07, 2006

Life with Vista


Over the last few weeks I have been playing with and working with Vista RC2. This posting will reveal some of the things I have found during this excursion.

First off let me enumerate my hardware setup.

Dell Inspiron 9100

  1. 3.2 ghz P4 w Hyper threading
  2. 2 Gig Ram
  3. ATI Mobility Radion 9700
  4. 160 gig HD

Samsung SyncMaster 213 T external flat panel display

Logitech G15 Keyboard

Logitech MX1000 laser mouse

Installation

Because I did not want to just ditch my prior Windows installation, I purchased a new Seagate 160 gig laptop hard drive and installed in the laptop. Then with my freshly burned RC2 version of Vista proceeded to install the operating system.

Vista, like almost everything else out there, installed basically without any real problems. It asks a few questions and then proceeds to install with a couple of reboots mixed in there for good measure. This of course is due to the fact that this hardware is fairly new and I don't have a lot of fringe devices with minimal popularity (IE The hardware is mainstream, if not a little aged at this time). One thing I am surprised about is the fact that the install took maybe 20 minutes start to finish. I had always been amazed that XP takes forever to install when a newly minted Linux distro could take much less time with all the bells and whistles. I know this is partly due to the fact that there are like 60+ updates to the aged XP Media that I bought whereas Vista is to new yet for any major patches. That said there are some patches even now to vista that must be installed or its constant nagging will drive you away. Still, start to finish, Vista takes a major leap forward with its installation times by being quick and relatively painless.

Now the fun begins

While as I said above my hardware is mostly supported by Vista and indeed most other new OS products, their are a few things about my existing rig that were not completely handled cleanly. This brings up another thing I will like about vista going forward. The fact is that unsupported hardware items asked about finding an appropriate driver once and then did not bother me with the alerts again. All of my prior experiences with XP and 2000 and Me and 98 and 95 all continued to nag when there was a device issue. Sure later OS's had the option "Don't ask me about this device again" but has anyone ever had that work foolproof. I know that plugging something into another port might trigger another round of device driver ping pong but come on folks can't software do better than that. I can say Vista does do better than that. The issue in this case is the built in modem on my machine. XP would complain every time when I rebuilt it (a total of 4 times since purchase) about the modem until I went to Dell and get the latest driver and installed it. I can honestly say I have never used the thing. Modems are so last centuary, besides my Cell phone (Cingular 8125) is much faster. Modem.... We don't need no stinking modem.

Other software/hardware items that I commenced to install, and all work to enough a degree to be usable, include (in no particular Order)

  • ITunes with QuickTime
  • Visual Studio 2003 and 2005
    (Studio 2003 seems to have some problems connecting to applications its launching in debug mode. Vista dialogs you that has croaked and will be shutdown. Just restart the debug session and it will usually work fine)
    Update 11-12-2006
    A fellow over at AGGREG8 noted that VS2003 is not supported under Vista. My experiance is that it works more than well enough to be usable and in my case Microsoft sanctioned support is not necessary.
  • SQL Server 2005 Developer
  • Altova Mapforce
  • My ancient Lightwave 3d (ver 7.x)
  • Office 2003 (with everything)
  • UE Studio
  • Red Gates Ants Profiler
  • SourceGear Source Vault ( Client side tools work VS integration seems broken)
  • Blender
  • Firefox and Thunderbird
  • VMware 5.2
    I need to still test my applications with XP and 2000 and in some cases even 98.
    Update on Vista RTM 11-26-2006
    Looks like they broke something in the RTM release. The Network adapter complains about overlapping IO calls and forces startup in disabled mode. No amount of tweaking I have been able to do actually seems to have any effect. The end result us a virtual machine that has no network support, which is just about useless. If there is no fix for this soon I might have to back peddle away from Vista back to XP....
  • Logitech G15 Keyboard/MX1000 Laser Mouse
  • Multiple USB and Firewire Storage devices
  • An ancient USB Scanner (I have no idea what the make is)
  • World of Warcraft ( now I actually copied my last install directory off my old drive and hand made the launch icon, Works perfectly)

All of these items installed and work almost perfectly, and this led me to another revelation. The propensity for Vista to prompt you at every turn when installing applications for permission to do something,

was not nearly as annoying as I had though it would be. On one hand it asks first and unlike the early betas it does not bother me again mostly. One exception was with ITunes it asked during the ITunes setup, then asked me again during the Quicktime setup, even though they are supposed to be integrated. A clue that Apple lumped their separate standalone quicktime install within ITunes and sent it all out as one big monolith. Still though, not nearly as much a pest as I had thought it would be. I can say that folks who should be able to install applications like this who gripe about the issue need to get some real problems to contend with.

Not everything was roses and perfume however, Remember that cell phone I talked about above?, well the device runs Windows Mobile 5, and Active Sync, the bane of all who are forced to use it, does not work on vista. In fact its functionality is supposed to be subsumed into the OS via the snazzy new Windows Mobile Device Center. Finally OS level support for the very necessary function of synchronization of external Windows Mobile PDA/Phone devices with their informational counterparts on the desktop, before throw your back out, jumping for joy, know this.... Its not working yet. Oh sure you can copy files to and from the devices. You can configure the OS to keep those files in sync but what about all those other items, like Contacts. Contacts will not transfer to Outlook. The cookies need to cook some more, as this release was dated early October and the business release is slated for November 30'th. I don't see the business Vista getting this point fixed in time. It's back to the old days of changing that number in your phone and then remembering to fix it in Outlook when you get home. Maybe this point will be fixed by the time it ships to end users early next year. Goodness, just as I had gotten Active Sync to work reliably to.

(Note as of Nov 20'th )

Upgraded my RC2 to the real Gold version from MSDN this weekend. The Sync issue persists even in this release version. The activesync website has this to say...

" ActiveSync works only with Windows XP or earlier. If you have Windows Vista, your synchronization settings will be managed through the Windows Mobile Device Center. Windows Mobile Device Center for Windows Vista will be available soon through Windows Update and this Web site."

Minor Annoyances

All manner of things have changed with vista's interface. Some items are better others are just an annoyance. Below is a run down of the bullet point and classification IMO...

  1. Name changes for familiar items. My seems to be missing from every place. I never understood the issue with folks saying I hate all this My Documents, My Computer, My Music. Well the My is gone and in the case of documents the name of the folder is now just your login name. I'm annoyed but hey its minor.
  2. Looking at the network shows nothing. In the default setup I had to go turn on the browsing service to have it enumerate the resources that are out there. Annoying but also minor.
  3. Configuring network locations does not show non netbios locations ( like FTP sites ) even though you setup the location using their Wizard. Yes you can craft shortcuts and place them in the file space or the desktop, but they default to opening in IE7 not explorer thus you cannot use them to copy files to and from the target. Annoying and significant.
  4. Remote Desktop complains about connecting to a remote desktop server that does not do all the wiz bang security diddy's that Vista supports. It dialogs you asking are you sure you want to connect. It also does not keep things like the Login Name associated with the site. Back to keeping them in my phone and having them sync with my computer, ah wait that wont work either (see above). Annoying.
  5. I often run two displays. The system refuses to allow me to have the DVI output as primary and the VGA output as secondary. Instead it insists on having either the DVI or the VGA as primary and the built in display as secondary or visa versa. Oh well I took the second head home and use it on the laptop when I am home. XP did this no problem, Annoying.
  6. The Power options don't seem to be allowing the built in battery to charge while the system is running. No BIOS options control this its strictly the VISTA power control settings. In Microsoft's eagerness to simplify they seem to have dumbed down the options to the point where that control is out of the mix. At this point I am losing about 1 % of the battery a day. Well I have 85 days left of "Plugged In Not Charging...". Looks like I'll have to slip my old drive in for an evening of XP screen blanker and battery charge time. Annoying.

    (Update 11-9-2006 Last evening I tried putting the system to sleep for some time in the hopes that it might charge while sleeping. Powered back up in the morning, now at 84% not charging... Still annoying)
  7. Webex is something I have to use a lot. Webex does not work properly in IE7 on vista. ( Its a vista thing because it does seem to work in IE7 on XP). I tried the java version in Firefox 2.0. Problem is that the JRE 5.x plug in does not install on vista. Some issue with writing some part of the packages. I asked the webex folks what gives, crickets... Finally I tried the beta 6.x version of Suns java. AT least it installed. I can now use Firefox to setup meetings and host them. One more problem though is the fact that Firefox 2.0 bombs the moment a single attendee joins the meeting. Vista spouts some friendly little dialog to the effect that Firefox has stopped responding and is being shutdown. Quickly reopen Firefox, reconnect with webex, relogin, and rejoin meeting those who joined the meeting are still there and it seemed to work. Hugely annoying.
  8. As suspected anti virus software is broken. Vista versions may be coming or may not be coming. Until then we have Windows Defender... Don't that make you all warm and fuzzy? Annoying.

Now that I have ran on and on about the annoyances I'll bet you folks are spouting on about why doesn't this loon just pop his old drive back in and be done with it. Well I can say that I did have to revert back while I was working out the kinks, after all I do work on this machine and while the initial install took 20-30 mins tops all this other stuff has taken me days to get right. The fact is, Vista with most all of my necessary applications and development tools and yes WOW is a necessary application, simply works smooth as silk. In fact today while I was editing a portion of this post, my system was...

  • Running ITunes blaring EVANESCENSE, (headphones of course, I am a good office boy)
  • Running VS2003 profiling one of our importer applications in a 2+hr cycle talking to the local SQL server 2005 database (several gigs in size).
  • Outlook 2003 connected to our domain using IMAP.
  • Several browser windows open (one on blogger where I was typing away), others elsewhere.
  • Downloading multiple issues Davorak's CrankyGeeks webisodes.
  • Word2003 and Excel opened.
  • With all the standard Vista eye candy running full bore in its new Wizzy Bang sidebar on its multiple displays (one external DVI and the other the Laptops own panel)







The system just ran smooth. Even with all that stuff happening at once. Now I will be the first to yell at an end user when they have 15 versions of word opened at once, but my XP system never ran that smooth on the same exact hardware. In fact while all that was happening the system memory was running at 95+% usage. ( As the G15 keyboards display and the Vista sidebar Gadget CPU usage were indicating ). During that time the virtual memory usage was minimal. The database server accessing the hard disk the same hard disk as the virtual memory subsystem was using. Now XP would hit the swap file at the drop of a hat. Vista just seems to be smarter about things like that, after all I put 2 gigs of ram in this thing for a reason. Finally we have an OS that uses it from the Pacific Northwest. (The one from Finland has properly used hardware when it was available for quite some time). This reason and this reason along compels me to overlook the list of annoyances and stick with Vista. Our clients require that I develop for the Windows platform, now we have an OS that makes that environment as comfortable as I have always felt it should be.