27
Jul 09

Pointless error messages

Once in a while, I try to send an email in Outlook and I get an error

An internal support function returned an error.

How is this error helpful in any way?

What function and what error and what can I do about it? If you're not going to tell me that, then why bother telling me anything?

It tells me, the user, that the email wasn't sent, but beyond trying it again, there's absolutely nothing useful this error tells me. It's not telling me a reason for the error and it's not giving me any information for improving what I did to improve the outcome the next time I try to do the same thing.


So, what do I take away from this experience as a programmer?

  • If I create an end-user type of message, I'll try to limit the amount of technical information in the message and try to tell the user what to do to resolve the error if that is not apparent from the message itself.

    For example, for a typical end-user, a more appropriate message might have been:

    An error occurred when trying to send this message. Try sending it again.

  • If I create a more technical message, one that contains more useful information for the programmer (me), I'll try to expose enough technical detail information so that when the message gets back to me, I'll know where to look in my code to find the problem.

    For example, a better technical message might have been:

    Internal function XYZ returned error 1234. Please report this error detail to your developer. Try sending the message again.


Tags:
18
Jul 09

Tip: You don't need a screen shot to capture an error message

I get a lot of screen shots in my email, most of error messages. Don't even get me started on Word documents containing 4 MB BMP screen shots and then attached to an email. Or better yet, a Word document with a bunch of screen shots, which are then discussed in the email, so I have to keep switching back and forth.

The apparently best kept secret of a standard Windows error message is that it can be captured as plain text using Ctrl+C, since at least Windows XP. This is far better for emailing off to report an error, since it produces a far smaller email message, and it allows the recipient to select and copy text.

Typically, when someone sends me an error message screen shot, the first thing I do is to search for the exact error message text in one or more places (e.g. help, KBase, forums, etc.) If the error was sent to me as a screen shot, I now have to type in the whole error message. If it was sent as text, I can simply select and copy it, reducing the time it takes and the likelihood of transcription errors.

This works for any Windows message box. For example, this line of C# code

MessageBox.Show("This is error # ZAV45273###Y: you forgot to finagle the gizmo", "ERROR");

Displays this Windows message box:

When this message box has the focus, you can press Ctrl+C to copy it, resulting in this text:

---------------------------
ERROR
---------------------------
This is error # ZAV45273###Y: you forgot to finagle the gizmo
---------------------------
OK  
---------------------------

Now, if someone sends me the text version of the above error, it's really easy to copy the complex error number and be sure I got it right.

9
Jul 09

Can I replace my keyboard's Scroll Lock with an Insert Lock?

I never use my keyboard's Insert key; well, not never, but never on purpose. Usually if I use it, it's like this:

type type type, type type type, type (accidentally hit Insert) type, type type oh man!

Then I wind up doing one of these:

  • Undo undo undo, press Insert again (intentionally this time to un-toggle over type mode), then retype what I just undid, then continue typing normally.
  • Copy what I just typed because I don't want to lose it, then undo undo undo, press Insert again, then paste what copied from before, then continue typing normally.

So this is usually a wonderful way to derail my train of thought.

My Cyberpower PC came with this great Logitech Y-SU61 keyboard, which is quite simplistic (no extra function keys, lit-up buttons, just a nice, full size keyboard, yet light with a small footprint) and replaces the typical Insert-above-Delete key arrangement with an extra tall Delete key. I love it! When I got it, I had high hopes this would become the new keyboard standard; however, this PC and keyboard are probably around 4 years old now, so it appears a new standard has not taken root.

Yet, I've been to cheap and lazy to go out and buy 2 more for the other 2 PCs I use on a daily basis. When I searched for this keyboard today, it appears to be discontinued, but there must be others with this feature.

The other alternative would be some way to simply disable (like the Caps Lock and Scroll Lock keys, neither of which I ever use) or reprogram the Insert key.

29
Jun 09

Blogging with WordPress

Well, I haven't been blogging very long and have zero prior experience doing so, but here are a few thoughts so far.

I wanted to add a blog to my existing site, but also have the ability to add other features in the future. My previous site was designed using static HTML pages and CSS styles I designed myself from scratch. Now I wanted something extensible that worked out of the box and could be hosted pretty much anywhere. I'm a programmer, but I want to spend my time working on the projects I want to work on, and designing a web site and spending a lot of time maintaining it isn't something I'm currently interested in.

