Friday, February 23, 2007

I just came across an article from Jakob Nielson's UseIt.com web site concerning Weblog Usability.  I figure I should go ahead and take the test and see how my own blog stacks against the ideals of the guru.

Top Ten Design Mistakes in Weblogs:

1. No Author Biographies - Not guilty

I have my real name and some real info about myself in the "What's this?" box to the right.  If you visit my home page, you can even download my resume.

2. No Author Photo - Not guilty (anymore)

Yes, I have posted an unflattering, but honest picture of myself.  I do have a nice picture of myself that was taken at my wedding by a professional photographer almost 17 years ago.  I don't think I can really use that, though.

3. Nondescript Posting Titles - Not guilty

I just barely squeaked by on this.  I try to title each blurb accurately, and when I'm in a playful mood I may throw in a double entrendre, such as "Nutty Warnings".  Some titles are lame, I admit it.  I throw myself on the mercy of the court on this count.

4. Links Don't Say Where They Go - Not guilty

This is classic Web 101 fare.  Search engines look for this; SEO depends on it.

5. Classic Hits are Buried - Guilty

The dasBlog software doesn't lend itself to breadcrumb navigation, and I have been too busy/lazy/apathetic to do anything to about it.  I don't have any real "hits" because I have so few readers that it probably doesn't matter.  I'll get off with probation on this.

6. The Calendar is the Only Navigation - Not guilty

I do add categories to each blog entry, honest, officer!  Once again, I'm at the mercy of dasBlog on this one because it show categories in a linear fashion instead of a hit-based or frequency-based heuristic.

7. Irregular Publishing Frequency - Guilty

I have not made a serious attempt to publish regularly, even though I can write quickly.  As they say in the Holy Grail, "I'm getting better".

8. Mixing Topics - Guilty, Guilty, Guilty

The fertile crevices of my brain are aching to explode with information to tell the world.  While I do try to keep the topics programming-related, I suffer from ADD of the fingers.  What was I writing about, now?

9. Forgetting That You Write for Your Future Boss - Hung Jury

I have deliberately refrained from including profanity and NSFW content from my blog.  So I get a silver arrow point for that.  Some people might be offended by my cheeky humor and unabashed assessments.  If that's the case, then they have a problem with my personality.  One of my criteria for accepting a new position is that I can get at least a chuckle during the job interview.  If my boss has no sense of humor, chances are he will melt down or blow up during a difficult situation, which will make my own life miserable.  So I guess in a way you can say that I am writing proactively in self-defense.  Yeah, that's it.

10. Having a Domain Name Owned by a Weblog Service - Not guilty

Oh, c'mon!  You can't spring the $7 a year it costs to have your own domain name?  Personally, I'm helping fund Bob Parsons' kids' college education.  But let's not go there.

The Verdict

Cleared on six counts, found guilty of burying the evidence, negligent publishing, and crossing the center line of my weblog.  I am hereby put on probation and required to attend a defensive blogging class as well as blogger sensitivity training.

Now, how well will YOUR blog stand up?

 "I'm vahtching you"
posted on Friday, February 23, 2007 4:15:32 PM (Central Standard Time, UTC-06:00) by Christopher S. Velazquez

Last night, I was enjoying one of my favorite snacks, peanut butter on a spoon.  Not the salmonella-infested peanut-flavored Crisco that you buy at Wal-Mart, but the good stuff: organic natural creamy peanut butter with nothing but peanuts and salt.  And I looked at the label and saw the following warning: "This product was manufactured in a facility that processes nuts".  Now I know the placement of this absurd warning has something to do with legal liability, otherwise it would make sense.  This bears a certain similarity to the way we handle homeland security in 2007.

What would the world look like if we put these warnings on software?

  • Windows XP Installation disc: Warning: this disc contains an operating system that is capable of executing coded instructions and may be susceptible to malicious activity.
  • Microsoft Excel: Warning: Errors in formulas and macros may lead to incorrect results.
  • ActiveState ActivePerl: Warning: Improper use of the Perl programming language may result in incomprehensible gibberish.
  • World of Warcraft: Warning: using this software to excess may deteriorate your social life.

