Google suggests

Google suggests looks to me to what we really need in our application. in this particular application the user has to select a street from the database without resorting to dropdowns and the like. At the moment this is a accomplished by the user specifying the start of the street name, clicks a button (or presses enter) and a asynchronenous XML query is run the background. This works perfectly but having something like Google suggests would surely help users.

The main issue with the way it currently works is that users need to know the exact spelling of the street (or at least parts of the exact spelling) to find anything. Using something like Google suggests has users could have some help finding the street without needing to know the spelling.

This guy dissected the code and made it more readable.

Thinking about LotusScript

Lately I have been help thinking about the LotusScript language and why it hasn’t matured more over the years. I have two primary grievances:

  • The lack of OO support in the IDE.
  • The lack of helper classes in the API.

The lack of OO support in the IDE

Come on Lotus – when will this happen. How come it is practically easier to develop LotusScript classes in Visual Studio than in Domino Designer. Please step up and add class recognizion to the LotusScript IDE. It is practially imposible to handle classes in Script Libraries and in Agents.

What would be really help would be a simple tree structure showing the class hierarchy in the left hand side – it anything else fails let us have the same UI as in the Java IDE… 🙂

I think it is a real show stopper for the adaption of OO design and programming since programmers new to OOP loose track of the code and the structure. The overview is much better when you use the traditional procedural approach.

The lack of helper classes in the API

I know additional classes has been added in version 6 but how come no collection api or more general string operation classes has been added.

There is a major need for a standardized collection API to help the adoption of OOP. Just see what the Collection API did for Java 2.

AMgr memory consumption part 2

After talking to Lotus Support and monitoring the server more closely it appears not to be the AMgr alone having the problem. The problem appears to be more general. Yesterday afternoon the CA task was at 200 MB memory! An important task but not one one of the busiest I must say…

Number of Lotus Notes seats

Hi Mikkel --

Both vendors have generally gotten away from making
seat counts the focus.  I think Microsoft is claiming
130 million, and IBM claims about 113 million.  The
problem with seat counts is that they are completely
artificial... unaudited numbers.

In terms of numbers to bet on, you could do well with
the Gartner market share numbers.  They report IBM as
having 46% share, Microsoft at 44.2%.  These
percentages are based on revenue, not seats.
Those numbers are reported publicly at

Hope this helps.


Using Velocity in an agent

At work I am using Velocity in a number of web applications and was looking into using it for a newsletter application we have. This would allow authors to write more dynamic newsletters, and insert user-specific information in the subject and body of the newsletter.

I already had an implementation in Java that would replace macros using String operations. While the current solution works flawlessly but I was looking for support for if’s statements etc. which Velocity has.

I turned out that replacing my own implementation was a matter of replacing the Decorator implementation I was using with a new one using Velocity:

import org.apache.velocity.VelocityContext;
import dk.itinspiration.newsletter.*;

public class VelocityMacroDecorator extends Decorator {

  public void decorate(Message msg) {
    try {
      // get the intended recipient
      Person p = msg.getRecipient();

      // get newsletter contents
      String content = msg.getContent();

      // initialize Velocity

      // create and populate context
      VelocityContext ctx = new VelocityContext();
      ctx.put("email", p.getEmail());
      ctx.put("firstname", p.getFirstname());
      ctx.put("lastname", p.getLastname());
      ctx.put("password", p.getPassword());

      // create a string writer for the result
      StringWriter sw = new StringWriter();

      // replace macros
      Velocity.evaluate(ctx, sw, null, content);

      // set email contents
    } catch (Exception e) {

This’s it! Surely very simple. Now it is just a matter of populating the VelocityContext with more information from the Person object (the newsletter subscriber) and about the newsletter in general (number of subscribers etc.).

The only caveat is that you must allow the agent to run with restricted operations due to Velocity requesting information about the system (dangerous stuff such as line separator and the like).

A sample newsletter could now be something like the following:

Hello $firstname $lastname
You are subscribed using '$email'
#if ($password != "")
  and your password is '$password'.

AMgr memory consumption

We recently installed a new Domino 6.5.2 server at a customer site. The server was herafter downgraded to 6.5.1 and a Sametime 6.5.1 server installed on top since the customer wanted to run Sametime as well. This was all very good and was pretty straight forward – no worries there.

The server should support 8 concurrent users and one would think that the HP monster server with 2GHz CPU and 1GB memory running Windows 2003 Server their IT guy got should be able to support this no problem but alas…

After a couple of days we began having complaints as to the speed of the server so we went to take a look. When looking at the task manager the AMgr, Sametime and HTTP tasks were all consuming 250-350 MB of memory and the total memory consuption was 1,1 GB. The server has swapping from the start. Once restarted the tasks would start and start consuming memory from the get go. The AMgr has 2 or 3 scheduled agents and one “After mail arrives” agent scheduled so it couldn’t be the actual load.

I created a support ticket with Lotus Support yesterday night and at 10 o’today I had my local support techie on the phone. Excellent response time! He started out with a couple of questions regarding the agent manager but also quickly concluded that it wasn’t that. He sent me a list of things he would like me to do:

  • Enable console logging (start colsolelog)
  • Enable thread id debugging (set config debug_threadid=1)
  • Restart the server
  • Do a memory “dump” every 5 minutes until the server reaches peak memory load (load nserver -mem)
  • Do a NSD dump.
  • Obtain a copy of the notes.ini and names.nsf
  • Dump it all in a zip-file and upload it to the support FTP server so it can be sent of the Dublin (location of the more hardcore guys).

I will have to do all this tomorrow morning so I get to go to the office a little early. There is a catch though – how to issue a command in the server console every 5 minutes without actually sitting there with a watch timing the damn thing ?

I’m going to use the Domino Console (the java client that connects to a management layer beneat the Domino Server) – yes finally found a way to use it. The Domino Console has a functionality where it can issue periodic server console commands. Took a look at it and it will suit my needs just fine.

Well I’m of to bed – I have an early start tomorrow.

Blogging break

Been having a little of a blogging break before I even got started. The disk in my new MythTV box crashed so I had to wait for a new disk and load it up. I salvaged the blog though.

HTML closing in iNotes

It appears that one can use an HTML closing in iNotes if you enclose the signature in square brackets ([]). It doesn’t solve the problem of using a company logo or similar without linking to it (as opposed to embedding it in the e-mail).


[<font color="#727785" size="-2" face="Verdana, Arial, sans-serif">
Med venlig hilsen,
<b>Mikkel Heisterberg</b><br>
it-inspiration aps - farvergade 2 - 1463 copenhagen k - denmark - <br>
phone: +45 7022 3141 - fax: +45 3316 0290 - mobile: +45 2682 5673 - email: <withheld><br>

Update on 1 December 2004 @ 23:03

Hmmm…. It appears that changing the signature in iNotes also changes the signature in Notes (which doesn’t really make sense to me). So if you do the above (html signature in square brackets) you will mess up your Notes signature.