eRubycon 2009 Day 3

Putting the “FUN” back in functional programming (or at least taking the “FU” out of it)

Randall Thomas - Erubycon 2009 - Day 3Randall Thomas kicked off the morning with a talk on Functional Programming. I have seen a number of talks on functional programming but was really looking forward to Randall’s take on it as he’s not only smart but he’s really entertaining.

The basis for functional programming was that there were a group of guys that were trying to figure out how to mathematically prove that an application was correct. This had strong basis in lambda calculus. The interesting idea here is that since the program can be mathematically proven, you can do things in a almost any order and it will still work. This means that you can

This is a big deal with systems that deal with concurrency. The reality is that any web application has to deal with concurrency. 3D video games deal with concurrency. Distributed computing, cloud computing and many of the things that we are doing on a daily basis have to deal with concurrency.

FU(Thinking) is when you start thinking functionally and solve a given problem in different way than you would have in the OO world.

Recursion is an example of this. Everyone has had to written and messed up a recursive function. The example that he used was calculating a Fibonacci sequence. In straight Ruby, the demonstration was 10-15 lines of code with a while loop, counters that were incremented and decremented and so on. The functional version of that was 4 lines with no looping,

I loved his quote “Amateurs copy, professionals steal” as he put up a demo that he borrowed from someone.

Honestly, he lost me a little on the deltas between procs and lamdas in Ruby.

He brought up the topic of Monads. When he asked the crowd who understood Monads and Jim Weirich didn’t raise his hand, I knew that we were in trouble. Then Randall admitted that he didn’t fully get Monads either. At that point, I knew that I wouldn’t get it probably ever. But he went on to say that mostly people talk about Monads in context of the obfuscated code contests and the like.

List processing is at the core of the things that we do on a day to day basis. There are three things that we do to lists every day.

  • Transform everything
  • Extract everything
  • Combining (everything or something)

Functional programming is really good at list processing.

“iteration is the life blood of ruby – and now a word from some bad ass functional code.”

#Ruby magic – f(x) style
(1..10).reject{ |x| 0 == x%2 }.map.join(‘,’)

So what does that do? It prints out all of the odd numbers from 1 to 10. Notice that there’s no initialization, no main and so on. This is at the core of why people love Ruby. It’s an extremely expressive language.

I was partially nervous that this talk was going to be a pitch for a “Functional” language such as Haskell, Scala, F# or Clojure. But it wasn’t. It was explaining functional programming and help us bend our head around thinking like a functional programmer but accomplish what we need to do *most* of the time in Ruby.

Modeling Workflow Concepts in Ruby or (almost) Everything I Needed to Know about Workflow I learned from Schoolhouse Rock.

David Bock - Erubycon 2009 - Day 3David Bock is a workflow consultant. He’s a great speaker and just a fun guy to hang out with.

State-Based verses Process-Based workflows is one of the core concerns in workflow camps.

