Saturday, January 30, 2010

Q: Why spend time on 800 words when you can do it in 150 characters?

A: Because a fruit fly is not an airplane

(Allow me to twist some logic.)

I am hearing a lot of noise in the thought-o-sphere that the attention span of the public mind is just short of 20 second sound bites and 150 character tweets.

Might be true.

Recently I had to express the benefit, modernity and newsworthiness of a very complex technical architecture in under 200 words. It took me about an hour and half with a half dozen revisions. Reminds me of the Mark Twain quote, "I would have written less, if I had more time."

The task was hard, really hard.

Let's face it, there's a lot of engineering going on to get a fruit fly off the ground, maybe more than required for an airplane. I mean, jeepers, fruit flies know how to replicate themselves!

It seems to me that issue at hand is not the brevity of message format. There's nothing wrong with a headline... as long as it's attached to a good story. In fact, headlines are a necessary part of a good story.

Sadly, most of the stories are just not that good.

[Word count: 205]

Sunday, September 27, 2009

Q: What happens when you die?

A: Your Facebook page lives on

I did it. I created a Facebook site for myself. I uploaded my email contact list which Facebook used to automagically send out 'friend' invites. Then I started to look at my 'friends' lists, my 'friends' of a friend's list and so forth and so on through the network. Now some of my acquaintances are 'friends', some of my current friends are 'friends', some people from my past are 'friends' and I am sure a few Facebook impostors are my new 'friends' too. Who knows, maybe Donald Fagen will be a 'friend'. Maybe a 'friend' will offer to drive me to the airport or invite me over to dinner. Maybe a 'friend' will volunteer to look after my dog while I am on vacation.

I can only hope.

Don’t get me wrong; I am really hot on Facebook. I find the notion and technology compelling. Facebook is important. These guys got it right, for the most part. I mean jeepers, the increase in the sales of BlackBerry and iPhone units that result from 'friends' just having to see what's on their walls is going to be of significant consequence. Facebook is a great step forward in the ongoing transformation of human attention into real currency.

I am a little embarrassed to admit it, but I find my introduction to using Facebook to be very meaningful. I am sorta loathe to go with the crowd. But, a I said earlier, it's an important technology.

A photographer-person that I knew from college days took a lot of photos during that time and posted them on his Facebook site. I was in a few of the photos. These photos, coupled with the ones I discovered as I put my life together to present on Facebook, have allowed me to take an objective look at my life. Words really don’t describe that which the eyes in those photos reveal. So here is a sampling.










Oh yeah, my daughters have yet to accept my invitation to be a 'friend'.

Saturday, August 15, 2009

Q: What is the cure for our woes?

A: Three days of fun and music, and nothing but fun and music.

Forty years ago today I woke up in the back of a Pepsi truck. I had left Port Authority Terminal the previous night on a bus to Bethel, New York to go to Woodstock. I was with my friend, Henry.

The bus got caught in traffic way outside of the festival area, so we got out and walked, all night long. Sunrise came. It was pouring rain. The only dry place that I could find was in the back of an empty Pepsi truck on the periphery of the festival field. Henry was across from me. It was Saturday morning. We fell asleep in a sitting position.

When we woke up we were cold, damp and hungry. So, we did what the times demanded. We ate the orange acid.

And thus began my participation in the Woodstock Festival.

We trudged down into the mud, found a place to the center-right of the stage, about 150 yards up and sat down. The sun came out. Things began to warm up and look a whole lot better. I was no longer cold, damp and hungry. I was someplace else, someplace really, really else.

The first band up that Saturday was named Quill or Keef Hartley. I had never heard of them at that time and I have not heard of them since. No matter.

From then on it was pretty much as depicted in the movie, except for two things: Sly and chicken tacos.

