|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
-- 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 --
INSTALL, UPGRADE NOTES CLIENTS WITHOUT VISITING EACH DESKTOP
Use InstallPump to automate your Notes R8 migration. InstallPump enables you to rollout Notes throughout the enterprise without visiting each desktop.
- 100% fully automated Notes upgrades/installs.
- Modify the Replicator Page, Address Book, and Desktop... and much more.
See for yourself. Full evaluation copy available at installpump.com.
Download your FREE evaluation copy of InstallPump today.
|
|
|
|
|
|
|
|
|