I did some research prior to taking the plunge, asked some friends whose sites I liked what they used and tried some content management systems (CMSs) first. I thought joomla could do everything I wanted, and for some things it could, but there were just too many small issues that added up to a lot more hassle than I wanted to deal with.

Then I started looking more at WordPress, because that seems to be one of the top (maybe the top?) blogging tools out there and it seemed mature enough. I didn't realize how many extensions for WordPress are available; it's almost like WordPress is becoming a CMS itself.

Anyway, I tried it and almost everything I have tried with it so far either just worked, or had simple workarounds (for example, there appears to be a problem uploading images with the default tool for this in WordPress 2.8).

Now that I've written a number of posts, the default editor is starting to bug me. It was a real pain in the neck when writing the post about Windows Vista Backup and Restore Center. It kept changing my formatting. It seems to think it knows better what formatting I want than I do, so it just changes it. It particularly likes to eat multiple line breaks, rather than paragraph breaks. Numerous times when I had the formatting just the way I wanted it, the next save changed it, to the point that I changed the formatting, because I didn't want to deal with the editor in the middle of writing the article.

Clearly, I am not alone and this issue isn't new. I came across a post called Make WordPress Editor Less Evil. I don't know if I would go so far as to call the editor evil. If I had to label it with an emotion, I would probably call it passive aggressive; it just kind of pecks at you with little annoyances. The post is dead on about the problem with replacing quote characters in code. This is something I frequently come across when converting documentation authored by someone else in Word documents to HTML doc. In Visual DataFlex, it causes code not to compile.

The RoboHelp HTML editor does things like this from time to time. It loves adding <div> tags with formatting in places it doesn't belong, like the middle of sentences, which winds up screwing up text justification.

26
Jun 09

Windows Vista Backup and Restore Center: not ready for prime time

As you may know, I take backups seriously. I have been trying to find a reliable drive image backup solution for Windows Vista. Since Vista comes with a built-in backup offering, I decided to try it. While it works, there are still too many limitations that commercial (and even some free) backup products simply don't have.

Issues

  • No compression
    Believe me, with the size of Vista image backups, you want compression! Of course, I didn't do tests of the same drive type and free space on XP vs. Vista machines, but my rough guesstimate is that Vista drive image backups of drives containing the operating system are 8 times larger than similar XP versions.
  • No differential backups
    Again, Vista backups take up a lot of space, so you really want to be able to save space via differential backups.
  • No backup scheduling
    Scheduled backups are only available for data backups, not drive backups.
  • Cannot mount drive images
    The commercial products available allow you to mount a drive image backups like a drive, browse it and restore individual files. Ghost has had this feature for many years. This allows you to use drive image backups as data backups, as well.
  • You can only store one backup image per drive
    Vista backup stores drive image backups in a folder named WindowsImageBackup on the drive being backed up to, which limits backups to one per drive. I have not found any way to browse for folders, create subfolders, etc. to allow storing multiple backup sets on the same disk. You can get around this by renaming the folder/files, but that makes automation hard and increases another maintenance step.
  • Cannot validate backup images
    The other products like this I have used allow you to validate a drive image backup to check it for errors and verify it will restore properly. I could not find this feature in the Vista backup program.

Backup products I've tried

  • Norton Ghost 14.0
    This was the first product I tried, simply because pre-Vista, I used Ghost successfully for many years. I still use Ghost 9 for my Windows XP PCs and we used Ghost exclusively for our in-house test PCs for many years. It just always worked. I didn't have such luck with Ghost 14.0, it didn't work for either of my 2 Vista PCs:
    - Vista Home Premium x64, HP, AMD Phenom 9550 quad core
    - Vista Business Ultimate x32, Dell, Intel Core Duo E8200A Symantec support technician remotely controlled one of the Vista PCs remotely for 2 full work days and couldn't come up with any reason for the failure. At this point, I figured I had wasted enough time with this product and went on to try something else.Symantec, $49
  • Drive Snapshot 1.3
    Drive SnapShot was recommended by our network administrator. It's extremely simple to install and use (you can actually just use a single .exe file without any installation). I was also happy with the support Tom Ehlert, the software's author provided in figuring out how to allow me to boot from a boot disk and see the hard drives on the HP Vista x64 PC (set the SATA BIOS setting from the default RAID to IDE/legacy mode).I've done numerous backups using the 30 day eval version of Drive SnapShot, verified them and restored from them. It just works!

    DriveSnapshot.de, $39

  • Acronis TrueImage 2009 Home
    I mostly tried TrueImage because anyplace I checked about what other people use and recommend, such as Server Fault, everyone spoke very highly of it, and boy were they right. This product just worked flawlessly from day one. The restore disk just figured out how to access the hard drive on the Vista x64 box without any messing around, the interface is really well done and easy to use. TrueImage allowed me to set up a scheduled incremental backup with compression very quickly and easily.It also comes with a truckload of extra features.I've done numerous backups using the 15 day eval version of TrueImage, verified them and restored from them. It also just works!

    Acronis, $49