In a sense, I guess that's what the modal dialog box was created for.  Sometimes you actually do need a warning if there is a side effect to the desired action.  If I want drop a database table, I want to know before I clobber a bunch of related stored procedures and program code.  More often than not, though, it is for some patronizing reason that we "interrupt the proceedings with idiocy" (as Alan Cooper puts it).  "We can't just let the user do that", I've heard from marketing types.  I recently had the displeasure of executing an old VB app that someone had written.  It always prompts with a modal dialog whenever one decides to change MDI child windows.  Why?  The data had already been saved in the database - you could reboot the computer and the data would still be available.  These dialogs were totally unnecessary.

The key to avoiding dialog boxes ad nauseum is reversibility.  Any action needs to be undoable, or a group of actions taken as a whole need to be undoable as a group.  While at Conic Systems (now Tadpole Technologies) our software implemented an "Undo Stack".  This was a pretty sophisticated approach for the 1990's.  You can use a design pattern called "Command" to partially implement this.  Unlike the IDbCommand implementers in .NET, a good Command object has the ability to reverse itself.  You place all the Commands on the undo stack, so the user can undo anything.

Undo a database record - Make sure the command object has all the information it needs to perform the delete after add, the add after delete, and the data from changed field values.

Undo a file deletion - don't delete files!  Rename them and send them to the Recycle bin programmatically.  That way you can get them back upon undo.

Undo a graphical operation - use the State pattern to incrementally change the state of the drawing surface and roll back to the previous state.

OK, enough of my soapbox rant.  I don't care if people think I'm nuts.

posted on Friday, February 23, 2007 8:46:39 AM (Central Standard Time, UTC-06:00) by Christopher S. Velazquez
 Thursday, February 22, 2007

And sadly, that woman was not Grace Hopper.  The winner of the coveted 2006 Turing award is none other than Fran Allen.  No, I've never heard of her either.  Apparently, she has been a lifelong IBM software engineer, and her accomplishments include, uh, er, something to do with optimizing compilers.  She is apparently the head of many different computing organizations and has spent a great deal of time teaching classes as an adjunct professor.  This reminds me of the adage, "those who can, do, those who can't, teach".  I'm at a loss to explain why Ms. Allen was selected to win the Turing award, other than she is an aging female software engineer, and she is still alive to receive the award in person.  She didn't even have an entry in Wikipedia until a few days ago, what's with that?

It's my opinion that if the ACM wanted to give this award to a woman that badly, they should have honored Grace Hopper posthumously, with her family receiving the prize.  Hopper had a major impact on the world of computing, with the invention of the COBOL programming language, and this impact was felt most forcefully as we approached the year 1900.  COBOL has always been the de facto standard for big-iron mainframes that crunch data in back offices that are impervious to its stench.  And to prove the point that people will actually pay money to romance a pig wearing lipstick, Fujitsu is keeping the corpse alive with NetCOBOL for .Net.

So I give my personal award for best lifetime achievement to a woman in the IT industry to Grace Hopper.  If it weren't for her contributions, we may still be using a variant of RPG or PL/I.  Nuff said.

posted on Thursday, February 22, 2007 3:09:58 PM (Central Standard Time, UTC-06:00) by Christopher S. Velazquez
Evolution of the Programmer.  The evolution of the "Hello World" program from high school (in BASIC) to master programmer (as a C++ COM library) and then through management.

posted on Thursday, February 22, 2007 11:46:25 AM (Central Standard Time, UTC-06:00) by Christopher S. Velazquez
 Tuesday, February 20, 2007

You've seen Google spreadsheets and online word processing.  But how about Visio diagramming?  Introducing Gliffy, a free service for drawing diagrams reminiscent of Visio and sharing them online.

Here's one I tried.  It's not quite up to Visio standards, but not far behind either.

 

posted on Tuesday, February 20, 2007 5:27:28 PM (Central Standard Time, UTC-06:00) by Christopher S. Velazquez
 Friday, February 16, 2007

