Automated Unit Testing for JavaScript

March 3, 2010 by Patrik Henningsson in Monday School 2 Comments » ()

In our work towards Continuous Deployment and an improved approach to JavaScript we are missing one very important thing – automated unit testing for JavaScript. Currently we have have some tests written in TestCase that will run in the browser. But we need away to automate this without the need of a browser so we have started to look at some alternatives.

The solution we’re currently playing around with is Rhino + Env.js + QUnit.

Rhino is a JavaScript implementation written in Java and you can run it in a terminal, which harmonize with our aim for automation.

Env.js is a DOM implementation written entirely in JavaScript and will simulate the basic functions of a browser.

QUnit is simply the framework for the unit tests.

So far it looks very promising and it looks like we can do much of our testing in this environment. We will post more of our discoveries here later when we have done more testing, so stay tuned or follow me on twitter (@pahen).


A first look at JavaScript Frameworks

February 22, 2010 by Michael Plikk in Monday School 3 Comments » ()

In our discussion today about Javascript frameworks we finally came to a conclusion, of sort, regarding when to use frameworks.

In back office applications we can use whatever framework we want. It is used by a small number of people and we have total control over possible dependencies and namespace collisions, so we do not have to worry about breaking other people’s stuff.

When we create code that is going to be included on another web page it is a completely different story. In those cases our goal will be to create code that does not require a framework, so we avoid polluting the requiring site with our dependencies. It might not always be possible to achieve this, but it is a noble goal at least.

We have been using Prototype for most of our work so far. On smaller projects we have started to dabble a bit in JQuery and YUI. The next time we do any major JavaScript development we will explore the options they give us.

The major reasons for moving away from Prototype is the huge size of the library, and numerous changes it makes to basic JavaScript objects. A lot of the changes are good and make for easier code development, but they don’t really feel like proper JavaScript. Instead they rely too much on magical functions and the forced object oriented coding style that Prototype enforces.

We also find that Prototype (and Scriptaculous) are lacking in regards to their option for “plugins”, like calendar- or graph-plugins. Either Scriptaculous have a solution built in, or there are very few good alternatives. Both JQuery and YUI seem to have better communities surrounding them that develop better, and more, plugins that might suit our needs.

The little experience we have with JQuery so far indicates that it is very DOM-centred. This is both a boon and a bane; we loose some of the power we might have gotten used to in Prototype, but it might help us creating purer JavaScript for code in the areas that do not touch on the DOM. This is a goal we have since we want to make all of our JavaScript code testable, and it is much easier to test code that only manipulate data and do not touch the DOM.

Another option in regards to plugins that we are going to look into is ExtJS. The GUI elements that they offer seem to be very powerful, and using pre-built items would save us a lot of time. The pitfall that we saw was that overuse of the items they supply might make the application look too much like a desktop application. Since we are developing for the web we should be careful to not draw too much inspiration from the desktop, they are different media and require different solutions.


No Scrum, No More

February 11, 2010 by Geir Berset in process, teamwork 20 Comments » ()

After listening to Olve Maudal at the Lean Meetup in Oslo yesterday, and after reading some of his tweets today (@olvemaudal) I realized that we never informed our readers that we are not doing Scrum anymore. I don’t think we have for 9 months or more. We were quite elaborate, if not evangelical, about our experiments with it here on this blog, so I figured it’s over due to let you know.

It’s official: We’re not doing Scrum anymore.

I will take the time to elaborate on why, and I’ll reflect on what we’ve learned from our experiences.

Why are we not scrumming?

