Search DominoPower's 11,437 Lotus-related article archive 
Home
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.
Twitter Feed Click here for the Twitter feed.
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.


Other articles you might like
Home > Lotus Technologies > LotusScript (64 articles)
   When the debugger won't debug hidden code that isn't hidden
   What to do if the LotusScript debugger won't single-step over code
   Little known traps about Lotus Notes fields
Home > Tips & Techniques (102 articles)
   More about Domino log files
   Why your log.nsf might not be purging properly
   A faster way to repair corrupted server files
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
Adding Quick Highlighter support to IBM Lotus Notes Domino Wiki, Weblog, or Webpage
Remember Young Admins...there are 2 files
WebSphere Portal 6.1.0.2 and Lotus Domino 8.5
The CKEditor - with Domino
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.

The many included activities and demos will make you a pro! Expert instructor help is a click away.

Click here to try a FREE demo course!!

-- Advertisement --

Mark your calendar for in-depth Lotus training, May 12-14, Boston
Join experts and peers May 12-14 in Boston for educational and networking events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. One registration gets you into THE VIEW's Admin2010 and Lotus Developer2010.

Register by April 10 to save $200.
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login