Set the wayback machine to late 1980’s

SteveX posted some tidbits about his work on VirusX, a virus checker for the Amiga. I get Lattice flashbacks whenever he does that.

I learned how to program in C on Lattice. At my first real job, we used the Lattice C compiler for Unix and MS-DOS. I bought the Amiga version and taught myself C with it. Back in the early 80’s, Lattice was the only game in town for getting commercial C compilers. Even Microsoft repackaged it as Microsoft C until they came out with their own compiler (MS C 4.0). By the time I was using it (1988), Lattice was being eclipsed by Microsoft’s own C compiler and Borland’s Turbo C. We eventually dropped it for the Watcom C compiler, a C compiler that ran circles around Microsoft C back then. It’s hard to imagine, but Microsoft used to have serious competition in the compiler area. Watcom C was nearly 100% compatible with Microsoft C at the source level, but it would compiler smaller executable that ran faster than the same code compiled with Microsoft C. Mind you, this was back in the early 90’s and Visual Studio did not exist. Lattice was eventually bought out by the SAS Institute, who then effectively killed it.

I was surprised to see that Watcom C is still around as Open Watcom C/C++ and FORTRAN. Sybase ended up owning Watcom and realized that maintaining the compilers didn’t make a lot of business sense. So they open sourced it about 5 years ago. It looks like you can still build Netware NLM‘s with it. If you ever needed to write a NLM, this would be the way to do it without having to spend any money.

VMware-authd.exe slowing down my PC

I was doing some work on one of my PC’s and I had the processes list open in Task Manager. Out of the corner of my eye, I noticed that one process, VMware-authd.exe, was going from 0 to 10% of the CPU. I didn’t know what that process did, I went out on a limb and assumed that it was somehow related to VMWare. VMware is one of my favorite tools, but I wasn’t running any VMWare sessions. Time to go Googling. Apparently it’s a service that provides administrator priviledges to to a running VMWare session if the host use isn’t logged in with administrator access rights

If you are logged in with admin rights, you don’t need to have this service running. VMware-authd.exe is the name of the executable for the “VMware Authorization Service” service. You can go into Services and shut that service down and then set it’s startup type to “manual”. There are no other services that depend on that service to be running. You can also stop the service from the Windows command line with the following:

net stop VMAuthdService

[Edited on 3/5/08]

If you need to restart the service from the command line, use the following:

net start VMAuthdService


Today our main app’s help system broke.  I hate that when it happens.  This app is built with Delphi, which supports WinHelp (*.hlp) files for context sensitive help.  A long time ago, I added some code to allow our apps to use HTML Help (*.chm).  It was fairly trivial to implement and once I got it working, we never had to look at that code again.

Until today.  The latest build of the help file didn’t work.  We pressed the help button and nothing happened.  Yet, if we ran the help file outside our app, it loaded up just fine.  Obviously something had changed, the question was what had changed.

The first step was to fire up the app and step through the code.  To use HTML Help with Delphi, I use some open source code that provides a Delphi wrapper for the function calls in hhctrl.ocx.  When I stepped through the code,   I ended up here:

h := HtmlHelp(0, PChar(mHelpFile), HH_HELP_CONTEXT, 5000);  // data = helpcontext id

The mHelpFile variable is the full path the .chm file.  HtmlHelp mapped to HtmlHelpA in hhctrl.ocx.  5000 the context id for the start page in the .chm.  It’s set to 5000 because nothing defaults to that value.  If the context id’s are not defined correctly, it wont have a context ID of 5000.  The code would call HtmlHelp and 0 was being returned.  In this context, 0 means that the context id of 5000 doesn’t exist in the .chm file.  It’s the same thing as calling the HtmlHelp executable, hh.exe, with the -mapid parameter.

hh.exe -mapid 5000 myfile.chm

So that’s my theory, next step is to prove that ID’s are missing or incorrect.  The guy who generated the .chm file was gone for the day and I don’t have to toys used to create the .chm file.  But I did have the .chm file.  Keyworks has a nice (and free) utility called KeyTools for working with HTML Help files.  One of the things it can do is to decompile the .chm file back to the source files.  I did that and opened up the .hhp file and sure enough the context id’s were all wrong.

