Tuesday, August 28, 2007

Light up the web? Maybe.

I loved "The Karate Kid" when I was young. It was a classic movie that had everything - martial arts, a good story line, a main character everyone can relate to, and a wise mentor who was pushy at the right times, but not overbearing.

I attended a Microsoft DevCares event today on SilverLight (Microsoft's answer to Adobe's Flash player for "Rich Internet Applications"). User experiences on the web are becoming more and more important for software vendors to distinguish themselves and Microsoft is trying hard to "Light up the web", as they put it. And, as I put it, it seems they want to take Abobe out of every market they own (for example Microsoft's release of the XPS document format [XML paper specification] in response to Adobe's Mars project for XML PDF documents). NOTE: SilverLight runtime ≠ .NET Framework!!! It's a different runtime. They must have said this at least a dozen times.

Being at the presentation reminded me a lot of watching "The Karate Kid", only, I'm not sure who's Daniel and who's Johnny - and the guy with all the answers, Miyagi, is no where to be found. I think this is how the dialog might have gone in the movie that was playing in my head (I'm not sure if it was a flash movie player or a silverlight runtime though).

Daniel: Hey - you ever have to write user interfaces when you were a developer?
Miyagi: Huh - plenty.
Daniel: Yeah, but it wasn't like the problem I have, right?
Miyagi: Why? Coding coding. Same same.
Daniel: Yeah, but you knew about web development.
Miyagi: Someone always know more.
Daniel: You mean there were times when you were scared to code?
Miyagi: Always scare. Miyagi hate coding.
Daniel: Yeah, but you like developing user interfaces.
Miyagi: So?
Daniel: So, web development's coding. You train to write code.
Miyagi: That what you think?
Daniel: [pondering] No.
Miyagi: Then why train?
Daniel: [thinks] So I won't have to write code.
Miyagi: [laughs] Miyagi have hope for you.


How does SilverLight compare to Flex?
To the end user - there's just about no difference. To the developer - they have only a little in common. SilverLight, like the Flash player is cross-browser and cross-platform and both are great at media delivery (like movies on youTube). Both are based on a declarative XML language (MXML Vs. XAML) and have design tools to help build the mark-up. The reason I say they have only a small portion in common has more to do with each company's approach to the solution.

SilverLight was born from .NET's WPF (Windows Presentation Foundation). WPF was meant for easy development of Windows desktop applications, but as part of the .NET 3.0 runtime and IE7 releases, WPF applications could be downloaded and used as a web application in IE. There were problems with that approach. End users needed to have the .NET 3.0 framework installed and are forced to use Windows and even further IE7! Enter SilverLight. The XML that is used in WPF applications is nearly 100% forward compatible with SilverLight and all that is needed is the SilverLight runtime which runs in any of several popular browsers on Windows or Mac. Flash started out as a web development platform and Adobe is now going the other direction with products like AIR (the Adobe Integrated Runtime). Adobe = Web -> Desktop, Microsoft = Desktop -> Web.