The shortlist:

  1. Iterations were too long – It would sometimes feel like a waterfall in miniature. Reality for most development teams is that circumstances change constantly, and developing the capacity to adapt to these changes are more important than planning iterations carefully, which is just a form of guesswork.
  2. Too much overhead – Sprint planning felt a bit forced. We had to decide what to do for days or weeks to come, and ended up with requirements churn. Beyond a certain point during planning, we went into congestion, and stopped caring about the details.
  3. Our sprints are too diverse – Sprint goals ended up  so diverse sometimes that we ended up more often than not with the sprint goal of “Finish all tasks” which was a quite uninspiring goal. (We tried very hard to create good sprint goals)
  4. Demos not often enough – We need to show off the feature we just made right now, not in 14 or 30 days at the demo. That is way to late for us. Demoing should be an integral part of each feature or improvement you make. You need to be close to, and intimate, with real users. If we had investors or any other formal committee of sponsors that needed to approve everything we did, we would see the use of such “demo roundups” at regular intervals.
  5. Too long release cycles – The scrum process batches a lot of changes, improvements, bugfixes and new features into periodical releases. We are working on continuous deployment with a steady stream of product improvements, which allows for more predictable releases and better fail-tolerance.
  6. “Scrum is just the easy parts of XP”  – It’s a quote from Kent Beck, although he does not like to be quoted on that one. This is why most are doing Scrum in combination with XP of course. I think you in many cases are better off with XP without Scrum, but that’s another story. We’re not doing XP in its purest form, either. Even though XP has much stricter coding practices, XP also has its limitations. The lean startup movement (which Kent Beck himself seems to be quite interested in) complements the weaker parts of XP — the customer feedback part, especially in the initial phases of product development.

You might see a pattern here: We’re still doing most, or all, scrum practices, just more often and in smaller chunks. This brings us closer to Lean.

What did we learn from it?

You should have a Product Backlog, and it should be a very simple sortable list. The emphasis should be on keeping it short, however. A long list of features becomes an administrative overhead. We found ourselves sifting through much of the same tasks from sprint planning to sprint planning. Too much got captured in the sprint backlog. We are still using product backlogs actively.

You should hold sprint planning meetings. The problem with the scrum-format of it is that it has more emphasis on creating a plan up front (i.e. the waterfall comparison), than it has on the planning itself. If planning is a monthly activity (or bi-weekly, or whatever your sprint length is in scrum), you end up reading your plan more than you spend time planning. We find that planning is at its best a continuous, on demand, activity. Do more of it, often, but in smaller chunks, and keep less of it lying around. I will have to agree with the Dwight on this one : Plans are nothing; planning is everything.

Daily scrums solves a non-existing problem – I’m sure that it is not hard to find team that would benefit from daily scrums. If you are such a team, chances are you are not communicating enough. We find that by hanging out on the project IRC-channel doing continuous micro-coordination and sharing information, and by hooking up on Skype to discuss challenges and problems on-screen as they arise we have nothing left to coordinate or discuss on the daily scrums. Everyone is in the loop on what is happening.

Retrospects are pure beauty. Again, the problem with scrum for us is not that it is has bad practices (it has the best of practices, actually). The problem is that it is performed to seldom to have the desired effect. Retrospect is not an activity, it is a mindset, and has to permeate everything you do, and should be done on a continuous basis. Ask these questions about every little project, task and experiment you run. What went well? What could be better? What will I focus on improving? It’s key to learning, and learning is essential.

Under what circumstances would we consider scrum?

If we ever find ourselves in a multi-team environment with quite large teams (5-10 per team), with sponsors that needed formal updates and demos, we would be sure to consider both scrums and scrum of scrums.

So, was all our Scrumming just a waste of time?

No way. It was a learning experience.

Never forget this: There is no silver bullet. You should try different stuff, be critical and analytical in the process, ask why to just about everything, and you will learn a lot. Shed each practice that fails to materialize into concrete value for your development process. In the end, no process formalities will save you, your diverse experience will.

What will we do differently?

We will continue to draw inspiration from Scrum, Lean, XP, Lean Startup, Customer Development, Continuous Deployment, etc. But instead of changing ourselves to fit the process (as was much the case with our scrum-efforts), we will look at the core of their ideas, extract their essence and see how they could apply to our existing and intuitive way of doing things;

If being a keen student of processes and development theory has taught us only one thing, it is that we should trust our gut feeling, our sense of what is purposeful and what is common sense, and that most of our current practices are worth keeping, and improving.

I advise you to try to improve the quality of how your team already, and intuitively go about doing the work. Do not change the way you work entirely in an attempt to magically achieve quality and speed. This way you can better preserve what you already got figured out, and at the same time be improving continuously.

In plain words, what are we doing now?

We still do a lot of the scrum practices. We just do them more often, and in smaller chunks. You might even say continuously, to some extent. We have learned to cherish planning over plans, and a retrospective mindset over bi-weekly formal retrospects. We write less plans, we take less notes. Communication flows more freely instead of formally in batches.

We get more done, and with increased quality, and we also have Scrum to thank for it, but definitely not only Scrum.

