Friday, January 30, 2009

There Is No Shame In Shame

This post is a divergence for me as it is not related to development nor is it technical it is simply an observation of the current economic situation and what I see as some of the major problems. I don't presume to be all that economically savvy but I can observe and evaluate what I see as well as anyone.

With the economy getting visibly worse I think this is a great time for Americans to take a hard look at themselves and try and figure out what went wrong and why. I have heard many opinions about why we are in such a terrible economic downturn: greed, bursting housing bubble, frozen credit, lack of consumer spending and a whole host of others. But I believe that all of these are effects of not the cause of the economic downturn. The most fundamental reason for all of these is shame or more precisely the lack of shame.

In the current politically correct age Americans have lost their sense of shame. This is going to sound contradictory but shame is nothing to be ashamed of. People feel no shame for anything, and if they get a whiff of shame they lash out and blame those shaming them. What the hell happened to us.

Banks and mortgage companies conjured up "sub prime" loans for people who historically couldn't qualify for a loan on a $3 cappuccino but all of a sudden qualify for a $100K plus home loan. The human waste that would willingly dupe good people into such a ludicrous financial situation should be shamed. It wasn't greed but the lack of shame of making money by graft and deception that caused the sub prime mess. Greed was the fuel but shame could have been the breaks to reign in the greed, but those breaks were never applied.

Don't believe for a minute that those people who were allowed to be duped share no responsibility. They people should be ashamed for being so ignorant of basic microeconomics. In the time of almost limitless and FREE information (books, Internet, financial advisers) there is no excuse for anyone to make a financial decision that gets them into so much financial trouble from something as simple as the value of their home decreasing or the interest rates going up 1 or 2 points. Those people should be shamed for being so ignorant and lazy, not stupid; stupid assumes they didn't have the brain power, ignorant and lazy because they just didn't take the time to take advantage the myriad of information sources. Now if they really didn't have the brain power the onus rest squarely on the banks and/or mortgage companies for serious malfeasance and they not only should be shamed but incarcerated. The problem now is that those people who did take the due diligence to make a good financial decision but were swept up in the tsunami are now being punished for nothing more then their neighbors and financial institutions not being ashamed of doing the wrong thing.

Onto to the executives. This group is a little harder to shame as a group because their are good executives and their are some mediocre executives and then there are the down right piles of crap executives. The good executives who didn't lie, cheat and steal to get ahead and in fact helped your customers and employees steer clear of the current debacle [Daniel P Amos of Aflac], you should be applauded for your strength of courage to do the right thing in an environment of "irrational exuberance."1 For the truly monstrous executives who exacerbated the current economic disaster you should be ashamed for living like a vulture, in which case you should do the honorable thing and give back your millions and step down and never be in charge of anything more than a hot dog cart. Mediocre executives, well you should just be ashamed for either being too stupid to be in the position you're in or for sitting on the sidelines and watching the world crumble. As an American executive you have a responsibility greater than than to your share holders. You have a responsibility to the American people to live honorably as well as successfully. You have a responsibility to your customers who have spent their hard earned wages to purchase your product. You have a responsibility to your employees who give you their blood, sweat and tears every day to help you prosper. As an executive you should know who is trully important and why. America is important because it has an economy and government that, while flawed, allows you to succeed. Your customers are important because they are the reason you are in business and they are your livelyhood,without them you don't have a business. Your employees are important because they are the company they are its hands its heart and its brain, without them your ideas are just thoughts without purpose. You, the executives, are important because you are the soul of a business and if you are dishonorable then the soul of the company is no better than a common criminals. The only group that really isn't that important is the share holders, because thousands of successful and privatly held companies prove that every day. If a share holder insists on making money at any cost they are a cancer to America, to your customers, to your employees and to you and they should be disregarded as you would disregard the rantings of murderer. Let their money go because its not worth selling your soul to let evil prosper. A share holder who doens't feel shame for making money at the expense of the truly valuable is a terrorist in every sense of the word.

