Monday, December 31, 2007

Year End

2007 was a big year. At the end of 2003, I had no way of knowing what life would be like today. I was a confused three-year biology student who had no desire to finish a degree in biology. Something had to change, and a new area of study would go a long way toward making that happen. I had always loved computers. I had a job doing computer support and a little bit of QA for a large HMO in my home town. A manager had the good sense to take me to lunch and encourage me to think seriously about a career in computing. And so goes the story. 2007 made it into the long range goal list when my academic counselor and I set out my plan my degree in computer science. Imagine with me for a moment what your reaction to the following course description would have been had you no formal experience with programming at all. "Introduction to the problem of engineering computational efficiency into programs. Classical algorithms (including sorting, searching, and graph traversal) and data structures (including stacks, queues, linked lists, trees, hash tables, and graphs). Analysis of program space and time requirements. Extensive programming exercises that require the application of elementary techniques from software engineering." I was overwhelmed, but willing to put in the long hours to learn the material. Looking back on my seven year tenure as an undergraduate, I wish I had found computer science earlier. I learned a lot about computers, gained knowledge that makes me a marketable employee, and built friendships that I hope will last a lifetime. Graduation was just a day in May of this year, but it was years in the making, and will have years worth of impact on my future. I'm profoundly grateful to the people who were along for the ride. They know who they are.

I also managed to get out of the country for the first time this year. It couldn't have been done without the suggestion and help of some awesome family members. In August with my uncle, aunt, cousin and grandfather, we went on a 14 day holiday through Europe. Cities on the itinerary included: Prague, Pilzen, Paris, Avignon, Vasion La Romaine, Florence and Rome. The country side to be seen was amazing. The food was better than I could have imagined. The art was truly awesome. The trip was unforgettable.

As if graduation and a european vacation weren't enough; there was mountain biking, pc-gaming and a trip to Moab, Utah to do both. There were near daily lunches with co-workers whom I am lucky to also call friends. I'm grateful to have a job where there are needs to be filled by solving interesting problems. I work with creative, smart people who care a lot about delivering a quality product to our customers.

2007 was a good year. There's a lot to reflect on. There's a lot more to be grateful for. I suppose the my wish for 2008 would be that situations continue to get better. We all have to live, learn and change. May our changes be for the best.

Sunday, December 30, 2007

Homework to Do

After Friday's gripe session with regard to my 'meets the requirements' discussion and scriptaculous, a friend engaged me in a conversation today.

Him: Did you see the article I starred from Ajaxian in Reader, or did you just shift - a it into oblivion?
Me: I read through it briefly, but I'm really not interested in learning yet another framework.

I made some pathetic argument about building frameworks versus working/contributing to ones that already exist. Oh well. It's pretty clear that I'm fallible. If I'm half the programmer that I claim to be, I need to spend some real time with GWT. It's not fair for me to bag a framework simply on the ground that it's another thing that I don't have time for. Dion Almaer makes a good argument that GWT may actually simplify a developer's life. I'll repent and give this a try. More to follow.

Saturday, December 29, 2007


Evening Walk in the Rain

All but Death, can be Adjusted -
Dynasties repaired -
Systems - settled in their Sockets -
Citadels - dissolved -

Wastes of Lives -resown with Colors
By Succeeding Springs -
Death - unto itself - Exception -
Is exempt from Change -
- Emily Dickinson

I took the above picture on Main Street in downtown Salt Lake City on December 21, 2004. The picture would be vastly different if I were to try to capture the scene today. Deconstruction looms everywhere. Buildings that once seemed so solid and permanent have been gone for months. I think that Dickinson gets it wright when she says All but death can be adjusted, and I'm not so sure about that either. Change is the constant in life. Nothing stays the same. Perhaps our biggest challenge is to adapt and accept the changes that come our way. Hopefully the changes that we face are good, but if they aren't there's something to be said for making the best of a difficult situation. The end of a year provides us with a moment to look back and assess where we've been and what we've accomplished. It's also a time to look forward, to see where we might like to be in the future. I don't know that I'm a fan of New Year's resolutions, but the end of the year does provide one with a good clean epoch from which observations, both backward and forward, can be made. It seems to me that if all things are indeed adjustable, and change is consistent rather than an exception. Then perhaps it is time to figure out how I'll change with the word which will change with, or without, me.

Friday, December 28, 2007

Ah Progress - Sort Of

A lot of credit is due to scriptaculous this evening. And though I am pleased that I got a job done, I'm not happy about the way it was accomplished. I don't usually have many good things to say about scriptaculous. It seems to me that it is a whole bunch of code, that almost never works correctly in every browser. Additionally, though the point of their website is to show off the product, I can't stand the way that it navigates. Finding exactly what you want concisely and simply is neither concise nor simple. This was absolutely the case with the Ajax.Autocompleter that I managed to wrangle to my will today. Finding the appropriate documentation was difficult. Also it appears to work differently in IE, Firefox and Safari. Because the feature was for an in-house, IE only application I didn't stress too much about the differences between browsers. However to make it work perfectly for IE, I did have to hack the script according to some advice I found on the scriptaculous wiki. At some point you have to weigh the costs of perfection, versus just getting the job done. I'm not usually an advocate for the latter but in this case for this set of users, I think that I'll just acquiesce albeit begrudgingly. At the end of the day the huge library was able to do something that would have taken me much longer to do on my own, though I am sure that had I invested the time to do it on my own, I would be more proud of the end result. I'm still a bit apprehensive about someone hitting the page with a non-standard browser. I know that company policy doesn't state that I have to support them, nor to I get paid to make sure that my code runs in every browser, but it's a point of pride for me. Generally speaking, I believe that if something is worth doing, it is worth doing the right way. That means that your code needs to be as nimble and flexible as possible, so that when someone decides that we are browser agnostic as a standard, I don't end up re-writing every piece of code.

There are a lot of big names using scriptaculous, which leads me to believe that my poor experience with the library may have to do with my naiveté. However, if you're the producer of a big library, wouldn't you want to be as clear and open as possible with your community. Yes, a wiki is open but something similar to a JavaDoc would be nice.

I guess I can't blame them, lots of big companies have a hard time making sure that their documentation is clear and easy to find.

Thursday, December 27, 2007

Those Days

Some days are better than others. Wednesday was an awesome day. Today was frustrating. I've been working on a small maintenance release for a legacy application, and I hit a major wall with my approach to solving a problem. I'll find my way around the issue, but that doesn't make me much happier about the situation. There are a lot of tools out there to help with AJAX auto-completion, but most of them assume that the programmer has more control over the dom and page rendering than I have with this portal bean. There's a very good reason for JSR168.

Wednesday, December 26, 2007

Good Food Continues

I thought to make a prime rib dinner for the family last night, but we were all too full to think about another large meal. So I prepared the prime rib this evening. Prime rib with pearl onions, carrots, gravy, red mashed potatoes, and steamed broccoli. Pretty awesome.

Prime Rib (4-6 lbs)
Garlic (1 clove)
Cut Carrots (16 oz)
Red Pearl Onions (8 oz)
White Pearl Onions (8 oz)
Beef Stock
Olive Oil

Forty minutes before you intend to begin preparation, remove the prime rib from the refrigerator and let it acclimate to room temperature. Preheat the oven to 350 degrees. Cut slits into the beef, for the garlic cloves. Liberally coat the beef with olive oil, salt, pepper, and thyme. Peel onions, and place with carrots in the bottom of the roasting pan. Cover the bottom of the roasting pan with Beef Stock. Place the prime rib on top of the carrots and onions. Bake for 2.5 hours(med), or or to desired doneness. Remove from oven and let sit under a tinfoil tent for 15 minutes.

If you're feeling extravagant, you can make a gravy from the drippings by straining the vegetables out of the roasting pan. While the pan is empty melt four tablespoons of butter, then add four tablespoons of flour. Combine the butter and flour, and cook for a couple of minutes. Then over medium-high heat slowly combine the drippings with the butter flour mixture. If the gravy looks too thick, add more stock.

Tuesday, December 25, 2007

Merry Christmas

It was a good day. Much like last night, there was lots of good company and food. I got a good nap time today, and had an introduction to Rock Band - lots of good fun. Right now I'm sort of wishing that I had opted to take the entire week off from work. Maybe I'll feel differently tomorrow morning. We'll see.

Monday, December 24, 2007

Holiday Eve


The weather was classic. The company was wonderful. The food was amazing.