One of our biggest ongoing project nowadays is our establishment of Continuous Deployment practices, and all the discipline that goes with such a strategy. (It requires some coordination when you have servers deployed all over Europe, as we do) You will need to optimize the entire value stream to achieve this. We’ll keep you posted on how it evolves, and the benefits our customers and we reap from it.


JavaScript: Tools, Coding Standard and Guidelines

February 8, 2010 by Geir Berset in Monday School, coding 1 Comment » ()

We’re currently devoting an hour each Monday to collectively work our way through JavaScript. Our aim is to point to the key areas of interest and improvement, and to dig into each area one by one.

We are maintaining a TOC for our JS-discussions here.

Development Tools

Firebug is the most important development tool for us, without comparison. Everyone is familiar with this time-tested tool.

You will rarely need more than Firebug, although there are some valid alternatives now, in 2010. Chrome, Safari and Opera (Dragonfly) have all internal tools for debugging (and more). None of us have used those tools extensively, so we don’t know more than what we have heard from third parties, which is mostly positive. If you need to spot errors in IE, Microsoft Script Debugger is your best hope. IE8 ships with this integrated as default. No-one in our team reported ever making use of the Firebug Light for IE.

When it comes to JavaScript editors, we find that no text editor seems to differ significantly from the rest. Most editors provide color-formatting, some provide API-reference with autocompletion and some editors like vim and TextMate can be configured for auto-validation through JSLint.

Coding Standard

Our coding standard for JavaScript builds on our own internal PHP Coding standard as far as it fits, which in turn builds on the publicly available Zend Framework Coding standard.

We have boiled our standard down to this shortlist.

  • Follow the Zend Framework Coding standard
  • Use an underscore in front of private objects. (i.e. var _private = 0;) Private objects and methods can be defined as «trusted» with everything else foreign and error-prone. This can make your core more stable and rigid without having to overdo it with data-testing and integrity validation.

It is possible to achieve a private scope in JavaScript, but it comes at a cost in complexity, and we have decided against it. Our decision is based on experience and advice given in “Pro Javascript Design Patterns“.

/**
 * Rationale and short description of ClassName.
 */
var objectName = {
    myFunction: function(whatToDo)
    {
        if (typeof whatToDo === 'string' && whatTodo.length > 0) {
            objectName._doWhatYouGottaDo(whatToDo);
        }
    },
    _doWhatYouGottaDo: function(whatToDo) {
      // As this is a private function, I trust the type and data validity of the argument
      alert(whatToDo);
   }
};

The above is a minimal example, which in no way covers all the rules accurately.

Guidelines

Global scope. Put as little garbage as possible in the global scope. Use well-named objects as namespaces and if needed sub-namespaces. Know the results of using or skipping “var” when creating objects.

Use closures, with care! Closures are necessary in JavaScript, but as not all languages have them, they will to an inexperienced JS-programmer look too much like Magic(TM), which isn’t too good. Use good judgement when to use them, and  remember good inline commenting to make the magic more transparent.

Don’t use the “new” operator. When setting up prototype inheritance it has to be used, but there are no other cases where it should be used. In most cases it’s not only slow, but the alternatives are often easier to understand, require less code and are more powerfull. Because of this, we have decided to conform on code without new. As examples, new Array and new Object should be written as [] and {}.

Prototype inheritance contains power for object oriented code. We will return with more guidelines when our experience grow. We must admit not to have used this elaborately. A serious liability of PrototypeJS (the framework we used) is that it overrides prototype (the language feature) from JavaScript.

Few anonymous functions. As a rule of thumb, we say: name functions. This has to do with testability and readability of your code. The exception is if you need a “one-liner” to use just once, in which case anonymous functions are OK. You would normally not test these kind of functions.

Lint your code! Lint is a code quality tool, and it will hurt your feelings. But  that pain is just Douglas Crockford stabbing the parts of you responsible for writing bad JavaScript. You end up stronger in the end.

Recommended research material

JavaScript requires effort on your behalf. You need to do the homework if you want to be a powerful and successful JavaScript developer. For starters we recommend these resources:


Enterprise JavaScript Coding

February 1, 2010 by Geir Berset in Monday School, coding, software 2 Comments » ()

Not many years ago, people would giggle and think of enterprise and JavaScript as an oxymoron. Not so much anymore. If you want to be a serious actor even in (or maybe especially in) the enterprise software market, you have to take JavaScript seriously. Large parts of your product’s business logic might find its way into your JavaScript scope, not to mention your GUI elements, and you must be prepared when it does.

