Tuesday, July 29, 2008

A new age of military healthcare?


So to take a break from all my Delphi stuff, I figure I'll post about where I've spent most of my career, which is in healthcare. The majority of my experience comes in working with the VA's EHR, named VistA. VistA by the way, was created at least a decade before Microsoft Vista. Recently, I've become more interested in CHCS and AHTLA, which is part of the DoD EHR system. Interestingly, it seems that MHS (Military Health Systems) is turning to new web based technologies to gather feedback from their users. I'm glad to see some of the MHS leaders taking advantage of social technologies.

Wednesday, July 23, 2008

Darwin Race of Langauges is Over!


Congratulations to all who finished! My downfall was I bit off more than I could chew by using a semi-familiar IDE and language, while attempting to learn COM and WMI. No excuses though! Even though I couldn't finish the race, I had fun and I learned more about RAD Studio in the process.

My one regret is that due to all the problems to solve being GUI based, I couldn't enter using my best language, GT.M. I bet that would be something no one else has seen =P.

In any case, that's just me rambling on (and trying to find some way to work GT.M into my post). Too bad none of the people who finished the competition entered anything for OSX.

Sunday, July 20, 2008

Special kind of error

I tried to cast an internal control to TwwDBGrid as a TwwCheckBox and use it's Checked property. All I can say is WOW!

Here's the follow on error

That is a special error. As in "Special Education".

Whoops, I still have more time!

For some odd reason, I thought that the competition ended on the 18th. It turns out it actually ends on the 22nd, so I still have more time to work on it. The next block of free time that I have will be on the 21st, so we'll see if I can work some magic to figure out WMI and COM before the actual deadline.

Friday, July 18, 2008

Darwin Race of Languages - Day 4


So I've been defeated by COM and WMI. To me, what's missing in the Delphi world are comprehensive tutorials and documentation like you can find with MSDN and Sun (for Java). What I ended up trying to do was look at existing code that uses WMI in Delphi, and attempt to reverse engineer it. I have a reasonable understanding of the objects and techniques used in the sample code, but when I got stuck, I had no idea what was causing the problem. Unfortunately, the time ran out for the competition before I could make anymore headway. 

Earlier in the competition, I posted about my usual steps when learning something new, for the Darwin Race of Languages, I got stuck on step 2, developing the proof of concept, by reverse engineering existing examples.

If anyone is interested in looking at the code I was working on, the entire project is in a zip file here. Note that I'm not sure if all the imports will be correct on anyone elses pc, as the paths were local to my pc. I can't really call the code "my code", since it was mostly a cut and paste from someone named ciuly. I also used as reference, this project from Planet Source Code, which interestingly enough had errors, but ran on my workstation. When I attempted to extract the code and place it in my project, I ran into the same EOleException that I had in ciuly's example. That leads me to believe that the issue lies somewhere in my project, but not in the sourcecode. 

Darwin Race of Languages - Day 3 Part 2

Still no luck. All I can find are MSDN articles related to WMI on Microsoft's official languages, such as C++, C#, VB, etc. I can also find many examples of using WMI in Delphi, but there are no comprensive, newbie friendly tutorials on the different WMI components as related to Delphi and RAD Studio. I'm sure it's a simple fix to solve my problem, but those simple problems are the things that a newbie friendly tutorial will help walk me through.

When I was learning C#/.NET, I did most of my learning on MSDN. I've done multithreading, socket connections, registry modification, file encryption, used active directory, so on and so forth. I never once had to ask the wider .NET community for assistance, as MSDN has always been good to me. Ditto for learning Java, Sun's documentation is good as well (at least it was back when I was doing Java, the version 1 days).

uses
  Google, MSDN;

implementation
procedure Will_I_Win;
var
  Delphi: New_Language;
   RAD_Studio: New_IDE;
  WMI: New_Component;
   Success: string;
begin
   RAD_Studio := IDE.Create('CodeGear');
   Delphi  := RAD_Studio.Language;
   WMI := Component.Create('MS');
   success := 'You Fail';
   while OtherProjectsGoingOn do
   begin
     if Solveable(Delphi, RAD_Studio, WMI, "2 weeks") then
     begin
         success := 'yay!';
     end;
   end;
ShowMessage(success);
end;



Darwin Race of Languages - Day 3 Part 1

I've been reading through tons of examples of using WMI with Delphi, and I've tried running what seems like the most likely candidate for what I want to do (return the CPU temperature). However, I keep getting the error below.


It seems like I am unable to use Sinkclass.DefaultInterface when I call Services.ExecNotificationQueryAsync. Since the "Sink" is supposed to be an eventhandler that fires upon receipt of an event from Services, I guess this is a good error, since I don't have any code defined to handle the event, and I have absolutely no clue where DefaultInterface is in my Sink object. 

I'm not sure if I will be able to complete the project before the deadline, but I'll keep trying until the time runs out.