This is the technical home of Chris Anderson, also known as TechGnome. I have been developing for roughly 30 years in one form or another, mostly using one version of Visual Basic or another. Since the main goal of the site is to share knowledge, every attempt will be made to ensure the widest target audience as possible. That means I'll be using Visual Studio 2008 and .NET Framework 2.0 unless otherwise noted. While I will generally test my code before posting it, I am human, things happen, and sometimes something will get borked in the posting. It happens. Don't freak. Use those debugging skills you have, or drop me a line.


September 22, 2011 1 comment

So I have had the chance to play with Google+ for a day now. So far I am liking what I see. Especially the G+ app on the DROID. That’s where it really seems to come together. I think I just might become more active on G+ than I am on FB.

Categories: General, Technology

Dangerous SEO

May 31, 2011 1 comment

I’ll be the first to admit, Search Engine Optimization, or SEO, is something that I don’t necessarily understand completely. I’m willing to bet most people don’t understand it either. Oh to be sure, we think we get it – it’s all about getting those coveted top spots in Google, Bing, Yahoo!, {insert your favorite search engine here}. So how does one get one of those spots? There are a number of ways, but as this article from ComputerWorld shows, there’s a proper way to go about it, and there is the shortcut methods. It’s those shortcuts that may ultimately get you into trouble. Not with the law, but rather with the Search Engines, which can get you pushed back down, or even possibly ignored all together.

OK, so if I don’t understand SEO but I want to increase my rankings, I should just hire one of those SEO consulting companies right? Not so fast. As JC Penny’s found out, you need to make sure you know who you are doing business with and how they are doing their business or you may get hit with the penalty. For what ever reason, JCP seems to have managed with barely a slap on the wrist. But they are a giant (of sorts), they have a multi-media advertising campaign. They have TV ads, print ads, and more. I seriously doubt they were affected much. Usually when I want something from JCP, I straight to their site. I don’t usually stumble upon it while doing a search. And when I say “I want something from JPC” … I mean “when my wife wants something from JCP…”

But the danger of lost business is very real for a smaller organization, the smaller retailers who rely on online sales to get by each month. For them the darker side of SEO is very much a temptation. It’s these companies for which any loss of ranking could mean the difference between staying open or having to close down the store front.

It’s up to us as designers, developers and IT professionals to make sure that we educate our clients on the importance of proper SEO, and to avoid the dark side of temptation of taking the easy way out. I’ll admit, SEO is still something of a mystery to me, and in the past I wouldn’t have given much thought to it. But at least now I’m a little more educated in the white, gray, and black sides of it, and should I care about SEO in the future, I’ll know enough to hopefully ask the right questions of the right people.

Categories: Technology

I’m not dead (yet)

May 31, 2011 Leave a comment

Things have been quiet here lately. I’ve been busy with the work thing, plus finishing up a move crossing nearly half of the country. Things still aren’t completed yet (the container with our stuff will be delivered later this week), but I’m planning on getting back into the habit of posting something on here at least once a week.

Categories: Personal

How to NOT Run a Contest

April 18, 2011 2 comments

Microsoft has announced anew contest called “Ready for Work”. I happened to come across this while reading a recent article on ComputerWorld about Microsoft broadening Office 365 Beta. The article stated that: “Five winners will receive a $50,000 marketing package, Office 365 and a day’s work from a Microsoft executive.” Intrigued, I decided to click the link provided. And that’s where things go wrong.

Let me just say I don’t blame ComputerWorld for the subterfuge, I think in this case, they were simply passing along the PR feed that came from Microsoft. Not a biggie. But with what Microsoft did is what I’d consider inexcusable and a horrible way to attract attention to the contest. Firstly, the url that was given is a seemingly innocuous one: Seems reasonable. Only it is a redirect to a FaceBook page.

OK, so MS is attempting to use social media for the contest. But when you look at the page you can see… or rather not see… there’s no details about the contest. All you get is that there is a contest, and if you want to continue you have to click “Like.” What?