We have decided to address JavaScript with more care. We’d like to give it the time and focus it deserves. Not to be mistaken, we are probably in the top 5% of businesses going deep into JavaScript on our enterprise software, but we still feel we can go further — especially in the fields of quality assurance and scaling.

Lo and behold, we give you;

Monday School Notes from JavaScript session #1

Table of Content

We have decided to divide the subject of JavaScript into the following sections:

We’ll be covering these topics in the weeks to come, and we well be returning with links on the TOC. If you will join us in this, please follow this blog on RSS or follow the company or the author on twitter. If you digg it, then digg it.


Notes on Continuous Deployment

January 21, 2010 by Geir Berset in process, teamwork 2 Comments » ()

Scenario: A customer has a problem with your software. His questions makes you think and you get an idea for a feature improvement. A good one! Act on it.

  • Plan it
  • Code it
  • Test it
  • Commit it
  • Deploy it

Nothing out of the ordinary, it seems. The seemingly new thing about continuous deployment is that we remove all the waiting in between each of these steps. That is, we don’t batch changes before to testing them. You test immediately what you just coded. You commit it. Not to a branch due for merging in a week. No, directly to trunk. And you even deploy it at once to production. Done. Clear your mind of it, enjoy, relax, spend some time doing something proactive.

Develop, test, commit, deploy. One feature, bug-fix or improvement at a time. That is the mantra for continuous deployment.

Some developers, and perhaps particularly managers, will find the idea crazy at first. Release immediately? Omigod. But frequently this sensation of safety in postponing something, is not rooted in any real benefits, and there seems to be no rational answer to the question of: why wait? Did your code ever get better during the night? Some will even argue that big feature releases is a marketing invention, invented to squeeze more money out of customers frustrated with the bugs in the current version. This practice of batching changes in releases in turn got embraced by the industry as the professional way of conducting business. I could easily add this to my list of major problems with the software industry.

Wouldn’t it be nice to deliver a bug-fix the same day it was reported? The same hour, even? It might just be possible if you are continuously deploying product improvements like this, kaizen-style.

Where does this idea come from?

The idea of continuous deployment comes from the lean school of thought. In the mindset of lean kanban pull systems — where you are constantly looking to remove waste and minimize your batch-sizes — grouping a lot of big software changes together in big batches and big releases makes no sense.

Even Flickr is doing continuous deployment these days.

The whole idea is to respond to customer “pull”. The customer needs something now. The clock starts ticking. Is the feature more useful if you wait a bit before you start coding it? No. Then start now. Is the feature better if you wait with testing after coding it? No. Then test now. Wait until tomorrow to integrate into version system? Is that better? No. Then integrate. Does thing get better if we wait to deploy that new feature? No. Then deploy it. Stop your clock. The shorter the time, the better for the customer. And better for quality, it seems. And the better for you, the coder. Unreleased code is stressful. Released, working code, is stress free. The code works. It’s proven.

After a few iterations, our fear level was actually lower than how we used to feel after a staged release. Because we were committing less code per release, we could correlate issues to a release with certainty. (From Case Study: Continuous deployment makes releases non-events)

Bugs that are not discoverable in testing are easier to find and fix if you released only one feature, than if you batched a months worth of changes together in one big bang release. Or so the lean school of thought states. I agree. You would have written the code hours ago, and probably say ‘a-ha!’ the second you hear about it. 20 minutes later, a bug-fix is released. Why wait?

A few resources on lean from Amazon:

What does it take?

Not surprisingly, continuous deployment requires a high level of team discipline. No goofing off and no more fixing everything mañana in testing. Practices such as 5 Why root cause analysis, extensive testing and automation will be required. But it will all lead you to better quality and higher iteration speed. Speed and quality, it is all related.

Eric Ries writes on O’Reilly Radar about “Continuous Deployment in 5 easy steps“. Eric Ries has gotten a lot of traction with his Lean Startup movement lately. And you can follow his thoughts and reports on personal experience on continuous deployment on his blog http://www.startuplessonslearned.com/

Look ahead

Will we pursue this issue of continuous deployment any further? In the name of delivering a high quality experience to our customers and users now, when they still need it: yes we will.

If you will join us in this, please follow this blog on RSS or follow the company or the author on twitter. If you digg it, then digg it.


