Saturday, December 29, 2007

Pondering a Solution to Creative Blocks

With a new year coming, a little reflection seems like the logical thing to do. And thanks to Lifehacker, I have a nice link all ready to kick off a topic: Jay Smooth of talks about "the little hater," that part of you and me that holds all of us back from our creative endeavors. It's a good video; y'all go take a look.

It's easy to recognize what Mr. Smooth is talking about. Back when I was studying Physics in college, computer programming was both a hobby and my creative outlet. To me, programming embodied both the logic and causality at the heart of science and the complete-freedom-within-constraints that is the hallmark of art. Physics certainly has a beauty about it; what study of Creation doesn't invoke admiration for the Creator? But that beauty wasn't my beauty, and I was never really going to understand it all. However, a computer is just a simple machine. They do only simple math. Programs are just sequences of instructions. In that, I found something I could understand. Something I could use to create. The bizarre synergy of technology, math, and creativity captured my imagination as nothing ever had before. And so what began as a hobby for me slowly evolved into the obvious choice for a career.

But there's a funny thing about careers: thy involve quite a lot of work. After a while my programming job overwhelmed what remained of my programming hobby. It's a common tale, one that I assume is shared to some extent by everyone who notices that they are growing older. While I am still fascinated by programming, still reading trade magazines and programming blogs, and still keeping up with the field as best I can, I find often I'm missing something. It isn't the job that changed, it's me. I am no longer as easily content creating ephemeral programs that do their work for a few days, months, years, or decades and then become obsolete and vanish into an archive somewhere, until entropy causes the storage media to decay beyond recovery. Somewhere along the path, I realized that I was that guy who still had a stack of punch cards that made up his first great program. (My "stack of punch cards" is actually a printout of C code, but I've got it all right, stashed in a trunk in my closet.) I was holding on to the memory of creating things, like a mother holds on to her child's kindergarten projects. And for the same reason: love.

Does it seem a little cheesy that I'm now going to write that the best way to beat the little haters is with love? Perhaps, but hang with me for a minute. I got into the programming business out of curiosity, but I stayed in it because I love it. Seriously. The problems I solve now are much bigger than any I solved back when it was just a hobby. And they can be both much more frustrating and much more fulfilling because of it. In fact, they are so big that I can't solve them alone any more. But that's good too, because it means I'm surrounded by people who, whether they realize it or not, love the art of programming just like I do. And since we are all different, we can learn from each other. And isn't that what life is all about? Not everyone gets to love their work, and it's a blessing that often gets hidden by the zillion stresses that come as part of the daily grind. But Mom never told me love was easy, she just said I would know it when it happened.

I've been talking about my job here because it's where I find frequent frustration and waning motivation most often. But whatever creative endeavor you find yourself blocked in, the philosophy is the same: we create out of love for the act of creation.* So when your little hater is yammering in your ear, remember the love. There are many techniques to beating stress, breaking through creative blocks, and finding motivation. None of them will work without first remembering that you love doing whatever it is you are trying to do. If you didn't, heck, you wouldn't be getting so worked up over it in the first place.

*There's perhaps a sermon in here along the lines of God is the Creator and God is Love so the act of a creator is an expression love. But I think I had best leave the sermons to those more eloquent than me. I'm being quite ham fisted enough as it is with this topic.

Saturday, December 22, 2007

The Last Solar/Battery Post of the Year (I Promise)

There have been several stories in the news over the past week about power generation and storage that caught my eye. The University of Copenhagen is studying a method to boost solar cell efficiency to as much as 30% using "nanoflakes." Meanwhile a well financed start-up has begun making solar cells out of material that is cheaper than silicon. Their stated goal is to make solar power cheaper than coal. (Which is basically the holy grail of the solar power industry, because they could really begin competing with the traditional players at that price.) And all of our new, cheap solar power needs to go somewhere, so Stanford researchers are working on a way to get lithium-ion batteries to store ten times the current amount of energy. Imagine for a moment an iPod that actually had enough battery life to play all the music it can store, or a cell phone with a charge that would last all week.

If solar power isn't aggressive enough for you, then look into Toshiba's new 20 foot by 6 foot nuclear reactor. The first one is expected to go into service next year. Yeah, I really need some sort of science fiction reference to go here, but nothing comes to mind.

And finally, after collecting all of these stories, I notice that Scott Adams wrote about the same subject today over on The Dilbert Blog. His post sums things up pretty well and has a more humorous tone than mine does...

Wednesday, December 19, 2007

A Tale About a Mistake

While working on a computer program a little while ago, I made a mistake. That's not unusual; mistakes are part and parcel of a programmer's job. There are so many layers and so many details that we have to juggle that mistakes become statistically inevitable. However, the one I refer to falls into the category of things I should have known better than to do.

The problem was simple enough: I needed to read in a series of dollar values as text strings and convert them to text strings representing their value in cents. The solution I chose initially was to convert the input string to a floating-point number, multiply by 100, convert the result to an integer, and then convert the integer to the final string. And yes, if there are any programmers in the audience, I am terribly embarrassed that I actually did this... If you aren't a programmer, being confused at this point is OK, because it looks like the solution would work. What actually happens when I attempt to convert 0.29 using the above method is a result of 28. Yes, I had somehow forgotten that computers can't really do math.