While I'm not as synical as most and don't believe all politicians are crooks, I do believe that the only good politician is a hog tied politician. Power always progresses toward corruption. Americans have been wrongly convinced that a good government is a productive government. A stalled and divisive government retards its power and therfore slows progression toward corruption. There are times, during war or national emergency, that an efficient government is necessary but generally a government mired in debate and conflict is desirable. During the roaring 90's and early 2000's politicians were given too much power by the American poeple. They were allowed to create policies that were are now suffering under. Policies that made lending to "sub prime" borrowers possible through Fannie Mae and Freddy Mac which were allowed to leverage to the tune of 50 to 1. That means for ever $1 of actual equity they were in debt $50 dollars. This policy was to make home ownership a reality for all Americans all in the name of fairness. Those politicians, particularly Barnie Frank, should be ashamed for putting the American economy and the world economy for that fact in serious jeopordy. These same politicians that got the world into this mess are now trying to tell us they are going to get us out of it. They should be ashamed for being such a miserable failure but still thinking their opinion counts. The American people should be ashamed for not throwing these bums out of office when their stupidity caused this mess and now we are giving them another bite at the proverbial apple. I had a hope that Obama could turn this around but he is turning to the one thing that got us into this mess in the first place, debt. It is shameful that our addiction to debt is going to cause the first American generation to be worse off than their parents. We should be ashamed to leave our children and grandchildren the burden of paying for our multi trillion dollar debt, I repeat $3,000,000,000,000 +/- 2 trillion. It makes me physically ill to think we are going to screw every man, woman and child with a minimum of $35,000 of debt for at least the next 20 years.

So be ashamed America. Be ashamed that we deserve this recession/depression for our stupidity, ineptitude and greed. Be ashamed for being the first generation in America to leave our children with less than we we given from our parents. Be ashamed because it is the only thing that will force us to do be better than we have been.

Sunday, January 25, 2009

Back To Work Reflections

Well, I'm starting my new job on February 2nd and it feels pretty good to be going back to work. Thanks goes out to everyone for their prayers and thoughts which are greatly appreciated. I am humbled by everyone's concern for my wife and I and we won't soon forget everyone's kindness. As a form of gratitude I want to examine what I learned during this turbulent time in my life. To that end I ask myself what did I learn - ala South Park.

So, what did I learn from all this? First, before leaving a good company do an in-depth self examination of your situation and ask, "is it really horrible or is it just challenging?" If it is horrible can it be corrected? Second, don't run to the first opportunity presented, do diligent research of the organization/business that you are thinking of joining and make sure you can be successful, happy and that the company shares your beliefs both socially and culturally. Thirdly, take good advice from good people who honestly care about you and discard negative and short sighted advice.

Enough generalities, what did I learn that is specific to my situation? Flat organizations are idiotic in concept and in practice; without minimal bureaucracy how do you rationally organize projects, resources and people. A truly flat development organization has no way of preventing nomadic development and cowboy coding. Great technical professionals are very smart, great at solving problems and taking advantage of opportunities but technical professionals are, let's face it, not the best organizers. How many times [as a developer/thought worker] have you started down a path of solving a particular problem and end up building a new framework or library. I know if I don't actively stay focused on my target I tend to start solving problems that nobody has or is likely to have; or worse, creating something that my employer neither needs nor wants. A flat organization also tends toward context thrashing. If people aren't assigned particular tasks/projects then the chances of bouncing from one task/project to another is inevitable. Flat organizations also lack any real leadership because there are no assigned leaders and if a business/organization isn't lucky or innovative enough to have automatic leaders then you are stuck with a developer herd going in all directions - not exactly a rosy work environment.

I also learned that when you enter an environment where you are continually told that you are working with the smartest people, run, run like the wind. When people have become so arrogant and self absorbed that they begin to truly believe they are the smartest people in the room you are dealing with a room of typewriting monkeys. You very well may or may not be working with some very intelligent and talented people but when those same people begin to toot their own horn then they have become blind to their own ignorance. Take a queue from Socrates, "I know that I am intelligent, because I know that I know nothing." No one, not even Einstein, was the smartest man in every room on every subject. What happened when Einstein joined a group of botanists? He became an above average Joe. If you are humble enough to know that you are not the smartest then you will always be pushing yourself. If you are the smartest around then you don't need to push yourself you can just rest on your laurels - not a good trait in IT.

I also learned to be more diligent about a budget. When I first got laid off my wife and I took a look at our finances and quickly realized that we had very little in reserve. The worst part was not that we were going to have to tighten our belt but that if we would have just handled our finances while times were good we wouldn't have been in such dire straits. My income alone was enough to pay-off most of our debts if we would have just been more disciplined. This was the hardest thing because it is the one thing we had the most control over and we squandered a great opportunity. This was a hard learned lesson that I am going to correct quick, fast and in a hurry at my new job.

If you have recently lost your job trust me I know how hard it is, especially psychologically. All I can say is turn to your family and friends they are going to be your anchor in the coming storms. Try not to panic, I know, I know easier said than done but this too shall pass. Try and learn from your current situation, you are living through a difficult time that can show you who and what really matters in your life. For me I rediscovered the strength of my wife, the love of my family and the strong bonds of friendship. I believe that everything happens for a purpose and if you stay alert you will discover the purpose of your hardships.

