Rules of engagement

There are two rules I always respect and usually follow:

  1. If a code compiles and seems to work in first try, there is something terribly wrong with it.
  2. Never, ever, under no circumstances, move anything in production on Friday.

I urge you not to break one of these rules, no matter how confident you feel and under no circumstances.

Let me tell you a little story. I have developed a new feature for our renewed web site. This was over two weeks ago and on test system, it was working like a charm. Everyone liked it and there was no bugs found. So, I moved my code to production system. All fine and well, as without content and proper linkage, this feature would not be visible to web users until we decided to allow it. As I said, the thing missing was a content. That wasn’t my job and I paid no heed to it. So on Friday, a co-worker assigned for content gave me a green light. Now, I was feeling overconfident and despite warnings in my head and by my fellow developers, I decided to go with it.

Big mistake. I spent next 4 hours (and some overtime as well), working feverishly to remove bugs that were result of the content. It is not that content was wrong, but rather that it was not tested enough. And for a cherry on a cake, I received a call from project manager on my way home. Apparently he wasn’t aware we are going live. Well not on Friday anyway.

Lesson learned. Never, ever, under no circumstances, move anything in production on Friday. Moving on.

Custom user sidebars in web applications

When I was assigned to rebuild company’s web site for the second time in 7 or 8 years, I have decided that it is probably the time to implement some modularity to the database. First in line were sidebars. Why? Well, despite “awesome” notes rich text to HTML rendering, web content was always contained in rich text field on a document, making it very customizable. On the other hand, sidebars were always subforms that were then connected to the document via a field (user specified subforms name). This was customizable, but regular content editors did not have designer access to the database. Thus, all modifications were relayed to us, developers. And there were quite a bit of modifications. I will pitch you my idea of solution to this problem.

[Read the rest of this entry…]

Calling Java classes from LotusScript

Have you ever wondered how you could call already written and quite useful Java classes in your LotusScript code? To me, this moment was, when I was trying to implement other department’s code into my own. Unfortunately I wasn’t skilled enough in ways of object development, LS2J  and googling back then to actually figure out that was possible. I remember thinking: “IBM implemented Java in Lotus Notes, they must have done some adaptor for it.”, but was unable to figure it out. Until couple of years back, when I got a Holy shit! moment, finding this blog post.

[Read the rest of this entry…]

Design patterns – Part 7: Template method pattern

In this article, I would like to present you a design pattern that is not so common, but for sure, I wish, that in the past I would have used it. It would certainly make my life much easier. So, what is this Template method pattern all about?

The Template Method Pattern defines the skeleton of a an algorithm in one method. Some steps are deferred to subclasses, which are allowed to alter certain algorithm steps without changing the skeleton of an algorithm.

[Read the rest of this entry…]

Design patterns – Part 6: Observer pattern

One of the most used patterns is also a pattern that hears by the name Observer. What does it do? Well, imagine you have a stock portfolio and you need to notify your investors every time the value of their stock changes. First, your investors need to subscribe to the stock they would like to be notified about. Next, whenever new stock value is published, subscribers are notified. Much like RSS subscription. But what about definition:

The Observer pattern defines a one-to-many dependency between objects so that when one object changes state, all of its dependants are notified and updated automatically.

[Read the rest of this entry…]

Securing names.nsf content from the web

Database names.nsf on public servers usually contains all details about users, groups, server configurations. With R8 this content is now seen on the web by default. There are plenty of possibilities how to secure the data. The easiest one though is to check Don’t allow URL open on application properties. 

As always there is a catch. As ?Login web command still works on names.nsf, ?Logout doesn’t. However ?Logout works on any other database that allows URL open.

Problems with names.nsf refresh

At work, we experienced an interesting problem. We use public servers names.nsf to register new web users. However, a couple of months back, that suddenly stopped working. A person document was created, user was added to all required groups, but upon login, a user would obtain an error that he is not authorized to perform that operation. The only thing that did the trick was to restart domino server.

[Read the rest of this entry…]

Version control and bug tracking

In my years of developing software, I come to realize that what every software development department needs is:

  • some sort of IDE with a compiler
  • version control
  • and bug tracking.

Usually you get stuck with IDE with a compiler. Everything else is up to you. But how are things in Lotus Notes?
[Read the rest of this entry…]

Got sick :(…

… so there will be no post this week. Sorry.

Design patterns – Part 5: Adapter pattern

Another quite useful pattern is Adapter pattern. Adapters represent an interface between two different classes. For example imagine being a continental EU citizen travelling to UK. For you to plug in to UK power plug, you need an adapter that will take the interface your connector has and output the interface UK power plug demands. [Read the rest of this entry…]