Data and Security
Microsoft is great at hitting it's competitors where it hurts - and they did it again. Kudos Microsoft. Flex struggles with a few things - foremost in my mind are cost, data accessibility, and security. To do anything really really cool with Flex or databases, you pretty much need some type of back end server application (e.g. Live Cycle Data Services, or WebORB [if you do .NET development]) which have costs associated with them. SilverLight 1.1 (Alpha at time of writing) will have LINQ and WCF (Windows Communication Foundation) built into it. And since SilverLight binaries are dll's downloaded over the web (dll's can be securely obfuscated - it's only a matter of time before Flash 9 SWF's can be decompiled) I already feel more secure. Like Flash, SilverLight is also agnostic about how it's content is served - it could be served by an Apache web server, a java web server, or your hacked Nintendo with a web server running on it.


Conclusion
SilverLight isn't ready for business applications yet due to the fact the SilverLight doesn't have any user controls like TextBox or ComboBox yet (included in 1.1 final release). But, keep an eye on this!! If the data connectivity is as good as promised - you'll start to see numerous seriously data enabled SilverLight web apps.


Links
I can't talk about all this without giving some examples.
  • Tafiti is pretty neat. It's a "visual" search engine.
  • PopFly is a SilverLight tool that lets you make dynamic Mash-Up's with a graphical tool. You can connect to services like Flickr to get GeoTagged images and place them on a map by wiring "Blocks" together. This is by invitation only - it's worth to getting an invitation to.
  • This is an emulation of Windows Vista done in SilverLight. Pretty Neat.
  • DLR-Console is a application that demonstrates the use of the Dynamic Language Runtime. Developers can now write SilverLight in Ruby, Python, or managed JScript.

Resources
So which one do you choose? Flex or SilverLight? Microsoft is catching up very quickly.


Miyagi: Now, ready?
Daniel: Yeah, I guess so.
Miyagi: [sighs] Daniel-san, must talk.
[they both kneel]
Miyagi: Walk on road, hm? Walk left side, safe. Walk right side, safe. Walk middle, sooner or later
[makes squish gesture]
Miyagi: get squish just like grape. Here, writing code, same thing. Either you develop UI "yes" or develop UI "no." You develop UI "guess so,"
[makes squish gesture]
Miyagi: just like grape. Understand?
Daniel: Yeah, I understand.
Miyagi: Now, ready?
Daniel: Yeah, I'm ready.

Monday, August 13, 2007

You have to crawl before you can walk

Ants.
  • Ants on a log - delicious (I love the chewy raisins with the crunchy celery and peanut butter).
  • Ants are bugs and you can get bugs in your code - bad.
  • They can lift several times their body weight - awesome.
  • Ants are ferocious - `cause they're fast.
  • They work together as a team to accomplish large feats - I heart teamwork.
  • Each was made for a specialized task - you gotta be yourself, I like that.
Are these reasons why Apache's ANT was named as such? Sadly, no. But I think they should all be candidates. Ant stands for Another Neat Tool (which you can find on their wiki), although I wonder what Indians** have to do with anything. They do, however, describe some of the reasons why Ant turns out to be a fitting name after all - ummm, except the one about celery. I just really like peanut butter celery.

Ant (and it's .NET cousin NAnt) are described as a build tool like the infamous make utility for C, but without the wrinkles. If you managed to make it this far and you're a developer you're probably thinking - Forget the "wrinkles", I never liked make, I think build files are a waste of time, and even if it is "neat" I don't need anymore tools to deal with. If you're not a developer you're thinking - this doesn't affect me and our products are just fine without any of this. Both of you might be right, but you can write code in most languages without an Integrated Development Environment too. IDE's make it easier on everybody and adding a build file might be a good idea too...

The title of this post, while clever (at least I think so), has some meaning. Developer's often times overlook tools that can make their lives easier. If you've ever heard the term "it's the little things that kill", you can see why it's important to get the little things dealt with and build tools like Ant can help.

** I think there's a lot to how things are named. The wrong name can give the wrong impression about something or be misleading. I think Apache is a superb name for a software development group. Here's why.

Thursday, August 2, 2007

Night Fishing

A few weeks ago, some friends from work and I decided to go fishing. It was hot out when we started - not off to a good start. I had been to the store during lunch to pick up some night crawlers. While I was there I found a lure that I wanted - it was $20!! I asked a few of the sales guys about them and they swore up and down they were some of the best lures in the store. So I bought one anyway, they did look like good lures after all.

I had been to the body of water we were going to before. It's located across the street from my friend's house. He knew what was going to work and so did I - worms. Night crawlers on a bobber, yes, but mostly fake rubber worms in a natural or dark purple color with a bright red tail retrieved at a medium to slow speed. Out of all the times I've been there, and from the stories he's told me as well, this seems to be what works most consistently and with better results (more strikes by larger fish).

Well, I'm always up for a challenge, and since I knew worms were going to work it lost some of it's appeal. I had bought some lures a few weeks earlier that I hadn't had a chance to throw yet. So I started out with those.

I had been to my friend's place several times and I've fished with him on several occasions. But I was still trying to impress my other co-worker. He hadn't done any good bass fishing in a while, so I wanted to make sure he caught some good fish and had a nice time. If you're reading this and thinking that it's conflicting with the statements in the previous paragraph, you'd be correct. I didn't realize how stupid it was of me to experiment while trying to impress until later.

Good thing my buddy stuck to the tried and true. He was having a great night. He got our other friend all setup and he caught some very nice fish as well. I was catching jack-squat. So I finally tried the new $20 lure - nothing to lose at this point - and caught a decent fish. Satisfied with that I switched to worm too.

The sun went down and we could hardly see to get back. At this point we were all fishing with night crawlers on the brightest colored bobbers we could find. Things had been slow for a while and we were just about to call it a night. My friend ended up catching the largest bass he's ever pulled out of that pond! It was a very nice fish.





I've had a while to reflect:

  • When it counts - use what you know will work.
    There's a time and place to experiment - and it's not when it counts. It's behind closed doors, on the practice court, during the scrimmage match. It's definitely not when you have something riding on the line, during a tournament, or when it's go time. You're probably not going to end up impressing anyone and it will take longer to get results. Most likely you'll end up going back to what you know works anyway.

  • You get what you pay for.
    Well... this isn't **ALWAYS** true, but it holds true for a lot of things in this life. Out of all the artificial lures I tried, the expensive, ultra good looking, super lure (please humor me) came through for me. The better stuff usually costs more. Why? - because it's better. Cost is often directly proportional to an item's worth. If it wasn't any better than any other lure (nothing that set it apart ) it likely would have been priced accordingly. SUB-POINT: Listen to what other's say. If the community is giving it good feedback - it'll probably prove it's worth.

  • Be patient.
    As evidenced, the best results are often those that are not rushed. We knew worms would work - we just had to wait for the big one to bite.

  • Have fun!
    It was hot. I wasn't having good results at first (my own fault). When I started having success it was dark. Two super-sized mosquitoes tried to carry me away. Would I do it again? Absolutely. The thrill of reeling in a fish is fun! Hanging out with your friends and enjoying nature - awesome. If you're not having fun, **NOTHING** will make it worth the effort - period.

Thursday, July 26, 2007

How many meetings does it take

to screw in a light bulb?



Before you read this, read this post from Cam Minges (excerpt below):
A good read is Death By Meeting by Patrick Lencioni. Since Jeff and I had four hours to kill on our way home from St. Louis, we decided to tackle this subject. Originally, it was about meetings but then we couldn't agree between meeting hell and project management. So, we decided to tangle them up together to see what happens.

Warning: This Blog Post is meant to poke a little fun at our two favorite subjects. It's meant for entertainment purposes.



I’m not sure either. Let’s schedule a meeting to discuss it, Cam. How about tomorrow? Oh you’re busy then – you say you’ve already got a meeting scheduled at that time? We’re going to have to schedule a meeting to talk about all these meetings we’ve been having lately.

Project Charter Meeting: We’ve changed the topic of this post several times already. Cam thinks it should be about meetings and light bulbs. I’d like to focus on project management and comedy, but mostly on the comedy. I wanted to stub it out by sections, Cam disagreed. We compromised on the later but we’re still unresolved about the overall direction. I’m sure we’ll have another meeting about this later on in the trip - though it will vaguely resemble something to do with a light bulb, I'm sure.

Risk Assessment Meeting: During the project charter meeting, I asked whether we should really be doing this, since some people (like the terrorists) might not think it’s funny. We decided to schedule a meeting to discuss the project risks. The risk of making a superior unhappy is probably a very real one and we decided it had a 50% chance of actually occurring and that we should deal with it early on. So please know as you’re reading this that this is merely a comment on… well… we really haven’t decided yet. I’ll let you know what it’s a comment on after we finish our project charter.

Task designation and estimation meeting: The first proposed task was to prototype several different brands and wattages of light bulbs to get the one that we like the best based on brightness, energy consumption, and cost. Cam volunteered to make some templates to benchmark the light bulbs. We figured it would take about 16 hours of researching light bulbs, about 8 hours to make the templates for benchmarking, and about 2.28263 hours to do the actual testing. It is important to note that these numbers are man hours, and not duration. We’ll pad these numbers with some time for quality assurance once we have an over all total. We both agreed this was a necessary step. Our meeting time ran out and we rescheduled for later.

Resource allocation meeting: Cam was 100% on driving and I was 80% on writing this entry for the duration of the trip. It looks like we’ll be outsourcing this project. We both agreed that this wasn’t ideal, but we couldn’t take on any more projects at the moment. At least we finished a meeting on time and actually came to an agreement.

Kickoff meeting: Cam declined his invitation. That’s it… that’s the funniest thing I could come up with. Neither one of us had ever been to a kickoff meeting where anything was accomplished. First item on the agenda for the next meeting: what’s a kickoff meeting?

That’s our project plan so far. I can’t write any more because after I logged my hours on my time sheet for all of this project management I realized we had sorely underestimated how much time the project management would take. We were already over budget and behind schedule from when we needed the light bulb changed. The first the thing Cam asked me was how this would impact the schedule of his project to get us home. Luckily it had minimal impact.

Conclusion: Looks like you’ll have to ask Mr. Owl.

Note: Thanks to Cam Minges for his guest appearance and taking care of all the receipts from our business trip.

Tuesday, July 17, 2007

How do I look now, Bob. Is it bad??

When I was a child my mother would say, "Watch out for the stove, it's hot." Or, "Don't put your fingers in the light socket." On some occasions she would say "Stop fighting you two, or I'm calling the police" and that would really shake us up good and end up making all of us mad at her instead of each other - but that's a post for another time. Anyways, even though my mom told me the stove was hot, and not to play with matches in the house, and looking at girls would turn me to ash - I still didn't listen. I'm not sure why, maybe because she was only right on two out of three. But from my life experiences, like being shocked a few times, I now know and understand why my mother was concerned for my safety. (My wife's concerned for my safety sometimes too, perhaps a few more shocks would fix me...)

I'm reminded of the joke where the doctor asks the patient what's wrong and the patient says, "It hurts when I do... this." The doctor says, "Don't do that."

What do kids, bad jokes, and fish have in common??? Other than the fact that they're all flaky, not much - but I'll try to piece something together for you anyway so it sounds like I thought this out. Out of the three, only fish never learn their lesson.

After I got burnt on the stove and stuck a paper clip in a light socket, I tried not to do it again. It hurt. I doubt the patient really needed the good Dr.'s advice. But fish... now that's a whole lot of weird goin' on right there.

How many times do you think a fish can be caught on the same lure? I can tell you it's at least three in one night. They just can't learn their lesson. That fake worm is just too tempting, that minnow that's swimming funny just looks too juicy to ignore. You know they're down there in the water just thinking, "Oh hey, Bob (seems like a good name for a fish). Weird, there goes that worm again. Wasn't it just by here a second ago?" "Yeah, I think it was. Man, it's looking pretty tasty though... must... eat... AGHHHHH! Damn it, that hurts!! What tha... hey where we goin'? I don't wanna go that way. Get this thing out of my face, its pokin' my brain!" And the same conversation must repeat itself as soon as you throw him back.

No matter what it is in life, you must learn your lesson. It's what separates us from the fish. Ok, it's ONE thing that separates us from the fish... I'll let everyone else debate it. No fighting though, or I'll call the police...



Note: There's a lot of analogies to made on the topic of fishing. I'll try to hit them all at some point in my life - I just couldn't fit them all in tonight.

Monday, July 9, 2007

If you can't stand the heat...

then get out of the house!

No, wait... yep that's right, get out the house! Don't judge me - just read.

This weekend the air conditioner starting sounding funny, the blower stayed on, the temperature in the house started rising, and I started to sweat. It seemed obvious at this point that I was having a situation. As a bead of sweat rolled down my back side, I took a brief moment to consider my options before heading down stairs - why would I want to be upstairs with no A/C - pay attention, man.

My options, in the order they came to me:

  1. Call a professional

    Couldn't bring myself to do it. Next!

  2. Try to fix it myself.

    I thought, "Self, I'm no dolt. My air conditioner is not smarter than me. I'll find out what's wrong and fix it myself, if I can. I'll save us a lot of time and money and several warm nights." (It was really hot with the A/C being busted and all - are you getting any of this?)

    This option was definitely looking good on paper - I was picturing my wife going on about how much she loves me while putting a medal around my neck as I triumphantly entered our comfortably cool living room from the garage. So that's what I resolved to do. Here's how it played out in reality:

    I looked at the thermostat - all computerized. I looked at the outside unit - yup, definitely making funny noises. Now, you'll be glad to know I'm a pretty handy guy, but I wouldn't know how to service the outside unit if the instructions were written on the side of unit (which they were) with a step-by-step video of what to do. (Even if I did know what to do, I don't know what made me think I would have the specialized tools to work on it.) So I went to the garage and took the cover off of the furnace instead. There it was. I was starring at the insides of the furnace all right. Yep, that's exactly what it was.

    I was still sweating - not because of the A/C, but because it was 90 degrees out... you thought I was gonna say something about the A/C.

    Stupid air conditioner...

  3. Call a professional.

    Hmmm, what else... I could feel the dollars melting out of my pocket.

  4. Take a cold shower.

    Not a long term solution, but I was getting hot trying to figure out what to do. But the showers were upstairs and there's no way I was going back up to that sauna without a plan. What about the garden hose! Arghh. I forgot, no one wants to see me like that in public... yeah, I won't even mention that one.

  5. Call a family friend who works on A/C for a living.

    Heck, he is a professional! You should always go with your first instinct (see #1).

    No answer. He was out of town. I left a voice mail.

    Weird... does that mean that if you're only blowing hot air your friends probably won't help you out? OH MAN!! HAAAAA! Seriously though - enough joking around. I was melting.

  6. Open the windows and do nothing.

    We could save a bunch on our electric bill this month. Awesome! There's always a silver lining. At least there was a breeze after I opened the windows... and the house's got to get cooler at night...

    Who was I kidding? It didn't get cooler at night! This stunk! So we...

  7. Got the heck out of Dodge!

    After a night of sleeping upstairs with no A/C (we refused to go downstairs just to make a point to the A/C about who was in charge) and laying in a pool of sweat while a fan blew more hot air over us (it was like being basted in your own juices in a convection oven) I'm sure you'll agree. We went to the in-law's house and swam in the pool. Sweet, sweet, relief. It sounded like someone dropped a hot-dog fried in bacon grease into a bucket of ice water when I got in.
Long story short (well, done, anyway) the family friend eventually got around to us and we're ok now... and then I found $20. Ok, not really, but I thought it made the end of the post sound better.

The moral to the story is: preventative maintenance is where it's at!

Sunday, July 1, 2007

The Way of the Code Warrior

This weekend while browsing the web I came across a reference to the Hagakure. I had no idea what this was so I looked it up and found it to be interesting, enlightening, and much of it still relevant to modern life. The Hagakure (meaning In the Shadow of Leaves) is a practical and spiritual guide for a warrior, drawn from a collection of commentaries by the Samurai, and contains views on the bushido - the warrior code for the Samurai.

Every paragraph that I read had something deep to say (I'll spare you the pain and get to the point). Here are a few of my favorite take aways and briefly how I think they relate to software after some quick reading:

Live In The Moment
Be resolved. Do not dwell on the past, but remember it.

There is surely nothing other than the single purpose of the present moment. A man's whole life is a succession of moment after moment. If one fully understands the present moment, there will be nothing else to do, and nothing else to pursue. Live being true to the single purpose of the moment.

Everyone lets the present moment slip by, then looks for it as though he thought it were somewhere else. No one seems to have noticed this fact. But grasping this firmly, one must pile experience upon experience. And once one has come to this understanding he will be a different person from that point on, though he may not always bear it in mind. When one understands this settling into single-mindedness well, his affairs will thin out. Loyalty is also contained within this single-mindedness.

It is said that what is called "the spirit of an age" is a thing to which one cannot return. That this spirit gradually dissipates is due to the world's coming to an end. In the same way, a single year does not have just spring or summer. A single day, too, is the same.

For this reason, although one would like to change today's world back to the spirit of one hundred years or more ago, it cannot be done. Thus it is important to make the best out of every generation. This is the mistake of people who are attached to past generations. They have no understanding of this point.

On the other hand, people who only know the disposition of the present day and dislike the ways of the past are too lax.

Be true to the thought of the moment and avoid distraction. Other than continuing to exert yourself, enter into nothing else, but go to the extent of living single thought by single thought.


Interesting: It is said that a Samurai makes a decision in a space of seven breathes.

Software needs to be useful now. Build on what you've done in the past. Once you know what your goal is do not compromise, do not be distracted.

Prepare Now
It was once said to one of the young lords that "right now'' is ''at that time, '' and ''at that time'' is ''right now.'' One will miss the occasion if he thinks that these two are different. For example, if one were called before the master to explain something right away, he would most likely be perplexed. This is proof that he understands the two to be different. If, however, a person makes "right now" and "at that time" one, though he will never be an advisor to the master, still he is a retainer, and in order to be able to say something clearly, whether it be in front of the master, the elders or even the shogun at Edo Castle, it should be practiced beforehand in the corner of one's bedroom.

All things are like this. Accordingly, one should inquire into things carefully. It is the same for martial training as for official business. When one attempts to concentrate things in this manner, won't daily negligence and today's lack of resolve be understood?
I think this one pretty much speaks for itself. We need to be prepared for what software needs are coming in our market space. We need to constantly be innovating in private so that when we are called to answer a need we are not silent.

The End is Important in All Things
Hagakure is sometimes said to assert that bushido is really the "Way of Dying" or living as though one was already dead, and that a samurai retainer must be willing to die at any moment in order to be true to his lord. This is a misreading of the statement "武士道と云ふは死ぬ事と見つけたり (The way of the samurai is found in death)", which was intended to mean that a samurai must always think of his death in order to do things well. -- Wikepedia.org

In the Kamigata area they have a sort of tiered lunch box they use for a single day when flower viewing. Upon returning, they throw them away, trampling them underfoot. As might be expected, this is one of my recollections of the capital [Kyoto]. The end is important in all things.


Good software needs to be true to its original goal, and we should be willing to let it die at any moment in order to do so. In order to write good software we always need to keep the end goal in mind - even if it's useful lifetime is only a day.

Summary

The Hagakure isn't exactly light reading. I wouldn't keep a copy by the toilet. Maybe by the night stand though. It's contents are the kind of thing I usually find myself thinking about before I rest - did I do my best today, am I living a straight life, do I have clean socks for tomorrow. It's principles could be applied to many things, I suppose, although I chose software design. The analogy only carries so far for me - the similarities between the two have more to do with the qualities of notable people in each profession. A book is just words - it's the ideals and actions of people that makes good companies and software. I know FORUM Solutions has a "bushido code" for choosing what software to write and how it should be written, and I hope other companies do too.