Computers can only be precise when they are working with integers (and then only in a certain range). The steps where I converted the input to floating point values and then back to an integer cause a small rounding error due to the imprecise way numbers are represented in the machine. A little bit of trivia: all programs that work with money represent the money as an integer value, for instance by tracking in cents or tenths of cents. The example above is the reason why.

My first instinct was to change the numeric conversion to a semi-complicated affair whereby I read each digit individually and use them one at a time to construct the proper number. That turned out to be a pretty silly idea too, but at least it was an accurate one. I even had it implemented and tested before I had the typical smack-forehead moment. What I really needed was to change my approach. Instead of using math, I used a touch more common sense. What's the difference between a dollar written as 1.00 and one hundred cents written as 100? Yep, that little decimal point. All the inaccurate or overly complicated math gave way to a simple string manipulation to remove the decimal point. Viola, a simple, precise conversion from dollars to cents.

The wonderful, thorough people in quality assurance found my mistake before it could cause any damage. I diagnosed and corrected the root cause quickly once my attention was focused on the symptoms. But the situation serves as a good reminder that we should question what we are taking for granted. The lesson works on a grander scale too, especially this time of year.

Sunday, December 16, 2007

Headlines in Spaaaaaace!

Man, there have been some great astronomy stories lately. I'll start tonight in near Earth orbit, where Virgin Galactic has declared 2008 to be the "year of the spaceship." Apparently, they are celebrating/hyping the near-completion of their newest launch vehicle. Virgin Galactic is interesting because they are a non-government entity trying to give some competition for NASA in the commercial space flight "business." That will work for me if it allows NASA to concentrate on science and the programs can compliment each other by trading technology, knowhow, and so on.

Moving outward about half an astronomical unit, we look in on the little-rovers-that-could, Spirit and Opportunity. Both have now been operational for more than fifteen times their designed lifetime, and even the breakdowns are now resulting in good data. Spirit's jammed and dragging wheel has uncovered silica deposits that could indicate there was once a favorable environment for life. I'm pulling for the little rovers to survive another Martian winter, even though dust on their solar panels is slowly choking off their power source.

Meanwhile, out in Saturn orbit, the Cassini probe has been looking at the rings and come up with some data that would indicate scientists' beliefs about their relative young age could be wrong. The new data indicates that the rings could have been around for as long as the solar system. While they still believe the rings are the result of a moon-destroying collision, the timing of that collision is now in doubt. It could have been four billion years ago or more, and the rings themselves look to be a feature in the Saturnian sky indefinitely.

Finally we visit a probe that makes the others I have mentioned look like upstart kids. Yes, Voyager 2, launched in 1977 and designed to last five years, has joined its older brother Voyager 1 beyond the confines of the solar system proper. Voyager 2's data gives us more information on the shape of the boundary that marks the end of our star's influence on the galaxy (the solar wind termination shock, where the interstellar currents overpower the out rushing gas from the sun).

NASA's fact sheet on this history of the Voyagers is an awesome tale of one of NASA's greatest successes, and not just because it includes this quote: "Voyager 2 encountered Uranus on January 24, 1986..."

Monday, December 10, 2007

It Was 77 Degrees Today

Sung to the tune of "Let it Snow" (and with apologies to original lyricist Sammy Cahn):

The temperature outside is frightful.
Though some snow would be delightful.
The Weatherman he says no.
He says no. He says no. He says no.

It doesn't show signs of cooling.
I guess Al Gore was not fooling.
I really would like some snow.
He says no. He says no. He says no.

Soon we'll all be needing a fan.
Everyone is going to catch a cold,
But we'll all have very nice tans!
It seems winter is on hold.

The sun in the west is sinking,
But iced tea we are still drinking.
Weatherman will there be snow?
He says no. He says no. He says no.

Sunday, December 2, 2007

Look Ma, No Transitions

Google wants renewable energy sources to become cheaper than coal (the current market price leader). It's an admirable goal, and perhaps a world changing one. If they succeed, Google will save tremendous amounts of money on power, and that's just good business. Unless you are in the power generation business. (And because of that, I almost decided to put this story into the Watching the Watchers section. Certainly, Google is watching you at least as effectively as the government...)

Scientific American Mind magazine posits that focusing on the effort of learning will allow children to confront issues much more so than stroking egos with praises revolving around talent or intelligence. I like this article because it rings true to my experiences, and I wonder if what we usually call talent isn't just someone being unusually motivated to try and learn in a given field.

This Victorian music-box styled laptop may be the single coolest case modification I've ever seen. There is some serious craftsmanship going on there. Not to mention a large indication of free time...

Watching the Watchers

Oprah Winfrey has picked her candidate of choice: Obama. She's often called the most powerful woman in America, and with the female demographic always an important on in elections, could this mean that Hillary's ascent is not as guaranteed as some in the news outlets seemed to believe?