So, to find out more about this contest that I may or may not participate in, I have to first “like” it. I’m sorry, but that’s not the way to run a contest. I think it is a perfectly good and valid way to PROMOTE it, but leave the details public, let me see what the contest is all about. THEN if I decide I want to participate I will. If I then also want to share it with my other friends, most of whom are not in the IT business, then I will “like” the page and promote it. But liking a FaceBook page should not be a requisite to being able to read the details of a contest.

And then I clicked the “Back” button on my browser. Which went back to the redirect, sending me right back to FaceBook. Yet one more strike. Click, click, click. Nothing. To get out, I had to dropdown the history list, select the ComputerWorld item.

Microsoft, I am not sure whose idea this was but I think they need to be flogged. I shouldn’t be required to like a FaceBook page just to get details of a contest, and when I click that Back button, LET ME OUT! Don’t trap me. Clearly, the redirects and the FB pages did not go through RC or CTP or any kind of Beta review. Next time, consider at least SOME kind of focus group review. Either way, this is an example of how to not run a contest.

Categories: General, Technology

Be careful of what you ask for… sometimes you might get it

April 6, 2011 Leave a comment

This is an example of why sometimes you should be careful of what you ask for when it comes to developers. You will get exactly what you asked for.

While working through a query that had been built by a third-party organization (whose name is being withheld to prevent snickering and embarrassment) when I noticed that some of the columns in the query were returning NULL. Ok, this happens, not a big deal. It just means the data for that piece of data is missing. Not unheard of and fully expected in this case. Usually to combat this, you use the ISNULL function to return a default value if the column contains NULL. So I made the appropriate changes and re-run the query.

What in the world? The NULLS continued to show. Needless to say, it required some investigation. The “problem” was buried in a custom SQL function that was designed to take a string, break it down on a delimiter, then return the specified element. There is was, in a case statement…. the else clause… where it returned ‘NULL’ … the literal. The literal text value ‘NULL’ … and not the NULL value as expected. I’m sure someone told them that if the element isn’t found, to return NULL. So that’s exactly what they did. It’s probably a good thing we didn’t ask them to return a blank value. We’d have gotten ‘A BLANK VALUE’.

Categories: Humor, Technology

“Little Bobby Tables”… (or why SQL injection is serious)

April 6, 2011 4 comments

I’d seen this xkcd strip before, but someone here in the office brought it up again during a discussion of the discovery that some one was building SQL statements by using data right out of a grid. xkcd: Exploits of a Mom. Don’t let the title scare you, it’s safe, even for work, unless audible laughter isn’t allowed. In short it shows what can happen when you don’t properly sanitize your data before just stringing it along into a SQL Statement. In addition, it shows the importance of using parameters for input values when ever possible.

Oh, and it is possible to use parameters with dynamic SQL, in a future post I’ll show how that’s possible.

Categories: Humor, Technology

Firefox 4.0 – FAIL

March 24, 2011 Leave a comment

The new Firefox 4.0 rolled out recently. First impressions was that it looked eerily similar. In fact, out of the box, it looked just like my Opera installation. It has the application menu button in the top left, tabs go across from there, with the navigation buttons and address bar contained within the tab.

It was quick, loading most sites that I visit almost as quickly as my Kindle can turn pages. The use of graphics acceleration, even on XP (see Microsoft? It can be done if you really wanted to). I used FF4.0 for roughly 30 minutes.

And then I un-installed Firefox. Three words I thought I’d never utter: I un-installed Firefox.

So what happened? Put simply, Firefox was ignoring settings I had painstakingly  (not really, but I tinkered with the config to get the original effect) set. I use Firefox not only as a browsing tool, but a communication tool. That means not only do I have multiple tabs open, but I often have various windows open. And that’s where Firefox 4.0 failed me.

