The right tools for the right job...

Over the weekend, I invested in a set of workshop tools - a decent torque wrench, and a few allen key bits. A mate lent me front and rear Paddock stands, and David Clark was kind enough to help me lift my motorbike onto the front one. With the right tools, I was able to remove my motorcycle front wheel, remove the brake calipers, and finally swap over my warped front brake discs. Whilst not a mechanic in any shape nor form, just having the right tools (and a decent Haynes workshop manual) meant that this desk warror was able to do quite a bit of complex surgery. Compare this to last weekend, when I tried to hammer out 10mm allen bolts from the brake caliper mounting assembly, and almost took my eye out.


So why is this relevant to Lotus Notes ? During the ensuring oily, bloody mess, I contemplated both the pain from my knees (a few hours kneeling on concrete does that to you) as well as the day job.


Almost every job I get pulled into with IBM for instance, seems to be a firefighting job, where I'm expected to assimilate 10-15k lines of Lotusscript, and by some miracle, get the stringly morass of bad design working in record time. What tools would help ?


  • Firstly, there's the TeamStudio script browser. Excellent piece of kit, for finding that odd declaration somewhere in the 10 or so script libraries that you've been given. Its free. Go download it now. And ping Craig Schumann (and the new Teamstudio VP, Rocky ) a nice eMail telling them what a great job they're doing.

  • Secondly, I'd love to see a code-quality checker. I wrote one whilst at Trust Factory for a migration job for a very large Dutch insurance company, but since it was written in Lotusscript (which doesnt handle recursion well, only having a 172-call deep stack), its not the best. Over in Visual Studio land, you can turn on the insane error checking, which quickly flushes out some really bizarre hard-to-find bugs. Or even simpler stuff, such as using a variable without actually setting a value in some sub-branch. What of course I'd love to see is something like the LINT project. This was (and probably still is) a C-Source code analyser. Not very tailorable, but the first weapon of choice. What would I like to see in a LotusScript quality checker?

    • Does every routine implement error handing?

    • Do the function return values match what your passing back ? Are they always set ?

    • Variables that have been declared but are never used. (I personally hate code that has 50 lines of declares at the top of every function, regardless of variable usage. I especially hate functions that dont declare variables as close to usage as possible..

    • Long code sequences. Anything over a few hundred lines deserves a good slapping.

    • Deeply nested loop/decision statements. Anything that requires me to scroll right means that there's no defensive coding, and there's likely to be an end-condition buried deep in the spaghetti that is causing my issue..


    And so on.

  • I'd love to see something that enforced the programmer to use soft-coded database/view references instead of hardcoding. 17% of the 36,000 or so application's I've audited from 2000 contain some form of hard coded reference, that bites you in the ass when you migrate/consolidate domains.

  • Refactoring. I'd love to see something that could take in a 1000 line function, and quickly+easily allow me to refactor it into somehing approaching sanity.

  • I'd love to see something that could take in LotusScript and spit out Java. It doesnt have to be 100%. Why would I want to do this ? Well, Java doesnt suffer from the load-time gradient that Lotusscript does. Have 15 or more script libraries being referenced in a nested manner, and you'll see the load/fixup time grow exponentially. And moving it to Java then gives me a fighting chance of making it onto another platform - such as Websphere/Portal..

  • I'd love to be able to scan a database, and construct a 'style sheet' - a standard CSS stye sheet. I'd then amend that style sheet, and the database itself - forms, views, subforms, dialog boxes - all would follow that style sheet. Finally, a way of updating the notes application look+feel without having to touch every single element.
  • I'd love to see something that analyses databases in bulk, and is capable of reconnecting orphan design elements back to templates, and to easily show differences (especially in script!) between different versions of the same script library. So all of a sudden, us developers can get back in control over our design elements in our environments again.

So why put this wishlist of tools here ? Now here's the interesting part. Few people (and Teamstudio are one of the exceptions) can actually write tools that extend the Lotus Designer client. Its seriously out of date, and we're all waiting in eager anticipation for Maureen Leelands' team to get the new Eclipse-based designer out the door. Its been a long time coming...


Why does eclipse make a difference? Because its possible for us to write a tool in eclipse that helps the programmer. Code completion, language features, on-line help lookup, syntax checking, the whole shebang.


So Maureen, if your reading this - no pressure. We're all waiting and hoping that what comes out will deliver. And more importantly, allow us to extend our development environments... In the meantime, do your bit. Get your environments up to Notes/Domino 801 (perhaps later this week) and start using some of this funky new stuff.