After traveling around the cosmos for most of Saturday, I needed a rest. At some point in the late night, after Janis, I fell asleep again. Somewhere in my sleep I remember feeling the ground shake. I woke up. The ground was shaking still. I got up to look around. Down on the stage was Sly and the Family Stone. The ground was not really shaking. It was moving sympathetically to Larry Graham’s bass lines. The music literally took over my body. I had no say in the matter. The next thing that I knew I was singing “Higher” while dancing around on the little piece of muddy heaven on Earth that the cosmos had given me for the weekend. Had you told then that I would carry those sounds and memories around with me for the rest of my life, I would say that you were probably right. At that point the whole notion of what it meant to be alive shifted a few degrees off the beaten path. And, at last I knew what it meant to really play the bass.

After Sly finished his act and the stage was clearing I realized that I had not eaten in two days. So, I figured that getting some food might be a good idea. I left my muddy piece of paradise and made it to the periphery at the back of the field. I found a taco stand and stood in line for a while. I bought some chicken tacos and took them back on plate to share with my friend Henry. All of the fairy dust had worn off, so I was pretty hungry.

So there I was trudging through the mud back to my spot when out of nowhere a hand came up and overturned my plate of chicken tacos. I was really hungry and really looking forward to those tacos. The guy that had tipped over my meal looked up at me from the ground where he was sitting and said, “I am sorry man.”

I said, “It’s alright.”

And, it really was. At that point I had not a stitch of anger in me. The tacos were on the ground. That was it. There was nothing to get mad about. Why? Because for the first time in a long, long while I felt safe; really, really safe. At that moment everything was all right in the world. It was as if the horror that the TV had been bringing me since Nov 22, 1963 did not exist. Walter Cronkite was not there on the 6 O'Clock News to tell me how many of us and them had been killed that day in Viet Nam; there was no “we interrupt this program to tell you that somebody has been shotagain.” There was no more fear of getting arrested and being tossed into jail for ten years for being an adolescent pot smoker. I did not have to think about what I was going to do if I was drafted when I turned nineteen, to be brought into a war that had been with me all of my life. At that moment in time and space, I was safe. Nobody was going to do anything bad to me. Nobody was going to threaten to take me in the boy’s room, cut my hair and then beat the living daylights out of me. All that I had to worry about was to not eat the purple acid that the guy on the stage was telling me to watch out for.

And, for one tiny, itsy, bitsy, teeny-weenie, morsel of time I was not alone. There were a lot of me out there. It’s a feeling that’s been hard to replicate since, despite the relief of the last election and close to thirty years of drug-free, alcohol-free living.

Then the sun came up and the rain started again. Henry and I looked at each other. It was time to go. The rain was winning.

So we worked our way out, jumped on the hood of some car going to a bus station and headed for home. I was barefoot. My shoes were out there someplace in the mud.

And so it went, forty years ago today. I was fifteen years old.

Sunday, July 19, 2009

Q: What is the warranty of Open Source?

A: Here, you figure it out.


This posting is rated
PG
[Pretty Geeky]
Knowing about code is helpful,
but not required
.

After seven years of enterprise programming in .NET/C#, over the past year I've been relearning the hardcore aspects of enterprise level Java. Maven, Spring, Jetty, Jersey and Eclipse have become my new and free-for-download best friends.

It was hard breaking away from the Redmondians. But after the bait and switch tactic of ASP.NET MVC, I decided to take a rest from the lemming like culture of Visual Studio's "Productivity Out of the Box". I mean, couldn't those guys on Lake Washington figure out that ViewState was a bad idea from the get go?

Anyway, all aspirations come with a price and a story. This is mine:

A few weeks ago I got this bright idea to exercise my Java coding prowess by making a Java library that provides a randomization service against often used data, in this case the city, state, longitude, latitude information associated with a given United States Postal Service zip code.

It was a simple idea. The library publishes a method, getAddress(). Behind the call to getAddress() is code that gets a random Address object from a list of Address objects. The list of Address objects is composed of data that resides in an XML file that contains all the address information for zipcodes in the United States.

The XML file is embedded as a resource in the Java project to allow the library to be transportable. I got the zipcode XML file from the Internet. The effort seemed like a no brainer.

So I make the library code as a Maven project under Eclipse and write my unit tests every step of the way using TestNG. (I am obnoxiously loyal to Test Drive Development.)