Great Software : A Definition

January 16, 2010 by Geir Berset in process, software No Comments » ()

Defining what great software is, is not a complex endeavor. I prefer to boil it down into two distinct characteristics.

a) Ease of Use

The software solution walks you gently through the process of solving your problems as intended. No distractions, no unnecessary decisions to make, no confusions, always heading towards the goal. In short : A great user experience.

b) Quality of Craft

Quality of Craft means that the software solution is easy to maintain, it’s easy to modify so that it’s always accurate in solving the ever changing problems it’s going after (and by that I don’t just mean in configuration, but easy to change the code of), it’s easy to move about (i.e. from server to server), it performs great, it responds immediately when interacted with and it scales, or can be modified to scale, in order to handle the traffic it will attract.

Photo by toffiloff

Isn’t that an intuitive definition?
The definition is common sense in software product development.
Perhaps a “Software Product 101” should start out with such a definition.

Thus, we should assume that everyone get’s this nailed down from the start, or through a little experience, no?

I’m sorry to report that surprisingly few players in the industry is able to see this.
And even fewer is able to execute it.

It’s always either or, never both. The tendency is quite prominent.

It seems as start-ups create great solution accuracy and a good user experience using customer oriented development methods, and in general a lean start-up methodology. Growth, however, turns them in the direction of stability and the need for predictability. Sadly this usually leads to a loss of the qualities in a) in favor of a few of the more stabilizing qualities in b).

As much as I agree that as a start-up turns into an enterprise, the need for operations stability and predictable performance increase. I do not, however, believe that this is achieved best by sacrificing the ability to adapt and to keep the software usable and accurate.

I believe that while sacrificing qualities in a) might seem to be the easiest path, it is not the only path, not to mention that it in no way is the right path.

I am part of a small, growing, start-up company, and we’re focusing our resources at keeping on the right path, maintaining the agility of a start-up, and the stability and predictability of an enterprise. It is possible — this path exists.

It’s hard to find. But we’ll find it, or die trying.

Related posts


Quality and speed. A primer in team design.

January 8, 2010 by Geir Berset in teamwork 1 Comment » ()

How you design your team has a great deal to say for the speed and quality of the resulting work the team will do.

Speed

The ultimate ideal for speed is a one-man show.

There’s this one guy doing everything in the project. He is competent in engineering practices such as software design, scaling and testing, and he excels in design, user experience and what not.

When he has an idea, he considers it. He weighs it back and forth. Then a decision is made, right there on the spot. No waiting, no straying, no nothing — just an idea, wham bam, a decision. All while taking a shower or having a cup of coffee. Soon he’s back at the keyboard implementing it, testing it, committing it, deploying it.

The next thing you know users are using it, providing their feedback and insight.

Did you notice the lack of all-day design committees (probably reaching no consensus, scheduling follow-up meetings the next week). Notice the lack of a board of directors that takes weeks to assemble into one room. Notice the lack of calling, facilitating and planning endless project-meetings. No extensive change processes. No writing frequent status reports. No large specifications documents needed to keep in sync for review and approval, there is no handing over documentation between the design phase and the implementation phase.

With the one-man show, it’s just wham bam thank you ma’m. It’s like a ninja — the ultimate warrior mastering all needed disciplines needed to win the war, and he’s calling the shots faster than you can say cheeseburger.

– Cheese (I chopped your head of) burger.


Quality

But say the ultimate goal is quality, not speed.

The ultimate ideal for quality is hordes of different specialists working the project. They work in teams, or they might even separated into entire departments or companies dedicated to one profession each. One of these teams consists of the best designers the world has to offer. Another team has the best programmers and there’s a team of the best usability experts in the field.

At the start of the project all sit together until everyone agrees what problem we are solving, and how we want to solve it. If new challenges arise underway, they will gather to discuss and to agree how to adapt.

We start the project, and we are passing the project from team to team, giving each of them the time they want, and do not interrupt them until they’re done. They will ask for your input when they need it.

When they are finished, you should have the best quality money can buy, shouldn’t you? After all they had all the time in the world, and they were not interrupted.

Speed or Quality?

Now, all you have to do is choose, will you need speed or will you need quality in your particular project? Choose your strategy from the two outlined above thereafter. Unfortunately, it’s not that easy. Or, rather: luckily there’s more to it.

The problem with speed