Often I open these other windows, then close the main one. Later I might come back and open a new window for something. When I open a new instance of Firefox, I expect to get a new window, with the homepage loaded up. That’s what the settings are set to, and I even had gone into the config area to make sure that when it recovers from a crash it doesn’t try to open the same sites I had open at the time of the crash (I had a site that caused a loop because it crashed the browser, and when it re-opened, it would open the faulty site, causing it to crash… well, you can figure out how that went).

To my dismay, I found out that as long as I had those other windows open, when I opened a new browser window, it would RELOAD EVERYTHING I HAD from the previous session. That means if I had 10 tabs open when I closed Firefox… it would re-open ALL 10 of those tabs/sites. Once I discovered this, and rechecking the settings and configuration, and unable to find a reason for this behavior, I decided that this was unacceptable to me and promptly gave Firefox 4.0 my stamp of “FAIL” and un-installed it.

Mind you, this is my experience with it.  It just so happens that it doesn’t fit my needs. Other than it trying to restore my pages when I re-open it, I thought it was quite good. The other down side is that, at least on the surface, it looks just like all the other browsers (except IE) out there. Most of the advances are under the hood with the graphics acceleration, and the support for HTML5 (what the heck is a Bieber?)

It’s good, it’s quick – even on the machine I was using it on, which isn’t exactly top of the line or known to be a speed demon. Again, it just no longer fit my needs. And so Firefox and I parted ways. Unfortunately, IE is now what I use. As unreliable as it can be, it’s predictably unreliable.

Categories: Technology

Apple’s iPhone Daylight Savings Time bug – redux

March 14, 2011 Leave a comment

This isn’t the first occurrence of the DST bug in the ever popular iPhone.

The same glitch in the iPhone’s clock that made loads of Europeans late to work last November has struck back with a vengeance. Instead of springing forward or standing still, many Verizon iPhone owners found that on Sunday their phones had fallen back, making them not only irritable and confused, but two hours off schedule.

(source: ComputerWorld)

A couple of things surprise me about this.

  1. This happened before.
  2. Where’s the outcry?

As noted in the CW article, this happened last year in Europe. And if I recall, it happened in the US once before as well, when the DST was expanded. Is determining if the phone should be on DST or not really that hard? I’ve done the calculations before, I don’t recall them being anything tricky, IF such and such date is the start of DST, and the hour is 2am, Then Add One Hour. OK, so not all states support DST. OK, Windows allows for this. It’s the “Adjust for DST” setting in the Date Time configuration. If you’re in Arizona, you know to turn that off. Apple? Are you listening? Want to make it even easier? If GPS is turned on, and I am in Arizona, leave my clock alone. Otherwise adjust it.

The first I heard about it, was on the local news this morning. And in passing. It wasn’t until about 20 minutes ago that I found the first article on it on CW. And again, it was a mention. Had it been a Win7 phone that had done this, Microsoft would have been crucified. I can just imagine Steve Job’s response “Just don’t calender it that way.” Or some other comment that seems out of touch.

Oh, and for the “solution”… turn the phone off then back on. Seems Apple DOES steal ideas from Microsoft after all.

I’s also like to note, my Droid had no problems what so ever. Neither did my win7 laptop.

Categories: Technology

Google’s PeopleFinder service for earthquake

March 11, 2011 Leave a comment

In response to this morning’s earthquake in Japan, Google has launched a PeopleFinder service to help family and friends find each other.

Link to article:

Direct Link to service:

They are currently tracking roughly 7,200 people…

I know I gave up social media for Lent, but I think in this case, it’s important. I’m posting this through my blog which goes out automatically to FaceBook and Twitter…

Categories: General, Personal

VB6 Binary Compatibility

March 10, 2011 1 comment

This is another reprint of an article I originally wrote on VBForums. In it I show how to set Binary Compatibility on your VB6 component libraries (this works for OCXes as well as DLLs of the ActiveX variety).


Read more…

Categories: Technology, VB6