I run the unit tests under Eclipse and also from the command line, just to be extra special sure. No problem. All works as planned. At the end of it all I have a nice JAR file which I can share with my coding brethren and qualified family members.

Then I get another bright idea, "Say, wouldn't it be great to expose my Random Address library as a REST service". After all, I am just as susceptible to coding trends as the next guy. So getting a handle on writing a Java based REST service using that new fangled OpenSource project, Jersey, seems a nice way to kill two birds with one stone.

(This is the part in story where the skies beginning to blacken. Evil things are about to happen.)

That night I go home from the day job and begin to read up on Jersey. It seems that all the code examples on the Internet are referencing beta versions of the Jersey artifact, which is weird because I know for a fact that there is a 1.0 version in play. All the coders at work doing REST under Jersey are using the 1.0. Anyway, I figure to myself, what the hell, just get the Jersey code examples to work and take care of upgrading to 1.0 later.

So I do. I use Jersey to get a simple REST site up and running under a Jetty web server.

Then I fiddle with the code to my Jersey REST site to make calls to the API in my Address Randomizer JAR/Library.

You know what? THE ADDRESSS RANDOMIZER LIBRARY DOES NOT WORK!

I figure, OK, I'll work around the Jersey enabled web code; after all maybe the beta version really is a dog. I write a unit test within the REST Web project that accesses the Address Randomizer directly, straight call to the JAR file.

THE UNIT TEST FAILS TOO!

I ask a colleague for guidance. He says to debug the unit test in the Web Project as a remote server. So, I fire up the Surefire debugger from the command line and bind in the unit test under Eclipse.

(Now for those of you common folks that are looking for breathing apparatus by which to survive this descent into the perilous depths of Java coding, please know this: if all this geekiness is causing you to lose interest, take heart! Read on knowing that in 5 years all of this technology will be replaced with a whole new set of gizmos that will be just as hard to learn and equally exasperating to use.)

Back to the coding.

So I look at the code under the remote debugger. It turns out that the XML file is not loading under the REST Web Project. I don't know why. All I know is that there is a null value where the file based InputStream transformed by getResourceAsStream() is supposed to be.

The wheels begin to spin and the self-doubt sets in. What am I doing wrong? What don't I understand? Am I loading the resource properly? Is there something about the Jetty web server that I do not understand? Is the Jersey beta code that wacky? Is there something more about the XML file format that I need to learn?

I go to lunch with a coding friend. We talk about the problem. He says that I might want to check the XML to make sure that the prolog is correct. And, he goes on to say, that it's a real craps shoot coding to XML in Java because all the XML parsers seem to work differently.

So, I fiddle with the encoding. Still, the XML file won't load.

I do some new coding in the original Address Randomizer library using the Xerces parser directly. I get a new error: Content is not allowed in prolog. I track down the error message on the Internet.

At one point I am taken to a Java bug report, UTF-8 encoding does not recognize initial BOM.

I think, can it be this deep that I have to start looking at bytes in the XML file? But, I figure, what the hell? At this point I'll do anything. I am that frazzled.

So I download the workaround code. The code is literally doing byte inspection, not my favorite topic in the world of computer programming. Turns out that the code had portions commented out. Can I trust this code? I go through it line by line trying to follow the logic. It seems that some of the comments were left in by error. I start uncommenting code. Then recommenting code.

Three hours later I am still at a standstill. I go to sleep quivering in my bed completely obsessed about the error of my ways. I just can't get it. The code is working running the unit tests under Eclipse. But, when I try to use the code in the REST Web Project, running against Maven from the command line, it fails.

It's a new day. It's the weekend. I can hit the code really hard.

So I start fresh, getting ready to completely rewrite the whole Random Address library. Then I notice something.

I try to follow good coding practice. Thus, I put the name of the XML file in the resource as a constant value like so:

/** The Constant ZIPCODES_FILESPEC. */
private static final String ZIPCODES_FILESPEC = "zipCodes.xml";

Just for giggles, I look at the name of the resource file in the file system.

The name of the XML, zipcodes.xml.