With the one man show, you are very exposed to obtaining one or more crappy qualities on your software product. Your guy will have his strenghts, and there is bound to be weaknesses. So you end up with the best user interface, but a crappy test-suite making the software unmaintainable. Or perhaps you have a delightful backend, but a user interface that sucks. Or maybe your ninja is so anal about every quality that he is failing to build up speed in the first place.

It just does not scale, and you are very exposed to this individual’s priorities.

Ultimately the lack of tests, the poor scalability or the increasing complexity will stop the project dead in its tracks. So much for the ultimate speed ideal. It was fun while it lasted, but it did not last. Project stops. Try again.

The problem with quality

OK, so you chose the smart path and aimed for quality. You landed the big budget and told everyone to do their very best, and gave them all the time in the world.

I’m sorry to report that problems seems to pile up for these kind of teams as well.

So your user experience department spends a week, a month, two months, or whatever time it takes to craft the best user experience possible for the problem they are solving. Then your design department spends a week, a month, two months, or whatever time it takes to create the best design of their life. They hand it over to engineering, and, as they go off to win a design award, the engineers have a go at fulfilling all the promising features that the UX-team wire-framed now fitted with the award winning design. They spend a week, a month, two months or whatever it takes to create the very best implementation. Their algorithms are featured in next years text-books for the university students.

Only now the solution solves yesterdays, yestermonths or even yesteryears problems.

The core problem with this quality approach: While each of your teams were busy creating the best user experience, the best design, the best algorithms, someone else were busy making the most accurate solution for the problem.

And as if that wasn’t enough, they were adapting to the problem as it changed in character. The problem always does that. Change, that is. At least in the field of software product development.

No problem, you’re thinking! Let’s just pass the ball back to UX, on to design and then back to engineering. That will show them!, in just 1 month or 2months or n months time, that is.

Oops, and there’s that change of problem to solve again. Darn it. Your project is behind, and your award winning design and algorithm are not solving the right problem. Quality wasted.

Turns out that time available and uninterrupted focus in each discipline is far from the only factors which affect the total quality of the project.

Solution accuracy is also a quality. Too often forgotten, but probably among the most important ones.

The solution lies in team design

In order to realize the solution, you will first have to buy into the assertion that:

You need quality to achieve speed, and you need speed to achieve quality.

This means that you should not choose either speed or quality. You should aim for both, as they tend reinforce one another. It might feel counter intuitive or even paradoxical, but it holds out.

The team design solution you are looking for draws inspiration from both worlds: the overly optimistic one man show (the ninja) and the bureaucratic silo process with a lot of specialists in their own departments passing the project from silo to silo in total isolation from one another.

You need speed and you need quality.

It’s really quite simple to explain (and very hard to execute)

You need one guy calling the shots, and you need specialists backing up and implementing in quality what he dictates. They all need to interact in a cross functional environment and they also need time to dedicate themselves to their specialties, creating price-worthy work within their profession.

You need to strike the fine balance in your team design to get the speed of cross functional teams, combined with the qualities of the isolated teams. Your continued efforts to ensure both will ensure that these two disciplines reinforce one another to achieve the best quality software you can produce.

“Accept and embrace the risks, even plan how to mitigate them, but don’t avoid them.”

There are, of course, loads of challenges.

  1. Why should the teams of specialists trust the chief engineer’s decisions, and thus back his ideas with a 100% commitment and enthusiasm?
    • The centralized decision-maker will have to be a respected individual, an individual in which all team members place their trust. (Challenge: These individuals are hard to come by, and they have to invest a lot of energy into understanding everything about all parts of the project)
  2. How will the chief engineer be able to know all about everything in the project?
    • Do not underestimate the capacity of man, given the opportunity to focus. The chief engineer will focus on two things : knowing everything about the project, and developing a deep relationship and understanding of the problem to solve (i.e. getting intimate with the customer group). He makes it happen through this focus.
    • Also, he must be wise and humble. He must be so humble as to pull information from specialists whenever it is needed to reach the best possible decision for the project. Just as much as he knows where to get all the information he needs — he does not himself possess it. He is trusted to do this, and his trust among his peers gets strengthened all the more when actually doing it.
  3. What if the chief engineer is hit by a bus?
    • A very common question from concerned prospects. The truth is that unless the chief engineer has had a brilliant protege at his side all this time that can step in immediately and take over, your development process will grind to a halt. At least for some time. Consider the alternative for a moment, before gasping in repulsion. Your alternative is a process similar to design by committee (a lot of people involved in every project decision), in which case your development process will grind to a halt from day one. Surely and you will be safeguarded from loosing momentum, but it’s not worth is when the solution is to never really building any in the first place. And that’s just not a smart strategy. Accept and embrace the risks, even plan how to mitigate them, but don’t avoid them.