Sunday, December 23, 2007

More Fun with C

Did you know that gcc isn't pre-installed with your Macintosh? I thought that they were, given that Terminal is, and that from terminal many of the command line staples exist. Today I managed to download and install the latest version of xcode. This opened up the way for me to play with some of the low level I/O stuff that I was talking about in yesterday's entry. I had a great time, and I'm well on my way to having my home-made I/O library to replace stdio.h. No, I am not planning to code without stdio, I just wanted to understand at the code level what it does. In my opinion, the best way to do that is to implement a toy library that does the same thing. That, and when you make a living working in high-level languages, it's a good idea to re-visit other languages and areas of the stack so that you don't loose fluency. There's something very satisfying about writing in C. My goal over the next few days is to finish implementing my own stdio.h, and then my own string.h. Again, it's just good to have first-hand experience with how things work in the lower levels. I really believe that it makes for better high level programs. Not every programmer needs to write the operating system, but every programmer needs to know how the operating system accomplishes its tasks.

Saturday, December 22, 2007

Food For Thought

"This is your last chance. After this, there is no turning back. You take the blue pill - the story ends, you wake up in your bed and believe whatever you want to believe. You take the red pill - you stay in Wonderland and I show you how deep the rabbit-hole goes. " - The Matrix

That quote often comes to mind when searching the web for some obscure, low level fact about how computers work. The world of computing is very broad and deep. You could be like my grandparents, just grateful that the machine turns on and that you can manage your photo albums. Or you could be one of those engineers who spends her existence working out the instruction pipeline on the processor we'll see in three years. Most days I live happily in a land filled with Java and Javascript, which for many of my non-work acquaintances puts me in a pretty deep rabbit hole.

I dusted off a text book from the college days: Computer Systems: A Programmers Perspective. Leafing through the pages of that book I was again reminded of how deep the rabbit-hole really is. I got caught up in chapter 11 for a while, "System-Level I/O". Over the Christmas holiday I'll work through some of those exercises just for good fun. It's nice to remember how I/O works at the system level. Every person who writes code should be grateful for the high level ease of something like System.out.println("Hello World!");.

Good Stuff. Really.

Friday, December 21, 2007

There are updates for Websphere 6.1

This probably doesn't come as a surprise to many, but there's quite a list of recommended updates to Websphere 6.1. Check them out.

The version that I'm currently running is It looks like I've got some serious updates to do. You know, perhaps if I was all patched up I wouldn't have so much resentment toward this app server. Then again, IBM could do more by way of an automated update process that is EASY to use. I just tried to patch up to patch 9 and it looks like I'm going to have to fight with my computer, JAVA, and RAD/Websphere just to be able to complete the install.

It's got to be better. I just want pages that compile quickly.

Thursday, December 20, 2007

Misc. Thoughts

I've not been as religious with Reader as I usually am. Things have been particularly busy at work, and I haven't been all that into reading when I've been home. There are still 938 items in my unread list, but I was pleased with several of the articles that I did get to read this evening.

I'm curious about Firefox, and the role that it will continue to play in the browser market. I'm a big fan. With that being said, I have to admit that I haven't installed it on my MacBook Pro. I've been happy with Safari. It's got some truly amazing tools to help with client side JavaScript/web page development. Hopefully the optimizations promised in ff3 will pan out the way the documentation claims that it does.

It was intriguing to read that IE8 has passed the famous ACID 2 test. More interesting than that however was the discussion of web standards given by Dean Hachamovitch who is the General Manager of the IE8 team. I have high hopes for IE8. As much as IE frustrates the hell out of me, I will admit that I love their rendering engine. The pages just look better in IE than they do on ff, at least in the Windows world.

Finally, I've found a renewed interest in frameworks that allow for some form of remote code invocation. We had a rather stimulating conversation about this at work today, but I still left with some doubts. EJB, Spring, Web Services, something else? Right now I tend to be favoring the something else category. Not that any of the above listed methods isn't a fine and valid solution, they just seem to be overly complex with what may appear to be their most simple configuration. More needs to be said about this, but the thoughts haven't fully solidified in my own mind.

That does it for tonight. I'll see what I can to do say more, particularly with regard to remote code invocation tomorrow.

Wednesday, December 19, 2007

For Beginners: Java 5 Collections.sort() and Generics

Today at work a co-worker came up with an interesting question related to a warning related to unchecked types when using Collections.sort under Java 5. When moving a project from an earlier JRE to Java 5 this sort of thing happens all the time. Though the answer was really quite simple, sometimes looking at the compiler errors, one isn't quite sure what should be done.