Again, the name of the XML file in the file system is, zipcodes.xml. The value assigned to the constant in my code is, zipCodes.xml. One little 'c'!

So I go back and change the constant value to:

private static final String ZIPCODES_FILESPEC = "zipcodes.xml";

The code works everywhere!

So what do we have? I spent at least three evenings trying to find the bug and fix it. I took the time of at least two of my friends trying to leverage their expertise to solve my problem. All for what?

Here's for what: Learning that the libraries under Eclipse will load a resource file, case insensitive against a filename:


/**
* This is a helper method that fetches an Xml file that is embedded as a
* resources as an InputStream and converts that input stream into a string
* that represents an in memory representation of that Xml file
*
* @param resourceFilename
* the name of the xml file. You do NOT need to prepend a '/'
* symbol to the file name. This method make the prepend for you.
* @return the xml file as a string
*
@throws IOException Signals that an I/O exception has occurred.
*/
String getXmlFileString(String resourceFilename) throws IOException {
InputStream is = this.getClass().getResourceAsStream(
String.format("/%s", resourceFilename));
return convertStreamToString(is);
}



While the libraries in my Web Project will not!

Had Eclipse failed from the get go, I might have noticed that one little 'c' a whole lot earlier and avoided many a night of fitful sleep.

I love to code, always have, and always will. Coding is an enormously demanding, yet intensely satisfying creative experience that's hard to describe to anybody but another programmer. Still, when I signed up to work with code as a way of life, I don't remember reading the paragraph that said to be suspicious of all that you see and never to expect anything to really work, particularly if you follow the Way of the OpenSource.

It's like this: most painter's don't have to know about the in's and out's of each type of paint in order to make a portrait. Paint making is mostly a third party affair. An artist gets some paint and executes the intention.

I really wish that the same could be said of OpenSource programming. I do. I really, really do.


Muse Alert!

I need to thank my wife for her patience on this one. I spent the whole weekend getting the code to run and then writing up on it.

She didn't give me any trouble at all; no "You are spending too much time in your geekiness."

Most guys would have been sleeping on the couch for lesser offenses.

Sunday, July 05, 2009

Q: What happens when work goes away?

A: Society goes insane

No doubt about it, the bubble's blown and payment is due. Without a moment's thought I can come up with three friends that are out of work.

It seems as if every Saturday the number of people trying to resell old clothes, VHS players and tattered furniture along that stretch of block on Venice Blvd, just west of Sawtelle is getting bigger. The sellers are people that used to work in kitchens, haul lumber at job sites, trim trees and do light assembly in local plants. The work that they did was provided by an economy that was based on funny money. And that money is long gone and it ain't never coming back; neither are those jobs.

So this where we ended up. It's like some scene out of Metropolis where the cream of society dress in white and live far up high in the clouds. The laborers dress in black and everyday march into the bowels of the earth in a eerie lockstep to man the gears of industry. Sort of like working on the line in what used to be GM. Only now they march in lockstep to the unemployment line, food stamp office or, if INS status is wanting, the nearest border.

The sad fact is that, for a variety of reasons, more and more people will be unable to participate as wage earners in the modern economy. We've moved way beyond the value of labor being the brawn of one's body. And, that taking advantage of entrepreneurial opportunities in most situations comes with a need for significant amounts of capital means that you can kiss goodbye the notion of starting an empire by selling oranges on the side of the road and reinvesting the profits. Fact is, the only viable side of the road to be had has 4 lanes in each direction with a name that starts with the letter "I", as in I95 and I80. Mickey D, Pizza Hut and Burger King tied those locations up a while ago.

Besides the important aspect of providing money to put food on the table, work organizes one's self and one's society. Ever since being ejected into the world, we've had agents that have organized our sense of self. When we were infants our parents held us and talked to us, even before we could figure out what they were saying. The subliminal message was,"You exist, you exist". We needed the ongoing message for our identity to emerge.

Then as we got older, regularity set in. Most of us had a specific meal time and bedtime. Then it was time to go to school. Our week became organized. School was soooo boring. But, as much as we hated it, the structuring of time further enhanced our sense of self and brought predictability to our world.