There are lots of other products out there for this purpose, both commercial and free. I did not try all of them, nor do I intend to. My goal was to spend as little time as possible to find a reliable and reasonably priced backup solution.

Bottom line

The commercial drive image products I tested are worth every penny of the $39-$49 retail price that single non-server PC versions of these products typically cost. I chose Acronis TrueImage 2009 Home for my Vista backups. Being able to simply connect an external drive (or even a second internal drive) and use true "set it and forget it" mode backup with scheduled incremental backups is just wonderful and I know I won't forget to backup anything.

 

Update (07/19/2011): I've been working with the Windows 7 version of Backup and Restore Center built into the operating system and it solves many of the issues of the Vista version I reviewed above. It is a reasonable backup solution for most purposes.

16
Jun 09

Visual DataFlex 2009 - 15.0 is released

Highlights include:

  • AJAX Library Support for Web Applications - Beginning with revision 2009, the AJAX library will be officially included and supported in Visual DataFlex. Plus The Visual DataFlex 2009/15.0 Web Application Server now provides JSON support.
  • Visual DataFlex Studio Enhancements - Include Design time anchor support, improved breakpoint panel, easier text selection in Code Explorer, a new Go-back option to provide “go back” points in a file, faster loading and running of large applications in the Studio via a Dependency Cache rewrite, and Debugger improvements including Conditional Breakpoints.
  • Runtime Improvements - Include new Array functions, new Pos and RightPos functions, and improved icon resource handling.
  • New and Improved Classes - A number of new classes and improvements to existing classes have been implemented. New classes include Hyperlink, Scrolling container, and Splitter container. Tooltips are also now supported in classes.
  • Library Enhancements - Improvements have been implemented that encourage the development and use of Visual DataFlex libraries within and across development teams.

My personal favorites are conditional breakpoints (yes!) and a simply hyperlink class (cLinkLabel).

See the forum post/release notice for details.

14
Jun 09

Adobe, stop hogging my resources!

This post isn't original in many ways, but this issue continues to tick me off. The sheer fact that this has been going on unabated for years confirms that more of us need to speak up about it.

So the other day, I installed the latest Adobe Reader 8 patch, then pretty much forgot about it. Today I rebooted my PC, and there is an Adobe Reader 8 icon on my desktop. I immediately noticed this, because, with the exception of the Recycle Bin, I have no icons on my desktop. This reminded me to check my Windows Registry. Sure enough, in my Registry, I found this:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"Adobe Reader Speed Launcher"="\"C:\\Program Files\\Adobe
    \\Reader 8.0\\Reader\\Reader_sl.exe\""

So what the Adobe Reader 8 patch installation did to my computer is:

  • Wrote a Speed Launcher entry into the Run key of my Registry, which makes this program launch on start-up
  • Placed an icon to Adobe Reader 8 on my desktop

It did all of this without asking me!

The Speed Launcher Registry entry is the kind of thing that gives Windows a bad name. While there are plenty of legitimate issues with Windows, one of the most often heard, and even used in Mac commercials, is that Windows slows down over time, both the boot-up time and performance while running programs. A lot of this is due to this type of behavior by companies like Adobe. Adobe Reader places a program into the Run key of the Registry so that part of the reader application gets loaded into memory when Windows boots up. The reasoning behind this is that less of the application has to be loaded up when a user actually opens a PDF document.

This practice is entirely self-serving of Adobe. Even if I just read one PDF document a month, part of Adobe Reader slows down my computer's boot time and hogs my computer's RAM 100% of the time I am running Windows. In other words, Adobe thinks that the Adobe Reader software is so important, so crucial to my everyday computing needs that part of it has to be running at all times, consuming some of the finite resources on my computer, no matter how detrimental this may be to the performance for anything else.

The desktop icon is mostly annoying, just another symptom of the audacity of Adobe to do whatever the heck it pleases to my computer. Also, why do I even need a desktop icon, or the Programs menu icon, for Adobe Reader? It's not like I ever open Adobe Reader directly; it opens when I open a PDF document, most likely on some web site. This is clearly just another way for Adobe to put its logo in my face.