Sunday, January 11, 2009

Fluent Calendar Builder

If you have ever worked with Java's java.util.Calendar interface, you understand the definition of pain. Don't get me wrong, java.util.Calendar is head and shoulders above java.util.Date or java.util.Time but it still hurts way too much to work with. Especially if you want to do something simple like instancing a Date/Calendar with tomorrow's date:

java.util.Date:
Date date = new Date(2009, 1, 12, 0,0,0);
System.out.println(date); <-- Fri Feb 12 00:00:00 MST 3909


java.util.Calendar:
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.YEAR, 2009);
calendar.set(Calendar.MONTH, Calendar.JANUARY);
calendar.set(Calendar.DATE, 12);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
System.out.println(calendar.getTime()); <-- Mon Jan 12 00:00:00 MST 2009


As you can see Date just gets it wrong. First of all it starts the months at zero, there is no reason for a zero index other than bad habits carried over from pointer based languages (C,C++). Second, what's with the year 3909? Oh that's right, Date works with 2 digit years [ala millennial bug] so instead of 2009 you would need to set the year to 2009 - 1900 (Date's epoch) which is 109.

Calendar doesn't do any better with the month index starting at zero, but at least it gives you some static fields to prevent mistaking January with 1 (how silly of you using logic, 1 = January). Plus, Calendar does work correctly with 4 digit years. But, OMG what a pain, from 1 line of instantiation for Date to 7 lines for Calendar.

These are just the easiest pain points to point-out, there are dozens for both Date and Calendar. Review this pdf to see more problems. Why can't it be as easy as:
Calendar calendar = Calendar.tomorrow().midnight();

Well it can be with a little work. Enter the Fluent Interface pattern. It can be used as like a DSL and it can ease the Date/Calendar pain immensely. By wrapping the instantiation of Calendar in a DSL Fluent Interface, CalendarBuilder I was able to do some amazing things like:
Calendar id4 = CalendarBuilder.builder().july().fourth().year(1776).build();
Calendar tomorrowNoon = CalendarBuilder.builder().tomorrow().noon().build();


Simple as Date but with the power of Calendar - much nicer. Be warned, this still doesn't remove the other failings of Calendar but it does make it less painful than pulling nose hairs but still as painful as hitting your silly bone, a little tingly and sometimes you even laugh. Don't expect the problems with Date/Calendar to get resolved any time soon. Date was Java's first attempt at working with temporal data but it was very flawed. Calendar was introduced in Java 1.1 and it fixed some of Date's ills but introduced a whole new set of problems. Now JSR-310 is set up to fix all of Date and Calendar's flaws but I'm not holding my breath. Some of the smartest people around created Date and Calendar and they couldn't get it right. I expect JSR-310 to make some good progress toward a better temporal model but I suspect that it will keep some warts and sprout several of its own. But if you have to work with Calendar I would strongly suggest a Fluent Calendar Builder until JSR-310 rides in to the rescue.

Wednesday, January 7, 2009

Java/J2EE Web Developer Looking for Job

Well, I'm now unemployed. Okay to be accurate I'll be unemployed Monday morning. I was working on a contract to hire gig and the contract ran out but the hire never materialized. What is the lesson learned from this? Don't depend on a contract to hire to pull through, always keep your options open. I got burned but learned.

I was really depending on getting hired on full time but now, I'm suffering jobless stress or whatever its called when you totally panic because you no longer have any income. My first reaction was to run out an cancel all of my extraneous expenses; cell phone, home phone, long distance, internet, gas, electricity, water, oxygen. Then my more level headed wife stepped in and calmed me down enough that I could think somewhat clearly. I did cancel my long distance but kept the phone and downgraded my cell phone service. That will help but it's not going to be enough. I will need to get another job, preferably in IT but if times get too tough I'll have to dust off my old server apron.

Don't get me wrong I don't believe any job is beneath me but I've upped my living standard a bit since I last was a server. I don't mind pulling it back but that still doesn't stop me from feeling a little anxious - strike that, a lot anxious.

This will probably end up being a great opportunity but right now the going is pretty rough. If anything its only hardened my resolve to pay off my debts quick, fast and in a hurry. Debt is a
serious weight that just drags you down to the depths.

So if anyone in Colorado is looking for a skilled Java/J2EE developer and you think I would be a good fit, I'm all yours.

Timothy Storm's Resume
Post your resume online!