Usability - Productivity - Business - The web - Singapore & Twins

By Date: June 2007

Lists in @Formula, especially @Member and @IsNotMember

Theo Heselmans has a nice post about how to figure out if a user has a specific role without using @IsMember or @IsNotMember. He doesn't like @IsMember and @IsNotMember. While that is a question of taste (or speed?) it is a good idea to fully understand how the various comparisions work. = or *= work differnt with lists than @is(Not)Member. One of the hallmarks of @Formula is the ability to deal with lists (multiple elements, similar to arrays) in the various formulas. In a lot of the @Functions you can use lists ("red":"blue":"green") to compute your results. If a Notes item (a field) contains multiple values they are treated as lists in formulas. The following table shows the effect of the various comparison results. I limit myself to matches, you can play with "greater" and "less" comparisons.
Let us asume we have these lists:

list1 := "red":"yellow":"green"
list2 := "yellow":"red"
list3 := "black":"blue"
list4 := "red":"white"
list5 := "yellow"

Comparison Effect Matches for @true Examples Result
= Compares every single value with the same position in the other list. If one list has less elements than the other list, then the shorter list is padded with the last value. In a list of one, that one element is compared with all others. If there is ONE match true is returned. one match, same position list1 = list2
list2 = list5
list5 = list1
*= Compares every member of the first with every member of the second list. If there is a single match true is returned. In difference to = the position doesn't play a role and there is no padding (needed) one match, any position list1 *= list2
list2*= list5
! [Expression] Turns the expression into the opposite. Very clean. Should be always in front. For readability you might want to use brackets depends on expression !list1 = list2
!(list1 = list2)
!(list2 *= list5)
!= not equal operator. Compares element by element, padds a shorter list with the last element (same as =). Returns true if one match pair is different. In other words: only returns false if both list have the same members in the same sequence. one mismatch, any position list1 != list2 @true
*!= Compared every element from both lists and returns true if it finds one difference. It only will return false if both lists only contain one value (which can be there multiple times, that wouldn't matter) if one list has 2 different values "red":"red" *!= "red":"red":"red"
list1*!= list2
@IsMember Checks that all members of the first list are available in the second list. The sequence doesn't matter. If there is one element in the first list, that is not in the second list it returns false. all, any position @isMember(list2;list1)
!@IsMember reversal of @isMember. If there is just one element in the first list that is not in the second list it returns true. one mismatch, any position !@isMember(list2;list1)
@isNotMember Checks that none of the elements in the first list is in the second list. If just one element is there, but not others it already returns false. So you can't replace !@IsMember with @IsNotMember for lists arguments. all mismatches, any position @isNotMember(list2;list1)
!@isNotMember Double negation to make your head spin <g>. Needs only a single match to return true. Equivalent to *= one match, any position @isNotMember(list2;list1)

Does your head spin now?

Posted by on 30 June 2007 | Comments (4) | categories: Show-N-Tell Thursday

Good by W2K server!

Domino R8 runs on a lot of platforms, 32 and 64Bit alike. Windows 2000 server is not on the list. W2K server was a very popular choice for Domino boxes and a lot of system administrators were quite reluctant to upgrade to W2K3. Since mainstream support ended in 2005 IBM won't officially support a legacy platform for a new product release (It would be interesting to see if it would run). So all W2K based Domino boxes need a new home when upgrading. While W2K3 seems to be the "natural" choice, you will add the Active Directory dependency (and after all AD is "just" a fancy front-end for an Jet database - rather fragile).
Will we see a big uptick in Linux based Domino server deployments? At least the box running W2K could run Linux, giving it a new lease of life.
What are your plans?

Posted by on 27 June 2007 | Comments (1) | categories: IBM Notes Lotus Notes

Jumpstart your Portal

Portals are great tools to get information into context. The big challenge you face with them is: they are tools. While in the past that was perfectly OK (Portals have been taken care of by the craftsmen who did appreciate their tool nature), it isn't enough anymore. As a consequence IBM offers Portal now with pre-configured content. In Websphere Portal Express you get ready baked Intra- and Extranet templates. For the rest of the Portal family (Enable and Extend) there is the JumpStart Site for Websphere Portal to give you a head start.

Posted by on 27 June 2007 | Comments (1) | categories: IBM - Lotus

Hacking the Lotus Notes 8 UI

When you are bored with your normal splash screen One of the new exiting features of the Eclipse RCP based Notes 8 client are themes. Themes allow you to change many visual aspects of the Notes client UI. While serious developers will take the time and effort to closely work with the corporate design department to define a unified user experience in all corporate colors and fonts, the hackers among us will be in for a quickfix. Here you go:
  1. Locate the directory com.ibm.notes.branding ... inside <Notes Program Dir>\framework\shared\eclipse\plugins\
  2. Create a backup of it, in case you screw it
  3. Edit splash.bmp, add a lotus flower
  4. edit themes/notes.css, look for mailtable>row>unread and change the color from Black to Red (yes it is back)
  5. Do other wierd things to your hearts desire
Your mileage might vary!

Posted by on 25 June 2007 | Comments (2) | categories: Show-N-Tell Thursday

Tony Buzan Power Learning Camp in Singapore

I'm pleading guilty of a mild infection with Singapore's education enrichment fever. Since I'm a big fan of Mindmaps, I though giving the kids a head start and let them learn about the mindmaps from the master himself. So I signed them up for the " Power Learning Camp" with the snappy tag line "let your child be trained in Buzan Learning Techniques". I was expecting the use of mindmaps throughout the course since they were introduced on the second day. The agenda had also math topics and I was curious how Mindmaps would help in math skills.

Read more

Posted by on 17 June 2007 | Comments (1) | categories: Singapore

View hidden fields while debugging.

A short one today. A typical pattern for Notes and Domino forms is to have hidden fields at the beginning and end of a form. These hidden fields store lookups, IDs, relations and all sorts of things. As a unwritten convention these fields are marked red and hidden from reading and editing (basically all hidewhen options are checked). While developing or troubleshooting applications it is important that you can see the values of these fields. So instead of checking all hide options I use the following approach:
I create a hidden Computed For Display field of type number named "IsNotDebug". I put this formula in:
@IsNotMember("[Debug]"; @UserRoles)
Then I use a formula in the hide when section: IsNotDebug. Is is kind of plain English: Hide when is not Debug.
By adding or removing the role [Debug] from your user-id you can switch on/off the display of the hidden fields. If you do a lot of local development, you might opt for a Environment variable instead of a role.
A final tip: To make things look better I often find hidden fields neatly put into tables with some explanations in the second column. This is not a good idea. Hide when formulas are executed separately for every paragraph in every cell. So you create a lot of extra computation. Best is to have the fields in a single paragraph (newlines with Shift-Control are ok). I use the pattern
Field : [the field] (Comment) | <-this could be just a bar or a new line.

Posted by on 14 June 2007 | Comments (5) | categories: Show-N-Tell Thursday

To REST or to SOAP for mobile applications?

I'm toying around with J2ME applications running on multiple mobile devices. Since I want them to run on most mobile phones I settled on Midlets. One of the questions I was musing is how to do the data communication with the back-end. Despite the "chattiness" of the data I already decided, that I will use XML as the data format (less hassle with diverse sources) and web services as the delivery method (the telcos who charge per kilobyte bribed talked me into that).
To parse XML in a Midlet you can use kXML or kSOAP. A few questions remain I haven't found an answer yet. Maybe someone can point me to answers or hints:
  1. Can I use gZIP from Midlets?
  2. How to integrate SMS (to trigger a pull) with a Midlet?
  3. Should I use REST or SOAP for the communication? REST seems to be simpler but SOAP is better supported in Domino Designer.
  4. How do I integrate HTTPS into a Midlet?
  5. Can I access and transmit the Phone ID (IMEI) using Midlet?
A seasoned J2ME developer probably could recite the answers before breakfast, but they are new to me.

Posted by on 07 June 2007 | Comments (1) | categories: Software