Learned a lesson the hard way this week. debugging a problem where a code running against the
property of a mail file with over 7000 folders couldn’t locate certain folders even though the interface clearly showed the folders as being there.
The ultimate cause was as simple as stupid: The code that ran against the Database.views property used the (undocumented) function
folder = getParentFolder()
to ask the user to select a folder. This function shows the user a folder select dialog and returns the selected folders as an array.
The users would select folders but for some reason the subsequent code retrieving the selected folders from the database.views wouldn’t always find them.
After some debugging the cause turned out to be that the folder names that the
Returned does a
on the selected folder names before putting it into the array. Problem was however that on creation of the folder (which was not being done manually but through a script in which the user was prompted for a folder name) the user sometimes added leading, trailing or double spaces in the name.
On normal (manual) folder creation, folder names are automatically trimmed to remove obsolete or trailing spaces. When created through script though this isn’t automatically done. So the actual folder names (as listed in Database.views) contained the names with the spaces while the returned array of folder names from the getParentFolder() didn’t.
As trailing spaces are almost impossible to spot in the interface this went undetected.
So while normally (on ordinary folder creation) this Fulltrim() by the getParentFolder() wouldn’t have been a problem, the fact that the folders were being created through script – and users were entering names with extra spaces – meant it caused a discrepancy between the name returned by the function and the name actually used. Or, to put it differently: the inherent ‘human’ factor wasn’t being filtered out.
Lessons learned from this:
Debugging a mail file with 7000 folders is a pain in the …
Do a Fulltrim() on any folder name created through code
And finally… NEVER underestimate the inherent capabilities of users to cause havoc (roughly 1 in 5 folder names contained trailing and or double spaces)
Spent Friday investigating some freakish code problems. This one just blew my mind….
When assigning numbers to a data type what do you expect to happen when you assign a number to big to fit the assigned data type? Right, an overflow error.
Well explain this then….
Ok, yes I know, you can solve it by using “difference# = notesDateTime.TimeDifferenceDouble( notesDateTime )” method which will return a double. I just can’t get my head around the fact that it didn’t return an error when it overflowed on 2,147,483,647 and instead continued up from it’s negative boundary (-2,147,483,648). Or is this normal behavior for a Long data type?? I just hate it when I can’t logically explain something…
Code I used to test the effect:
Sub Click(Source As Button) Dim todayD As New NotesDateTime(Today) Dim AlteredDate As New NotesDateTime(Today)
Set todayD = New NotesDateTime(Today) todayD.Localtime = todayD.Dateonly + ” 00:00:00″
Set AlteredDate = New NotesDateTime(Today) AlteredDate.Localtime = AlteredDate.Dateonly + ” 00:00:00″
For x = 24850 To 24860 Set AlteredDate = New NotesDateTime(Today) Call AlteredDate.AdjustDay(-x) If TodayD.Timedifference(AlteredDate)<0 Then ‘EXPECTED OVERFLOW ERROR AT 24857 NOT HAPPENING
End If Print “TimeDifference between: ” + TodayD.DateOnly + ” and ” +_ AlteredDate.DateOnly + ” = ” + Cstr(TodayD.Timedifference(AlteredDate)) +_ ” —- Days: ” + Cstr(x) Next
Update: I got this answer back through Twitter: “@FemkeGoedhart normal behavior for int/long. See http://en.m.wikipedia.org/wiki/Integer_overflow” Thanks @Thimo! It explains it, although the logic of Lotusscript returning an error on overflow of Integers but not on Longs still eludes me….
Anyone doing web design regularly uses tools to do so. One of the tools I used to used a lot was Firebug. A simple add-in for Firefox that allows you to inspect and debug code, CSS and HTML on websites directly while viewing the site. A lovely tool.
Unfortunately Firebug is not compatible with the Firefox 4.0b6 Beta release I installed a couple of days ago so it didn’t work anymore. I installed the Firefox Beta because of some other functionalities I wanted and as I’m not currently in a web project I didn’t really mind that Firebug wasn’t working in the Beta. Until I wanted to change something this morning in my blog design and missed my trusted Firebug icon.
Ok, it might be total geek mode butthis makes my day!
It’s finally there! The announcement was made today that IBM Lotus Quickr V8.5 will be released on September 13th. This release was long anticipated!
Early 2009, on the eve of the Quickr 8.2 release the DomDoc redbook team I was on describing a migration path from the DomDoc platform to Quickr was already told some of the features likely to be in the 8.5 release. One (folder security) even made it into the Redbook itself as an announcement for the next (8.5) release.
At that moment, we didn’t know it would take until September 2010 to actually get that release. So it feels really good that it’s here now and I can’t wait to start working with it!
Nice checklist for people planning a DAOS implementation with lots of further links for additional information.
Especially the one about Backup’s. It’s the one thing that sticked in my head from the 10 worst real live examples of ‘how not to‘ given in the “BP108 Worst Practices….Orlando we’ve got a problem” session by Paul Mooney and Bill Buchan at LS10. The story about a company implementing DAOS, suffering a major OS failure and then discovering that they didn’t have backups of the DAOS directory because they forgot to include it in their backup scheme……..Right, I’d call that a problem!
I’ve been busy, really busy the last couple of weeks. Mostly with writing jobs I had to finish. I’m still working on an article and apart from that have been really busy with several reports and Functional Design documents so writing on my blog kind of fell in between.
But in the midst of all that writing I got a good old basic user problem to solve today. A notes 5.0 mail file (yes, I know this customer is really taking his time to upgrade) that had problems with it’s Signature and Archive settings. they seemed to randomly disappear. Fixup didn’t help and to rule out other problems with the profile information documents I decided to simply delete those. Now I’ve done that literally dozens of times with the calendar profile so knowing how to address that profile was no problem. I wasn’t sure about the Archive profile name though, so to be sure I dove into the code to see how it was addressed.
The agent opening the Archive settings called a method:
Mmm…..not a method I am familiar with so I tried the help to see what it did. But I got no luck there, no mention of the method in the help files.
Unusual, Domino methods usually are pretty well documented but at the same time: No problem, the notes community is so well organized that I was sure that I wasn’t the first one looking for this. So I turned to the biggest help file imaginable: The Internet.
Within a couple of seconds I googled several entries noticing what I noticed, that the method wasn’t actually documented although it has been in use since Lotus Notes 5.0. But more importantly, they also provided me with the answer I was looking for: The archive profile is addressed as, yes you guessed it: “Archive Profile”.
Go figure. That simple and predictable answer could have cost me a lot of time hadn’t there have been the Internet. How I ever survived before…..I really don’t know!
ps. Deleting the profiles did the trick as I expected.
One of the products Lotus has bought over the years and incorporated into their Lotus portfolio that always interested me was Lotus Workflow. I have a real admiration for this product that has been out there now for a over decade but still is more than versatile and resilient enough to be a strong competitor when it comes to workflow tools.Especially for Lotus Notes applications.
For years I’ve been fearing an End of Life announcement but I guess it keeps proving itself enough to keep on going. Last Lotusphere there was even a session in which some very nice integration with the sidebar and Xpages was shown and there is some discussion on the possible integration of Lotus Workflow into Quickr. A step that would benefit both products greatly and which I would really love personally. Let’s face it, the current out-of-the-box workflow capabilities in Quickr (I wouldn’t even call it that) are way too limited.
Recently IBM bought a company called Lombardi that also has a very good workflow/Business Process Modeling tool called Blueprint. I didn’t know about it but was attended to it and I must say it looks pretty neat. I’m muddling through some of the documentation and online tutorials to get an idea of the product right now. Ok, it doesn’t natively integrate with Lotus products (haven’t found any reference) but with all the new techniques of accessing data in Lotus databases that shouldn’t be to much of a problem.
The question of course is whether this tool isn’t also a good competitor for integration with Quickr and if so what happens to Lotus Workflow… We will have to see and wait I guess.