I have to get this off my chest before I explode. I’ve been seething about it for many days now, and it’s funny that it follows hot on the heels of this post.
SO…
We have this software vendor. There has been an ongoing drama regarding creating an integration with their software and a specialty printer we have in our lab. The whole thing is actually so damn ridiculous, that it made it to the Daily WTF a long while back. The basic gist is that to integrate the printer with the software, they wanted to charge us like $30K. Horseshit.
So, after looking into it, I decided that I could do the printing part myself, in like an afternoon, because lo and behold, you can print to these printers just like any other printer in Windows. So the deal was, I create the component that handles the printing, and give it to them. In exchange, they would put a button in the software to call the component so that we could do the printing. No biggie.
Now I created the component in C#, and set it up so it would work from VB6 (details here) which is what they develop in. (gag..by the way. nothing against VB6 developers, but if you aren’t good at it, then the problems multiply). I went so far as to create a VB6 app that used the component in exactly the way we wanted it used, and sent it to them.
It took them a month to do what amounts to a copy/paste of about 10 lines of code.
Several months later, after this whole hassle of setting up a test system, I was in New York last week to finally deploy the printer and this solution. At the 11th hour, I wanted to make one last test, and the print button in the software no longer exists. I guess they are looking for the component and showing or not showing the button based on if it’s there or not. Well, it was there. Now I had recompiled the assembly earlier and re-registered it, but that should really be a problem, I wouldn’t think (please tell me if you know differently) because it has the same COM signature, and it was the same exact component, just recompiled. Well, they said that’s what broke it. So they sent me the version they had been developing with (which I already had) and I registered that, and tried again. Button still gone. I told them to figure it out, and I caught a plane home.
Yesterday, when I called to see what was up, the answer I got was “it seems to be a registration problem with the component, and it works fine here” to which I replied “well, it doesn’t work here, and you aren’t our lab, so it doesn’t work” to which they replied, essentially, “well, it works here” and, sensing a non-terminating loop coming up, I hung up in frustration. Now they want the source code of my component to try to fix it which…is ludicrous. The problem is not with the component clearly, because I am using the same one they are. And I’ve been around the block a few times…I know how to register a component. But it works on their machine so I guess it’s fine.
More fun with this…
I throw exceptions from my component when things go awry, like say the printer doesn’t exist or is offline. I explained each exception in my documentation and said that they would need to handle it by simply MsgBox’ing my error message. They didn’t do that. When we called them on it, they said that there was a problem with my component and that they weren’t getting the exceptions. I also return a “1” if the function is successful, and a “0” by default. In my comments to them, I said that if they ever get a “0” return, they should probably call me, because looking at the code, there is absolutely no code path that should ever return a “0”. If there is a problem, the assembly throws an exception and terminates. If there is not a problem, it returns “1”.
So I get the statement “well, we’re getting a 0 back, and you said if we get a 0, we need to call you because it shouldn’t happen”. Coupled with the knowledge they aren’t trapping the error, I came to the conclusion that they were doing, essentially, this:
Dim i As Integer
i = PrintFunction()
MsgBox i
And that the message was “0”. I asked this, and they confirmed that much. So…I had to tell the VB programmers that VB is going to give an unassigned Integer variable a 0 value by default. And that they were not in fact getting a 0 from my function. They confirmed this by assigning i a value other than 0 or 1. Why I had to walk their programmer through this on the phone is beyond me, but it did not give me great confidence.
The second thing was that they were not receiving my exceptions. What was happening, they said, was they try to print and they get a system error message from my component that says “Printer does not exist”. I then proceeded to explain that the message was in fact my error…not some thing where Windows automagically knows what’s wrong with my component…and that they should probably put some On Error GoTo action in the code, and then handle the error accordingly.
Now that this was taken care of, the problem was “when we trap the error, your component doesn’t return control to our application”. Doesn’t return control? WTF? I went around and around in circles with them explaining that there is no “control” scenario taking place. Once you get the exception my code terminates and does nothing. But they insisted that their application wouldn’t do anything after they caught the error. Um…well…you know that “End Function” thingie at the bottom of your VB function? It makes the thing stop doing stuff. So you’re either going to need to “Resume Next” after catching the error, or do some other actions in the error handler to make it do what you want it to do after you have caught the error.
Give me a break. This is my problem with VB. Not that it’s a “toy language” (I don’t think it is, you can do (and I have done(and others have done even more so)) really cool things with VB), or that it’s not powerful (it can be in the right hands). My problem is that any asshole can write something quasi-functional in VB/VBA/Access/VBScript/ASP and think they are a programmer. Programming isn’t about languages, it’s about concepts and knowing how to apply the language to problems that need solving. And this is a clear example of knowing the language and having no clue how to use it. I know a bunch of words in French, but that doesn’t mean I can go to Paris and have a conversation with someone…know what I mean?
Now Playing: What’s on Your Mind – Information Society
Tags:
Ranting