We'll go with option A



  • Be forewarned, this is nothing new or special. It's a typical management WTF, and it happens a thousand times a day. I did not cite any sources for that statistic, I'm just talking about my own company. If I include your company, it may increase this number.

    I was tasked to write some software, as managers tend to do to programmers from time to time. I sent out periodic demo versions of the tool for the manager to play with, sending only the executable each time as all functionality was contained within it, accessing only native Windows APIs.

    Or so I thought.

    At this one government location, they've apparently disabled comdlg32.ocx on their Windows XP machines, which renders my software useless. Below is the following email exchange between my manager and I:

    Manager: "We're getting an error message about comdlg32.ocx being missing. I don't have admin rights on this computer, is that what it's saying?"

    Me: "No. I always assumed the file would be there since it's supposedly part of the default Windows installation. We have two options:

    Option A - I'll make an installation package and include the file you need. You find out how to get someone to install software to your computer. Or...

    Option B - I'll recreate that interface myself in about three hours"

    Manager: "How long will option A take?"

    Me: "Well, it will take me about 60 seconds. The bulk of the work is on you to find out how to get someone to install it, and being on a government site means it could take weeks."

    Manager: "OK we'll go with option A"

    I groaned at this point, knowing he'd have a nifty little setup.exe that was completely useless to him as he did not have privileges to install it. Just another case where management hears "3 hours" vs "1 minute", and of course the shorter time makes more sense.

    The WTFs with this guy continue daily. He told me that there's an error on one screen where he can't edit the fields. It took me awhile to get him to admit that the background color of the fields was gray. This means the fields are currently read-only, as seen in basically every application created in the last couple decades. I asked if he saw an "Edit" button at the bottom of the window. Yes? Well click that.

    I told him this was how the software would work when I sent him the demo version, and I asked if he wanted to remove the read-only functionality. He said no, he liked it this way. And if I had this conversation with him only once, that would be bad enough. Nope...three times now, about three different forms. I call it form consistency, making them all look and act similarly.

    Maybe I'm taking crazy pills.



  • At my job (working on a bunch of internal web applications), our definition of consistency is to have all of the webpages use the same dumb "blue ice" background image....



  • [quote user="Manni"]

    Just another case where management hears "3 hours" vs "1 minute", and of course the shorter time makes more sense.

    [/quote]

     

    Does any developer even keep track of the number of times they have this kind of conversation any more?

    Manager: How do we fix this problem? 

    Me: We have two options: the quick-and-dirty fix that forces the data to make sense, or the right way that fixes the root cause.

    Manager: How long will each one take?

    Me: A couple of hours for the quick-and-dirty, and I'd guess about a week to figure out and fix the root cause...

    Manager: We'll go with Option A.

    Me: But it could mean ending up with bad data...

    Manager: That doesn't matter, as long as it gets the customer off our backs.



  • [quote user="Manni"]Maybe I'm taking crazy pills.[/quote]

    Better to take the crazy pills than to drink the kool-aid. 



  • [quote user="ecklis"]

    ...wrote a conversation I have daily

    [/quote]

    I guess my problem with the situation is that his solution doesn't solve anything. It would be like handing someone an 8mm tape when all they have is a CD drive. The solution exists, but it's completely unusable because of the system setup.

    Basically I spend no time fixing the problem, and the problem is still there. Somehow this counts as corrective action.



  • Option A - I'll make an installation package and include the file you need. You find out how to get someone to install software to your computer. Or...

    Option B - I'll recreate that interface myself in about three hours"

     

    I agree 100% with your boss actually. Recreating the functionality in comdlg32 would be ridiculous. Use the APIs when you have them. If you read from a rational standpoint, he is making the correct decision, and attacking the root cause of the problem. You recreating that functionality introduces more risk of bugs, time (money), and limited functionality. Just because you CAN code something doesn't mean you should. I would definitely be posting a new WTF if I came across your code, where you had recreated comdlg32 instead of using it....

    There is no logical reason to block comdlg32. Work on that issue. That is what managers are for (assuming he actually pursues this).

    Perhaps he knows more than you think. There is often a reason why a manager is a manager and a developer is a developer.

     

     



  • If only it was possible to not even give option A to your manager.  Life would be a little busier, but we wouldn't feel so dirty.  Of course, the real world doesn't work that way, especially in the world of "we need this done yesterday" mentality.  Even if all you gave to your manager was "I need a week to fix this", they would probably still find a way to get that "quick and feeling dirty" fix out of you, putting us all back to option A anyway.

    I think it's fair to say that we've all been in this situation as well.  



  • [quote user="MasterPlanSoftware"]There is often a reason why a manager is a manager and a developer is a developer.[/quote]

    Usually it's a matter of better hair. 



  • When writing to management, I've had very good results just by applying the correct formatting. E.g. "3 hours" vs. "could take weeks". A manager's brain is simpler than us geeks can ever hope to understand.



  • [quote user="MasterPlanSoftware"]

    Recreating the functionality in comdlg32 would be ridiculous. Use the APIs when you have them.

    [/quote]

    The problem is I don't have the APIs on the destination systems. That's my whole point. And the likelihood that they'll magically be enabled on the dozen computers my boss needs at a government location in the next few days is highly unlikely, I'd go so far as to say impossible.

    Yes recreating the interface may introduce bugs, but it's by no means complex. At this time it's either allow me to rewrite that feature, or don't use the tool at all (it won't even load if one of the referenced APIs is missing).



  • And my point is that your boss is considering the option of having you reuse good, working code, or making your own.

    He is making the right decision as long as he follows through and gets the api installed.

    I fail to see how these computers missing comdlg32 could be running much considering the functionality it provides anyway.

    Like I said. This may be a minor wtf, but the bigger wtf is the suggestion of recreating functionality which already exists in an api.

    Everytime someone creates a custom open/close/save dialog box or something similar on a windows box I shudder.



  • Question: could you not just put comdlg32.ocx in the same directory as the executable?



  • Last time I checked you need to run regserver to actually install an ocx. I assume the poster means his company gives no access to run regserver...

    But this SHOULD be a simple fix.

    A developer cannot be responsible for a company's (agency) security policy not allowing standard parts of an API to run. Sounds like the perfect job for the manager to run interference between IT and a developer.

     



  • [quote user="MasterPlanSoftware"]I fail to see how these computers missing comdlg32 could be running much considering the functionality it provides anyway.[/quote]

    comdlg32.ocx != comdlg32.dll

    I believe comdlg32.ocx is just a COM wrapper around the functions in comdlg32.dll. comdlg32.dll will be there so you could use the winapi functions directly if possible instead of cloning the dialogs.


  • [quote user="stinch"]

    [quote user="MasterPlanSoftware"]I fail to see how these computers missing comdlg32 could be running much considering the functionality it provides anyway.[/quote]

    comdlg32.ocx != comdlg32.dll

    I believe comdlg32.ocx is just a COM wrapper around the functions in comdlg32.dll. comdlg32.dll will be there so you could use the winapi functions directly if possible instead of cloning the dialogs.[/quote]

    Yes, that's the case. Even if you have to work with VB6 or C++/COM, for whatever reason, it isn't that hard to import the plain dll into your project and recreate the OCX's interfaces yourself. 10 minutes to an hour, depending on how many it has and you have to use; just tell him there's an issue with the hack and took longer than expected (but still took less than the other option, to make him feel good).

    WTF clients aren't always so easy to get around, sadly.



  • AFAIK, the OCX will be temporariy registered automatically if it's included in the same directory as the executable (and isn't registered elsewhere on the system already), although I don't know if this works without admin privileges.



  • [quote user="stinch"]
    comdlg32.ocx != comdlg32.dllI believe comdlg32.ocx is just a COM wrapper around the functions in comdlg32.dll. comdlg32.dll will be there so you could use the winapi functions directly if possible instead of cloning the dialogs.[/quote]

    You're absolutely right here. The Comdlg32.dll functions are GetOpenFileNameA (or W) and GetSaveFileNameA (or W). Even from VB it should be pretty easy to import them.

    Ken 


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.