After school, we went to work. For some of us who were lucky enough, our life had meaning. But no matter what, just about all of us had structure. The notion of being without ego was kept far away. If we had no internal sense of existence, then that was easily provided by the alarm clock going off each morning.

But what about those of us that didn't have the parent telling us that we existed, the predictable meal and bed time and all the external structures that take a blob of undefined identity and evolve it into a mature human being? What's happens to these people?

Well, if the world won't on its own provide the structure required to differentiate, then these type of people force the world's hand. They injure themselves in public view. They'll get caught for a grand or petty crime that ends up having time structured for them: jail. In some cases they'll just join the military.

The human psyche needs structure.

Which brings us to work. Here's the deal. All the talking heads are saying that we are going to have significant unemployment for a long time, maybe forever. It takes a lot of smarts to participate in the modern economy. After a while the UPS packages will figure out how to deliver themselves and all the movie theaters will be in your house, even the 3D ones. We won't need drivers or ushers.

The birth rate might go down. But, without birth control in the water supply that's debatable. So there is a good possibility that we'll have a lot of people sitting around with no place to go, without need of an alarm clock. The external structures that reinforce ones sense of self will diminish. An ego without identity is an ego in panic.

Then as far fetched as it might sound, if the unemployment rate is high enough, for long enough, society just might go insane.

Monday, May 04, 2009

Q: What’s more dangerous than global warming?

A: Riding a bicycle

OK, I’ll admit it; the global warming stuff is scaring the bejeesus out of me. You’d have to be half brain dead to think that melting glaciers, weird weather and rampant drought are not very, very serious problems.

There's no twisting my arm; I’ve drunk the kool-aid. Global warming is serious and I am not going to be an innocent bystander on the road to geothermal destruction.

So, I am paying attention and doing all that makes sense. I’ve taken a job four miles from my domicile. I drive a four-cylinder car, as does my wife. I have two trash bins in my kitchen, one for bio-degradable waste, the other is for recyclables. And, I avoid using my car whenever possible.

Which brings me to the bicycle.

I bought a bicycle a few months ago in order to kill two birds with one stone: to get some ‘free exercise’ and also to do my part bucking the trend toward environmental Armageddon. I mean, I going to go to work anyway, so I might as well burn some calories on the way there. And, there is both a moral and financial exhilaration that comes with filling the tank every two weeks. Win/win as they say.

Well that’s the dream. Let me tell you the facts. Riding a bike from West LA to Santa Monica is like going all in with the chips that represent the remainder of your lifespan. First, most streets do not have bike lanes. This means that I am forced to share the roads with four thousand pound monsters traveling at forty miles an hour, any one of which can just flick me off planet Earth with nothing more than a nudge from its right fender. And, if the fender does not get me, an open driver's side door on a parked vehicle will. The best case is that I can see it coming and hopefully avoid throwing myself over the handlebars as I careen to a stop. The worst case is that I go flying over the door into traffic, in which case I’ll get a one-way ambulance trip to a local hospital.

And then there are the alleys and driveways. I have to watch each alley and driveway that I pass to make sure that there is no vehicle emerging. In most cases the driver will not see me coming. And, if he or she does, it has been my experience that most times it just won’t matter. The vehicle keeps going on just the same. It’s as if I have a sign on my back that says ‘Hit me’.

There is no place for bicyclists on the thoroughfares of the American city. Don’t let the Save the Planet mumbo jumbo fool you. When it comes to LA, New York, Boston or Chicago, Mother Earth has been bought off by the Big Three, or what’s left of them.

But, there is a little, millimeter size sliver of hope. Some cities get it. If you live in Barcelona, you can walk up to a ‘share a bike’ stand and take a bike through a myriad of bike lanes to your destination. Pickup, ride, drop off…simple.

The same is true in Paris and Rome. We’re not talking about a few bikes for the Birkenstock crowd. According to a friend of mine from Paris, the City of Lights is going to put 400,000 bikes on the street. This is a lot of drivers to take out from behind the wheel.