Well this has been a slow news week.  No astronauts went ballistic this week, and the hype over the death of what's-her-name is over.  The usual body count from Iraq and our casual acceptance of new encroachments by Big Brother just aren't news anymore.

Garfield, eat your heart out

So I guess I'll just introduce my beloved cat, Spot.  We have three cats, but Spot is decidedly "mine"; she often hangs out on the gate waiting for me to come home from work.  I picked her from the litter a month before she was ready to be adopted.  She is about 4 years old now.  When she was about a year old, she was exploring one of our neighbor's abandoned cabins and accidently fell down the chimney.  The fireplace had been boarded shut, so she was trapped in the chimney just above the flue.  I wondered what happened to her, and after about a day and a half of her missing, I heard a very faint meowing.  I found her and rescued her from the cabin, but she had blown out her vocal cords trying to get somebody's attention.  As a result, she barely meows any more.  Now she's kind of fat and indulgent, so I guess it's true that pets and their owners start to look alike.  I took this photo of her this morning; she has spent the night sleeping on some pizza boxes from the night before.

"It's not the fur that makes you look fat", quips my daughter Aria.

Something to think about

I think I've finally discovered the absolute worst programming language.  It's called "Whitespace", and it's even worse than brainf*ck.  All commands in the language are composed of whitespace.  This is not a joke.  I'm seriously considering porting this to Whitespace.NET.  Anyone want to join me?

posted on Friday, February 16, 2007 9:06:45 AM (Central Standard Time, UTC-06:00) by Christopher S. Velazquez
 Friday, February 09, 2007

Remarkable benefits of NASA technology

Having spent the past week in the Clear Lake City area of Houston, in light of the recent flap with astronaut Lisa Marie Nowak, I guess it should not come as a surprise that every time I passed by the NASA Johnson Space Center there was a queue of reporters waiting to have there smiling faces videotaped in front of the NASA front entrance.  Of course, the most interesting aspect of this stranger-than-fiction drama was the fact that Nowak drove from Houston to Orlando while wearing a special "space diaper" that obviated the need for pit stops.  I asked the guard at the gate of NASA if there was any way I could buy or otherwise obtain one of these coveted "space diapers", but he didn't find the humor in this so I left before he could call the cops.

 Lisa Marie Nowak and Nick Nolte.  Separated at birth?  I report, you decide.

A Valentine poem

Valentine's Day is right around the corner, so you should set your MS Outlook reminder to give you the electric cattle prod sometime before Wednesday.  Of course, I like to stay on top of these things, so to speak.  Therefore, in order to display my more sensitive side to my lovely wife, I embarked upon some original poetry.  Chicks dig poetry.  Without further adieu...

Washington Monument
Never looked as grand
As what I have for you
In my hand
Happy Valentine's Day

See what a true romantic I am?  I wonder if I can sell this one to Hallmark?

News from people with similar DNA

My chef brother, Josh, opened his new restaurant, Deep Ellum in Boston last month.  He's been getting some rave reviews from the local press, which is always welcome.  I asked him if he had a web site yet, to which he did not answer.  So I did a registration lookup at DomainTools.com and found that he already did have a domain registered, and when I visited the web site, it was already under construction.  Josh was not happy that I found his web site.  But I hope everyone in Allston gets a chance to sample some of his remarkable cooking.  He's phenomenal.

Yet another case of Texas envy?  I report, you decide.  I'll update when the website is "officially" launched.  Till then, you'll just have to find it yourself.

San Antonio's biggest problem

One thing people certainly will not envy about Texas is that 4 of the 10 "fattest cities" are right here in the Lone Star State, with San Antonio topping that list at position #2, just behind #1 Las Vegas, NV.  Now anyone who's been to San Antonio knows that the food is great here - barbecue, Mexican, and many others.  San Antonio is one of the most hostile cities to bikers, and there are so few bike trails that it's hard to understand how Lance Armstrong got his start here without getting run over.  And the few existing public parks and green spaces in the Alamo City are lame.  If I were king of the world, I would kick the military out of Camp Bullis and turn it into the most wonderful public green space in all of Texas.

