• oheso (unregistered) in reply to ZPedro
    ZPedro:
    ... the problem is an organization that lets such organically grown software become mission critical before it's taken over by actual IT programmers.

    QFT. It takes a lot of user education and willingness by the IT department to take on projects even when they're busy. A lot of these guys approach IT first -- if a user comes to you and says he wants something and it's going to end up being mission critical, the time to act is now.

    Let users develop stuff that makes their life easier. And let them know that when it becomes mission critical (before it becomes mission critical), it's time to hand it over to the pros.

  • oheso (unregistered) in reply to OfficeMadness
    OfficeMadness:
    There is another language that lets you store variables as 1pt font objects in a Word document? Horrifying thought there...

    Any language capable of parsing a Word document as a text file. Just have to figure out how to troll through the document syntax.

    And yes, it would be equally as stupid an exercise.

    For the record, this is one use of Word's Bookmarks.

    There are probably more elegant ways of serving the underlying business requirement here than VBA hacking, such as a non-WYSIWYG front-end for a PDF compiler on the server. On the other hand (as I've hinted above), there are much more elegant ways to attack this issue within the toolset presented which would involve a lot less effort.

    The WTF is allowing non-enterprise code to become enterprise-critical. Just saying "VBA!" and closing your eyes does not address the problem.

  • oheso (unregistered) in reply to BentFranklin
    BentFranklin:
    So how would a world class programmer store data in a Word Document?

    Custom document properties. Autotexts. The methods for manipulating these are well documented.

    I'm just getting warmed up ...

  • Misha (unregistered) in reply to bannedfromcoding
    bannedfromcoding:
    Rodman:
    Didn't the "great" Joel Spolsky invent VBA? Or come up with the idea behind it, anyway? I seem to recall that.

    As I recall (could be wrong) he was on the team to bring VBA to Excel. I think Word may have already had it? Maybe? But he definitely was with the Excel team.

    Didn't Visual Basic for Applications(tm) evolve from WordBasic (which was the macro language in Word95 and probably 6.0)?

    Joel Spolsky:
    My first assignment at my first job was working at Microsoft, where I was told to come up with a new macro language strategy for Excel. Pretty soon, I had the first draft of the "Excel Basic" spec (which later evolved into Visual Basic for Applications, but that's another story).
    From http://www.joelonsoftware.com/articles/TwoStories.html
  • FN (unregistered)

    This calls for a ... --- ...

  • Kirby L. Wallace (unregistered) in reply to frits

    You could have, and people in fact do this very thing with every computer programming language ever made. It's got nothing to do with VB. If you have access to an "IF construct, and if you have some way of putting something on the screen... Bingo. You could have "made the dots" with Java, if you were so inclined, or so inexperienced.

    Man, you should have seen some of the stupid things I did in my first stabs at Java.

  • Wyrd (unregistered)

    Now that is a true, quality wtf. I pity that poor coder.

    Furry cows moo and decompress.

  • Antony (unregistered) in reply to Kirby L. Wallace
    Kirby L. Wallace:
    You could have, and people in fact do this very thing with every computer programming language ever made. It's got nothing to do with VB. If you have access to an "IF construct, and if you have some way of putting something on the screen... Bingo. You could have "made the dots" with Java, if you were so inclined, or so inexperienced.

    Man, you should have seen some of the stupid things I did in my first stabs at Java.

    Figures that the only defender of VB would be a Java programmer.

  • Ouch! (unregistered) in reply to Antony
    Antony:
    Kirby L. Wallace:
    things I did in my first stabs at Java.

    Figures that the only defender of VB would be a Java programmer.

    Not a Java programmer, he tried to stab it. Whether the world would be a better place had he succeeded is another question.

  • anonymousse (unregistered) in reply to usitas

    I hate you.

  • Mahmoud (unregistered)

    i thought i was losing my mind alone in this world of coding, but u have given me hope my friend

    im surprised no body caught this. this made me rofl (literally)

    "Skynet wasn't a rogue military AI, but a mail merge macro trying to recover from a badly formatted postal code."

  • wow that sucks (unregistered) in reply to Ex-Wow

    Move to the center!

  • wow that sucks (unregistered) in reply to Ex-Wow
    Ex-Wow:
    More dots!! more dots!!

    Sorry, couldn't resist :)

    Move to the center!

  • Mike (unregistered) in reply to pete

    One note: during the course of your job, you may be asked to share point accounting communications between yourself and the project manager.

  • FinacialRadDeveloper (unregistered) in reply to Scotty
    Scotty:
    Pfft, VBA's great. I'm saying that as a dev that's had to rescue/convert and on occasion begrudgingly create a few of them. And I have seen my fair share of wtfs. I take them for granted in VBA. What get's me is seeing this stuff echoed in "Architected" systems using big iron tech. As painful as it is - its a fact of life - there's a gap between business and devs that won't be bridged for a long time and for now this is all we've got.

    The tricky thing with VBA is inevitably it becomes epic and uncontrolled. If you can curb that then it does serve as a handy gap filler.

    It's been said here before it's not the tools, it's the Tools using it.

    I am so with you on that. Its just a very easy system for morons to get hold of and start using! It would be like blaming car manufacturers for idiot drivers I guess.

    I still share the pain of those who must maintain and extend the systems that can spring out of this mess though.

    http://financialraddeveloper.wordpress.com/

  • (cs) in reply to ceiswyn
    ceiswyn:
    A:
    Clearly the proper enterprisey solution would have been to make the "dots" use white font color so the user couldn't see them. That's just common sense good UI design.

    I actually did that once.

    Must have been almost ten years back. Whichever version of Word we were using at the time had a bug whereby sometimes it wouldn't let you delete things from the footer. Three of us spent a day wrestling with the problem before deciding to heck with it; even though we couldn't delete anything we could still change the formatting, so every time we came across the problem we just changed the offending text to 1pt, white.

    Some of those docs probably still have invisible random numbers in them to this day...

    I used to do the same when I had a problem with "water marks" or whatever they were called. Still hate Word with a passion.

    On another note. When I worked in a Power company, providing power to about 10 Million people, I found out that the main Dispatch application were VBA macro's running in Excel'95 on Windows NT SP3. They would not run on anything newer and nobody understood the code. We're talking 2006 here. It came up because I asked them why they were still running NT and didn't even upgrade to SP6.

    My point is that even core infrastructure is infested with these VBA macro's.

  • Random Programmer (unregistered) in reply to Z

    This is the most WTF I've seen in a very, very long time. I mean What. The. Fuck!?!?

  • FormalWare (unregistered)

    I see the light! Code IS Data; Data IS Code!

  • Adrian (unregistered) in reply to FormalWare

    I mean, seriously, this must be the mother of all WTFs. You can practically shut the lights, pack your bags and go home, cause this will never, ever be surpassed...

    (I really hope you don't though, because I love the site!)

    CAPTCHA: quis - sounds a lot like kiss, which means pee in swedish :D

  • EngleBart (unregistered) in reply to Kevin

    Reminds me of an attendee in a C programming class.

    Her current programming environment was Lotus Notes VB. Basically, VB plus the classes necessary to manipulate the Notes database items.

    I had written a few of these scripts myself and I could tell I was not getting through to her on some C topics.

    While some other students were working on a lab, I spent about 10 or 15 mintues trying to figure out how to break through.

    I was really saddened when I realized that she had absolutely no concept of a subroutine or function. I was flabbergasted. She would write thousand line programs in one block "and break them up into sections with comments between each section"!

    At least the sample code here had a function (even if it used global variables for input and return)! Of course, in favor of her code, it would have been a lot easier to debug than the mess this person found themself in.

  • EngleBart (unregistered)

    My favorite WordBasic application ever...

    Friend of a friend who prepared bid/quote sheets for jobs.

    Requirements: There are about 30 line items that I might put on a quote. I add new line items about once a month. I have standard language for the rest of the document.

    Current solution: He hand types the same things over and over or tries to copy an existing bid and modify it.

    Solution 1: Have a master template that lists all of the items. Delete the ones you don't want. Result 1: Too hard to delete all of the correct items without accidentally deleting parts of other items or messing up the formatting.

    Final Solution: Use notepad or word to maintain a text document of all of the quote items in the order you want them to appear. Add new items to this list as necessary.

    Use WordBasic (at the time) to read the master text file and generate an impressive, dynamic dialog (took up 80% of the screen!) using a Control Array with one check box for each line item. The user just checks all of the line items he wants in the quote and it generates the base document based on a master template he can easily maintain with word. He types in the customer info and the price. Prints a copy for his records and immediately faxes it to the customer.

    Final Result: Time savings: probably about 6-8 hours a week. This meant about a 20% increase in the number of quotes he could write!

    This is the brilliant code that Paula could not write in Java.

  • Darren (unregistered)

    "I'm a loner Dotty, a rebel"

  • Cherns (unregistered)

    I once had to convert a complex WordPerfect 6.1 merge application to MSWord: the inputs were a big data file for a single case and a user-selected template, and the output was a legal document. There were all sorts of internal calculations, including (for instance) counting the numbers of plaintiffs and defendants so as to put "The Plaintiff A" or "The Plaintiffs A and B" or "The Plaintiffs A, B, C, and D," depending on how many there were. It queried the user for the sex of each person involved and put he/she/they/it and him/her/them/it in all the right places. It queried the user for required phrases, for optional boilerplate, and for free-entry paragraphs. And much more that I can't remember.

    I looked at the templates and initially couldn't figure out just where all this was happening. Turns out that each document had a footnote that contained very elaborate program written in the WP merge language (similar to, but not the same as, the WP macro language, and IMHO just as clumsy), the last statement of which deleted the footnote, leaving only the merged document and no trace of the processing.

    My first job was to adapt and expand a WP-supplied macro program that would go through a WP template and expose all the commands, so I could get a hard copy and try to figure out and document what the template was actually doing. For a very brief moment I considered re-writing all the processing in VBA/WordBasic, and I actually designed and created a nice little merging program that I may try to sell sometime, but we ended up using HotDocs (a commercial product designed just for this sort of thing), with a Delphi driver (for user selection of case and template, for filling the HotDocs variables, etc.)

Leave a comment on “Poke a Dot”

Log In or post as a guest

Replying to comment #:

« Return to Article