It would be one thing of the installation program to ask me if it was ok to do these things and allow me to make the decision, but to just do this behind my back is simply wrong! It's also pretty underhanded to do this again during each patch installation, not just during the original program installation. This way, it forces me to clean up my Registry even more often.

I happened to pick on Adobe because it's the most blatant and frequent offender, which uses these tactics with many of its products, but there are plenty of others:

  • Microsoft Office 'Microsoft Utility Startup'
  • Apple QuickTime (qttask.exe)

Sadly, the list goes on and on. Together, if left unchecked, all of these programs would take up more and more time and resources on my computer until there aren't enough left for the things I actually want to do.

Thanks Adobe!


Update (July 1, 2009)

It has been only two and a half weeks since I wrote this post. Today, Adobe Reader asked to install yet another patch and guess what was back in my Registry again? Looks like it's time to seriously start looking for another PDF reader.


Update (February 6, 2010)

I have been using FoxIt Reader for a few months now and really like it. Thanks Kalpesh!

Of course, the stated problem remains, Adobe Reader is just one of many offenders.

Tags:
13
Jun 09

Are you taking your hard drive for granted?

I did just that until about a year ago. In that past year, I've had 3 hard drive failures:

  • HP Pavilion, vintage 2004: this was my main work PC. It literally blew sparks one day. After that, the power supply was toast and the hard drive inaccessible. We wound up replacing the entire PC, because we could not justify the cost of replacing a hard drive and a power supply on a 4 year old PC.
  • Dell workstation 360, vintage 2003: this was my wife's PC. We wound up replacing the entire PC, because again, we could not justify the cost of replacing just a hard drive on a 6 year old PC.
  • Dell Inspiron, just under a year old: this is my main test PC that I run virtual machines on. I had to repartition and reformat the drive, then reinstall the operating system. It appeared ok for a short while, then started failing again. It turns out that there were memory problems. Dell eventually replaced the RAM (another long story there, but not today) and now it seems ok.

I thought I was pretty good about back ups before all of these problems happened. Yet after so many failures in a relative short amount of time, you really find out whether your backup strategy is working or not. Mine clearly was not. Some drive images were several months old, some data wasn't being backed up frequently enough and some not at all. I lost a lot of time due to:

  • Having to reinstall Windows and/or numerous applications from scratch
  • Getting data back from various places (source control, external drives, network)
  • Simply not realizing what I did and did not have backed up.

At some time when we were discussing this mess, my boss Stephen said something to the effect of "If you don't have a full drive backup, you don't have a backup." I now realize how right he was -- don't tell him! ;-)

Now I use scheduled backups on my daily working PCs and created a schedule in my Outlook calendar to remind me to back up the other PCs every two weeks. I bought a couple of big external drives (750 GB and 1.5 TB) and now have enough room for multiple drive image backups for each PC, so I can "roll back" to any of several drive revisions.

There are so many benefits to doing full drive image backups:

  • You know you have everything backed up. No more "did I backup X before this crash"?
  • It's inexpensive: hard drives, including ready-to-use external drives, are cheaper than ever before.
  • It's easy: most drive image backup software today has true "set it and forget it" modes, with backup scheduling.
  • Most drive imaging software today allows you to mount a drive image as a drive so you can view and retrieve individual folders and files from them, so drive image backups can also serve as data backup (within limits).

Remember to actually test restoring of your backup images, so the first time you try it isn't after a drive failure. That's a bad time to find out that it doesn't work!

3
Jun 09

Austin Code Camp 2009

Last Saturday I attended Austin Code Camp 2009. This was the second year I attended and I'm already looking forward to next year! Austin Code Camp is an annual event of a full Saturday of .Net-related classes and presentations, all completely free to attendees like myself.

My biggest problem was picking which sessions to attend, or worse, which ones not to attend. :-(

I eventually chose to attend Sneak peek at C# 4.0 by Jimmy Bogard, who gave a similar session about C# 3.0 at last year's camp, and 2 excellent 2 hour SQL Server sessions by Anil Desai, SQL Server Reporting Services: Report Creation and Deployment and SQL Server Performance Monitoring & Optimization. All 3 sessions were awesome, thanks guys!

Thanks to John Teague, all presenters, the Austin .Net Users Group, the sponsors and everyone else who helped make this event happen!