Delphi Interview Questions

Nick Hodges posted a list of interview questions for Delphi programmers. While I usually like his posts, I didn’t agree with this one. I’ve been using Delphi since version 2 and I would get a brain freeze if I got all of those questions in an interview. I know them all, but to repeat them back in an interview, that’s not going to happen. The sole exception would be writing of a function to reverse a string. If I was interviewing someone, I would make them write a function like that. It shows how they think and hopefully what processes they are accustomed to following.

Another thing I do is to describe a wierd bug that would have been submitted that no one could reproduce and ask the interviewee what steps he or she would take. I would describe a real of fictious application (it really doesn’t matter) and then describe a loose series of steps that will crash the application, but only on a certain. You can adapt the description to match the perceived skill level of the applicant. This is closer to real life and you can hopefully learn a few things about the applicant. How does he react under stress? How well does he know the debugging tools and methodologies. You’ll want to see what steps or directions he would go in order to isolate and reproduce the problem.

I would also ask some generic SQL questions. Every job that I ‘ve had (OK, it’s a short list) has involved SQL at some level or another. I don’t think you avoid databases and every programmer should have some level of familiarity with SQL.

The rest of the questions in Nick’s list show that you have memorized the help system, it doesn’t tell you if you actually know to use it. Unless you are writing components, how important is it to enough about how components are read in to repeat it back in an interview. In our shop, we have 7 developers who use Delphi. Only one of us (me) has any real experience in writing a new component from scratch, and doing it the right way. And that’s OK. We’re not in the component development business, we’re in the business of writing applications.

These questions would weed out a skilled programmer who never used Delphi. I would greatly prefer getting an experienced programmer up to speed with Delphi, then dealing a programmer with Delphi experience, but otherwise horrible.

Here are some suggested Delphi interview questions:

  1. Describe how components are loaded from a DFM file at runtime.
  2. What is the difference between TGraphicControl and TWinControl?
  3. Write a function that reverses a string.
  4. If a component has another component as a property (example:  TDatasource has a TDataset component as a property), what happens if the “pointed to“ component is deleted?
  5. Where does TCustomControl fit into the VCL heirarchy?
  6. What is the purpose and significance of the TPersistent class?
  7. What are the three methods required for an implementation of IInterface?  What do they do?
  8. What class in the VCL heirarchy implements IInterface?

from [Nick’s Delphi Blog]

Free icon sets from IconBuffet

Thanks to a tip posted on, I came across a site that offers free commercial quality icon sets. sells a wide variety of icon sets for app and web work.  What they also offer are free sets.  You register with them and once a month they send you a free set of icons.  To raise it up a notch, they will send different people different sets each month.  You are allowed to send each set up to 5 times to other people through IconBuffet’s web site.  They call it “Free Delivery”.

I just signed up and I have the “Oslo Finance” set.  There are about 10 or 11 different images, in a wide variety of formats: BMP, GIF, Mac ICNS, Win ICO, TIFF, and PNG.

If anyone with an IconBuffet account wants this one, just leave a comment here or email me at anotherlab{at}gmail{dot}com.  I’m looking for the other sets, with my eye on the Shanghai Tech and Shanghai Tech Vector sets.

 [2nd edit]

I just got my first deliveries (thanks Dan!).  It’s the Shanghai Tech Vector and Shanghai Tech sets.  Duncan sent me all 5, I now have a complete set.  I’m not sure what I’m going to do with them, but they are cool.

[Edited on 12/7/05]  I have the following sets left

  • Oslo Atmosphere, 3 deliveries remaining
  • Oslo Finance, 2 deliveries remaining
  • Shanghai Tech, 1 delivery remaining
  • Taipei Buddies 1, 2 deliveries remaining
  • Taipei Buddies 2, 3 deliveries remaining
  • Taipei Night Market, 3 deliveries remaining

Technorati tag: