Monday, 16 August 2010

MR Trace: SQL Developer Add-In Gets Trace Files for You

Cary Millsap and the folks at Method R have devised a cute add-in to Oracle SQL Developer.  It's called Method R Trace (MR Trace or "Mister Trace" for short) and it does a very simple thing elegantly: when you run PL/SQL code, it automatically turns tracing on and off at the right times, fetches the trace file for you, and presents it in a list right there on the screen.


I read about it on Cary's blog.  Here's a short video demo with Cary at the keyboard:  


He's proud of it because it's the "smallest software tool we've ever designed," but it's usefulness seems way out of proportion to its size.  Just not having to bug the DBA to get your trace files seems worth it to me!


(I'm going to start a new policy here that I hope will catch on among all bloggers: anytime I talk about a product, I'm going to disclose whether or not I received anything of value for the mention.  I didn't, though I did win a Method R door prize at an Oracle User Group meeting once.)



Wednesday, 11 August 2010

Simple Oracle Practices

Sometimes, it's the simple things that get us into trouble -- or can save us big time.


Any experienced UNIX admin will tell you to always do an "ls" (list structure) command with your wildcards before you use them in a "rm"  (remove) command.  Similarly, you should test your WHERE criteria in a SELECT statement (perhaps with COUNT) before you use them with a DELETE.


Here are some more very simple practices to develop as a habit, and which will save you at some future time.


1.  After you set ORACLE_HOME manually, test it by changing your current directory to it.  In Unix/Linux, the command is "cd $ORACLE_HOME"; in Windows, it's "cd %ORACLE_HOME%".  If the cd command succeeds and you list the contents of the directory, you should see a standard ORACLE_HOME.  If the cd command fails, or doesn't have the usual subdirectories in it, you've mistyped the pathname and can fix it before relying on it in other commands.


2.  After you connect to the database using "/ AS SYSDBA", test it by the following query:


SELECT instance_name, status FROM v$instance;


You'd be surprised how many times you THINK you connected to one instance, but in reality, you've connected to a different one. This only takes a second, and can save you a LOT of grief.


3.  After a SHUTDOWN ABORT for any reason, immediately follow with STARTUP RESTRICT.  This lets the SMON process perform instance recovery, so that the database is consistent; but it doesn't allow non-privileged users into the database.  Then do a SHUTDOWN IMMEDIATE and continue with whatever corrective action you need.


Three simple things, which if made into a habit, can help prevent gunshot wounds in your feet.



Thursday, 5 August 2010

Apologies for my Blackberry

Well, not mine.  I don't have a Blackberry.  What I'm referring to is a trend I've begun to see in emails from my Blackberry-toting friends and associates at work: adding a signature line apologizing for the fact that the email was sent from their Blackberry.


Originally, the tag line "Sent by Blackberry" was probably RIM's strategy for viral adoption of the device: promoting that this email was sent by someone with a cool new technology gadget.


But lately, I'm seeing signature lines more like the following:  "Please excuse misspellings, sent by Blackberry."   Or "Sent by Blackberry, excuse typos and terse replies."


Am I crazy to think that if you have to apologize for a technology, you might have to rethink why and how you're using it in the first place?



  • Are you misspelling things because you're trying to text and drive? Pull off the road before replying so you can focus on your typing (and on keeping the rest of us alive).
  • Are you sending such a terse reply because it's hard to type on the tiny keyboard? Could your reply wait until you get back to the office, when you could send a more thorough reply? Just because you CAN respond immediately, does every incoming email require an immediate reply at the risk of offending the recipient?
  • Are you sending a short reply because you're in a meeting or with someone else? Is the person you're replying to that much more important than those sitting with you, that it's worth disrespecting those in the room?


Text is such an unforgiving medium, that people are forced to read between the lines when interpreting the messages they receive. Right or wrong, a very short reply is often seen as a sign that the sender is angry or upset.  Right or wrong, typos make the sender look like someone who doesn't care enough to correct them before sending, or worse, doesn't know how to spell in the first place.


Granted that the Blackberry is a very useful device, and judging by its nickname ("Crackberry") highly engaging to use. But if you have to apologize for it, maybe you're using it wrong.



Friday, 16 July 2010

Tear Up Your Moleskine

I've been conducting an experiment that may seem like heresy to those who swear by the Moleskine brand of pocket notebooks.


I rip the pages out.


Now before you organize an angry mob of townspeople with torches and pitchforks, let me explain why I'm doing such a thing, and how I use my Mokeskine 3.5" x 5.5" ruled pocket notebook with my GTD system.


As I wrote in my previous post on Capture and Focus, it's important to have a notePAD not a noteBOOK as a capture tool, so you can toss loose sheets, 1 per idea, into your In Box for later processing. I don't use the Moleskine as a journal; I have another solution for that, so permanence is not an issue as it would be if I were using the sketchbook like my son does.  (Yes, he keeps them.) 


The durability of the Mokeskine stitched binding actually put me off from buying it for a while. I looked in all the office supply stores for a nice cover with a refillable notepad and a pocket for loose papers, without success.  Finally, I decided to try the Moleskine -- and I'm glad I did.  It's just the right size, and the unfolding pocket in the back is perfect for collecting ATM and debit card receipts.


I was mesmerized by the beautiful binding at first, so I just wrote my notes and checked them off as I processed them into my GTD system. Except that it was too easy to forget.


Then one day I figured what the heck, and the next time I got back home I grabbed hold of the three sheets I had used that day, and slowly ripped them asunder from that oh-so-perfect binding. I was surprised to find that the skies did not open and smite me with lightning, the earth didn't shake, and most important, the book seemed unfazed by it all.


If a couple of sheets come loose by my doing this, well, the elastic strap will certainly keep them in place until I need them. (The book supposedly has 16 perforated pages designed to be torn out, but I didn't see them.)  And at $12 at Barnes and Noble, it's a heck of a deal compared to the $80 leather Notetaker Wallet kit sold in the David Allen Co online store.


By the way, since the Moleskine doesn't have a pen like the Notetaker Wallet, I've found a marvelous companion to my Moleskine in the Zebra F-301 Compact Pen, which folded in half is less than 4" long and protected from leaks because the cap snaps into place. You get two in the package for under $10 at Staples and refills are available in fine point in various colors.


UPDATE 7/20/2010:  My latest experiment is the Mini Booksling with Pen from The Container Store. I replaced its plastic pen with my Zebra, and I'm good to go.  I taped the elastic that comes with the Molestine inside the back cover so it's out of the way, and use the Booksling across the width of the Moleskine instead. This places the pen along the long edge of the notebook. It still fits in my pocket.



Saturday, 29 May 2010

Capture and Focus: I Don't Have to Do Everything RIght Now

On my business trip last week, I listened to an older David Allen podcast on the Best Practices of Collect. I download these podcasts to my iPod so I can listen to them on airplane rides. I seem to hear something new each time I review them.


What struck me this time around is the impact that having a good collection system has on your ability to focus. David was describing his own capture tools, such as a tray of loose sheets of paper on his desk. When he gets an idea in the middle of doing something, he writes it down and throws the paper into his Inbox tray. Then he can let go of it, because he knows it's in his system and he will see it again the next time he processes his Inbox.


A lot of what I do, such as software installs or courseware development, requires intense focus. Interruptions blast my concentration to pieces, and it takes time to put those pieces back together again so I can make sure I'm not forgetting a step (installs) or that I'm keeping the big picture in mind as I write (courseware).  Although some interruptions demand immediate attention (such as an instant message from my manager) many more of them really don't need to be acted on in the moment.


So the past few days, I've been trying to ask myself, "Do I need to do this now?" Even if it will take less than two minutes to do, if it will interrupt something and cause a context shift, I capture it and keep working. I don't need to do everything Right Now for fear of losing it, if I can capture it for later processing.


Another tip: all three speakers in the podcast were insistent that they captured thoughts on a notePAD, not a noteBOOK.  You have to be able to tear out the individual sheets and put them into your Inbox for later processing.  It's too hard to go back through a whole notebook to hunt for action items. With one item per sheet, it's easy. They recommended half-size legal pads so they didn't waste a whole 8-1/2 x 11 sheet of paper for each idea.



Thursday, 22 April 2010

Two thoughts on Deciding What to Do Next

It's easy to get stuck in between tasks, trying to determine what is the best thing to do next. This leads to an excess of planning and strategizing, and not enough doing. I had two anti-procrastination thoughts today about the Doing phase of the Getting Things Done methodology.


1. You don't get better at making decisions by thinking or planning, only by doing. It sounds counter-intuitive, but sometimes you can't tell what the best choice is in advance. Only when you choose something and actually do it, can you see the results and use them as feedback to make better choices later.


2. If you're stalled because you don't want to choose "wrong", think about this: if it's in your system as an action item, it's not wrong.  You've already processed the item and decided what it means for you, what the next action is, and put that action on your calendar or an action list.  So if you can't decide what to pick, pick anything at all, rather than continuing to stew.  Anything on your list will move some priority forward, and will provide feedback on what to choose next. Plus, once you're in motion, it's easier to stay in motion and pick the next action... and the next one after that.



Thursday, 8 April 2010

New GTD folder - @Watching

I've been using David Allen's Getting Things Done method (GTD) to organize my time for over a year now.  I have a fairly typical set of "@" folders in my Outlook mailbox, such as:


@Action - things to be done as soon as possible, but not on a specific day
@Reading <listname> - things to read when I have time (several of these, one for each mailing list I'm on)
@Someday - ideas for Someday/Maybe
@Waiting - things on hold while I'm waiting for a response from someone


I also have many folders with no "@" on them, which are my project support materials and reference. When I'm assigned a task, I create a folder for its correspondence. But I was having trouble with emails that didn't fall into any assigned task -- typically things that I've been copied on but have no immediate action. However, I want to keep a closer eye on them than burying them among my reference folders, because they may turn into an assignment quickly.


So I added the folder @Watching. I create a subfolder for each topic, and track the email traffic to these subfolders as it arrives. Now, by expanding @Watching, I see a list of topics I'm tracking. If nothing happens or the task is assigned to someone else, I can delete the folder and its contents easily. If the task is assigned to me, I can just drag it up out of @Watching so that it becomes a regular reference folder.


So far, I'm liking this refinement. But of course, I will keep evaluating it as I go.