Sour grapes aside, I’ll still keep at it. I need the exercise. When worse comes to worse, I'll ride on the sidewalk despite the fact that my municipal guide to bike riding in Los Angeles advises me not to. Who knows, maybe the bike thing will catch on.

Keep hope alive.

Saturday, March 07, 2009

Q: What’s a good way for a Big Corporation to save money?

A: Use the Corporate Jet [listen]

OK, I’ll admit it. I don’t think that I am going to make any new friends on this one. But, what the hell?

It seems that recently there has been a lot of hubbub running through the airwaves expressing indignation about the audacity of Big Ass Bank CEO’s taking the corporate jet to Washington in order to get some bailout dough in order to allow the big wheels of finance to keep on rolling.

Whether or not bailing out cash strapped banks is a good idea is a question that is better answered by someone who actually knows something about intricacies of financial prestidigitation. As far I can tell, turning a ten dollar deposit into a hundred dollars in loans is a fantastic, yet fundamental magic trick that seems to be the bedrock of the global economy.

So I am not going to comment about the wisdom of bank bailouts. But, I do know something about the economy of corporate jets.

The Big Ass Computer Manufacturer that I worked for in the nineties had a jet. It was a Gulfstream, I think. I was never on it. That was a privilege reserved for senior executives and board members.

One day I was ranting on about the injustice of it all—thousands of assembly line workers supporting the excess privilege of corporate executives. After I finished my rant my boss sat me down to explain the facts of life. If I had to put a title on the lecture, I would call it, The Value of Time.

At the time I was working for the Big Ass Computer Manufacturer, it had 19,000 employees and was pumping billions of dollars in revenue. Also the company’s stock was headed to its $80 a share high mark. There were billions of dollar in play every day. At the top of this prosperity was a group of ten people running it all. If these guys made a good decision at 9 AM, a few million dollars showed up on the bottom line at 5 PM; make a bad decision and a few million bucks went to the red. Given these numbers, it is not that far fetched to think that the value of the senior executive’s time was worth well in excess of $5,000 an hour.

So let’s say I am Joe the CEO in New York and I have a meeting in Washington with the powers that be. Let’s use the scenario that my group of four—me and three senior VPs—are traveling on a standard commercial flight, at a ticket cost of $658 round trip from NY to Washington.

We leave my office at 10 AM, just after a 9 AM conference call with the President of France. We want to get to LGA by 10:30 AM for an 11 AM flight to DC. We hit severe traffic at the Triborough and get to LaGuardia at 10:50 AM. Due to the heavy traffic we have missed the flight. The next one is in an hour. So, we get to wait. That hour will cost my company at the least $20,000. And because we are to meet with the House Committee on Really Important Things, I am going to cost the taxpayers some money because all the Congressmen and Congresswomen will have to wait for us too.

Or we can go to Plan B. We leave my office at 10 AM, hit severe traffic, arrive at La Guardia at 10:50 AM. We go to the Corporate Hangar, get on the Gulfstream and off we go. The cost? About four thousand bucks a head back and forth. (You can lease 50 hours of a corporate jet for about $425,000 or 8,515 an hour.) While this may seem expensive at first glance, when you take a look at numbers in terms of risk mitigation and opportunity cost, four thousand bucks for a NY to Washington roundtrip flight for a Fortune 500 executive is not that bad. In fact, it's pretty good.

I know, I know, four grand is a lot for the average traveling salesman. But, these people are not average. They may be running multi-billion dollar corporations into the ground, but they *are* running multi-billion dollar corporations. The Gulfstream is nothing more than a piece of the equipment that you need to play the game. Think about it. A pair of leg pads for a NHL goalie still costs around $1200, even if the goalie plays for a last place team. It costs a lot of money to play in the Big Leagues.

So it seems to me that the real issue is not the corporate jet. It’s the people traveling in the corporate jet. I mean, all this righteous indignation would be but a murmur if the passenger were Brad Pitt, or if our 401Ks were worth the money that we put into them.