Surprise nullpointerexception!

Last week I had to modify a JSP file. It wasn’t something I’d done before but the author of it made clear that they weren’t going to support it, so I gave it the old college try. My rationale was that I have experience with about a dozen different scripting/programming languages and, combined with syntax references, I had a chance of figuring out how to modify the code.

When I looked into it I found this:

if ((bipvar == null) || (bipvar.length() == 0)) {
redir = "a URL";
} else {
throw new RuntimeException("The bip parameter is not currently supported");

It worked fine, but I needed to add a third case. I decided to separate the condition that throws an exception and move it earlier in the code (if it’s going to throw an exception, there was no point in having the code do some other actions that it does.) The result was:

if ((bipvar != null) || (bipvar.length() == 0)) {
throw new RuntimeException("The bip parameter is not currently supported");
if ((pfs == null) || (pfs.length() == 0)) {
redir = "one URL";
} else {
redir = "another URL";

The problem was, this produced one of two results – either the intentionally thrown exception, or a null pointer exception. Ultimately, I had to rewrite it as below to make it work.

if ((bipvar != null)) {
throw new RuntimeException("The bip parameter is not currently supported");
if ((pfs == null)) {
redir = "one URL";
} else {
redir = "another URL";

Additionally, in the course of debugging I noticed that out.println bipvar;" worked while out.println bipvar.length(); did not.

With the previously stated caveat that I am unfamiliar with JSP, can anyone explain why this is so? In particular, why it would work with a .length() used in an if condition once but not twice.

Posted in Uncategorized | 4 Comments

It hurts even more every time I fall off the posting bandwagon…

Life has been very eventful since November…

The holidays were…well, the holidays. They’re ever easy when navigating a fractured family and doing what little I can to make it easier for those involve, particularly when I’m the one estranged from most of my family.

Had a fantastic annual review! When I took the position with SAS in late 2011, I was unsure how going back to corporate would be after fifteen years in higher education (my first two post-college jobs were for corporations.) However, it has proven to be an excellent move.

I got to do a lot of mentoring, particularly as internal personnel changes throughout 2012 meant I became one of the more senior admins on my team. Mentoring was a function that I found remarkably rewarding, particularly when I figured out that it had three stages and how to handle the third stage, which is often poorly handled in my industry. In that stage, the newer admin has the knowledge but not the confidence; I realized they were asking me about information that I knew they had been told before not because they had forgotten but because they wanted the opinion of someone they saw as an authority and I worked with that. Sometimes it meant going through an hour-long procedure with them then, at the end, pointing out that they had nailed it. It’s particularly cool when I observe them helping each other and hear words that are familiar.

I got involved in a Research Triangle region book club, which I love. It’s a fantastic bunch of (mostly?*) women.

I rode Tail of the Dragon on my BMW R1100R, and got my Kawasaki Voyager XII fixed at long last (failed coolant pump.)

Had major surgery; recovery is going well.

When I returned from that leave, I began a new position. It’s related to the previous one but involves dealing with a lot of newer products, developing documentation and best practices for my former team to use, etc. It’s a challenge and I’m both enjoying it and looking forward to it. I’m not one to shy from that.

* I’m not sure if there are any men in the group; every meeting I’ve attended has been all women.

Posted in Personal, SysAdmin | Leave a comment

Book roundup

I realized I’ve not updated my reading list in a while…

  • Daughter of the Sea Mira Zamin
  • Pilgrim of the Sky Natania Barron
  • The Spark (Extraumans) Susan Jane Bigelow
  • Monsters Lauren Pearson
  • Letters to a Battered Woman: What Do I Do Now Lisa Oliver
  • The Jungle Upton Sinclair
  • The Ultimate Hitchhiker’s Guide to the Galaxy Douglas Adams and Neil Gaiman
My reviews after the break (with Amazon-style star counts.)

Continue reading

Posted in Books | Leave a comment

Silliness for tonight

Now I lay me down to sleep
I pray my pager does not beep!

Posted in SysAdmin | Leave a comment

One-touch mobile dialing WebEX conference calls

I regularly (read: daily) have WebEx conference calls and often take them on my mobile while commuting. Most of these are repeating so it’s the same conference code every time. I recently learned of a way to simplify dialing in from my mobile.

What you need to know is the call-in number, the conference code, if you are joining as the call leader, and if the conference is configured to prompt for you to speak your name before joining – some of mine are, but the calls are set such that the response isn’t used. For me the following us the usual sort:

Number: 1-800-555-1212
Code: 1234567
Leader: no
Name prompt: yes

With this, I create a contacts entry with the name “08:30 Tu-Th OPS Concall” and the phone number: 1-800-555-1212,, 1234567#,,,#

This will dial the number, pause for a few seconds for the conference system to answer, enter the conference code with the requisite # sign, wait though the leader prompt, and send # for the name prompt.

My M-W-F 08:30 does not have the name prompt, so that entry ends at the # following the conference code.

Posted in SysAdmin, Technology | Leave a comment

What a month!

I’ve had lots going on and little time to write. We had a great vacation in Oak Island, North Carolina, last week.

At the moment I’m having lunch in Bloomington, Illinois. I’m here through Friday working on a software install for a customer.

Posted in Technology, Travel | Leave a comment

Hello, it sure has been a while!

Sometimes life just happens. The last several months have been hectic.

I’ve read a few more books, though mostly for class. I was taking Anthropology 440 in the spring term at UNC, which I aced, so my cumulative GPA is 4.0! If I ever again think taking a 400-level to fill a core requirement is a good idea…

Work is most of the hectic, though I can say I’m still liking it. This past Wednesday marked six months that I’ve been there.

Baseball season has started and we have our same fantastic seats for the Durham Bulls. Their season isn’t going so well, but, they’re still my team.

Angela and I took a weekend away last month. We went to Enfield, NC, which makes Enfield, CT, look positively metropolitan. We’d found a Living Social deal for a bed and breakfast named Bellamy Manor, which is beautiful. For dinner one evening we went to On The Square in Tarboro, NC, which was a 45 minute drive away by way of mostly two-lane state highways. One of the owners of The Lodge at Roanoke Valley, which is the Masonic Temple building in town, told us of the restaurant while we were there for an art exhibition.

We now have a third motorcycle, and it wasn’t at all what we had intended to buy. We’d wanted to buy a third motorcycle, one that either of us could ride, so that we didn’t run into an issue when one was in the shop. Angela can’t get my 1998 Kawasaki Voyager XII off the sidestand, though her 2002 Kawasaki ZR-7s is comfortable for both of us. We had planned for a Ninja 650R or its fraternal twin, the ER-6n – the unfaired or “naked” version. However, a coworker was selling his bike for a price that was great and it’s a model that, in terms of various aspects, similar to the ZR-7s, so we went for it. I never thought I’d own a machine from this particular company, but I’m now the owner of a 1998 BMW R1100R.

Tomorrow we’re celebrating Mother’s Day with my parents (they had other obligations last week) by taking them out to 604 at West Village in Durham.

Posted in Durham Bulls, Family, Personal, Travel, Vacation | 1 Comment

Books read.

I’ve had the Kindle Touch just over three weeks now and, stealing a few minutes, decided to post what I’ve read thus far.


  • Broken (Extrahumans)
  • Fly Into Fire
  • Curveball
  • The Wedding Gift
  • A Christmas Carol

In progress:

  • The Scarlet Letter

Continue reading

Posted in Books, Kindle | Leave a comment

Blogged advice.

I came across this “Run Your Campus” article via the Managing Your IT Career blog (has an academic focus but does contain more generally useful advice.) I fell a bit behind in keeping up with this blog (among others) in the fall due to events in my life, but some things are truly better late than never.

I feel this article has much to offer anyone in IT; probably more for academic IT, but there’s still some as you get further from that. The paragraph “Your university computer is not really yours” is really spot-on! When I was at UNC, that was compounded by the fact that I was a public employee and things like my state-provided computer and e-mail account were subject to public records laws. It’s a practice I have carried-forward to SAS: if it isn’t related to work, it goes to my personal e-mail.

This does take an interesting turn for my account at UNC as it continues to exist and I have legitimate access to it beyond my employment there as I am still a Carolina student. Even so, I tend to draw that line with it.

Posted in Uncategorized | Leave a comment

More on the Kindle Touch 3g

  1. No landscape mode.
  2. PDF Handling.
  3. Pinch-zoom
  4. Text-to-speech.
  5. Web browser
  6. Refresh

#1 – the lack of landscape mode is something I only found because of a mention elsewhere. It’s not personally been an issue for me, but Angela’s DX is capable of this.

#2 – PDFs, as in copied to the device via USB. I tried one and found it pretty much impossible to adjust the text size. It was small by default, though easily legible, with fairly large margins but any pinch-zoom resize attempt lead to at least some amount of text being cut off on the vertical sides. I understand using Amazon’s conversion service solves this, but at a price. The PDF I tried was actual text rather than a scanned image; I imagine viewing a scanned image in PDF format wouldn’t be pleasant.

#3 Pinch-zoom. I’ve only tried this when viewing the PDF as I find the pop-up available when reading a Kindle book (the “Aa” button that appears at the bottom of the screen after tapping to bring up the menu) to be far more usable.

#4 Text-to-speech. The first time you go to use it, change the volume. It will be set around 75%, but will actually be using something far quieter until the level is changed for the first time. You can imagine how I figured that out – it involved my car stereo and me having first adjusted the stereo volume up to compensate. I tried using this with Curveball but found it rather unusable due to how it treats some conventions used in that book. Em dashes are rushed, having a verbal run-on effect, and footnote numbers are read after a pause at the end of the sentence to which they belong. The Wedding Gift works better, but there are still many emphatic problems, including unnatural pauses due to commas in quotes that were part of a fast-passed dialogue, e.g. “Yes, ma’am,” which would have really been close to “yes-em” when actually said becomes “yes *pause* ma’am.” Salutations are not handled, thus “Mrs” is read as “Emm arr ess.” Still, I’ve made it a quarter of the way through that book using that on my commute to and from work.

#5 Web Browser – filed under “Experimental” for a reason. It’s functional, but that’s about all I can say for it. You wouldn’t want to really use it for much, though I’ll grant that the gray-scale rendering of sites like Twitter and Facebook is better than I would have expected.

#6 Refresh – I have noticed ghost text on occasion. There is a setting about full refreshes/redraws on page change which eliminates this, but page redraws become longer and much more visually disturbing (the screen goes black for a moment for every page change.)

Posted in Personal | Leave a comment