Thu 25 Sep 2008, 08:27 PM
Meaningless Drivel

So I have a new job and I've realized that they suck at just about everything that matters to a technology professional.

  • Change Management
  • Stable Environment
  • Documented Procedures
  • Code Review

This is of course, not unique to my employer. In fact it's quite common in one form or another. My point is that we should build technology organizations like we build solutions.

We want our applications to be logical, well structured, stable, flexible and lastly to grow.

As a developer every time I write something similar to what I've written before, I either use the same code as the last time or I try to find a way to make it better. This is really just self-improvement at the digital level. Challenge everything.

Strangely, as technologists we should be leading the charge for organizational innovation but sadly I think sometimes we're worse than the business units we support.

Mon 19 May 2008, 12:46 PM
Topic: Lotus Domino

I typically find that the abilities of LotusScript almost always leave me wanting more. This is particularly true in the area of error handling.

I think most Domino developers follow a fairly typical path when learning to write error handlers.

  • what errors?
  • on error resume next
  • on error goto ErrorHandler

The ErrorHandler typically comprises some number of the following: logging the type of error (err and / or error), where the error occurred (by line number or function name or both), and exiting. And this code in whatever form it takes, must be present in each module. Or so I assumed.

"When I was a child, I spake as a child, I understood as a child, I thought as a child: but when I became a seasoned programmer, I put away childish things."

For a couple of years now we've had lsi_info() and getthreadinfo() to help us provide some additional clues as to where a given error occurred. getthreadinfo() is pretty straightforward as it's actually documented. lsi_info() is where things really start to get interesting.

For example:

  • lsi_info(2) - module name where the lsi_info() occurs.
  • lsi_info(12) - calling module name where lsi_info() occurs.
  • numerous others...
all of the arguments to lsi_info() are undocumented and according to numerous reports are not entirely thread safe. So buyer beware.

I have continued to use these functions in my usual error handling. a little more sophisticated, but ultimately not much better.

It occurred to me after testing some additional arguments to the lsi_info() function that there might be a wholly different and better way to do this.

The key to all of this is lsi_info(14) which provides a stack trace (v6 and later only). Thats right, boys and girls, a stack trace. No more push() ing and pop() ing module names into an array or list to keep track of a given error. Not only that, but since unhandled errors bubble up to the calling functions errorhandler the code to handle fatal errors (you still have to handle your non-fatal ones locally) can be put in only the top level module of a given piece of code (say Initialize for an agent)

It's not a perfect world. You'll need to format the stack trace before you present it to either your log or user.

Function Foobar()

'Error occurs here!

End Function

Sub Initialize()
On Error goto ErrorHandler
Dim errh as New customErrorHandler

call Foobar()

ErrorHandler:
call errh.ReportFatal() 'Gets handled here.
Resume ExitWithError
ExitWithError:
End Sub()

Thu 8 May 2008, 09:29 AM
Topic: Software Development

So generally I do not care for searchdomino tips. They tend to be a little basic, and the newsletters tend to be a little bloated with vendor speak. Despite that I was reading a recent submission ( a pretty intestesting article) when i get to the line:

On Error Goto oops

Can we not call identifiers what they are?!? This drives me just a little nuts. Im not suggesting that we adopt full hungarian, but if its an errorhandler lets call it that instead of oops.

By the way, If you happen to have seen my name in another recent searchdomino article, please do not allow that to influence your opinion of this post. The fact that they used both my name and my quote has no bearing whatsoever on my opinions.

er.... mostly. :)

Mon 5 May 2008, 01:19 PM
Topic: Lotus Developer

So when I was at the "Meet the Geeks" event I sat down at the IBM... er... Ed Brill and Alan Lepofsky table and apparently someone gave Chris Miller a camera and i got caught talking to Alan. Or maybe he got caught talking to me.

Interestingly enough one of the topics was global privacy and how IBM was dealing with the latest opponent to collaboration. For the organization I work at I think this photo would have to have some kind of release. :-)

Dont you love progress.

Fri 2 May 2008, 07:44 AM
Topic: Lotus Developer

Bob Balaban: Doing really good web apps in Domino is possible, but it sure aint easy. You have to poke and prod.... it's a bitch.

A real live actual quote. I promise.

Fri 2 May 2008, 07:08 AM
Topic: Lotus Developer

Currently sitting in the Web 2.0 session Bob Balaban is presenting. Mostly just using Javascript and XML to make better UIs. My interpretation of that is... writing extra code to make up for what Lotus / IBM will not do with the Domino server.

As luck would have it I was approached by Matt Gervais from SearchDomino this morning to ask me what i thought about the conference.

In the process I asked him about the now infamous "Best practices for migrating LN apps to modern platforms" newsletter. Lots of coverage on it elsewhere. He went on about how the editorial staff is at the mercy of the marketers.

It seemed clear they took a beating over the whole issue. He even mentioned how people are dropping the subscription, the recent "call for experts", and eventually referenced a conference call between them and ed in a damage control context.

Interesting times over there at SearchDomino.

Thu 1 May 2008, 07:46 AM
Topic: Lotus Developer

Caught Bill Buchans session today: Advanced OO in LotusScript.

Interesting notes:

  • .. notation for parent method execution
  • Factory class for dynamic class loading via the execute command. really sexy stuff.