State-based workflow – this is the thing that reminded David of Schoolhouse Rock. He was thinking about the example of getting a bill passed (http://www.schoolhouserock.tv/Bill.html). There are a lot of different states that a specific bill can be in at any given time. But how things progress from one state to another is the interesting bits. The states are just the points that you would tell your boss if he asked you how things are going. It’s been “Submitted”, it’s “In progress”, it’s “On order”, it’s “Completed”.

To implement a State based workflow, you can do it easily in Rails. David is also working on a project called “Stone Path

Process-based workflow flips things on it’s head compared to the state based workflow. Or as David said, Process based workflow says that Schoolhouse Rocks was wrong. The state is not what’s an issue, what matters is who does it and how it’s done. This deals with what things can be done in parallel and more. These are things that state based models don’t deal with. There’s a fair amount more handholding and strictness to a process-based workflow engine as it really deals with the “How” of what you are doing, not just the end results.

There’s a project that deals with it well called Ruote.

If you users are novices, you need to choose process-based workflow. This will give them a lot more handholding and rules that they will have to follow.

If you users are experts, you need to choose the state based work flow. This will give them the freedom to skip around, push the boundaries, take shortcuts and anything it takes to get from one state to the next. This can be a good and a bad thing.

“Workflow” is not a tool, it’s a bunch of domain concepts that you can apply and implement yourself.

Playing Nice With Others

Jeremy Hinegardner - Erubycon 2009 - Day 3Jeremy Hinegardner did this talk about playing nice with other languages and data stores and the like. He talked about the idea that there are three types of persistence that are out there. None, Snapshot and Lifetime. There are times that we need one verses the other

Then he talked about a number of different tools that accomplish various bits along the path there.

Memcache – This is a memory based object caching scheme that is used heavily in a number of different languages including Ruby, Python and PHP.

Tokyo Cabinet – This is a set of libraries that cover a fair amount of ground. They can fit in either the Zero or Lifetime persistence.

Redis – “Redis is a key-value database. It is similar to memcached but the dataset is not volatile, and values can be strings, exactly like in memcached, but also lists and sets with atomic operations to push/pop elements.” – from the Redis home page.

Beanstalk – This is fast, distributed, in-memory work-queue service.

ZeroMQ – This is a memory based messaging system.

The most interesting part of the presentation to me was when Jeremy started showing how understanding what your persistence needs were and how that helped you make your decisions on which of the frameworks to pull down. For example, if you need
Lifetime persistence, you should look at Tokyo Cabinet and so on.

Building Native Mobile Apps in Rhode

Adam Blum - Erubycon 2009 - Day 3The last talk of eRubycon was done by Adam Blum on writing mobile applications. The Rhodes framework is an application framework that all allows you to build applications in HTML and Ruby and deploy that application to iPhone, Windows Mobile, BlackBerry, Android and Symbian.

Their tag line is “The Open Mobile Framework”.

The architecture is that they built a small web server and Ruby implementation for each of the platforms. The framework actually loads up the HTML/CSS from the small web server and runs it in the local device’s browser control. I asked him if they ship a browser control or not and he said that they haven’t had to. Specifically he talked about the fact that Blackberry is actually the hardest to work with. They were surprised by the Windows Mobile browser. In their experience, as a browser is not fantastic compared to Webkit based browsers but as a browser control it’s actually very light and works well.

They have a public beta of RhoHub which is a deployment as a service for mobile.

eRubycon 2009 Day 2

Leadership 101

Jim Holmes - Erubycon 2009 - Day 2Jim Holmes kicked off day two with a talk called Leadership 101. This is an amazing talk. Jim, as humble as he tries to be about it, is an amazing leader.

He has posted his slides at http://is.gd/2avEy.

He started off the talk with a story about World War 1 and a story about trench warfare. I knew but it didn’t really hit home that the phrase “Over the top” started in trench warfare. In trench warfare, the troops dig in and build trenches that they basically live in except for when they are on the assault. The phrase “Over the top” referred to leaving that safety and crossing no man’s land, the area between the two armies where you were in the direct line of fire, and going to attack the enemy. This was not a safe thing to ask people to do. But the “brass”, was not on the ground in the trenches. They were miles and miles away in relative safety. In 1912 in France, there was a huge miss that was caused by this separation. They missed the fact that it had been raining for weeks and that the trenches had flooded, the river had flooded, the fields were swamps and there was no way to move quickly. It was suicide to go over the top. But they didn’t know that so they kept sending people over the top and ended up loosing 500,000 men.

The next thing that he talked about is that we, as technologists, need to grow. We are passionate about what we do and take pride in the technology that we implement. But we need to understand business value and how that relates to what we are doing. When we talk to the business owners, we need to express ourselves in terms that they understand. “The business does care, they just speak a different language than we do”.

The next step is to mentor. Take on mentors. Mentor others. But as you are entering these mentoring relationships, you have to be an active participant in the relationship. As one of his early mentors said “You are not a teacup and I am not a teapot and I can’t just poor information into you. You have to be an active participant in this relationship”. Mentoring is a two way street.

Another thing that he talked about is the idea of smart mistakes verses dumb mistakes. If you make a smart mistake, there shouldn’t be any negative consequences for smart mistakes. These are ones where you do the due diligence and make a decision after some thought and it turns out to be the wrong decision. That’s fine. The dumb mistakes are the ones where you make rash decisions without understanding or thinking about the consequences of the decision. These should have consequences.

In order to be a great leader, you have to have the respect of your team, peers, clients and more. But how do you get that respect? “You don’t get respect unless you give respect. You can’t demand respect back. You earn that respect”.

“It’s not just enough for you to be successful. Those around you, below you and behind you have to be successful too. Leading from the rear has never been successful.”

Jim did an amazing talk and really opened my eyes in a number of ways.

Your Rails are Rusty

Adam McCrea - Erubycon 2009 - Day 2Adam McCrea from EdgeCase did a talk next about doing Rails development and productivity. He started off the session talking about a project recently where they got started and it took them several iterations to get to a productive state.

The basic problem that he started off is that when he started Rails development, he accepted all of the defaults and was very successful. But over time he kept changing this default or that default and trying new plug ins. Each time he tried a new plugin, he added possible complexity and startup time. He advocates “minimizing decisions – automating as much as possible”. This is the core thesis of the talk. I whole heartedly agree.

“If you’re learning too many new things at once on a project, something has to go if you hope for success” – Joe Fiorini on  Twitter

Adam laid out a number of really good guidelines in his talk.

“Your needs may be more complicated than this, but don’t assume that they are”.

“If you don’t understand the source” of a given plugin, then you should run away. This is a great tip. You can blackbox Rails to a degree but it’s really hard to do that with a given plugin.

One of the things that I really liked that he talks about is that you should pick a default UI for all of your projects that you don’t have a designer to work with on.

Be Careful, Your Java is Showing

Joe O'Brien - Erubycon 2009 - Day 2Joe O’Brien did a great talk next on developing Ruby as Ruby, not as Java, C#, C++ or whatever language you did last in Ruby syntax. There are some core changes in the mindset that you have to put yourself in to be truly successful.

Unfortunately, I was panicking over my upcoming talk a little so didn’t get to listen to him in great detail.

If someone wants to email me or put a summation in the comments section, I’d happily put it inline here and give them credit.

Enterprise Java

Charles Nutter - Erubycon 2009 - Day 2Charles Nutter was the talk right before me. As I was still building some of the demos and getting ready for my talk, I was not able to really get a lot of notes down.

JRuby is in version 1.3. They are rolling along pretty quickly. They are fully 1.8.6 compliant and are most of the way to 1.9. One interesting thing that he pointed out is that you can have 1.8.6 and 1.9 in a single binary.

He showed GlassFish running on JRuby.

He showed running JRuby on the Google Android device. This got a few good oohs and ahhs.

I really wish that I had been in a better spot with my talk to take more notes. Again, if you’ve got a good summation, please help me get that up here.

*Update* – my plea for a summary were answered by Gayle Craig, aha @gayleforce.

“Charles observed that when Ruby first gained it’s popularity, many Ruby developers were coming over from the Java world.  And now, some of those folks are going back to Java because their companies are not moving away from the Java platform, and because of the maturity and availability of tools that may not have been written yet in Ruby but are already available in Java.  If the rubyists embrace this, and work to find ways to build bridges between Ruby and Java, then that will continue to entice more Java developers over to Ruby instead of abandoning Ruby.  And that’s good for the Ruby community.  And that’s what JRuby is working to do.  Charles demonstrated some things in JRuby like ruby2java (a Ruby to Java compiler), become_java, and Jibernate (Hibernate through JRuby.) Charles highly encouraged developers in the room to contribute to JRuby, as there’s only a few of them working on JRuby and there’s plenty to do…”

Thanks Gayle!

IronRuby

Josh Holmes - Erubycon 2009 - Day 2I did the next talk on IronRuby. Largely, I did Jimmy Schementi’s talk from Oscon with my own twist. He posted his speaking notes at jimmy.thinking IronRuby at OSCON 2009 Mono, Moonlight, and scripting open source apps.

The short version of my take on the state of IronRuby is that it’s real this year. Last year and the year before, I talked about IronRuby but I really couldn’t show anything that I would actually consider putting it into production. This year, between the Gestalt stuff, the Witty app with the Repl/IronRuby scripting attached and many many more demos, I had some really awesome and powerful things to show people. I think I turned some heads.

It didn’t hurt that Leon Gersing, who wrote all of the labs and docs for Gestalt, was sitting in the back of the room. 

Why “Enterprise Tools” Are Bad for the Enterprise

Glenn Vanderburg - Erubycon 2009 - Day 2Glenn Vanderburg did a talk the next time about the enterprise and how development goes there.

The first thing that Glenn did is rehash his first eRubycon talk on Ruby in the Enterprise. The quick summation goes as follows – “Here are tools that will let you build software quickly, cheaply, with below-average developers”….“Enterprise problems are not nearly as much technology problems as much as they are people problems.”…“You have to write Enterprise software with the expectation that it might still be in production in 30 years. I really liked that talk. These are drums that I’ve been beating, although not as eloquently as Glenn does, for quite some time.

Glenn then talked about a the state of the industry in the form of a case study with Verizon Business. The reality is that there are a number of enterprises that are starting to look at agile development and figure out how it will work for them. There are a couple of ways to go about that. There’s the whole sale change over, which have largely failed for a number of different reasons. The second way is to run a small pilot effort that tries a few small projects to prove things out. These largely succeed but there’s no real follow up.

The reality is that the overall organization might need to change in order set itself up for success. To demonstrate the point, Glenn talked about how accounting was done in manufacturing organizations of old verses today. At one point in time, inventory was considered an asset. While this makes sense on it’s face, it actually created a number of counter incentives for productivity and sales as factories started hording inventory and materials. This pushed a change in the industry to start looking at inventory as a liability. This pushes things like lean manufacturing and just in time ordering of inventory.

So, what we need to do is to start looking for those type of hidden counter incentives in the enterprise. These are actually not that hard to find, we just need to start identifying them and figure out how to articulate these incentives in the correct language for the business.

“Individuals and interactions over process and tools”

Context-Switching is one place where people loose a lot of time. This is not talking about multi-tasking, this is talking about having to change tasks quite often and have the change the mental model to work on.

The next topic was “One job at a time”. The idea here is that there are a lot of tools in Ruby that do one and only one thing. Cucumber is an example. It allows you to write a specific type of test but you can’t really get distracted and do other things while writing in Cucumber because it really only does that one thing.

The next topic was “Crazy as I wanna be”. The idea here is that enterprise tools try to sell you on the concept that with that tool you can do anything. And typically don’t have to write any code in the meantime. The reality is that the tools cannot replace smart people doing smart people. Ruby allows you to do whatever crazy things you want to do without having that crazy be the main stream. This is common for agile tools.

Glenn then started talking about the idea that you shouldn’t buy tools that have “Impenetrable Skin”. These are the tools that typically have lots of configuration options but if you have a need outside of the imagination of the original tools writers, you are stuck. Glenn prefers “Onionskin APIs”. These are the tools and APIs that you don’t have to crack up most of the time but you can if you have to. Rails and ActiveRecord are good examples of this.

Glenn Vanderburg - Erubycon 2009 - Day 2Many enterprise tools are often large enough that they are they have their own ecosystem. What that means is they have their own group of people who’s sole job is managing and maintaining the tool. There are lots of examples of this such as databases, service busses and the like. The example that Glenn talked about quite a bit was ClearCase. The issue is that the tool is sold to the people that don’t use it all that much. These tools are sold to managers and project leads who use the tool an hour a week at best. It’s not sold to the developers who are going to use the tool 20 times a day.

The interesting issue is that as these tools start to gather their own ecosystem, the counter incentives start to mount. The use of the tool justifies the ecosystem which promotes the use of the tool regardless of whether or not it’s the right thing because it’s job security for them.

So many enterprises start by treating the symptoms verses actually fixing the problem. One of the treating the symptoms results is rules engines. Rules engines are not inherently the problem. The issue comes in when the rules engine is there because the engineering and development teams are unresponsive. The rules are really code but they are not treated as such. The result is that the people are making changes that are not tested and put through the correct rigor. This will eventually break and we’re back to the beginning.

The next set of symptoms that enterprises take on are really people problems. For example, why are there reuse repositories? Nobody uses them, ever. The reality is that reuse is far more of a people problem than it is a far more than it’s a technology problem. Requirements traceability programs are another great treatment of a symptom. The reality is that these problems are set up to assign blame. Many of the agile tools, such as Cucumber, leveraging index cards or Kanban boards get the benefits of the requirements traceability programs without the overhead and negatives.

The last topic is “Too much control”. The control that the business is really trying to force down is far less about moving forward than it is to keep people from making big mistakes. Too much control, however, stifles innovations and keeps people from making leaps of faith and trying new things.

To get the benefits that people are looking for with the control without the negatives, you need to ratchet up the communications and visibility rather than tightening down thing. Most of the tools in the agile and Ruby space fit this bill really well.

Panel discussion

Panel - Erubycon 2009 - Day 2Joe closed out the day by putting together a panel discussion with a number of people that have had success in the enterprise with Ruby.

Randal Thomas kicked off the panel with a story about a project where he taught a number of VB developers Ruby and was able to kick out and an application that was originally speced for 6 months in about a month. But the business freaked out and shut the project down. They went back and redid the project in “approved” technologies in about 6 months. David Bock followed with a similar story.

The topic quickly shifted to the idea that we really need to understand the business side and how to introduce ideas in such a way that you are not putting them on the defensive. David Bock and Glenn Vanderburg both recommended a book called Fearless Change: Patterns for Introducing New Ideas by Linda Rising.

One of the ideas is that they pitched is that you should start looking for allies. There will be a DBA somewhere that wants to run PostGreSQL and so on. Start quietly gathering that army and mount a campaign.

eRubycon 2009 Day 1

Joe O'Brien - Erubycon 2009 - Day 1This is my third year at eRubycon. I’m thrilled to be involved and speaking again this year. I’m shocked every year when Joe picks me as a speaker. I’m just honored to be considered worthy of speaking on a docket with Jim Weirich, Glenn Vanderburg, Leon Gersing, Charles Nutter, Randall Thomas, Neal Ford and all of the rest of the amazing speakers that are here. It’s definitely one of my can’t miss conferences every year.

Joe O’Brien does a great job putting this conference on year after year. The logistics are smooth, the talks are great and the vision for the conference is crystal clear.

SOLID Ruby

Jim Weirich - Erubycon 2009 - Day 1Jim Weirich started off the day with a talk called “SOLID Ruby”. The whole talk is already up on github at http://github.com/jimweirich/presentation_solid_ruby. Jim is not only very informative but fun to listen to. I really like his delivery and sense of humor.

The first question that he asked is “How do you recognize a good design?” One of the things that Jim points out is that most people can recognize a bad design but we can’t describe what makes a good design. This is actually quite profound. How can we ensure a good design if we can’t describe what makes one? To demonstrate his point, he talked about the 1666 London fire and the subsequent plans to rebuild the city. He talked about 4 to 6 very distinct designs that were all presented to the king at the time. They actually didn’t build any of designs but rather did the first ever agile project with an incremental build and no huge design up front.

SOLID
S – Single Responsibility Principle (SRP)
O – Open Closed Principle (OCP)
L – Liskov Substitution Principle (LSP)
I – Interface Segregation Principle (ISP)
D – Dependency Inversion Principle (DIP)

SRP – Each class should have one and only one responsibility. You should be able to describe what your class does in a single sentence without using the words “and” or “or”.

OCP – You should be able to change the behavior of a class without having to modify it. This is the basis of inheritance. In Ruby, you can just open a class and “Fix it” right?

DIP – Jim took this one out of order because it made ore sense when trying to explain things. Depend on abstractions, not on concretions. In static language such as Java, C#, C++ it meas that you develop to interfaces. In Ruby, you don’t have to do that as there are no hard references to classes so you can swap out classes at will. If you want to swap out the class, you just have to have all of the methods that the code that leverages that class call. Jim calls this coding to a protocol verses coding to a spec or interface.

LSP – the question answered here is how do you know if you can swap out two classes? The reality is that it’s more than just are the methods require present. It’s what are the promises back as well. For example, if you have a square root function but you require a certain level of precision. From the LISP community, Jim pulls the phrase “Require No More, Promise No Less”. If you are well covered on testing, this will be automatic.

ISP – Make fine grained interfaces that are client specific.

To finish up, Jim opened things up for discussion but in traditional Jim fashion he did things a little different. He brought the questions for the discussion.

First question – “ActiveRecord objects implement a domain concept and a persistence concept. Does that break the SRP?”

Next question – “How do you verify that your client software only uses the (narrow) protocol you expect”?”

Next question – “Some SOLID principles are an awkward fit for Ruby as they were built for static languages. Are there design principles from dynamic languages that are awkward fits for static languages?”

One of the key points that Jim implicitly made is that Ruby the language auto-implements many of the SOLID principles and the the culture pushes the rest of them in great ways.

Testing the Enterprise

Charlie Baker and Leon Gersing - Erubycon 2009 - Day 1I was really sorry but I had to miss this talk. I’m planning on getting a summary from the speakers later tonight and posting some notes later. They posted their slides at http://fallenrogue.s3.amazonaws.com/Testing%20the%20Enterprise.pdf.

In short, Leon Gersing and Charley Baker have been working at the Gap on a large project. A big reason for the success of the project and the team is the rigor around testing.

I asked Leon to email me a short write-up and this is what he sent me:

+++++++++++++++++++++++++++++++++++++++++++++++++
“Testing the Enterprise” is about how we brought Ruby testing into Gap Inc Direct. GID has campuses in Columbus, San Francisco and offshore. In addition to the challenges in a distributed environment, training QA resources and developers new to Ruby, Watir, other libraries; we’ll be talking about incremental adoption of Ruby in the Enterprise, and how it enables us to move from a Waterfall SDLC into an Agile model.
We’ll be going over lessons learned, pitfalls and successes. The points of view will be from Leon Gersing, who has been responsible for the adoption of Ruby at our San Francisco campus over the past 4 years, and Leon Gersing from EdgeCase, who’s working with our Columbus distribution IT organization as they adopt Agile practices and using Cucumber have bridged the gap between developers, QA and product teams.
+++++++++++++++++++++++++++++++++++++++++++++++++

Rails in the Large: How Agility Allows Us to Build the World’s Biggest Rails App

Neal Ford - Erubycon 2009 - Day 1Neil Ford came in next and talked about the largest Rails applications known to man.

The application itself is a car wholesaler web site called http://ove.com. He started out talking about how the project came about in the first place. They had a huge complicated web site built in Java. They were looking to do a ground up rewrite in either .NET or Rails.

Neil asked them “There are 300 Java developers downstairs, why don’t you want to rewrite it in Java?” The answer was “Frankly, we don’t want them to touch it.”.

Neil convinced them to go with Rails.

They started out in January of 2007 and built the team at 1 new pair of developers to the project every two weeks. At this poin
t they have 11 pairs of developers, 8 business analysts, an iteration manager, 6 quality assurance, a project manager and a client principle.

One of the key points that Neil made here is that “technology isn’t as important as responsiveness to business needs”. There are a lot of people in the technology world that don’t get that. The reality is that most customers don’t care about what the underlying technologies are, they only care that their business requirements are met.

One of the things that Neil pointed out very strongly, and actually spent a lot of time talking about, is the importance of the testing and specifically the way that they did them. One of the interesting stats that he threw out is that they have 3.2 lines of test code for every line of production code. There’s currently close to 100k lines of test code.

Obviously, this is a lot of code so they have had to pull together a number of other resources and tools to put together to actually run all of the projects. One of them that struck my fancy is DeepTest. It can do distributed testing of your Ruby code. Another one is Selenium grid. This does distributed running of Selenium tests.

One of the side effects of all of this distributed testing is that they have no setup and tear down methods in the tests. Rather all of the tests are completely standalone.

There were a number of social engineering things that they did that were very successful. They have a theme song for broken builds and theme songs for each person that plays on a successful check ins.

Agile, Rails and the Cloud: Why companies can’t afford to ignore the efficiencies of modern development approaches

Ian McFarland Erubycon 2009 - Day 1Ian McFarland finished off the day with a talk about why modern development approaches matter to business. This is a very important thing to talk about and think about for businesses. The reality is that not nearly enough people spend time considering.

He started talking about Agile development and walked through many of the core tenants. He put forth fairly compelling arguments that you really do need to follow the tenants of Agile. For example, having the customers setting the priorities on the things that you are building matters because it helps you produce business value faster. He spent quite a bit of time arguing that you really do need to do paired programming. Everyone learns more faster, gets distracted less and the team knowledge goes up dramatically.

After that, he switched to talking about Rails. He’s got data that switching from Java to Rails proved out to have have 2-4x productivity gain for the developers.

Then he talked about the Cloud. To steal words from Brian Prince to help paraphrase Ian’s thoughts here – “Don’t be a plumber!”. Unless it’s critical to your business to run your own infrastructure, you should outsource the infrastructure. Actually, he made a strong argument that you should outsource a number of things. As I’ve said for a long time, if it doesn’t add to your companies stock price, why are you building it? There are times that you have to run your own infrastructure such as regulatory issues or business needs that make it more advantageous to have it internal.

At the end, he made a very contentious statement that Rails is not ready for the Enterprise. There are a number of reasons for this and mostly it comes to the fact that Enterprise is actually not ready for Ruby. The actual barriers are being solved. For example, companies such as Engine Yard are solving cloud issues and the like.

 

Now for dinner – more tomorrow!

The Lost Art of Simplicity

 

I recently did a keynote at the Central Ohio Day of .NET and a session at Kalamazoo X called “The Lost Art of Simplicity. I have to say that I’ve not been as excited about a specific talk in quite a while.

I posted the slides to SlideShare and I’ve signed up for speaker rate for this session. I would love some feedback.

Slides on SlideShare – http://www.slideshare.net/joshholmes/the-lost-art-of-simplicity

Speaker Rate – http://www.speakerrate.com/talks/773-the-lost-art-of-simplicity 

The Lost Art of Simplicity – Presentation Transcript

  1. The Lost Art of Simplicity Josh Holmes joshholmes.com josh.holmes@microsoft.com
    image
  2. sim·plic·i·ty (sm-pls-t) n.
    1. The property, condition, or quality of being simple or uncombined.
    2. Absence of luxury or showiness; plainness.
    3. Absence of affectation or pretense.
    4. a. Lack of sophistication or subtlety; naiveté.
        b. Lack of good sense or intelligence; foolishness.
    5. a. Clarity of expression.
        b. Austerity in embellishment.
    image

    Let’s start off by talking about what simplicity is. The official dictionary definition has 5 parts. We are going to focus in on the first definition. Simplicity is the property, condition or quality of being simple or uncombined. This is a beautiful statement that is unfortunately missing in much of our current application development.

    When we talk about something being simple, often people just right to the fourth definition assuming that it’s lacking sophistication or good sense and intelligence. That it’s foolish. As technologists, our tendency when we see something that’s simple is to say “Oh, I could write it in a weekend”. There’s a fair amount of NIH (Not Invented Here) tendencies that are just part of our culture. This is a dangerous concept.

    The last definition is the one that I really like. To have a something that has “Clarity of Expression” is awesome. Put that with the first definition and we really have something. I’m striving to solve problems in ways that are “Simple and uncombined” with “Clarity of Expression”.

    http://hikingartist.com/art/Peopletypes_g54-King_type_p124.html

    http://www.thefreedictionary.com/simplicity

  3. Simplicity is an acquired taste. Mankind, left free, instinctively complicates life – Katherine F. Gerould
    image

    One of the great things about the human race is that we are a race of problem solvers. And we take great pride in our solutions. The issue is that the solutions that we are most proud of are the ones that only we can understand.

    The best ideas, however, are the ideas that are immediately obvious once someone shows it to you. It’s that head smack “Duh” moment that accompanies those great ideas that I really like.

    http://hikingartist.com/art/animals_g58-evolution_p60.html

  4. I adore simple pleasures. They are the last refuge of the complex. – Oscar Wilde
    image

    Let’s use the example of this guy dreaming about having that apple for lunch… It’s a fairly simple problem on it’s face. We, as IT folks, get the IT equivalent of this issue day in a day out.

    http://www.flickr.com/photos/hikingartist/3010374978/

  5. Our life is frittered away by detail. Simplicity, simplicity, simplicity! – Henry David Thoreau
    image

    Can I get report of sales by geography? How about splitting that by demographics such as age or gender? What’s the effect of our current marketing efforts on sales of our latest line and how does that differ by geography or demographic? Could I enter a contact I met at the picnic into our CRM? Could that be blue?

    http://hikingartist.com/art/Cartoon_illustration_g29-Still_want_that_apple__p262.html

  6. Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and
    a lot of courage — to move in the opposite direction. – Albert Einstein
    image

    Our biggest fear is that the user is going to go get a copy of Access or something equally destructive and try to solve the problem themselves. Often they can effectively solve the short term problem and in the process bring down the enterprise…

    And this is a dangerous thing because as they open up the simple tools such as access and solve just their problem, they are potentially causing other issues like data redundancy throughout the company or duplicating efforts with another group. Often these solutions are even done with ignorance to larger concerns such as privacy laws.

    Even so, they are solving their problem in the short term and that was their goal.

    http://www.flickr.com/photos/hikingartist/3010374978/

  7. Most of the fundamental ideas of science are essentially simple, and may, as a rule, be expressed in a language comprehensible to everyone. – Albert Einstein
    image

    To head that off, we just, we start throwing our favorite technologies and designs at the problem to solve it in the most “elegant” way. This quickly results in over engineering the task at hand.

    One immediate and obvious danger is that we take that simple request and roll it into the next version of the application that’s going to be 18-36 months down the road ignoring the fact that it’s a pain that the user is feeling today. What happens when, 18 months down the road, the user that has requested that feature has solved the problem some other way? Or if that user is not even employed by the company anymore?

    http://www.flickr.com/photos/hikingartist/3010375012/sizes/o/

  8. It takes a long time to make something complicated simple, but if you do, it will work w/o problems for a long time. – F. Andy Seidle, http://faseidl.com/ 
    image

    And the solution that results is not only over engineered but it’s reminiscent of a certain coyote with all of the possible ways that it can fail. The reality is that the more complex a problem is, the more ways that it can fail.

    As a solution ramps up in complexity and “cleverness” it quickly becomes more fragile because there are more moving parts and more possible points of failure. Just because something is using the latest or coolest technology, doesn’t mean that it’s the best idea. If that latest or cool technology reduce complexity in some way, such as reducing the number of tools, streamlining process or raising the bar on the usability then there is a good argument to leverage it.

    http://www.flickr.com/photos/hikingartist/3009540065/

  9. The Innovator’s Dilemma that disruptive innovations are almost never the result of technological breakthroughs but are instead recombination’s of existing and often inexpensive technology in forms the former market leaders don’t pursue. – Clayton Christensen
    image

    In all of this, we are missing the obvious. There are known simple solutions to a lot of the requests that we get on a day to day basis.

    The first thing that we have to get over is the NIH complex that we all have. When you get a new request is your first thought, I can build that… Or is your first thought, I bet that’s been built…

    The second thing that we have to recognize is that the simple solution is probably the right one. If the solution that we have come up with is a so complicated that we are amazed with ourselves and proud of it, it’s probably the wrong direction.

    http://hikingartist.com/art/Cartoon_illustration_g29-Want_an_apple_p261.html

  10. Dealing with complexity is an inefficient and unnecessary waste of time, attention and mental energy. There is never any justification for things being complex when they could be simple. – Edward de Bono
    image

    We can’t keep down this destructive path of building more and more complex solutions that take eons to develop when the users have needs that we are not addressing in the short term.

    http://hikingartist.com/art/Cartoon_illustration_g29-Want_an_apple_p258.html  

     

  11. I’m Fine
    image

    We are living in denial that we are the problem. It’s our insistence that we are the technical gods and know everything that is driving this as a problem in the industry in the first place.

    http://hikingartist.com/art/Cartoon_illustration_g29-Not_to_be_disturbed_p398.html  

  12. We need to be very careful about the lure of complexity. We should not fall into the trap of thinking that if it’s hard to design, it must be good; that if it’s using the latest technology, it must be good; that if all our friends think it’s really cool, it must be good. – Gerry McGovern
    image

    We, as the IT world, tend to go rampant with technology with little to no thought to the consequences. Even though we are trying to make people’s lives easier, at best we do no harm. At worst, we cause a lot of pain and anguish for our users.

    The answer that a lot of us, and I’m guilty of this too, turn to is to vet our ideas and our UI designs with our peers. The issue is that our peers are also technologists who are just as geeked as we are about X new technology. This just perpetuates the problem.

    http://hikingartist.com/art/Peopletypes_g54-The_akward_type_p86.html

    http://www.gerrymcgovern.com/nt/2004/nt_2004_11_22_complexity.htm

  13. Things should be made as simple as possible, but not any simpler. – Albert Einstein
    image

    Let’s take a short step back and examine how complexity comes to our applications in the first place.

    Often complexity sneaks in under different names. One of my favorite is “Enterprise” which almost automatically means a complexity multiplier of 10. The idea here is that we have to be “Enterprise Quality”. This implies a certain engineering rigor, stability and scalability. One huge issue that I have with this term is that if you look at a mid to large sized enterprise with 10k, 20k or even 50K users you are still looking at a user base that would be considered a rounding error on some of the larger consumer facing applications such as Facebook, Twitter, Wikipedia and the like.

    http://hikingartist.com/art/animals_g58-Trojan_trap_p106.html

  14. The whole point of human-centered design is to tame complexity – Don Norman
    image

    Often the complexity is as simple as not understanding our users.

    I was recently in a long envisioning session with a customer about the next version of their client facing applications. We spent a lot of time hashing through their current application and came up with a number of ways that we might be able to save time or give a better experience. But at some point I backed up and asked the question, what are the top three things that your customers do with the application? If we knew that, we could focus on surfacing those to three tasks in the UI to help cut complexity and time out of the user’s day. The reality is that they couldn’t answer that question. There were some guesses and opinions thrown out but nothing definitive that they could throw out. Their homework assignment was to go back and find that out.

    I find this as an issue in a lot of customer engagements. Very few companies actually know how many of their users are using Windows 98 or IE5 but there is an assumption that it’s an issue so a lot of complexity is built into the system in order to accommodate what might very well be a small portion of their audience.

    The other side of this issue is that there’s what the users say that they want and what they actually need. There are some simple examples. “Could you Web 2.0ify my site?” “I need a X (where X is some buzzword that they just read in some article) technology application” Or any other place where technology enters requirements. This is where we need to redirect the user’s requirements by asking them about their goals and aspirations and then start figuring out what they need from that. “Oh, you want to cut down on the amount of text that your users have to type while increasing the accuracy of their reporting? How about we replace that block of text by allowing them to select a picture of what they are looking for? Yeah, we can do that without requiring them to wait on the page to reload.”

    http://www.flickr.com/photos/hikingartist/3208741909/sizes/o/

  15. I apologize for the length of this letter, but I didn’t have time to make it shorter. – Mark Twain
    image

    An unfortunately common problem that I see in the industry is that given group of developers knows one or two technologies and approach every problem with that technology as the solution. The reality is that that there are tremendous number of technologies at their disposal from web applications to desktop applications to mobile applications to hybrid solutions of all of those. You need to approach each problem with an open mind as to what is the best solution for that problem. Sometimes you’ll find that the solution is not actually a technical solution at all.

    The real solution here is to take the time to explore all of the possible solutions, technology based or not.

    http://hikingartist.com/art/meetings_g55-hammer_management_p129.html

  16. Ok. now what?
    image

    Where are we now and what can we, as mere cogs in the wheels, do to tackle this problem?

    http://hikingartist.com/art/Cartoon_illustration_g29-Short_term_solution_p408.html  

  17. \”Think simple\” as my old master used to say – meaning reduce the whole of its parts into the simplest terms, getting back to first principles. – Frank Lloyd Wright
    image

    There’s, unfortunately, not a magic solution to the issue of complexity. Simple is hard.

    Often you have to come up with several complex solutions that you can boil down to the simple solution. Often, in an effort to find the right solution, I will solve or at least map out solutions to a given problem in several different ways with a number of technologies ranging from desktop to web to mobile to non-technology solutions. Kind of like going to a shoe store and trying on a ton of different styles and sizes of shoes, you can get a lot of interesting ideas from checking out al
    l of the different solutions. You might be surprised by the solutions that make the most sense at the end of the day.

    http://hikingartist.com/art/Cartoon_illustration_g29-Wizard_type_3_p111.html  

  18. Simplicity is not the goal. It is the by-product of a good idea and modest expectations. – Paul Rand
    image

    All of that said though and as much as I’m talking about Simplicity in this talk, the reality is that Paul Rand has it right. “Simplicity is not the goal. It is the by-product of a good idea and modest expectations”.

    http://hikingartist.com/art/Motivation_g56-The_just_enough_Type_p116.html

  19. Never again will I make the simple into the complex. Something of true value does not become more valuable because it becomes complicated. – Donald Curtis
    image

    One of the biggest problems is that we try to, for a large number of reasons, try to boil the ocean with our applications. When we build out our project plan and it’s going to be an 18 month cycle before the users get a new version, they are going to go to battle tooth and nail to get their feature request on the docket because they know that if they are not able to get it in this release, it’s going to be at least 36 months out. All of these features crammed into a release adds not only a lot of complexity but a lot of risk to the endeavor.

    We have to get past the misperception that features equal value. Features do not equal value. Solving people’s problems equals value. The amount of complexity and risk that we add with these massive project plans hurt out ability to solve someone’s problem in a reasonable time frame.

    http://hikingartist.com/art/animals_g58-Fishing_type_p112.html

    http://en.wikipedia.org/wiki/Willard_Gibbs

  20. The ability to simplify means to eliminate the unnecessary so that the necessary may speak. – Hans Hofmann
    image

    You need to start small. Even if you know that the end game is far bigger, what’s that first step? What’s the minimal set of features that you need to get started? This is a struggle for a lot of people as we all want to go for the big vision. The natural tendency is to think that more is better but in a lot of cases, more just gets in the way of success.

    This is a core concepts that groups like 37 Signals have held. Their motto is that the first order of business is to get running and start building a customer base. You can worry about scaling later. But if you spend too much time worrying about scaling up front, you’ll never get out there to build the customer base in the first place.

    http://hikingartist.com/art/meetings_g55-Fools_can_t_you_see_the_bird…_p12.html

  21. Making the simple complicated is commonplace; making the complicated simple, awesomely simple, that’s creativity – Charles Mingus
    image

    On the other side of the coin, you need to have a clear concept of the future as you are getting started. I often see applications that are built with no concept future requirements and accidentally build in roadblocks to success. There are a lot of simple things that you can do that will future proof your application to some degree. It’s not hard to build in, if you start from the beginning with a tiered and separated architecture so that you can replace bottle necks if they start to pose a problem.

    This is sometimes a hard balance to hit but it’s an important one to tackle.

    There are a lot of straight forward things you can do such as adopting some of the great architectural patterns such as MVC (Model View Controller) or MVP (Model View Presenter) combined with great practices such as Test Driven Development (TDD). TDD is more than just building regression tests. It forces you to design and build your application in a modular fashion that allow you to make changes and modifications to your application quickly and with confidence. MVC and MVP are architectural patterns that work well with TDD and provide for great separation of concerns to further provide the agility that you need to grow and scale your application over time.

    http://hikingartist.com/art/meetings_g55-Not_quite_ready_p7.html

    http://en.wikipedia.org/wiki/Hans_Hofmann

  22. When thought is too weak to be simply expressed, it’s clear proof that it should be rejected – Luc De Clapiers
    image

    http://hikingartist.com/art/Peopletypes_g54-The_engineer_p121.html

    http://en.wikipedia.org/wiki/Luc_de_Clapiers,_marquis_de_Vauvenargues

  23. The whole is simpler than the sum of its parts. – Willard Gibbs
    image

    None of this means that I’m not solving complex problems. It just means that I’m layering simple solution on top of simple solution to solve those complex problems.

    http://hikingartist.com/art/Free_print_versions_g79-Building_bridges_p747.html

  24. The first requirement for an exemplary user experience is to meet the exact needs of the customer, without fuss or bother. Next comes simplicity and elegance that produce products that are a joy to own, a joy to use. True user experience goes far beyond giving customers what they say they want, or providing checklist features. – Nielsen Norman Group
    image

    So where to from here?

    As I look into the future, I see a world where we are working hand in hand with our users to solve their real needs rather than reacting to what they say that they want and confusing checklists of features with value. I dream of the day when we are able to respond to the users needs as quickly as we can get them to express those needs to us to the point of being able to forecast and proactively provide exactly the functionality that the user needs, nothing more, when they need and not a moment before they do.

    To do that, we need to forgo our egos, our love of complexity and our die hard grip on our favorite technologies and focus on the user.

    http://hikingartist.com/art/meetings_g55-The_observer_type_p135.html

  25. Go confidently in the direction of your dreams! Live the life you’ve imagined. As you simplify your life, the laws of the universe will be simpler. – Henry David Thoreau
    image

    You call to action is to go to war against complexity. Stand up for simplicity.

    Take the extra time that it is going to take to build the uncombined solution that has clarity of expression. Don’t confuse simple with lack of sophistication.

    Focus on your user and their needs.

     

    As you do this. As you take on this challenge and “as you simplify your life, the laws of the universe will be simpler”.

    http://hikingartist.com/art/Motivation_g56-The_gatekeeper_type_p48.html

  26. All artwork used in this presentation is licensed under Creative Commons by Frits Ahlefeldt, aka hikingartist Support his amazing craft at http://hikingartist.com
    image

    Before I finish, I need to say a quick thank you to Fritz Ahlefeldt. He’s a Danish artist with obvious talent. He publishes a large amount of his work under creative commons. If you like this art, you can see much more at http://www.hikingartist.com and support him and his amazing craft.

  27. The Lost Art of Simplicity Josh Holmes joshholmes.com josh.holmes@microsoft.com
    image

I’m looking forward to evolving this talk as I move towards CodeStock and DevLink. I know that there was a really nice progression in just a week between Central Ohio Day of .NET and Kalamazoo X as my message got a lot crisper and more direct based on a lot of great constructive advice I got from Michael Eaton, Michael Wood, Jim Homes and more.

Glimmer – A jQuery Designer

I had heard about this effort a few weeks back but I’m thrilled that it’s public and I can talk about it now. Karsten Januszewski and some of the other whiz kids on the MIX team have put together a visual designer for jQuery called Glimmer.

Right now, they’ve got a number of design wizards that you can leverage but they’ve built a great plug-in model so that you can write your own for your favorite jQuery UI plug-in.

Check out their video on how to leverage Glimmer and how it all came to be.

Get Microsoft Silverlight

I’m really geeked and am looking forward to using this in my next web dev projects…

Creating a Simple Silverlight Countdown Blog badge

image I’m going to be speaking at RIAPalooza in about two weeks, well more specifically at the time of this writing it’s 10 days, 12 hours, 48 minutes and 45 seconds. 🙂

I’m going to be tag teaming with Mike Labriola again talking about “10 questions about RIA you haven’t had the courage to ask”. We’ve got a short list of questions but are hoping to get some questions from the crowd as well. If you happen to have any questions, feel free to shoot them to me in the comments section on this post.

Anyways, we were discussing different ways to get the word out about RIAPalooza and someone mentioned that we didn’t have have a blog badge so I decided to create one.

I started by grabbing some art from the RIAPalooza web site. I started out in Expression Blend with a simple Silverlight project. Here are the steps that I took.

  1. Resize the Page.xaml user control to 100×200 to fit the blog badge size.
  2. Add the wood background that I grabbed from the RIAPalooza web site trimmed down to the blog badge size.
  3. Paste in the two other images, one for the logo (referred to as i and one for a a free t-shirt offer.
  4. Animate the two images to wiggle, spin, wiggle, wait, wiggle, spin, wiggle, wait, reverse.
    •  image
      To do this, I opened a timeline and started by rotating the first image -6 degrees and then a frame later rotating it to 6 degrees and then a frame later back to 0. This gives the images a nice little wiggle and catches the viewer’s eye without being too annoying. Well, I don’t think it’s too annoying but you can tell me…
    • image
      Then I kicked forward 2 seconds and did the wiggle again in preparation of swapping to two images. The wiggle makes a nice little transition before the action starts.
    • image
      At the end of the wiggle, I spun the image on it’s X axis over the span of half a second. That’s accomplished by setting the X Skew to zero.
    • On the same frame that the first logo hits an X Skew of zero, I make the other image visible with it’s X Skew to zero an proceed to transform it’s skew to 1 (normal) over the course of a half second.
    • Then I wiggled the t-shirt offer image in the same manner that I did the first logo.
    • Now, back in the code, I set a few properties and started the animation.
      AnimateLogos.AutoReverse = true;
      AnimateLogos.RepeatBehavior = new RepeatBehavior(1000);
      AnimateLogos.Begin();
  5. Now that the logos are moving, I needed a link to the site. Simple enough using a HyperLinkButton.
  6. Last thing I needed was to provide some type of count down. At first I just used a couple of labels and set the text.
    • First, I used a timer set to go every second and set the time
      _timer = newTimer(newTimerCallback(Timer_Tick), null, 0, 1000);
    • Next I used the dispatch object to work on the UI thread as follows:
      public void Timer_Tick(object state)
      {
          Dispatcher.BeginInvoke(() =>
            {
                try
                {
                    DateTime launchDate = new DateTime(2009, 5, 8, 8, 0, 0).ToUniversalTime();
                    TimeSpan span = launchDate.Subtract(DateTime.Now.ToUniversalTime());
      
                    txtDays.Text = string.Format("{0} Days", span.Days);
                    ...
                }
                catch
                {
                    //Eat all errors. We'll get another chance in a second...
                }
            }
          );
      }

There are a couple of things to notice about the code above. First, I just used everything as UniversalTime. I thought about trying to do the whole timezone thing but realized that it didn’t matter for a countdown because as long as everything was in the same timezone the math would be right.

Second, notice that I’m eating all of the errors in the timer. The basic error that I can get from this code is a threading issue and since this is low priority code, I didn’t care about the threading issue. It’s not like there’s a real recovery path other than trying again in a second.

Now that I had the simple countdown and badge done, I decided that I didn’t like the flat labels and wanted a real clock style count down. To accomplish this I started a Silverlight FlipClock project to build a reusable clock face.

Since I was creating a flipping clock with a separate top and bottom, it made sense to create a control to encapsulate those bits in user controls that I could reuse. There were two interesting parts here. First, how to get the text to cut off at the top and second, how to get the text to scale correctly with the number if we resized it.

image The first issue was solved by using a brush that cut off to an opacity of zero just under halfway. I did that on both the background and the textbox. The whole gradient is actually made up of three stop points. Two set to be the same color and opacity of 100% and a third that is set to the same color but opacity of zero. This third stop is just a hair further down than the second. The purpose of the second stop is to keep it from fading from top to bottom rather than having the hard like that I desired.

<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFFFFFFF" Offset="0"/>
    <GradientStop Color="#FFFFFFFF" Offset="0.48"/>
    <GradientStop Color="#00FFFFFF" Offset="0.49"/>
</LinearGradientBrush>

The second issue was solved thanks to Laurent Bugnion. He pointed out that although Silverlight doesn’t have a scalable font, there is a VIewbox in the Silverlight Control Toolkit on Codeplex that will scale anything inside itself correctly.

<controls:Viewbox Height="Auto" HorizontalAlignment="Stretch" Margin="0,0,0,0"
VerticalAlignment="Stretch" Width="Auto" Content="Viewbox" Stretch="Fill">
<Grid x:Name="LayoutRoot" Background="{x:Null}">
. . .
</Grid>
</controls:Viewbox>

I added a simple property to set the value in the textbox.

public int Value
{
    get
    {
        return int.Parse(txtNumber.Text);
    }
    set
    {
        txtNumber.Text = value.ToString();
    }
}

Then I just played with the styling a little with a slight highlight on the top and the like.

Next, I created a FlippingNumber control that would be the base for the various numbers on the clock. To make it look right,  I actually needed 4 sections to the control. Two to show the current number and two to show the next number and we flip between them. I simply put two of the top and two of the bottom number controls one the page. The flip was just an animation similar to the flipping of the two images in the top of the badge. The only difference is that I skewed the controls a little to give it a slight 3d effect.

Once that was done, the rest of the number was built in code.

public FlippingNumber()
{
    InitializeComponent();

    FlipDown.Completed += new EventHandler(FlipDown_Completed);
}

void FlipDown_Completed(object sender, EventArgs e)
{
    numBottomBack.Value = _val;
    numTopFlip.Value = _val;
}

int _val = -9999;
public int Value
{
    get
    {
        return _val;
    }
    set
    {
        if (value != _val)
        {
            _val = value;
            numBottomFlip.Value = _val;
            numTopBack.Value = _val;

            FlipDown.Begin();
        }
    }
}

The other property that I added was so that the clock could adjust the speed at which the number flipped.

public double SpeedRatio
{
    get
    {
        return FlipDown.SpeedRatio;
    }
    set
    {
        FlipDown.SpeedRatio = value;
    }
}

Finally, I was ready to piece together the clock. That was a simple matter of placing 6 of the flipping number controls on the clock face. All that was left was set the time on the clock based on a value in the passed in TimeSpan.

TimeSpan _timeSpan;
public TimeSpan TimeSpan
{
    get
    {
        return _timeSpan;
    }
    set
    {
        _timeSpan = value;

        numSecondOne.Value = FirstCharacter(_timeSpan.Seconds);
        numSecondTwo.Value = SecondCharacter(_timeSpan.Seconds);

        numMinuteOne.Value = FirstCharacter(_timeSpan.Minutes);
        numMinuteTwo.Value = SecondCharacter(_timeSpan.Minutes);

        numHourOne.Value = FirstCharacter(_timeSpan.Hours);
        numHourTwo.Value = SecondCharacter(_timeSpan.Hours);
    }
}

private int FirstCharacter(int num)
{
    string s = string.Format("{0:00}", num);
    return int.Parse(s.Substring(1, 1));
}

private int SecondCharacter(int num)
{
    string s = string.Format("{0:00}", num);
    return int.Parse(s.Substring(0, 1));
}

The last thing on the badge that I did was change the timer control code on the overall blog badge to pass the time span into the clock face rather than parsing it into textboxes.

Now I wanted people to be able to use it from their own blog. To allow that to happen, I needed a put together a cross domain policy via the clientaccesspolicy.xml file.

<?xml version="1.0" encoding="utf-8"?>
<access-policy>
    <cross-domain-access>
        <policy>
            <allow-from http-request-headers="*">
                <domain uri="*"/>
            </allow-from>
            <grant-to>
                <resource path="/resources/SilverCountDown.xap" include-subpaths="true"/>
            </grant-to>
        </policy>
    </cross-domain-access>
</access-policy>

Notice that I’m allowing access from any domain but restricting access to only load the specific xap file.

Anyone who wants to put it on their blog can do so simply by leveraging the following object tag.

<div id="silverlightControlHost">
    <object data="data:application/x-silverlight," 
type="application/x-silverlight-2" width="100px" height="200px"> <param name="source" value="https://joshholmes.com/resources/SilverCountDown.xap"/> <param name="background" value="white" /> <param name="minRuntimeVersion" value="2.0.31005.0" /> <param name="autoUpgrade" value="true" /> <a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"> <img src=http://go.microsoft.com/fwlink/?LinkId=108181
alt="Get Microsoft Silverlight" style="border-style: none"/> </a> </object> <iframe style='visibility:hidden;height:0;width:0;border:0px'></iframe> </div>

Feel free to place the badge on your own blog to help promote RIAPalooza – When this year finishes, I’ll update the counter with next years dates as soon as we know it… 🙂

Also – I put the code up at https://joshholmes.com/resources/silvercountdown.zip. Feel free to take it and play with it.

Antidotal info on JavaScript Library Ext JS

I’m in conversation with a group that’s using Ext JS for their RIA. As I haven’t used it, I thought I’d go ask at the international water fountain that is twitter about it.

Anyone using Ext JS? Thoughts compared to jQuery or Prototype/Scriptaculous?about 3 hours ago from TweetDeck

 

This is what I got back (I love twitter):

Kevin Hoytparkerkrhoyt@joshholmes IMHO, Ext is more about traditional applications. jQuery is a Swiss Army knife. Ext can do that, but rarely is used that way.about 1 hour ago from TwitterFon in reply to joshholmes

Nate Schuttantschutta@joshholmes friend of mine loves ext but the learning curve can be steep and leads to lots of js config rather then HTML. I like proto a tonabout 2 hours ago from twitterrific in reply to joshholmes

Joe O'Brienobjo@joshholmes we have tried all three and much prefer jquery. but ext is in a very different space with diff objectivesabout 2 hours ago from Nambu in reply to joshholmes

Kevin Marshallksmarshall@joshholmes I use extjs and jquery together. I just use extjs for some of the nice ui controls it creates and jquery for the rest of the jsabout 2 hours ago from twitterrific

Dave Meekerdmeeker@joshholmes We’ve looked at it extensively. It seems to be a mishmosh of those other libraries, no? I can put you in touch with someone hereabout 3 hours ago from web in reply to joshholmes

Jeff Blankenburgjblankenburg@joshholmes My limited experience suggests it’s much more a RIA development framework than jquery, etc.about 3 hours ago from TweetDeck in reply to joshholmes

Nate Koharinkohari@joshholmes ExtJS is nice if you’re looking for a full control toolkit. If you just want a low-level JS library, jQuery is the best imo.about 3 hours ago from TweetDeck in reply to joshholmes

Kalamazoo X conference

On the heels of the announcement by Michael Eaton, I thought I should post about how excited I am about the upcoming Kalamazoo X Conference

The Kalamazoo X conference, while being put on by the technical community, is a very different sort of conference. You’re not going to hear “technical” talks. All of talks pertain to technical folk but it’s a step back from the nuts and bolts that we usually deal with day in and day out and focusing on the topics that are really important.

Jeffatmix

Jeff Blankenburg will be giving Six Tips for Improving User Experience. Jeff is one of those amazing people that cross easily between the designer and developer world and can talk to either group with complete credibility. Again, he’s bringing great experience to the table as his roots in development are in the digital marketing arena.

Photo_11

Leon Gersing will lead a discussion about Change. Leon is a great software craftsman who has worked in all types of development shops from large consulting shops and independent software vendors to the small and nimble consulting shops working in technology ranging from his much loved Sharepoint to Ruby on Rails. His deep passion and experience combine to make him a dynamic and engaging speaker.

We have the great fortune to hear from Jim Holmes twice speaking on 3 Tips to Improve Your Development Process and Leadership 101. The first talk is a great talk that is important to anyone doing development regardless of their current process, tooling or any other variables.

Jim’s second talk on Leadership 101 couldn’t be given by a more perfect guy. Jim is a born leader in the truest sense of the word. Management, as a role on a team, can be given to someone regardless of their qualifications. Leadership is proven and earned over time. Jim’s led the CodeMash conference, which he downplays but he is the head cat herder. He doesn’t play a “management” role but rather leads through great thought leadership, influence and enablement of the people around him. But he knows when the buck has come to his desk and he has the ability to make those hard decisions that are required of a true leader.
I’ve heard Jim speak on similar topics in the past and I can attest that he’s bringing real world hard fought battle proven experience to the table. You can get some of his thoughts on the topic reading his blog post about Leadership 101.

Head_shot_v2

Brian Prince will be reprising his Soft Skills talk. This is a great talk that speaks to the non-technical side of our jobs that we all need to work on. I’ve seen, and actually delivered once when Brian came down with the plague the night before the Grand Rapids Day of .NET, this talk before. It strikes to the heart of how you, as a technical person, need to work on and grow your soft skills. It’s not fuzzy feel good bits, it’s things that will actually help you in your career.

Josh Holmes on Mount Crested Butte - photo by James WardAnd I’ll be speaking on the Lost Art of Simplicity. I’ve decided to go to war with complexity. Simplicity is a lost art in the application development space.

The Wikipedia definition of Simplicity is “Simplicity is the property, condition, or quality of being simple or un-combined. It often denotes beauty, purity or clarity. Simple things are usually easier to explain and understand than complicated ones. Simplicity can mean freedom from hardship, effort or confusion.”

This is a beautiful statement that we often lose sight of when we are building our applications. Instead we are on a never ending quest to fill out a checklist of features or to build something clever forgetting about the actual needs of our users to get a specific task done. This session takes complexity to task and challenges you to bring simplicity to the center of your development with some straightforward ideas and guidance.

I’ve not even touched on the sessions by Tim Wingfield, Chris Woodruff, Michael Wood, Phil Japikse, Sarah Dutkiewicz, James Bender, Dave Giard, Andy van Solkema or Clovis Bordeaux! I know most of these speakers and have seen them speak on a variety of topics. I guarantee that they are great speakers and that you’ll learn something from each and every one of them…

Best of all, you don’t have to choose between the all of these great sessions. I was terrified that I’d be in a time slot opposite of Jim Holmes and A: miss his talk and B: have to compete with him for audience.

As per the announcement by Michael Eaton, the conference format has been radically altered to be a single track conference with 20-30 minute sessions rather than the typical 4 track conference with 70 minute sessions. This will let me catch all of the sessions and it gives a new energy to all of the sessions as the speakers have to stay very tight to their topic and come with high energy to hit the time limit. I’ll be working with Mike to make sure that we have the hook ready  to go for people that go over. That might include me…

As you can tell, the Kalamazoo X Conference will be a very different conference than you’re used to. Now, it does cost $20.00 for professionals and $10.00 for students. That’s a VERY reasonable price for the quality of the speakers, topics and format that the organizing committee has been able to assemble.

Hopefully I’ll see you in Kalamazoo on Sat. April 25th.

Interesting Web Development Related Resources

Like so many thing that we do in our daily development, there’s a high probability that someone has already solved the problem if you know where to look. This is just a collection of resources that I’ve found useful over time. Honestly, I’m posting these here because I need them in one place so that I can find them easily…

JavaScript Resources

Like a lot of you, I’ve been doing JavaScript since 1996. I’ve been pretty geeked, however, with the recent (well, last 2-4 years) emergence of a ton of JavaScript frameworks that are making this work a lot easier.

imageThe first one to talk about it dojo. It’s one of the more mature ones that’s out there. I’ll be honest and say that it’s been a little while since I’ve used it because I’ve started using jQuery or Prototype more often. That said, dojo is one of the most complete frameworks out there. I do love it’s drag and drop support. It includes offline support and a whole lot more. Check out and play with some of it’s cool features at http://dojocampus.org/explorer.

Of course, any group that has a conference called dojo.beer() is a winner in my book.

imageThe second toolkit is MochiKit. I love it’s tag line of “Making JavaScript Suck Less”. I first worked with MochiKit when I was playing around with TurboGears – a Python web application stack. What it’s really outstanding at is doing async work which is particularly useful in doing AJAX and other service based work. It’s interesting to note that Kevin Dangoor started Turbo Gears and then at some point later ended up working for SitePen who paid him to work on dojo. Check out demos of it in action at http://www.mochikit.com/demos.html.

image

Prototype is a slick relatively low level framework. What it does is extend the HTML DOM to include a lot of really useful features like element, class and css selectors. One of the useful things that it does is add a number of manipulations to the built in string class. This gives us startsWith, stripScripts, stripTags, isJSON, strip and a whole lot of other really useful functions.image By itself, Prototype’s useful but I have a hard time talking about it without mentioning script.aculo.us and some of the other plugins. script.aculo.us brings drag and drop support, animation frameworks a number of controls and makes it all really easy.

Check out demos of Prototype and script.aculo.us working together at http://wiki.github.com/madrobby/scriptaculous/demos.

imagejQuery is a fantastic and relatively light-weight framework that’s garnering a lot of new supporters recently. Honestly, I was happy with dojo and Prototype until I saw the Visual Studio Support for jQuery at which point I started playing with it.

I’m a convert. 🙂 Now, because it’s not as low level as Prototype, jQuery doesn’t have some things like the string manipulation, but overall I’m really pleased. I find that I have to write a lot less code to accomplish the same results. And very importantly, the jQuery Documentation is really good. Another really useful thing is that jQuery, being a really nice citizen, has built in support to make sure that it’s compatible with other JavaScript frameworks. Throw all of that in with intellisense in Visual Studio and it makes life easy.

There are also a ton of different plugins for jQuery that do everything from menus to rude string manipulation (not as good as Prototype but it’s a start).

Some of my favorite jQuery plugins in no particular order are:

AJAX History
Mousewheel
JSON
Curvy Corners
jCarousel
xWin

image  ASP.NET AJAX is the last framework I’m going to talk about here not because there aren’t other frameworks but I haven’t used the others so I don’t really want to comment on them.

First, as the name does imply, what it does really well is AJAX stuff. One of the really powerful features is the JavaScript proxy generation.

<asp:ScriptManager ID="ScriptManager1" runat="server">
      <Services>
           <asp:ServiceReference Path="~/CustomersService.asmx" />
      </Services>
</asp:ScriptManager>

That allows you to call web services as if they were methods on an object.

function GetCustomerByCountry()
{
      var country = $get("txtCountry").value;
      InterfaceTraining.CustomersService.GetCustomersByCountry(country, OnWSRequestComplete);
}

function OnWSRequestComplete(results)
{
      if (results != null)
      {
           CreateCustomersTable(results);
           GetMap(results);
      }
}

Second, despite the name, ASP.NET AJAX can work with more than just ASP.NET. There’s a project on CodePlex to generate the service proxies for PHP called PHP MS AJAX (which is a whole lot of capital letters…).

How do you choose?

There are a ton of different tests out there some of which you can look at the results, others of which you can actually run yourself…

Dojo vs JQuery vs MooTools vs Prototype Performance Comparison | Peter Velichkov’s Blog – Jan 19, 2009

Mootools Slickspeed Test

I like to see if there’s broad support so the project won’t go away, see if it’s actively being developed, what tooling is available, how easy the syntax is, how well it plays with others, what it brings to the table from a functionality standpoint and a whole lot more.

Really though, it comes down to your preferences. The good news is that it’s not the end of the world if you decide to switch frameworks.

My current JavaScript work is being done with a combination of jQuery for most of my client side work with ASP.NET AJAX doing my communications (and some of the controls) with a little bit of Prototype thrown in when I need to go lower level.

CSS Resources

I used to spend days getting exactly the right alignment in my HTML/CSS work. But as time has gone on, I’ve gotten more mature and realized that I don’t have to work that hard. Instead of me figuring out how to do the exact right layout should be, I’m starting to leverage the various CSS Frameworks that are out there – especially since there are so many new browsers and form factors out there from IE8 to Safari 4 to iPhone. I want a framework to

imageOne really simple CSS Framework is the 960 Grid System. It’s simple and gives you a lot of flexibility. The idea is that it breaks up the page into either 12 or 16 different columns and then lets you put in areas that spread across any number of those columns. This is a direct nod to the print industry which does exactly the same thing on paper. This gives you a tremendous number of possibilities from a simple two column layout to a really complicated layouts with multiple width columns and variety. Check it out, it’s simple and it works.

image  The downside of it is that it’s a fixed width layout so it’s not always the right choice. The good news, however, is that the project has been extended by Fluid 960 Grid System. imageThis adds JavaScript to the 960 Grid System to give is a much more dynamic layout that resized to your screen size. It also brings dynamic menus to the table. It’s JavaScript it based off of a project called MooTools

imageIf the you really don’t want to think that hard and the others don’t give you what you need tied up in a neat enough package, check out Layouts.IronMyers.com. It’s simple to use web site gives you a preview of exactly the layout that you’re looking for and lets you download a zip file with a sample HTML and CSS inside.

imageAnd if that’s not enough and you really just need the design and all of the layout handed to you – check out FreeCSSTemplates.org. It’s got a large number of Creative Commons licensed CSS templates and layouts.

Conclusion

I hope these resources are as useful to you as they are to me. I’ve banged my head against the wall a ton of times until I realized that someone else had already solved the problem and I can leverage their solution.

Measuring ROI – Moving from Cost Center To Strategic Partner

MoneymanI ran across this article on ZDNet (Wanted: ROI for internal app development)  that really worried me. My friends at PreEmptive Solutions ran a survey across a wide number of developers that included people from 21 different industry segments in 33 countries asking about how the company measure the ROI of an application that they are building. The terrifying part is that the survey found that 58% of companies don’t bother measuring ROI on their internal applications and the majority of the ones that do measure don’t do so in a consistent and proven way.

This means that you are almost positively throwing away time and effort and therefore money. For some crazy reason, companies don’t like that.

image

Of all of the companies surveyed, only 6% have a consistent and reliable approach to measuring ROI. That terrifies me.

What are your Goals?

For a long time I’ve been preaching that IT needs to become a strategic partner to the business.

The issue is that most IT departments are considered cost centers. This means that they are the first to be cut when times get tough, they are the least invested in, they are the last at the table to be heard and they are pushed around by all of the other departments. This is not a good position to be in. This is why a lot of companies look to outsource IT. Since they don’t see it as a strategic asset and partner it doesn’t matter if they keep it close.

The way to move from cost center to strategic partner is to start showing value and to start pushing the edge on ideas that will drive a great ROI for the business.

But, if you’re not measuring the ROI, how can you talk to the business about the possible ROI?

Explaining the numbers...And every time that someone asks me how to sell their management on usability studies or spending any time on a UI, I tell them to go to the numbers.

And every time someone asks me how to sell their management on buying a given tool, I tell them to go to the numbers.

And every time someone asks me how to sell their management on training, I tell them to go to the numbers.

And every time someone asks me how to sell their management on anything at all, I tell them to go to the numbers.

ROI really it comes down to a simple question. How much money did the business make or save based on their investment in the software that they just paid to have developed?

There are two ways businesses think about investments. ROI, the first, is the percentage of return over a given period of time. Payback, the second, very closely related to ROI but very importantly different, is the length of time that it takes to recoup the investment. The reason that payback is important is because once you hit the payback point everything else is profit.

image I borrowed the graphic to the left from Paul Sheriff’s article called The Business Value of .NET.

An overly simplistic example is as follows. Let’s say a company wants to build a new online e-commerce site. If it takes 4 developers whose salaries are each $100,000.00 working for 3 months on a project with tools that they already own and so on. That means that it cost $100,000.00 to build. If the new site generates an average of an additional $15,000.00 a month for the first year, the gross profit is $180,000.00 with a net of $80,000.00.

We look at that as $80,000.00. That’s a good thing. However, there are two ways that the business is going to look at this example. The ROI is 180% and the payback is 6.6 months. Now, if the business sees an investment in another department that could yield a higher percentage or lower payback, that department is more likely to get the investment.

This is not a new problem. Back in 1999, Bill Gates wrote

image“When I sit down with developers to review product specifications, or with Microsoft’s product divisions to review their three-year business plans, or with our sales groups to review their financial performance, we work through the difficult issues. We discuss feature tradeoffs vs. time to market, marketing spend vs. revenue, head count vs. return and so on. Through human intelligence and collaboration, we transform static sales, customer, and demographic data into the design of a product or a program.”
Business @ the Speed of Thought : Using a Digital Nervous System
By: Bill Gates

Whether you are selling software or building internal applications, you need to go through the same process.

 

There are two basic ways to increase ROI, produce things cheaper or provide more value.

How did it cost to develop the software?

Money fightThe problem is that this includes more than just the developer’s salary. This includes how much were the machines, rent for the building they were in, telecom costs, training costs, their secretaries, management, consultants, tools, components that they bought and more.

You can keep costs down in a tremendous number of different ways.

Understanding what you’re building – There are many different types of processes that are out there that are more or less efficient depending on the team, project and a whole lot of different requirements. There are a handful of absolutes.

image The first is that you need to know that you’re building. You can accomplish this through solid requirements analysis.

Martin Shoemaker makes An Argument for Requirements Analysts where he points out research done by Boehm and published in Software Cost Estimation with COCOMO II found that “Excellent requirements analysts can reduce a project’s schedule by almost 30%, while inadequate analysis can increase the schedule by over 40%.”.

image David Platt has been talking about this same problem for years as “Why Software Sucks”. He’s been on ArCast twice, once with Ron Jacobs and once again with Bob Familiar. And he’s got a book on the topic called Why Software Sucks…and What You Can Do About It

Before you freak out, this does not mean Waterfall. This means that you understand what you’re going to be building and have a good grasp on the requirements. You’re going to make different web framework decisions if you have to scale to 10 users verses scaling to a million users. You’re going to make different input type decisions if your users are working outside and likely to be wearing gloves. You’re going to make different data locale choices if your user is going to be sitting in the corporate office next to the data center verses sitting in India or somewhere.

image With the Unified Modeling Language (UML), which can be leveraged with almost any process, requirements are captured in Use Case Diagrams. Check out Martin Shoemaker‘s UML Applied for a light weight process he calls 5 step UML.

In Extreme Programming, one of the Agile methodologies, these requirements are captured in User Stories. Regardless of your process, there is a way to do requirements analysis and it’s absolute that you have to do it.

Another absolute when it comes to process is that you need to have some form of user acceptance. A huge issue with most waterfall methodologies is that they push this user acceptance to the end of the project. At this point in time, the cost of fixing issues that the user finds with the software is prohibitively expensive. This is why Agile methodologies have the user involved in the project the whole way through and get smaller bits of functionality in front of the user earlier and more often. Course corrections along the way are a lot less costly than reversing and undoing months of work.

Buying a component or application – Building software is expensive. Going shopping againMost of the time, it’s cheaper to acquire something than to write it yourself. The question is, how close is the component or application to what you needed and how much customization do you need? Many people have heard me talk about “Buy, Rent or Generate”. If it’s not adding to your business’ bottom line, why are you spending the time and energy to build up the intellectual property yourself?

Think about a control suite such as NetAdvantage for WPF from Infragistics. It’s a $995.00 price tag. At first glance that’s a lot of money but how long would it take for you to write a control such as their xamChart that does 2D and 3D charting? A month? Two? Let’s be overly optimistic and confident like all of us technical folk are and say a week. If you’re making $50,000.00 a year, you just broke even if you actually hit the ridiculously tight deadline (technically you still lost because of all of the other factors that go into the cost of supporting you as a developer but for the moment, let’s pretend that you broke even…). What about support or feature enhancements?

The question you have to answer is does building the control, component, application yourself worth more to the company than buying it? What’s the (you should have seen this coming) Return on Investment?

With any of type of components or applications, you have to look at the full cost however. Often you’ll find that the licensing cost is a small part of the overall acquisition. How long does it take to integrate with the rest of your application? How much modification does it require? How much maintenance does it require? Whether it’s free (as in beer – i.e. no licensing fees) or not, there’s a cost associated. People who charge money for their software, open source or not, are betting on the fact that the cost of acquisition is going to be lower than you building it yourself. Sometimes they’re right, sometimes they’re wrong.

More efficient tools – The more efficient you are with your tools, the less time it will take for you to get features and functionality in front of the business.

Right tool for the job...For example, if you start leveraging CodeRush and/Or Resharper on top of Visual Studio, it will save you a lot of time. Or if you are leveraging tools that cut down on the amount of time you spend reporting or anything else you are saving time.

Again, pull out the numbers. If you can prove that you’ll have a 5 minute a day savings in time by leveraging CodeRush for example you might have a good case. At $50,000.00 a year / 2080 paid hours per year = about $24 an hour and a savings of 5 minutes * work days (with two weeks of vacation) is a savings of 900 minutes or 15 hour which equals $360.00. This means that at a price tag of $249.00, the ROI is 144% with a payback of 8.3 months.

The same type exercise applies if you are looking at buying a source control management system, bug tracking system or any other set of tools such as VSTS and Team System. In fact, there’s a whole lot of case studies that lay out the ROI of VSTS and Team Suite.

Not building a feature – The cheapest feature is the one that you don’t build in the first place. The When it would have been better with a planquestion is, how do you know which features you need to build in the first place? First and foremost, you need to understand the user. This is accomplished by doing user research. Next you need to, going back to my first point, do solid requirements analysis so that you know what you are supposed to build. And most importantly, you need to look at partnering with the business to build out the application. This is a core tenet all of the Agile methodologies. This means that you’re going to be building only the features that the folks on the business side want, not the features that you think that they need.

The second question here is after you build a feature, do you measure to see if the users are actually using a given feature? In other words, if you spent X amount of time and energy building out a specific set of functionality, how do you know that the business is actually realizing the potential return? It’s a simple matter of logging when a given menu item or button is clicked or code path is executed. There are tools that will automate setting all of this up. PreEmptive Solutions, for example, can build this functionality into your application without you having to write any code with their 2010 Dotfuscator application.

How much does it cost to run the software?

When money wins the raceThere’s a lot that goes into calculating the cost of running the software. It includes not only the cost of running the data center, hardware that the users use, the electricity to run the machines and the like but it also includes training to user to use the software, the user’s salary while they wait on latency issues and a whole lot more.

Again, there’s a tremendous amount of ways that you can save money in this arena.

Deploy in the cloud –  The idea of utility computing is that you only pay for the service that you use just like the electric bill. In a recent conversation with a friend whose company maintains MASSIVE data centers, he said that the servers were averaging less than 15% utilization. This is nuts but smart at the same time. On the one hand, you’ve got 6-7 times the data center that you need. On the other hand, you’re ready to handle spike traffic. The issue is that you’re still paying for that unused 85%.

This is where Windows Azure and other cloud computing platforms comes in. By deploying to the cloud you are cutting the costs of the data center down to what you are utilizing rather than what you anticipate as the possible high water marks.

This comes back to the question, however, what’s more valuable to the company? Keeping the data and processing in-house or saving the cost of the data center. A key architectural decision that you need to make here is what’s business critical to keep in house and how can you architect to keep that in house while rolling other parts out to rented data centers?

Build a better UX – If done correctly, this can make you user more efficient, cut down on the training costs and reduce support costs. 

image A great book that talks about UX is The Inmates Are Running the Asylum: Why High Tech Products Drive Us Crazy and How to Restore the Sanity by Alan Cooper. I can recommend reading not only any book that Alan Cooper has written but also can recommend reading his blog. In this book, Alan makes the analogy that most technology is like the dancing bear at the circus. The reality is that the bear is not a great dancer but people still flock to the circus to see the bear dance because, well, it’s a dancing bear. Many (maybe even most) of our technology solutions are really not that great for the user but the fact that it does anything at all is a novelty.

Principles of Software Engineering ManagementIn Principles Of Software Engineering Management, Tom Gilb wrote that “The rule of thumb in many usability-aware organizations is that the c
ost-benefit ratio for usability is $1:$10-$100.”

This cost benefit ratio is realized in several ways. Users will often call support to figure out how accomplish a given task. These calls can be eliminated by careful building of the user experience so that it’s “intuitive”. To figure out what’s “intuitive” to your users, you need to understand who they are and how they work. You can attract new users to your application. As mentioned before, you cut down on the number of features that you build that don’t get used and more.

Reduce the cost to maintain the software – This includes support calls, time and effort finding and fixing bugs, adding new features and the like. Dealing with legacy systems is what a very high percentage of developers do in their day to day jobs. The cost of maintenance can be mitigated on the front end in a number of ways.

There are a ton of books out there that cover this topic in great detail.

First, you have to have sound architectural principles and rigor. The larger the application is, the more important this is. If you can separate out your business logic from your data tier from your UI cleanly and absolutely, you have a much better chance of being able to do maintenance on one piece without devastating the rest of the pile of spaghetti.

image Second, you have to write maintainable code. The definition of “Maintainable” varies but my go to book in this topic is Code Complete: A Practical Handbook of Software Construction. I had the great fortune to have the first edition of Code Complete. It taught me things from properly named variables to building high performance data structures. I highly recommend anything that McConnell writes.

Third, find a good way to do a given task and make it the standard. For example, if you’ve got 3 different logging mechanisms, that’s probably 2 too many. If you’re doing one off security mechanisms in every application or even different parts of the same application, you’ve got huge headaches. If you have many different mechanisms for hitting the database you need to simplify and standardize.

There are lots of other techniques that will cut down on the amount of time and effort that it takes to maintain the software. However, there is a tipping point where it makes a lot more sense to do a rewrite than it does to keep maintaining the existing code base. This tipping point depends on the function of the application, state of the code, state of the architecture, practices used to build the application in the first place, availability of tools, availability of talent who understand the technologies used to write it in the first place and the requirements for new features. Determine whether it’s going to be more cost effective, given all of those variables, to do a rewrite or to keep maintaining.

This is not an easy decision. You have to fully understand the risks. Legacy code contains often vast amounts of implicit requirements: lessons learned that were never documented anywhere but the code. They should be documented elsewhere, but reality says otherwise. This is especially common when the original developers are no longer around: the new developers, in their hubris, assume all the old code is junk and can be “easily” replaced. Along the way, they lose implicit requirements that they’ll have to relearn the hard way. Additionally, rewrites from the ground up invariably take longer than adding a single small feature. Joel Spolsky is talks about these risks in an article called Things You Should Never Do, Part I.

Even with Joel’s wise words of warning, there comes a time when it’s cost effective to do a rewrite. In 2004, Rutherford and Associates took their 15 year product and rewrite 80-90% of their existing functionality and enabled a tremendous amount of new functionality with a 6-9 month investment of time from 3 developers. They had gotten to the point where they were not able to respond in an efficient manner to new customer requirements with the existing C code base. Of course, part of that code base was their own database engine because when they started 15 years prior, there was not a database engine for mobile devices.

But again, that’s going back to the numbers and understanding the needs of the business.

What’s the return?

Thinking "more"This is the really difficult part to measure. Most of the time there’s a way to measure how much your application costs to develop in the first place but there are many ways to measure return.

Returns come in three basic forms, money saved, time saved or new business enabled which brings in more revenue.

To really bring and measure a great return, you have to understand the current state of the business. This involves studying how the company earns money today and how they spend that money. When you understand this, you can start looking for ways to improve things.

Money Saved is not hard to explain but you can look for it in a lot of different places. One contract that I did before joining Microsoft was building out a specialized survey engine specific to the medical field to replace the paper one that they were currently using. This saved on printing costs, typists to type in the returned results into a spreadsheet but the real savings came in shipping costs. That alone paid for my contract within the first year.

Are you cutting back the costs in the data center or even cutting portions of it by rolling out to the cloud?

Are you cutting the power requirements of the client software by employing green methodologies?

Time Saved is a little more nebulous to measure but possible. Are you cutting down on the amount of time that it takes to process an order? One CTO of a call center told me that if he could save an average of 3 seconds a call, he would save 2 million a year. That’s a lot of money. Because of that level of savings, he was willing to spend a lot of time and money researching where users were spending time and what we cut. Latency issues were a killer. Near side caching, GEO location of data and many other relatively simple things shaved seconds and therefore saved time and money. 

Are you automating currently manual processes? If so, how long do those tasks take and what’s that cost?

Enabling New Business is where you want to be. This is where you start to become that strategic partner to the business and get a first class seat at the table w
ith the rest of the business leadership team.

Growing...Are you increasing capacity? This has to be carefully examined. If you are increasing the capacity to take orders but not the capacity to fulfill those orders, this is wasted effort. For benefit from the increased capacity, capacity for ordering, fulfillment and marketing all have to be working in concert. This comes back to understanding the business and asking people “where are the bottlenecks?”.

Are you attracting new customers to the business? Is your new online presence ranks higher in the search engines or taping into social media to leverage the “word of mouth” marketing that happens in that arena?

Are you making it simpler for people to buy your products? I recently blogged about Jarod Spool and how he changed the text on a button and created The $300 Million Button. The quick moral of the story was that the old wording was confusing customers and driving them away. The new button brought in $300 Million dollars.

Are you enabling new lines of business?  One example of enabling new business is when a wine distributor bought EO Star‘s distribution management application and realized that they could start managing and distributing many different types of foods with their wine and manage those as easily sold and packaged deals. A counter example is where one restaurant chain couldn’t offer a new type of food because they had to rewrite their menu application to handle it.

Conclusion

Money as a positionAs technology folk, we have to understand business or we will be at the mercy of the business. The primary motivation for all businesses is making money. This is measured via ROI and payback.

In order to become a strategic partner to the business you have to prove that you are providing a great ROI for the business’s investments in you.

You can improve your projects ROI by reducing development costs, runtime costs, maintenance costs and by saving the company time, money and enabling new business.

While this measurement can be a lot of work and a little scary sometimes, it will prove to be absolutely essential because once you have that data, you will be in a great position with the business.