On getting noticed by search engines

It's clear that I have much work to do when it comes to search engine optimization.  I read with eager abandon the article on SEO referenced by my friend Big Nellie on his blog.  You would think that because I registered the domain "chrisvelazquez.com" and that my site is called Chris Velazquez, and that in fact my name is actually Chris Velazquez, and has been since birth, that when you type the phrase "Chris Velazquez" in the search engine, that the first entry for "Chris Velazquez" would be one of my own pages.  My home page has the words "Chris Velazquez" in the title tag, the H1 tag, and all over my web site.  Yet if you go to the #1 search engine, you won't find any pages of this website at all unless you place the term "Chris Velazquez" in quotes, and even then it only shows one of the blog pages, sometimes.  It's not that I'm in love with my name; my name is pretty ordinary, and there are a few other people who also have the same name, including a rancher in New Mexico and a film producer.  As you can probably tell, this entire paragraph is an attempt at an experiment to see whether this page will become the first search engine result for the term "Chris Velazquez".  Sorry to have to bore you with all this.

 What Gooooooogle thinks about my website!

 

posted on Friday, February 09, 2007 10:47:10 AM (Central Standard Time, UTC-06:00) by Christopher S. Velazquez
 Wednesday, February 07, 2007

I can't believe that I've been racking my brains for hours trying to figure out how to execute my .NET 2.0 code in Microsoft Excel 2003.  Hopefully this tidbit of information will save somebody else on the web some pain, frustration and time.

Punchline: You need a file called EXCEL.EXE.CONFIG in the same directory as EXCEL.EXE.

I created a class, written in C# and compiled with Visual Studio .NET 2005, with the .NET 2.0 Framework.  This class has a COM Interop wrapper so that it can consumed by ActiveX clients, most notably Excel 2003.  This class was compiled with the "Register for COM interop" setting in the properties turned on.  This arrangement autogenerates the GUIDs and COM interface for you, though I prefer to define my own COM interfaces manually in production code.

Here is a sample class in C#:

// COMClass.cs
using System.Windows.Forms;

namespace AnyCOMLib {
    public class COMClass {
        public void DoSomething() {
            MessageBox.Show("I did something.");
        }
    }
}

When I compiled this C# class, Visual Studio generated the DLL and TLB files I expected.  You can invoke it from a COM client, and it seems to work.  Here is the VB code:

Dim thing As Object
Set thing = CreateObject("AnyCOMLib.COMClass")
thing.DoSomething

I typed out a simple VBScript file with this code, and it worked.  A message box popped up saying "I did something.".

I created a simple VB 6.0 program with this code, and this worked, too.  The same message box displayed.

I created a VBA macro in Excel 2003.  This did not work.  I had a message that read:

Run-time error '-2147024894 (80070002)':
File or assembly name AnyCOMLib, or one of its dependencies, was not found.

So I thought - If I can create a VB6 DLL that can be called from Excel (true) and VB6 code can call my COM-wrapped C# code (also true) then why not create a VB6 DLL that calls my C# code and call that from Excel?  Unfortunately, Excel was not easily fooled by this subversion, and I continued to get the -2147024894 error.  That was a waste of time.

After spinning my wheels for too long, I finally found something helpful.  It turns out that I need a file named Excel.exe.config to be placed in the same directory as Excel.exe (typically at C:\Program Files\Microsoft Office\Office11).  That file has the following format:

<configuration>
    <startup>
        <supportedRuntime version="v2.0.50727"/>
        <supportedRuntime version="v1.1.4322"/>
    </startup>
</configuration>

You have to make sure that you have the correct supportedRuntime elements for the .NET runtime to work.

Here are links to the pages that helped me find out about this:

newsgroup microsoft.public.dotnet.framework.sdk

topic in msnewgroups.net

These were specifically targetted for MS Word, but the same method applies to running .NET assemblies in Excel 2003 as well.

I hope this helps somebody!

posted on Wednesday, February 07, 2007 11:27:09 AM (Central Standard Time, UTC-06:00) by Christopher S. Velazquez