Email:   
Home
In This Issue
Email a Friend
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
THIS WEEK'S POWERTIP
A quick way to turn debugging on and off using the ACL
By Mick Moignard

Many years ago, I learned a life tip that has stood me well over the years. It's to be ready and willing to learn from everyone you meet and everything they say. There are always opportunities to learn something new, if only your mind is open and ready when the opportunity arises.

And that's not just in your work, but also in your family life, hobbies, whatever, and at any time.

All it takes is to listen to people just a little more carefully, and you will come across real gems. Maybe not very often, but they do happen, and in unlikely places and from unlikely sources. You get them from friends, work colleagues, your kids, other people's kids. And often from people who you might not expect to get such ideas from.

What prompted writing this was doing an interview recently, for a Domino developer for the project I'm currently working on. Normally, at an interview, you don't expect to pick up new knowledge yourself. After all, you are selling a job to the interviewee and he's selling himself to you. We were talking about debugging techniques, and he suggested something I'd not thought of. I filed it away mentally as a useful idea, reminding myself that if I'm not mentally ready to learn in any situation, I'd have missed it.

And here's the Notes tip that came from that idea. When working on complex code, it's often useful to be able to switch on or off some sort of debugging output.

The original tip was to use @UserRoles output to determine whether to @statusbar or @prompt debugging info during a piece of formula code just by whether you are in a role called, say [Debuggers]. Then, all you need to do to turn it on is to add the role to the ACL (Access Control List), and add yourself into the role.

Quite a neat idea, because you can turn it on and off without changing the code. You can also extend this idea to LotusScript and Java. All you need to do to do this is to Get the NotesACL for the database, get the NotesACLEntry for the NotesSession.EffectiveUserName -- which is the person or server running the code -- and see if the NotesACLEntry.Roles contains the Role called, again, say [Debuggers].

If so, then do whatever you do to display or log debugging output.

Remember, keep an open mind. It might just save you some coding time.

Mick Moignard has been working and traveling with Lotus Notes since Release 2.0 in 1991. Mick is a DominoPower Senior Technical Editor and a Principal CLP with Unipart Expert Practices, a Lotus Advanced Partner in the UK. If you want to discuss anything to do with this article, or indeed anything else to do with Notes and Domino, contact Mick at Mick_Moignard@unipart.co.uk. Unipart Expert Practices will also happily discuss any opportunities you may have with any Notes and Domino application development or infrastructure projects you need help with. Unipart Expert Practices can be found at http://www.unipartep.com.


ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
-- Advertisement --

AUTOMATE LOTUS NOTES USER ID MANAGEMENT
ID Manager 4.5 from HELP Software provides a new level of automaton for managing Lotus Notes IDs. ID Manager lets Lotus Notes administrators get out of the business of creating and managing user IDs. Use our ROI calculator to see how quickly ID Manager will pay for itself.

Learn more about HELP Software products
-- Advertisement --

Six Great Tools for IBM Lotus Sametime
  • Encrypted and secure, browser-based, persistent chat rooms
  • Complete chat logging and auditing
  • Easy-to-define IM help desk queues
  • Manage buddy lists across any organization
  • Integrate awareness into Microsoft Outlook
  • High powered, rapid bot development tools


Visit Instant Tech for free trials and more information.
Copyright © 1998-2008, ZATZ Publishing. All rights reserved worldwide.
Editor's Login