Suppose you tried to compile the following code:
public class Test{
public static void main(String[] args){
ArrayList<Foo> testArr = new ArrayList<Foo>();

public class Foo implements Comparable{
public int a = 0;

public int compareTo(Object o){
return 0;
Upon compilation the javac compiler will issue the following warning.
warning: [unchecked] unchecked method invocation: <T>sort(java.util.List<T>) in
java.util.Collections is applied to (java.util.ArrayList<>) Collections.sort(test);
Essentially, we are being warned that the version of the Comparable we're using doesn't support the generics, so you had better know what you're doing. The answer is to explicitly tell the compiler what kind of Comparable Foo knows how to compare. Doing this is really quite simple, but it's not immediately obvious from the warning error how the code needs to change.

If we change the inner class to specify what type Comparable operates over, the warnings will go away.
public class Foo implements Comparable<Foo>{
public int a = 0;

public int compareTo(Foo o){
return 0;
Note that in Java 5 Comparable now carries a type. That is, it's a Comparable<T>. The other important thing to note is that rather than having compareTo take an Object, it should take the specific type that it will compare.

In the office today my co-worker was happy to change his code to make the warning go away, however he did question why the compiler couldn't make some assumptions about the type for Comparable<T>. I'm not a language specialist, but I have a feeling that it has to do with compiler implementation and the limitations of generics as implemented in the byte code. Though it would be fun to learn more about the real theory behind the design decision.

In the mean time, if you run across this simple warning and want to make it go away, it all has to do with making sure that your object is set up correctly with the new Java 5 type paradigm.

Tuesday, December 18, 2007

My Own Home - One Step Closer

Today I met with a mortgage broker.  I'm now pre-qualified.   So the wheels are now moving.  I've been told that I can finance the place.  It's all about finding it now.  The meeting went well, I certainly feel a lot better about things now knowing where the finances will actually lay.  The decision to buy is a big one, but I think it's time.

Monday, December 17, 2007


It was a monday.  I got quite a bit done.

Build shipped to QA- check.
Documentation/Sample Data for internal audit- check.
Prepared for tomorrow's meetings- check.

I'm also really sleepy.  So I think I'll call it a night.

Sunday, December 16, 2007

The Belgaraid - A great set of books (fantasy fiction)

A year ago I would have rejected the notion of reading fantasy.  Really, I had a hard time with the idea of reading fiction.  It just seemed to me that in a world where there was so much to learn and do, that reading fiction didn't seem a proper use of time.  Shortly after graduation a friend suggested that I take some time off from academic reading and pick up a series of books by David Eddings.

Twelve books in all.  They represent a wholesome, entertaining and thought provoking story that has entertained me in small doses for the last eight months.  I wasn't in a big hurry to get this series read, sometimes I would go several weeks without picking up the book.  It was however a good read.  If you have time and are thinking to dabble with the fantasy genre, this would be a great place to start.

Saturday, December 15, 2007

I Want to Buy a House

I’ve been informally looking for housing now for the past six months. Most of my searching has involved looking at the MLS listing online and driving up and down the streets in neighborhoods that I liked. It appears to me that the triangle of expectation applies to the housing market just like it applies to business. I guess that makes sense since housing is business. You’ve got three areas of requirement and you can have two, but you can’t have all three.

1. Location
2. Quality
3. Price

I saw a home today that was listed at an unbelievable price. From the curb I loved the look of the house. I was convinced that this was the house for me. So, I called a friend who happens to be a real estate agent and asked if she could get me in to see the place. A couple of hours later we were walking through the house and the triangle of expectation was once again thrust upon my life. Like many other things in this world, quite literally, you get what you pay for. Or to use another trite axiom: if it looks too good to be true, it probably is.

Some good lessons were re-enforced today. It wasn’t anything earth shattering, or particularly new. But it was good to see the realities. It was also good to make my housing search official. I know what I can spend and now I have someone who can help me find a place. I’d like to be in a new place within the next 90 days. With any luck, and some work, I’m sure that goal can be met.

Friday, December 14, 2007


Today I was in an informal meeting where I mentioned that perhaps a piece of software should 'automagically' fix a problem.
The business associate that I was with stated that she had never heard someone use that word before, and it caused me to
think a bit about Clarke's Three Laws:
  1. When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong.

  2. The only way of discovering the limits of the possible is to venture a little way past them into the impossible.

  3. Any sufficiently advanced technology is indistinguishable from magic.
I'm particularly enamored with the second and third laws. One of the things that I love about software is that its writers are often presented with opportunity to venture venture a bit past the possible. The best part is that if the journey is successful, then the experience can be magical for both the engineer and the end user.

Everyone wants software that is fun, intelligent and easy to use.

Thursday, December 13, 2007

Prototype and Insertion.After

This probably comes as old news to people who use prototype a lot, but I came across a bug with Insertion.After in IE 7.
Is it really any shock that it wasn't working? Seriously. IE.

I didn't spend a whole lot of time looking into what specifically was borked. All I know is that Insertion.After appeared to be doing an insert, but not exactly after.

I decided to just drop prototype 1.6 into the project to see if it fixed the issue and it did. Now I just need to go figure out what changed between 1.5 and 1.6, followed by regression testing of my application.

Fun Stuff. O that the browser manufacturers could agree about how things should be implemented.

Wednesday, December 12, 2007


As most of my co-workers would tell you, I'm not afraid of refactoring code. Firstly, I think that doing it more often helps relieve development debt. Secondly, I believe that it helps me not become too attached to a given way of solving a problem. Though refactoring is generally a good thing, if one's not careful, bad things can come of it. This is perhaps why most people who write about writing software claim that uninterrupted time is so important. When you're in the middle of writing, or in this case transforming, code it becomes quite critical that the job is completed in a thorough manner. Half transforms, especially when we're talking about JavaScript, cause strange bugs that are difficult to track down.

So, when on that endeavor to improve code by changing it, make sure that you're able to complete the task at hand. I'm not sure about the best ways to tell those around you that you can't be bothered. I'd hate to appear rude, but I'd also hate to commit murder to my code by not completing a transform.

It's a thought anyway.

Tuesday, December 11, 2007

Change and Verification

Program correctness. It’s important and certainly worth study. Formal verification is very worthy, but perhaps a bit deep for my taste. Though I am fascinated with languages that are mathematically sound. Not only does it sound good, but it feels good too.

Work has presented me with opportunity to re-visit some code that I wrote more than a year ago. Were I to program today what I programmed a year ago, it would look very different. I think that’s a good thing, as it means that I’m learning and growing. But it also brings to mind a question of correctness. The code is correct, it meets the business requirements, but it could be more correct in that it could have been written more efficiently.

A different situation at work is allowing me to think about a set of business rules that a colleague and I have been working on now for the past eight months or so. As we’ve worked on this unit of logic our views about the problem and what is ‘correct’ have changed significantly. At times we’ve made changes to our algorithms. Other times we’ve approached the business rules philosophically by re-defining the task we’re trying to accomplish. Interestingly enough though we change algorithms and/or re-define tasks, in the eyes of the customer the meta-rules remain the same. However from the perspective of verification, I believe that we’ve created a moving target. Though the meta-rules remain the same, there have been many changes (some small, some not so) which should get us to the same set of meta-results. I suppose the question is this. In an environment were change is the constant, what is the best way to verify program correctness? Or to ask the same question with different words. When making constant changes/re-definitions to the nuts and bolts, how is the consistency of the meta-rules to be maintained and verified?

One might argue that this is where unit tests will come to my aid. However, I’m still having trouble buying into unit tests for database driven business processes. When the database is removed (as most unit testers say is prudent) many of the most critical parts of our application are cut out of the picture. I’m not so concerned about presentation logic, but I’m absolutely paranoid about getting the right data out of the database in the most efficient manner possible.

I’m intrigued by this ‘moving target’. It’s more like research. What we thought to be correct eight months ago isn’t so correct today. Like the code that I wrote over a year ago, it’s encouraging to be able to look back and note that there are things that I would do differently with today’s knowledge. I’m comfortable with change, and with change comes the need to verify that the results are still good. Verification is the part I’m still uneasy about. It’s the weak link. I don't know what the answer is, but I’d like to believe that I’ll be able to recognize it when it is presented.

Monday, December 10, 2007

DRM... meh

I read an article today which posited:

“Nobody cares about DRM until they have to, and then they care passionately.”

It may be the case that I’m just one of those people who hasn’t had to care about DRM yet, but currently I’m firmly in the camp that says Apple has done what they needed to do in order to deliver a product to the people in a manner that both the people and the recording industry could stomach. Is the situation ideal? No. Am I able to conveniently buy and listen to my media? Yes. Absolutely. I don’t feel hindered by my iTunes library. Contrary to the fact, I now buy more music with my iPod and iTunes than I ever did before.

I’ll concede the point that if you go out and buy a non-apple media player, things aren’t plug and play with your current media library, but there are ways around that. And before you tell me that those methods are only available to the technically savvy, I’ll head that off by saying that anyone who can use Google will be able to figure it out.

Amazon. I love the book store, but I don’t think that their music buying experience is on par with that of iTunes. Sorry.

DRM isn’t here to stay. This is just another one of those moments in the history of media that someday we’ll be able to reflect upon with a smirk. “Can you believe that ten years ago media was tied to a specific platform or player?” The industry will catch on. There is money to be made, and I’ll be buying along the entire way. So far as caring passionately about DRM, I think that it really depends on the person. I know what I’m getting into. I know how to get around it. Thus, there’s no need to be fanatical about it one way or the other.

Sunday, December 09, 2007

They Get it All

It’s a rather obvious, well documented, fact that there are twenty-four hours in any given day. Twenty-four hours with which you can perform any number of finite tasks. It appears that some people are more efficient with their time than others. Millions of dollars have been made by enterprising persons who have figured out how to market time management plans. Though the plans are thorough, and are often full of great advice, they don’t often scale. Personal time management seems to be just that. Personal. Everybody has their own rhythm. Things that work for one, don’t always work for another. Yet, people who’ve figured it out seem to have everything going for them. You know the type. They’re the ones who get in a physical workout every day, they fulfill all of their religious commitments, they have full and happy social lives, they are successful in the work environment and it appears that they always have time to do anything that happens to come their way. Not only are they always able to achieve what appears to be the impossible, but they are very positive people. It’s pleasant to be around them.

I’ve wondered about these people from time to time. Who am I kidding? I’d like to be one of them. When asked these achievers often shrug it off and say something about making time for the things that are most important. It seems to come down to prioritization and the attitude with which one uses their twenty-four hours.

Irish Novelist Maria Edgeworth said: (thanks Google)
"All work and no play makes Jack a dull boy. All play and no work makes Jack a mere toy."

From being so concerned with work that there is no fun, to spending too much time with life’s indulgences. Neither is ideal. The real answer to appropriate time allocation has as much to do with balance as anything else. Doing the right thing. At the right time. For the right reasons.

Saturday, December 08, 2007

NBC "rewind"

I was an avid watcher of NBC comedy night. However, I never caught it on television. I was a faithful iTunes watcher. I've tried to get along with NBC's version of online video, and I just can't make it work for me. The video quality is bad. There are almost always glitches in the streaming or problems getting into or back out of commercials. Can't Apple and NBC just figure out there differences and let the viewers have a service that lets them get the shows on their own terms. There's got to be a better way.

Friday, December 07, 2007


I spent a lot of my day in meetings. The thing about meetings is that they are seldom inspirational. More often than not, they have this way of gradually draining their victims of creativity and will to thrive. I understand that meetings are necessary, and that it is a great medium for communication, but only when the right people are involved for the right amount of time.

Needless to say I was with on my way between meetings with another person and he mentioned how given the choice he would really like to skip out on the next appointment. Being a Friday afternoon, I asked him if we should start a game. It was determined that the contest would be to see who could work the word "route" into the conversation as many times as possible.

We hadn't even sat down before this person had used the word. He won the game. But only because I lost track of the game and never came to the table to play. I'll claim that I was too busy paying attention to the conversation, which didn't leave the brain cells to play the game. However, we have a meeting with the same group next week at which time I would like to try again.

At the end of the day, I suppose that some of what you'll get out of a meeting depends on what you bring to it by way of preparation and germane conversation. Everyone already knows it, but time comes at a premium. The least a meeting organizer can do is to make the time spent worthwhile.

Thursday, December 06, 2007



I liked this shot when I took it with my cheap camera in 2005 and I still like it today. There's something entertaining about the reflections in the blurry green glass.

On another note, I was walking from one meeting to another today and have decided that I absolutely MUST instantiate an exercise program for myself. Seriously, tired from walking? That should NEVER happen. Granted it was further than I would normally walk in a day (we walk to and from the Gateway at least once a week) but still. How shameful. Really.

If only day's were as easy to replay as pictures. You live and learn.

Wednesday, December 05, 2007

Core Dump

What is the best way to squeeze the most out of every day?

What is the best way to make sure every person involved with a project feels a sense of ownership and responsibility for the cumulative success of the endeavor?

"Enterprise" is NOT synonymous with "Easy", "Friendly", or "Fast".  Particularly when it comes to software purchased in a package from a third party.

It is possible to write idiot proof software, but it does come at a cost.  Perhaps education with regard to the "triangle of expectation" should be addressed when minds are at a young age.

When in doubt, smile.  Be nice.  Try to understand.  Deep down most people really do want to succeed.

Tuesday, December 04, 2007

Windows By Any Other Name...

would still be a big pain in the you-know-what to install- even on a mac.

This evening as I've been back in not-so-happy Windows install land, I remember why it is that I fear a the annual Windows re-install.

I've got to hand it to Apple, they've done just about everything that they could to make Boot Camp a pleasure to use. However, they can't do anything about the HUNDREDS of updates that Windows XP2 requires after a clean install. There MUST be a better way. Seriously. Think 2007.

Speaking of Boot Camp, I should have started there before I played with CrossOver or Paralells. Though the idea of virtualized windows is also really neat, and will work great for most "business" needs. It just doesn't give you the performance you need for say- Team Fortress 2. Now if Steam and Valve were to produce binaries that could run natively under OSX- then we'd be cooking with gas. In the meantime, I have Mac to please my aesthetic needs, and I have Windows to remote to work and play the occasional FPS. Who said I couldn't have my cake and eat it too?

Monday, December 03, 2007

Everyone Knows One

Though I don't imbibe, I've got to recognize the great work that was Anheuser-Busch's Bud Light campaign - Real Men of Genius.

I came across this on the interwebs today, and thought to share.


Sunday, December 02, 2007

Tis the Season

The lights are on the house, the tree is trimmed and the halls are decked.  It's that one month when we tend to live just a bit more indulgently than we do the other 11.  Some may spend 11 months recovering from the one that they totally let go.  For some it's a time to re-kindle friendships of seasons past.  A season for reconciliation.  A moment to focus on others rather than self.  Regardless of the way you choose to spend this holiday, indulgent or not, may it be bright. 

Saturday, December 01, 2007

Food For Thought

I've been trying to catch up on the backlog of items in my feed reader and came across this article by Amy Hoy.

She has some interesting and motivating ideas about how one should go about living their lives. After all has been said and done, a lot of our happiness as people comes down to how we choose to learn and experience the things that life throws at us.

Consider the following thought from her article:

The Pithiest Lesson

It all comes down to this: Some people make themselves into doers. The rest make themselves into what they probably call realists, cynics, or John C Dvorak—but often, in reality, they're merely complainers.

That's just the way life is.

But you get to choose which you are, which you become. And you can change, if you want.

I'll admit to having been on both sides of the above thought. Who isn't at one point or another? Though in my mind I think we'd all rather be classified as doers.

Wednesday, October 17, 2007

I went for a walk

It was nice to get away from work for the afternoon. A rainy fall day in the canyon is seldom disappointing.

Sunday, October 14, 2007

Unit Test Discomfort

Unit testing is not one of my strong points. I'm currently reading several books whose central claims are that unit tests bring stability to code, save developers time when refactoring and that once one becomes test infected that they're fun. The claims may indeed be true, and that's why I've been reading about unit testing. I want to believe the claims. Michael Feathers claims that legacy code is simply code without tests. That's rough. Really rough. It means that my code is “legacy” even before it has been committed to version control. Before Michael's book I thought of legacy as being code written in an ancient language, or perhaps a system that has been around for years. Interpreting code without tests as legacy brings a new perspective. Even though I comprehend and agree with the tenants of unit testing, I have trouble brining it into my daily work.

According to the literature, good unit tests run quickly so as to give quick feedback to a developer. Most of the books I have read claim that a unit test should run in less than 1/100 of a second. Typically tests are not to include database access, or interaction with other systems. They simply exist to test a given class or function. Unit tests are there to verify that a piece of code will produce expected results given a set of inputs. If a developer is doing his/her job it should be the situation that a test case is crafted to test each branch of logic in a unit. Given the above constraints, my mind draws the conclusion (perhaps naively) that unit tests are best suited to check user defined algorithms and to do bounds checking.

My struggle with unit tests begins with defining what is appropriate to test. If you are building a simple database driven web application where do the tests belong? I acknowledge that if there is an interesting algorithm or function to verify that would be an appropriate use of a unit test, but what if the work being done is very simple. My framework of choice has unit tests for all of it's moving parts, so I don't really need to re-test the plumbing. I find that there are a lot of interesting conditions that I would like to test with regard to getting data into and out of the database, but the principles of unit testing claim that the database is out of scope. I find that there is a goodly amount of logic happening in the JSP by way of JSTL tags and Javascript, but I haven't seen any really great unit testing tools for that either. Does this mean that I just haven't built a sufficiently interesting web application? Am I placing the logic in the wrong places?

I've still got some reading to do, and my mind is still open to the idea. I would really like to join the happy group of people who swear by some form of test driven development. The advantages appear to outweigh the costs of maintaining tests. I would like to know how to fit unit testing into the work that I do. It just appears that there's a mis-match between the way that I develop and the concepts that are being discussed in the literature.

Sunday, September 30, 2007

Last Lecture - Randy Pausch

I received notice of this lecture being web cast before it happened, but being busy at work I didn't take the time to watch it. The video appeared in my feed reader this evening and I've got to say it is one of the most motivational lectures from an academic that I've ever heard. It is well worth the hour an a half.

Experience is what you get when you didn't get what you wanted. - EA

I'm dying and I'm having fun, and I'm going to keep having fun every day I have left.
Because there's no other way to play it. - Randy Pausch

Watch the video here

Randy's home page.

I've been inspired.

Sunday, September 23, 2007

My Moab


I spent the weekend in Moab, Utah. Having lived in Utah all my life and with Moab being four hours away by car, you would have thought that in twenty eight years I would have managed to get down there before now. Moab is a small town with a lot of energy and life. The occasion for the visit was a semi-annual mountain biking trip with my co-workers. The talent of our group's bikers varies greatly from guys who are willing to try all sorts of crazy stuff to people like me who are just grateful to be able to hike the bike along the trail at times.


We started out on Friday morning leaving Salt Lake City at 6:30 AM, by noon we were on our first bike trail in Moab. It was pretty hot outside, but I figured everything would be great because I did have 2 liters of water in my Camel Back. The trail was really picturesque and fun. There were lots of interesting obstacles, some that I could ride, others that I couldn't. Regardless of the ride ability it was a blast to be on the trail. Unfortunately for me, on the way back down the trail I started to feel really sick. As it turns out, I managed to get myself a pretty good case of heat exhaustion. I spent most of Friday evening in the Moab hospital with an IV dripping fluid into my body. As things turned out, I wasn't the only person to get injured that day. A co-worker managed to fall on his elbow resulting in a fracture. Because the two of us had been banned from biking for the rest of the weekend, while the rest of our team enjoyed trails such as Slick Rock and Porcupine we decided to take a four-wheel drive vehicle through part of Canyon Lands.

Though it was somewhat disappointing to miss out on the rest of the weekend rides, I was still able to have a good time with the team. There really is a lot to see and do in that part of Utah that doesn't require a bicycle. Even when seen from the window of a vehicle, the geography is just stunning. It's now clear to me why people will travel such great distances to bike, hike, and ride in these areas of Southern Utah.

The Neck

I'm excited for the Spring trip. I'll be more careful about the heat/hydration situation, and maybe I'll get to bike on three days instead of one. It was fun to get out of town for a weekend.

Thursday, September 06, 2007

Happy Early Birthday

I'm kind of a clean freak. Particularly when it comes to my space at work. Maybe it's because I'm just pathological when it comes to my need to find order in things. I like to claim that my desires for cleanliness have nothing to do with my crazy brain; rather that it helps me to think better when things are organized. This means that there's a place for every tool I have at work, including my red Swingline stapler.

This morning when I arrived at my desk ready for the challenges of the day I noticed a piece of paper sitting where my stapler usually sits.

I kept my Swingline

I try to ignore it for about 30 seconds, then I ask my co-worker if he is playing some joke. He states that he "had nothing to do with it, really". I open all my cupboards and drawers, but alas no stapler was to be found. I mention to my co-worker that it's really going to be quite the challenge not going to all of our friendly cube neighbors asking if they've seen my stapler. I tried, but wasn't too successful at ignoring the happenings.

I ask around a bit. No one seems to know anything. I give up my search figuring eventually the stapler will come home.

I go to lunch, and when I get back the receptionist for the floor brings a box by my desk. Taped to the front is a sign.

Happy Birthday!

I open the box and see my stapler preserved in a layer of Jello. Well, it wasn't actually my stapler but it looked just like it. Yes, my co-workers re-enacted the prank that Jim played on Dwight in NBC's popular comedy "The Office".

In the end, I've got to say it was a pretty funny joke. No harm done, and really someone went to a decent amount of work to pull of a good joke. It really made my day.

Tuesday, September 04, 2007

For Sam


My friend Sam called to tell me that I should blog more and twitter less. That may have been something of an exaggeration, but he did ask me why I hadn't posted any more pictures from the trip. I guess that a lot of it comes down to being busy, and not being overly impressed with my photography skills. So Sam, for your enjoyment you have the Florence skyline as seen by my camera on August 11, 2007 at about 9AM. Kudos to you if you can name all of the prominent buildings!

Saturday, August 11, 2007

Short Day in Florence

I won't complain much, because the bed and pillows are soft, except to say that free, wireless internet should be a given anywhere in the hospitality industry. I'm glad that the Black Berry affords me the ability to post, even if it is short and without photos.

Once we were checked into the hotel and able to rest and clean up a bit, the day got much better. I even found a little bit of time to wash some clothes in my bathroom sink (pretty exciting eh?). Today really reminded me of the two art history classes I've taken. Seeing this art in person is quite different from. The slide presented to the dark room full of students. Florence really is a beautiful place.

Aside from the art, the shopping here is quite amazing as well. All of the names are here. One of the great finds of the day were silk ties for $27.00. At Nordstrom they are close to $100.00.

Of course, I've just scratched the surface of this great place but tomorrow it's off to Rome.

Friday, August 10, 2007

Travel Travel Travel

Just now eating a sandwich we picked up at a train station while the train is parked at a stop. The sleeper train is going to be quite the experience. Quarters are very tight, and though they claim there is air conditioning it is uncomfortably hot. None the less, it is an experience I'm glad to be having. Pictures to follow when I have a real internet connection again.

Itinerary for the day:
Avignon to Vaison la Romaine
Vaison la Romaine to Avignon
Avignon to Nice via train
Nice to Florence via sleeper train

In 8 hours I'll twitter that we've made it to Florence (and I might even get some sleep).

Thursday, August 09, 2007

Vaison la Romaine - day 2

Castle Near Vaison la Romaine

We got to sleep in today - which was really nice. After a lazy morning in the hotel we ventured off toward Vaison la Romaine again today. This time we were much more confident on the roads which afforded us the opportunity to do a bit of exploring. Along the way we saw some beautiful vistas, and found a Michelin rated restaurant. Being in wine country I suppose its requisite that we splurge for an expensive meal, we really did have a lot of fun even if the bill was quite high. Once we got to town today we did a lot of window shopping, which means a lot of walking. There was some cool art, but the prices seemed a bit high for my taste.

We have one more day in the area and then we'll begin our journey to Italy via Nice. The train tickets say that we'll be staying in a train that has beds. I'm sure that will make for nice blogging, though probably from the Black Berry. It's time to turn out the lights, so I'll leave it at that.

Wednesday, August 08, 2007

Avignon e Vaison la Romaine

We rode the train from Paris to Avignon today. Once checked into our hotel (Best Western, and substantially less than the Paris Marriott) we got back in the car and worked our way to Vaison La Romaine, where we watched a concert given by the University of Utah Singers. This general area, Provence, is very beautiful. It's wine country, and once you get out of the city the roads are lined with vineyards.

The interesting thing about southern France is that the road signs are really hard to see. That is not to say that there aren't signs, because there are. In fact, the signs will tell you just about anywhere you want to go. They won't however, tell you exactly where you presently are, which makes for interesting driving experiences. Maps are hardly helpful when you don't know where you are, and Google Maps either from the web or the Black Berry application aren't too helpful if you don't have some general clue of where you are and where you're going in the first place because of the small screen size. My thought is that the Black Berry needs to include GPS and use the info to place you on a Google map. I am sure others have thought of it, I just think it would be very nice.

In other news, though the Best Western here in Avignon doesn't have down comforters and pillows it does have free (as in BEER) wifi. Could someone please tell me how it is that Best Western gets it and Marriott doesn't? Seriously, down pillows but not free internet. Crappy cotton pillows free internet. And don't tell me that they are using the internet money to buy down pillows and comforters, I simply won't buy that.

I made the mistake this evening of checking my work email. I'm going to have to think for the next couple of days about how I really shouldn't have done that, as now my mind is processing the work issues a bit again. But maybe it's better to be somewhat informed than not.

Anyhow- things are good here. I am happy, relaxing, learning a lot and really enjoying the time I have to see this place. Nothing is on the agenda for tomorrow morning, so I think I'll take the opportunity to sleep in. Hopefully I'll also get around to working on posting a couple of pictures.

Until Then - Aurevior.

Tuesday, August 07, 2007

Paris Day 2

-Tour of the city by bus in the morning.
-Tour of Versailles on foot in the afternoon.

I learned about the city's train system, not nearly as challenging as in Prague. I learned about french history and the tour guide had a bit to say about American foreign policy.

King Louis' castle is more amazing in person than in the books. I'm still on the Black Berry, hopefully tomorrow the interweb is more affordable.

Monday, August 06, 2007

Prague to Paris

What a crazy day. Wake up call came at 3:45am. We dressed quickly so as to be in the hotel lobby by 4 for a quick sack breakfast, checkout and a ride to the Prague airport at 4:30. We then waited at the airport until our flight to Paris left around 6:30. Either the fruit salad I ate for breakfast or the gummy candies I ate before the flight really didn't sit well with me. I actually had to hurl on the plane. How very embarassing. Thank goodness the flight was short and I didn't get ill until the end.

Once in Paris, my aunt and I took off to go see some of the Louvre. What an awesome trip that was. We really only looked at early Italian and French renissance paintings, but it was a real blast. Later in the day I learned that if one wanted to see every piece in the Louvre and spend 20 seconds on each view, it would take 2.5 months to complete the project. It was super cool to see pieces of art that I studied in high school and at the university.

To wrap up the evening we took a night bus tour of Paris. It was spectacular and beautiful.

Sorry for the shortness, and no pics, but I refuse to spend $30/night on internet; which means the Black Berry has to do, but one can only do the thumb keyboard for so long.

Sunday, August 05, 2007

Seeing the Czech Country

As I mentioned yesterday, it was goog to get out of the main city and see what Czech life is like when you're not in the tourist center. We spent the afternoon driving around little villages as we drove form Plzen to Prague via Karlstejn. My observation is that communism has really left its mark on the people. Though they are free, the haven't quickly forgotten how things were.

Back in Prague tonight, we ate again at that great cafe where with the live jazz.

I'm writing from the black berry tonight as I am supposed to be sleeping. Our flight to Paris requires that we be at the airport by 5am. Hopefully there will be more time for pictures and blogging tomorrow evening.

Saturday, August 04, 2007

On the way to Plzen


I'll keep it short tonight. The public transit situation in the Czech Republic is VERY interesting. It is deserving of its own little story which I really don't have a lot of time for right now. We made the journey from Prague to Plzen via train today and as I mentioned, it was quite the experience. I now know what it is like to be in a place where no one speaks your language and you have no understanding of what is going on around you. Thank goodness we made it to Plzen intact.

The Czech countryside is beautiful. It is nice (and frightening) to get out of the way of the tourist traps. Out here in the country, one really begins to feel what the people and place are really about (and the price of food and shelter comes WAY down).

Last night I didn't wake up at all. Though I was still really tired this afternoon. Thank goodness for naps. All is well.

Friday, August 03, 2007


Prague Castle Cathedral

Today we took an official tour of the city of Prague. It mostly focused on the Prague castle and the surrounding “lesser town”. It is stunning and humbling to stand next to buildings that are so very old. Our guide informed us that the cathedral next to the Prague castle was under construction for 600 years. While on the walking tour I came to the conclusion that my desk job is far too comfortable. There used to be a time when being on my feet that long wouldn’t have tired me at all. However, now I am thinking that I really need to get on that bicycle a lot more when I get home. Late 20’s is too early to be feeling old.

In other news, the food scene has been quite good. Breakfast provided by the hotel was more that adequate, we had a nice mid-afternoon snack provided by the mini-bar in our room and dinner was a fantastic traditional Czech meal eaten in an outdoor street café. The meal itself was roast beef served in gravy with dumplings. It was full of flavor, and very hearty. An additional plus is that there was live jazz music provided by the café: saxophone, piano and bass. It was a super classy experience. Yep, I’m a freak for that sort of thing.

The city of Prague is a thriving place, a beautiful city full of history and charm. Seeing people everywhere tends to make places feel more inviting and safe (though safe is a relative word). I’m convinced that I could spend several hours sitting at a table in a street café just watching people do what they do. Though I am sure that life here is busy and frantic at times, it seems to be just a tad slower, but none the less classy.

I’m still fighting the battle with time zones. My body wanted to be up and running at 3am this morning, and I was dead tired by 3pm. It is now bedtime, but I’m not feeling much like sleep. I hear this gets better with time.

Lots of pictures have been taken, but I’m not a big fan of photo editing on the laptop. I just can’t trust what I see on this LCD screen. Needless to say, there will be a lot of fun in editing trip photos upon my return.

"Lesser Town"

Thursday, August 02, 2007

We Made It


Yep, after many hours on the airplane and waiting in Airports we made it to Prague. All is happy and well. The internet here at this particular hotel isn't where I think internet should be for this day and age, but I'll survive.

Grandpa and I took a whole bunch of pictures this afternoon. I'll have a lot to share when I get around to the processing. In the mean time, I just wanted to get something up here noting that we've arrived and are well.

Now just to get over the jet lag.

Friday, July 20, 2007

My Diploma

Yep, that's it. The official diploma came in the mail, and it means that not only can I claim to have a degree, but I can prove it. I always thought that the delay between graduation and the actual receipt of the diploma was a bit odd. It has been strange, a couple of times in the last couple of months I've had dreams that perhaps I neglected some obscure requirement and that I wasn't going to receive my hard earned degree. This puts the concerns to rest, not that there were any legitimate concerns in the first place.

Thursday, July 12, 2007

Spring or EJB?

With the ease and brevity of updating in one sentence clips via twitter, it becomes increasingly difficult to sit down and write my thoughts in blog form. That and the fact that the more I read other blogs and commentary about my industry, I feel less confident of my opinions.

Today's discussion is brought to you by some of the conversations I've been having at work. The team that I work on has been around building financial business solutions now for almost five years. We're a Java shop using Websphere, EJB, and Struts as an MVC. This “stack” serves us very well, but being of the opinion that we should always keep our eyes out for other technologies, I got on a Spring kick several months ago. Yes, I know that means that I've come to the Spring party late, and that many cutting edge folks have moved on to Guice. However, wanting to try out the whole DI thing, and having an aversion to the difficulty seen in testing EJBs and the weirdness that Websphere adds to the EJB mix, I got permission to try a project in Spring. Like many others that have tried the Spring Framework, I came to really enjoy it. It seems to me that the Spring Framework can do anything that I ask it to do in my small business domain. I don't feel the pain of EJB, and have really come to appreciate the flexibility that Spring MVC brings to web application development.

However, when it comes time to defend my love for the Spring Framework, I can't prove that it would always be preferable to EJB and Struts. It seems to me that EJB is a dying technology, at least trying to find a good set of propaganda for their use doesn't appear in a cursory Google search. Sure, there's some great stuff talked about with EJB 3, but that seems a bit off in the distance for my team – at least right now. In discussions with my co-workers, I'm left to argue testability, ease of development, and using the right tool for the right job. But when one looks at what the two solutions have to offer, I think that defining what the right tool is becomes somewhat ambiguous.

Sure there's some argument that EJB allows for code reuse, but isn't that what spring remoting is all about? I've also heard a bit about EJB clustering, and how that can lead to greater speed and efficiency with regard to n-tier server solutions, but can't you just cluster a set of servlet containers and get similar speed, efficiency and reliability?

I would really like to hear what an expert says about these technologies, and what the future holds for them. Specifically, how does one pick the right tool for the right job?

Thursday, June 21, 2007

In the words of my boss...

Best ride ever! Which is cool, except he calls every ride the best ride ever.
One of the perks about working where I do is that the team has fun away from the office. We took the day off and decided to visit the downhill mountain biking options at the near by Deer Valley ski resort. We had a great time! The food was a bit on the expensive side, but the downhill rides were a riot. It's like eating a meal of pure dessert. All the fun of downhill riding without the pain of the uphill climb. One could get quite spoiled by the chair lift.

Deer Valley Mountain Biking

Wednesday, June 13, 2007

I Purchased a Mountain Bike

I stole the photo from my dad (thanks), and no it is not of me.
I purchased a mountain bike on Monday. How totally cool! I haven't been mountain biking since I was a teenager. Though I am completely out of shape, and had to walk the bike up most of the hills, the view of the Salt Lake Valley from the northern foothills is simply amazing.

Here's to more fun in the mountains, and getting healthy.

Monday, June 04, 2007

Good Listening

While driving home from work today, I was listening to NPR's All Things Considered. For month's now I've been deeply impressed by the wisdom shared in the "This I Believe" segment. Today, I heard an essay titled "A Marriage That's Good Enough" by Corinne Colbert. Before looking up the title, I would have titled it "Settling". I really agree with the ideas that Corinne shared with the nation today. Put on the headphones, pull up a chair, and enjoy four minutes and thirty seconds of sound philosophy.

Saturday, June 02, 2007

Chopin: Polonaise no. 3 Opus 40

Chopin: Polonaise no. 3 Opus 40

Years ago, with my second to last piano teacher I set out to learn this piece. I was in high school, and heard one of the kids in the grade ahead of me play it in his act for talent day. Talent day was one of those silly things we did in choir to pad the last couple of weeks of the school year, when learning new choral music would be pointless. Each student in the course had to prepare some talent to show the class. My sophomore year, I took in some framed photos. My junior and senior years I teamed up with good friends to sing a couple of barber shop songs. If I recall correctly, both years we sang barbershop out of “The Music Man”, but don't quote me on that. Singing with my friends was a good time for sure, but being introduced to the Military Polonaise by Chopin was surreal. I don't know why it is, but some music just hits you, and you know you'll never be the same again after hearing it. The above piece is exhilarating, full of energy, and just a real joy to listen to. It was so cool, that I decided that I wanted to learn how to play it too, because if there is enjoyment in listening to music, participating in the making of music brings it to the next level. A great piece, by a great composer, for a great day.

Thursday, May 31, 2007

On the Street Where I Live

On the Street Where I Live

You must forgive the title and post full of cheese. I'm a sap when it comes to jazzy show tunes. Anyhow, more than a decade ago I was introduced to this song by my best friend, and I know I've found a particularly happy moment in my life when "On the Street Where You Live" starts playing in my mind.

This evening I went on a walk and really it was a beautiful Salt Lake evening. As I turned onto my block, the song started playing in my mind, and I knew what I would post to my blog tonight. I'm particularly grateful for moments where things are just right, even if they are fleeting. I'll take what I can get.

Sunday, May 27, 2007

Ouch! My Back

I went to see Pirates of the Caribbean: At World's End last night, and found it to be quite enjoyable. Yes, the show is a little on the long side, but I really liked it. Seriously, what's not to like about the pirates movies? The only downside to the whole experience was that while sitting in my camp chair at the drive-in, I did something to my back, and now it doesn't want to let me move very much. I've found that with a good dose of Advil, I can manage to sit in a high backed chair. Things seem to be okay so long as I don't do much with my arms or twist. I hope that this is just a really bad knot, or that I pulled a muscle somehow (though I have no idea how I would have done that). I'm looking forward to having a day off from work tomorrow. It's been a while since I last took a day from work in which I didn't have some other time-consuming task on the calendar in its place. If I can get out of this chair, or my bed, I might even get to go take some pictures.

Tuesday, May 22, 2007

To be a JS Ninja

Today I had three wishes.

  1. I wish that I was a JavaScript ninja, with a deep, abiding understanding of how the DOM was implemented in all of todays major browsers, particularly IE7 and why it never works the way you think that it should.

  2. I wish that when I get stuck like I got stuck today that Google was able to return more meaningful results.

  3. I wish that I had more web designer friends that are JavaScript ninjas, that do understand the DOM, particularly as it relates to IE7.

So there you have it. My three wishes for the day. Here's the back story, and a petition for someone's superior skill and knowledge.

The application that I am building at work would be greatly benefited by a framework that would accommodate light boxes. Yes, there are lots of implementations out there, but none of them were quite what I was looking for, so I set out to modify one to suit my purposes. Everything was up and running happy and fine in good 'ol Firefox. I jumped over to IE to make sure things were equally as happy, and found that seemingly simple things really weren't as simple as I had hoped.

The function would look like this:

function doStuff()
var node = $('myUpdateDiv1');
node.className = 'class1, class2' //class 2 overrides some attributes of class1
node.innerHTML = '... nice HTML chunk with a style tag
and other stuff that comes from
an AJAX call ...';

node = $('myUpdateDiv1');
var box = new lightbox(node);

And in Firefox if the innerHTML has a <style> tag that defines class2, then the div will assume the class2 style. However, IE really really hates it. So I ended up with code like this to solve the problem.

function doStuff()
var node = $('myUpdateDiv1');
node.replace(... HTML with embedded style right on the tags
coming from an AJAX call ...
node = $('myUpdateDiv1');
var box = new lightbox(node);

IE seems to require that if the style is going to work, that the styles be embedded on the tags in style attributes, and that the entire div be replaced, as innerHTML would replace the markup, but the styles wouldn't appear to take. I am sure that these issues have something to do with my non-ninja design, DOM and JavaScript skills. If you have a better answer that would allow the AJAX call to return an HTML chunk that could take a chunk like this, and render it in IE, I would be VERY happy. It would really simplify some aspects of this process that I am working on. It's critical that the web page be agnostic to the styling of the light box, as it would be much preferable for the implementer of the remote AJAX call to set his/her own styles for the box.

Here is a very simple toy page that I have been playing with. It's working in both IE and FF, but I would really like to get away from the node.replace(), and style on each HTML element if at all possible.

Can anyone tell me what I'm not understanding?

Wednesday, May 16, 2007


Really this is quite the rambling, I'm not exactly sure what it means, but it is a brain dump of some ORM related stuff that I've been thinking about for the past couple of days.

After having used Hibernate on a school project to help with object relational mapping (ORM) and now returning to an environment where I am writing all of my database code by hand, I understand why ORM is such an appealing solution. It isn't without its own headaches, but it does speed up development, because the developer isn't required to spend as much time on the data layer.

In the past month at work, I've spent most of my time writing service layers for a project that needs to support distributed API access by several applications across our line of business. To me it seems that when I am working on debugging code, more likely than not, the bugs appear in the data layer rather than in the business logic, or presentation layer. When I am debugging my data layer, or when I need to write yet another query to get at some aspect of the data, I am constantly faced with the question: why not use an ORM tool?

At my place of work the answer has been that ORM tools don't work well against legacy databases, and that they tend to add more overhead to processes that need to run really fast. Both arguments may have some validity. I have not yet tried to map objects against our legacy schema, and I do understand that if you one doesn't clearly understand the working of their ORM tool that some queries could end up being quite bloated. It is quite obvious that if all you need is a single field, and your ORM tool brings back 20, that's 19 fields that you didn't really need, but that argument sounds a lot like the argument that we should code every application in assembly because it would be very fast.

It was interesting to read a follow-up to this article in this month's Linux Journal. The Object Relational Mapping Quagmire, as the authors put it really needs some deep thought and attention. I think that they really hit the nail on the head. Yes ORM is nice because developers can deal with their happy objects, but relational databases and ORM don't have a perfect 1:1 correspondence because our objects hold information differently than our database tables do, and perfectly normalized data tables in BCNF will can cause a lot of pain for most ORM tools. It looks like there are some tools out there that aim to store data as objects rather than rows and columns, but that doesn't do much to solve the legacy database issue.

If a company currently does very well with the tools it has, and the legacy database it has supported for years, is it justifiable to start over? If it isn't broken, should it be fixed? I completely understand the decisions made by new companies to start out with the bleeding edge tools, but what about the legacy companies who have been making fine money with their tools for years? It's not an easy question, and I don't know that there are any exact answers. I don't believe that a company wants to be technologically stuck, but some upgrades seem almost prohibitive to the ever important bottom line. I'm a proponent for change, and it's always exciting to use the new tools, but re-structuring an entire database does seem counter-intuitive, even if I do have to write my DB code by hand.

Sunday, May 13, 2007

Hibernate and MySQL Connection Timeouts

Several weeks ago, while trying to finish up a portion of my senior project, my team was having some issues with our persistence layer. The issue had to do with the connection time out in MySQL, and the default C3P0 setup that Hibernate uses. As it took MUCH more research than I think it should have to solve the issue, I thought I would write a blog entry about it. Besides, I haven't set out to give anything back in quite a while. Note that while none of this information is new in any way, I have not been able to find it all gathered together in one place.

After my Spring/Hibernate/MySQL soltuion has been running but inactive for more than 8 hours, I get a broken pipe exception.

Root Cause:
MySQL automatically times out, and closes unused connections after 8 hours, and out of the box, Hibernate does not set up C3P0 to appropriately test/refresh its connection pool when connections go stale.

It seemed that as we searched the forums for an answer it wasn't immediately obvious what the right answer would be. We noticed that the C3P0 properties had different names, depending on how your project was configured. The hibernate documentation has some suggestions, but it turns out that the names of the properties are not stated correctly. It is also important to note that if properties are not set in the hibernate configuration they will be overridden by hibernate defaults. Here's a snippet from my hibernate.cfg.xml:

<!-- driver/connection info removed --!>
<!-- C3P0 Stuff -->
<property name=“hibernate.c3p0.acquire_increment”>3</property>
<property name=“hibernate.c3p0.idle_test_period”>14400</property>
<property name=“hibernate.c3p0.timeout”>25200</property>
<property name=“hibernate.c3p0.max_size”>15</property>
<property name=“hibernate.c3p0.min_size”>3</property>
<property name=“hibernate.c3p0.max_statements”>0</property>
<property name=“hibernate.c3p0.preferredTestQuery”>select 1;</property>

The important properties to note above are idle_test_period, and timeout. You want to make sure that C3P0 is configured to test for closed connections and time out unused connections at some rate beneath the threshold set on your MySQL server. With these properties in place you should be good to go.

Waiting 8 hours to conduct a test like this would be lame, so let's just change the connection timeout for the MySQL server, re-start the MySQL server, and our application to try it out. You can change the timeout time for MySQL by editing your /ect/my.cnf file (linux) or your my.ini file(windows). You would want to add the following line to the file:


Note that the value after the property is in seconds. Once you're done with your testing, you can remove the property and it will default back to 8 hours.


Configuring C3PO

C3P0 Hibernate Configuration

my_sql options()

Set the MySQL Connection Timeout

Saturday, May 12, 2007

The Void

I keep waiting for things to get less busy, but they never will. So far as the personal details of my life, I graduated from the University last week! The graduation commencement and convocation activities were really great. I appreciated the advice that was given and the thoughts that were shared. The whole experience was rather emotional. It's been almost seven years since the beginning of this journey. At first I thought I wanted to be a doctor, but then I found a real passion for computing. Changing my major may have added three years to my time at the University, but it was a good move for me personally.

So now that I have that piece of paper that says I jumped through collegiate hoops, I feel something of a void in my life. Yes, I should be quite happy that I won't be spending hours and hours on homework, but I really did come to enjoy the process of programming for personal education. I've decided that I must be involved with projects that force me to keep learning. It looks like I'll be playing with Ruby in the coming weeks, so though I am a Java developer by day, I'll play with Ruby by night, and hey, I might just get the hang of that Linux thing while I'm at it. I'll work on filling the void with extra sleep, programming projects, and it couldn't hurt to start dating. I'm starting to feel old.

Anyway, here's to change!

Wednesday, April 18, 2007

Feature Complete

The senior project is "feature complete" for the alpha version as of tonight. It's been a long haul. I don't think that anyone in my group could have guessed how many hours we would put into the project to get it to this point. We are pretty excited though. I think that it stands well as a 'capstone' project for my computer science education.

We've been testing along the way, but now we really need to sit down and work on end to end testing. The project gets graded on Tuesday, so time is of the essence. With a little less than a week to test, I think we're doing pretty well.

16 more days, and I'll be wearing the cap and gown.

Friday, April 06, 2007

What Happened to March?

So, over a month ago I wrote about how I believed that my school work was anticlimactic, little did I know how very busy things would get in the following weeks. After spending a long day at work, and a long evening in the computer lab, writing in the blog just seemed like one more thing that I just didn't have time to do. I know that had I made it a priority I could have, but it seemed like more effort than I was willing to spend in the wee small hours of the morning before my head hit the pillow.

In the last month, I've learned some really interesting things. There have been some interesting speakers in my computer science seminar course. I'm having a blast working on my senior project, and I've read a couple of interesting books.

My senior project is a group project where the group is composed of three team members, and we essentially get to build a system of our choosing. Our group elected to take on a faculty sponsored project titled “Program Analysis for Education”. Essentially, it is an online quiz system that differs from a traditional online quiz system in that instructors will be able to ask students to write actual code as a quiz problem. This means that our system needs to have a fully functioning parser and interpreter so that we can attempt to automatically grade a student's input. The system is coming along quite well, but there is still a lot that needs to be done before we hand over our solution to the school at the end of the semester. The project has given me the opportunity to gain experience with Hibernate and the Spring Framework. I was originally skeptical of both tools, but as I have used them and learned about their capabilities, I've come to really agree with the paradigms presented by these two tools. This has been a really great project because it has had a real set of customers, so rather than programming in a vacuum, we've been able to present the system to our sponsors. It's been a ton of work, and there is still a lot to do, but it is very satisfying to see things coming together.

As far as the reading goes, here's the short list:

Somebody's Gotta Say It – Neal Boortz
The Long Road Home – Martha Raddatz

Pro Spring – Rob Harrop and Jan Machacek
Spring In Action – Craig Walls and Ryan Breidenbach
Pro Hibernate 3 – Dave Minter and Jeff Linwood
Java Persistence with Hibernate – Christian Bauer and Gavin King

There are some really great things to be said for Spring and Hibernate, I know that I am coming to this party a little late, but I believe that these tools have a lot to offer Java web development.

Spring is here, I've got 28 more days as an undergrad. I purchased my cap and gown at the bookstore this week. It was a surreal experience. In some respects I am very excited to be graduating, and in others, I am sad that this era is coming to a close. That isn't to say I won't continually be learning, but it will be different.

Wednesday, February 28, 2007

More and Less

It feels like that time of week that I should sit in front of the computer and write some semblance of a blog entry. Just remember, this forum was never meant to be a work of literature, though I must admit that since I changed the style of things around here, I feel obligated to write more rather than less. Life is strange sometimes. There has never been more, and less, going on at the same time. Work continues to be interesting, fun, challenging and full of new problems to solve. I really love work. The countdown I have on my Google homepage tells me that I have sixty five days left of school as an undergraduate. As ironic as it is, I thought that I suffered from “senior-itis” the last few months of my high school career, that doesn't even compare to how I am feeling now. There is a rather large, and somewhat interesting project to be working on for school, but I have the hardest time forcing myself to work on it. It does involve some of my favorite topics though; compilers, programming languages, and web-architecture. I think that the real problem is that after putting in a 10+ hour day at work, coming home and doing more programming isn't very appealing. And so I say, there is more and less, going on at the same time.

I've found that when I don't want to do homework there are several good time sinks.

Twitter – if you haven't tried it out, you really need to. It's like blogging only way easier, and in the tongue-in-cheek words of my friend Curtis, way less thoughtful. I think it is fun, I should probably work on expanding my network there though the realm of instant messages and text messages still feels a little personal for people that I only know through blogs.

Reader – when in doubt, find some more blogs to read. I really like the way that you can share read items there, it's particularly interesting to see what another person found novel, important, or useful. I like it a lot better than I like link blogs, though those do serve their purpose too. If you have a feed of shared item's give me a shout out so that I can add you.

Flickr – the good 'ol flickr. Visually stunning, and always enough to keep that little voice in my head telling me that I need to get outside with my camera a lot more than I currently do. I think that in the coming weeks that will be remedied as I just spent some coin on a new tripod. I am very excited about it, it's really nice, and will let me play with some of these new fangled techniques that I've been yearning to try like HDR.

American Idol – Yep, I'm a sucker for this show. I can't explain it, well I can it has to do with having no life, but, it is still quite entertaining. It's fun to see how my personal opinions about the performers and performances compare with those of the judges.

NBC Comedy Night – Earl, The Office, Scrubs, 30 Rock. Need I say more?

When you've got the Internet and television, who needs homework. I'll be more focused tomorrow.

Monday, February 19, 2007

Day Off

Holidays are great indeed. In the past, I've been one to try to use a holiday to make up for lost hours at work. However, things are a bit different this semester, in that I only have two classes at the University. This means that I am actually at work a lot more often, during normal business hours, and because I am actually not behind on my hours, I figured that actually enjoying a holiday might not be such a bad thing. And I haven't been disappointed.

I've spent most of my day reading. I started a subscription with Communication Arts sometime in December, and my first two magazines came in the mail sometime in January. I've just been too occupied with other things to get to reading them. Not only are the magazines beautiful on the outside, they're beautiful on the inside too. Yes, I know, this should be expected from a magazine that caters to the design community, but still, it was fun to look through the art, and read the thoughtful articles. It's pretty cool stuff. You may ask, why would a programmer geek be purchasing a subscription to a design magazine? Well, I hold this idea in my head that deep inside the psyche of every programming geek is a designer (though not often a very good one). So, in an attempt to train my sense of design, I've decided to read this magazine. It's good to have balance right?

I also finished Chuck Klosterman's Sex, Drugs, and Cocoa Puffs today. That book, could really be an entire blog post on its own. Rather than spilling my guts in a review though, I will say that the book presents some though provoking philosophies on the society we live in, and “low culture”, which to some extent every person has some contact with, no matter how cultured they think that they are. I don't know that I can actively recommend this book, as I think it would be offensive to most people I know. At any rate, I finished the book for a book club and though I don't agree with some of the points the book makes, it was thought provoking none the less.

Until today, when it decided to snow an obscene amount for February, the weather has been getting nice, and I have decided to take some time each day to walk around the neighborhood with my camera. This serves two purposes. First, it allows me to get some much needed time away from the computer screen for exercise (since the heart association tells us that 30 minutes every day is a good idea). Second, it gets me outside with my camera, which should hopefully allow me to get more photos on flickr in the near future. I'm on a black and white kick currently. I may try to stick with it for a month, just for the sheer fun of it, and the fact that I've decided, I am no good with color correction on raw photos.

School has really been rather anticlimactic to this point. I really imagined my last semester at the University to be something very different from the way it is going. This doesn't mean that things aren't good, they are just different. The “senior project” is going well, and I think it is quite interesting, though there is quite a bit of busy work surrounding the real work for that class. The “industry forum” seminar that I attend once a week has been very enlightening. The speakers are well qualified to be presenting to the class, and the topics are diverse and engaging. The countdown on my Google home page tells me that I've got 74 more days until I'm done with school, it's both cool and frightening at the same time.

Wednesday, February 14, 2007

Something, albeit short

Valentines day. In my family it is a bittersweet day as we celebrate the love we have for those around us, and commemorate the second anniversary of the tragic death of a cousin. I guess sometimes we have to face the hard things in life to understand how good it really can be. Love those around you while you can, you never know when they might not be around. I came across a really great though last week, I'll pass it along.

When you are about to speak about someone else, we would all do well to think about these three points before opening our mouths.
(1) Is it true?
(2) Is it necessary?
(3) Is it kind?

An interesting principle to live by. I wonder how much more love there would be if we put some extra thought into what we were about to say.