There are surely more challenges with this approach than my shortlist above, and you’ll have to develop the capacity to deal with them. Nobody said this would be easy. I just asserted that it will be the right thing to do. And it will. Master this, and it will make you strong, fast and of high quality.

Summary: The solution in a simple list

You know you love lists. I know you love lists. That’s why I’m willing to oversimplify the answer to this complex problem, and state it in a few simple bullet points below. Be sure, however, that you set out to absorb these ideas beyond this list, and follow up on the recommended reading, in order to make your team design better and better with time. Kaizen.

  1. Keep decision making centralized at a wise, trusted, experienced and respected source.
  2. Ensure a steady flow of cross-functional communication between specialist teams to keep everyone aligned towards the ultimate goal of creating the best overall solution for the problem — not just the best design or algorithm in isolation.
  3. Ensure that each professional discipline has enough isolated time so they are able to produce work they are proud of.

Am I making this up? (AKA: References)

The concept has been tried and tested not only by us, but in larger scale by Lean inventor Toyota (their chief engineer role), by Gore (the Gore-tex manufacturer) who refuse to scale beyond 150 people per factory in order to keep it small enough for one guy to pull all the threads and have direct contact with everyone involved.

Toyota relies on the chief engineer role in every new product development process. Their future existence relies (more and more) on their ability to come up with new designs that accurately address the needs of the marketplace, and just for this reason they have the chief engineering role, which also makes them one of the best in this field. The others are following in their tracks.

Both of these companies has enjoyed great success as a result of their strategies.

There is no silver bullet. You’ll need to experiment with team design to master it. My best advice would be, that you give it a shot in the small, and in the process you should read the references provided. See how it goes, revise, celebrate your ability to spot your failures, acknowledge your victories and try again.

Repeat indefinitely.

If you like this post and want more, enter the fourth dimension. You can subscribe by email to the right.

Disclaimer

Never mistake team design to be the silver bullet. There is no silver bullet. Good team design will not help if you have team members that lack the skills or the motivation to excel within their respective fields. You need excellent individual skills in each team member to pull this one of, and you need to put full trust in them.

It’s not a development strategy for the faint of heart, or for the micro managing control freak.


3 Major Problems With the Software Industry

January 3, 2010 by Geir Berset in software 3 Comments » ()

There are three prominent problems in the software industry that bothers me in particular at the moment. Being a part of that industry, I feel somewhat responsible to help shed some light on these problems. I list each problem below, with a proposed solution outlined.

broken

Problem 1. Foot-in-the-door Software

The recipe for creating foot-in-the-door software is really quite simple:

  1. Design a software that can do anything with “a little customization”.
  2. Make it hard to customize. Make every protocol and specification proprietary and hard to understand.
  3. Don’t go anywhere near any standards.
  4. Provide a horde of overpriced consultants to fix all of the above problems, and have them apply the “Ninja Technique (Problem 3)” so that they can stay on-site indefinitely.

Voilá! Now just wait for money to pour in from miserable customers.

Solution: Empower your customers through creating standards compliant API’s and plugin environments with open and commonly used technologies for which problem solvers can be found everywhere and anywhere. Even better, stop creating problems for your customers in the first place. Stop sticking your foot in the door, and focus on creating something that makes your customers the stronger one. They will rely on you all the more for it — and it will be a relationship based on trust, not desperation or despair.

Problem 2. The Green Lights Problem (Unchangeable Bloatware)

Players in the industry still build software that is close to impossible to change or make additions to. It can take months or years between releases, and they buffer up so much change that no-one ever dare (or can afford) to upgrade. This frightens the purchasing department. Big time. As a reflex to this problem, they have (understandably) rehearsed their spec writing to include everything but the kitchen sink — effectively forcing anyone that want to be a player in the industry to create bloatware from day one rendering the software hard or close to impossible to use, as well. A 100 page requirement is not that uncommon(!) 20% of the required features typically end up being used (*). The longer the spec the better, it seems. It means less risk of having to ask for a software change from a broken industry — let alone taking the risk of going through actually receiving it! Purchasing is happy though, they did their best to fight change by getting their little green lights on all checklist points in their gargantuan spec, and then they moved on never seeing the havoc in the wake.

