By Michael Woloszynowicz

By Michael Woloszynowicz

Saturday, September 10, 2011

2 Years of Programming in 4 Months

If you're hoping for some revolutionary method to drastically accelerate your programming, I'm afraid you won't find it here. What I'd like to share is how we managed to accomplish in 4 months what previously took us 2 years, and do it much better.

Several months ago we made the decision to completely re-write and re-brand an application that we worked on for over two years. The decision came as a result of gradually adding features without a complete understanding of what was really needed and what customers actually valued. Fortunately over the last few years we learned exactly what it is that people like about our software, and what they're willing to pay for. We had a substantial user base that we built up with little to no marketing, no real brand, all in a relatively concentrated geographic area. The benefit of this was that we were able to learn and make changes without affecting too many people. Furthermore, we were able to maintain a close relationship with the clients we did have and find out what their pain points were.

Armed with a good understanding of the market and what is needed to succeed in it, we decided that it's time to begin scaling up. Despite this ambition, our existing product was not up to the task. After years of adding features on a case-by-case basis, the UI was a fragmented collection of features, usability was a concern, as was application architecture. The decision was finally made to start over, and 4 months later, a brand new product was born. While we still have a long way to go, what was accomplished in a short period of time was truly astounding, and customer feedback has been overwhelmingly positive. So without further ado, what allowed us to accelerate our development so much?

I've written before here about the advantages of building your web application atop a REST API, and I can say with strong conviction that this was a major contributing factor to our accelerated development. This approach made development more enjoyable and left us with a well structured and high performance back-back. We were able to pack a tremendous amount of functionality on each page without having to worry about how the pieces interact. Each component had it's own JavaScript objects and dealt with its own API, so each problem could be dealt with individually. The stateless nature of REST has made debugging a breeze because the path from the client side to our data access layer is clear, and consistent. Furthermore, we've been able to reduce the memory usage of our Tomcat server by a factor of 3 thanks to removal of session level data.

A Pure JavaScript Front-End
Related to our REST-centric approach is building the front-end entirely in JavaScript. Six months ago I began playing with the Dojo toolkit and fell in love with the simplicity it brings to creating rich and interactive user interfaces. When coupled with a good deal of CSS, very little JavaScript code is actually needed to create the UI components for even the most complex pages. By building the entire UI in JavaScript we no longer have to rely on ID's or classes to reference elements and instead we can maintain pointers or utilize closures to modify the state of various elements and respond to events. As I've written about before, Dojo's event handling mechanisms allow you to create well structured and highly maintainable UI classes so I highly recommend checking it out.

One of the greatest benefits of a pure JavaScript UI is the ability to create reusable components that you can drop-in wherever they're needed. Thanks to Dojo's class system, we created base classes for everything from modal dialogs, to REST communication layers, all the way to large UI elements. For example we noticed that our client has to choose users in several areas of the application, with only minor variances in each one. Before we were writing a separate user selection mechanism for each context, but this time we simply created one incredibly powerful and extensible user picker modal dialog that we reused over 10 times in the application. This has obvious usability benefits as the user only needs to learn how to use it once, and can benefit from it throughout the application. Half way through our development we amassed such an extensive set of base classes and components that it more than doubled our rate of development.

The Right Team is Everything
One huge advantage we had today as opposed to two years ago is a fantastic programming team. Each person has a unique set of strengths, a desire to learn new techniques and desire to write a high quality application. Skills on their own are great but the real acceleration occurs when those skills come together as a complete team. A team that shares the same vision, the same goals, and most importantly embraces the culture in the company. Despite working long hours and being tired, everyone was always smiling and cracking jokes, and this positive attitude was visible in the final product.

Hire a Good Designer
In the past we got by with doing our own designs and css development, not necessarily because we wanted to, but because it's not easy to find a good designer. Fortunately we were able to find one and I'm constantly amazed at how much quicker the design and implementation of a page comes together, and how much better it looks. Most developers hate fumbling around with colours, graphics, and writing CSS that works across various browsers. Freeing them from this allows them to focus on doing what they do best. While I've read several articles where it is suggested that startup owners try to do their own design at early stages, I would advise against this in all but an early prototype. If you find a good designer, hire them. It will save your developers a lot of frustration, accelerate development, and produce a much more beautiful product.

Embrace the Lean Startup
Focusing on a minimal set of features and having an understanding of where the value of your product lies is essential. Not only does it reduce the actual amount of work needed, the motivation it provides is equally important. While the value of most features that we previously developed was questionable, knowing that a specific feature is valuable to the client motivates the developer to do it well and do it fast.

Quality is a Motivator
Knowing that every feature that went into our product was valuable, we wanted to create a product of the highest quality. No corners would be cut, the user experience would never be compromised to save time, and that the look and feel be perfect. Despite this fanatic focus on quality, the pace of development only got faster. As development progressed and the product came together, we realized we were working on something special, something that looks beautiful, that's fun to use, and something that we can all be proud of. Mediocrity doesn't motivate, being a part of something unique and amazing does. Keep in mind that you should only obsess about the details and strive for perfection when you've verified that your value proposition and business model are sound. As the lean startup suggests, it's not wise to invest in perfection at the outset, just make it look decent and figure out if anyone wants it.

Embrace Agile
I shouldn't really need to mention this one but I think it's important to emphasize for those still stuck in the world of waterfall methodologies and 500 page product requirements documents. Although we knew exactly what our application needs to have, we didn't opt for a big design up front approach. We created the vision of what we want to the product to be and what it needs to have, but the design of each feature happend just before implementation. This proved extremely valuable as we learned new approaches, had new components, and continued to learn from clients and each other right up to the last day. Arm yourself with use cases, embrace Scrum, and watch your productivity soar.

Slowing Down is Speeding Up
Rapid development is not about being a slave driver. Take the time sit down and reflect with your team, toss around ideas, enjoy a coffee together, and spend lots of time on design. You'll learn a lot from each other and a good design will pay dividends during implementation. Typing away at a keyboard all day long leaves little time to think so create an atmosphere where employees feel it's ok to sit at their desk and just ponder. If they're tired one day and need to leave at 3:00, they should feel comfortable in doing so. Sometimes you just need to slow down in order to speed up.

While your situation may be different from ours, or you may find yourself at a different stage in your business, I'm confident that embracing at least some of these suggestions can help you increase the pace of development, produce a better product, and create a more enjoyable journey for your team.

If you liked this post please Tweet it, or follow me on Twitter for more.

No comments:

Post a Comment