This quote from It’s Learning shows just how bad it can get “We need not concern ourselves with the users, as long as we make money” Meaning that they’ll throw anything into their software to please purchasing, even though it makes the users miserable. (via Ida Aalen and google translate, original post in norwegian here)

Solution: Dear Industry, let’s at least start by creating usable (as in usability), modifiable and maintainable software, effectively showing the customers that we can please both the user and the purchasing department all at once: changes and additions to the spec is possible without a headache, which allow us to keep software functionality concise and to the point. Happy users and happy purhcasing = happy everyone. Even you. Look to lean and agile for your solutions embracing, not fighting change. It’s possible, you know. It just might lower costs and increase your overall software quality, as well.

Problem 3. The Ninja Distraction Technique  (using Tech Jargon)

Traffic ConesThe software industry has spent years (or maybe decades) educating their customers in tech jargon. It’s all a part of the ninja technique of distraction. It is. Really. The theory goes: Keep throwing words such as “Java, JBoss, Caching layers, Multi Tier Software Development Housing Fascilities Campus” at the customers, and you will not only sound very professional, but what’s even better, the customers will soon forget what they really were asking you for, so there’s less of a chance chance you have to deliver.

Imagine being the customer in this scenario: Here you were looking for a a) safe car with b) comfy seats, c) low fuel consumption, d) good stereo sound and a e) large trunk for all your groceries, and suddenly you had a car salesman giving you a primer in everything ranging from the new four layer varnish coating technology to the latest in air-pressured suspension theory and revolutions within the field of fuel injection and what not. You don’t want to hear about that, you want to know if it will hold your coffee cup steady while playing your Mozart in a perfect pitch.

Well, the industry seems to have distracted you from all that.

Solution: It’s about time the industry starts talking about the metrics that the customers can relate to and understand. And more notably, the ones that they need. Let’s talk about ease of use. Let’s talk about performance (can you handle 100 users registrations a second?). Let’s talk about modifiability (can you deliver a medium sized product feature change in 1 week, or less?). Let’s talk about reliability. Is your up-time average more than 99,97%? Will your software automatically restore upon any hardware problems? Can you upgrade our software frequently without involving our tech-department? What is your fix time for bugs?

There is no need to talk about technologies if you can reassure the customer on the real metrics. If you can deliver on these metrics (and deliver you can if you just stop with all the distractions), you would not need to apply your ninja techniques, and our software could be made by an aging brontosaurus for all they would care.

Let’s shift focus onto providing real software solving real problems for real users — injecting relief instead of frustration and hopelessness into this world. (**)

Please contribute with any experiences you have with the industry in relation to any of these problems. Or maybe you have a beef of your own with the industry. Bring it on! We (the players in the industry) desperately need to hear it in order to improve.

Footnotes

(*) This is my personal estimate, based on the pareto principle and experience. However, probably not an unfair estimate given the magnitude of this problem.

(**) Am I trying to convey that we’re perfect in this respect? No. We’re improving all the time.

Tune in to the fourth dimension using RSS or follow me on twitter.com/geirber


Caching Concluded (for now)

November 16, 2009 by Geir Berset in Monday School No Comments » ()

hammertimeIt’s been very interesting looking at different technologies and strategies, and we are now concluded and will be leaving the topic of caching for now.

Caching Todo-items

Reverse Proxy Caching and ESI
We will be creating an internal guideline-document for using Varnish, which we’ll also publish here on the blog. Varnish is a simple, fast and stable technology excellently suited for the job (Reverse Proxy Caching and Edge Side Includes).

Data Caching
We will be re-implementing our data-cache layer in our framework, namely AFWCache. The goal is keep options open for future technologies, while solving today’s needs elegantly (as in: sustainable software development). It will become an abstract class which through use of the adapter pattern will support our two technologies of choice, namely Memcache and APC, which serves as both opcode cache and data cache layer.

Future topics for Aptoma Monday School

We’ll be spending this week considering a new set of challenges to thrive on. We’ll conclude this Friday in which direction we’ll move.

  • JavaScript Guidelines
  • Upgraded database adapter class for our framework

Suggestions? Hang in there (RSS)