Showing posts with label lessons learned. Show all posts
Showing posts with label lessons learned. Show all posts

Wednesday, March 25, 2009

The Fall of Agile?

Switching gears a bit from the last post, I recommend you read "The Decline and Fall of Agile".

I agree it is a common misconception that Agile is easy, that Scrum will solve all your problems. That daily scrums and sprints are the path to the rapid delivery of high value software. Many people and organizations say they implement Scrum, but in reality implement "Scrum but". Unfortunately the "but" tends to be the lack of strong engineering practices and a strong Product Owner. Now there is nothing wrong (in theory) with "Scrum but", as a service company, not all of our customers will accept a Scrum methodology, or, we need to follow their development process, some of which are very heavy-weight. But, you need to strive keep the important pieces of Scrum, and the corresponding good engineering principles. While Scrum is a MANAGEMENT methodology, don't forget the engineering part.

In my opinion, the most important pieces of Scrum include:
  • The daily standup
  • Strong collaboration tools to share knowledge and keep everyone informed.
  • Constant communication with the customer (product owner) and the team
  • Short iterations
  • Engaged and highly motivated teams
  • Motivated product owner
In addition to these management principles, some of the strong development processes we use at Macadamian include:
  • Peer review - all code is peer reviewed by at least one other developer. In addition, the test cases the developer used in his testing are also reviewed by a QA that is on the team.
  • Daily builds - All builds are run daily, failures are reported to the team immediately. The person who broke the build is severely punished by having to buy donuts. 
  • Continuous integration - Builds are run whenever a developer checks in source code, this aids greatly in the integration and helps catch build regressions.
  • Automated tests - These tests are run as part of the continuous integration environment, and prior to any patch submission.
  • Design review - All design is reviewed by the team prior to being implemented. It helps catch any missed requirements and shortcomings in the design. The design can be as simple as some boxes on a whiteboard, or even some interface declarations. No UML is required.
  • "Wide and Shallow design" - Helps catch fundamental design issues before any of the actual implementation has been done. This allows a more senior developer to help “bootstrap” a project and leave it with a solid foundation for the more junior developers to fill in. Because the design is only stubbed and not cast in stone, the design can still evolve in an emergent fashion.
What do you think? Anything you would add or remove?

Wednesday, March 18, 2009

Top 5 Agile Mistakes

A good post over at Agile Software Development on one team's top 5 mistakes on their first Agile project.

They are pretty classic mistakes, and some of them don't relate at all to Agile. Scope creep, and boring demos are widespread in all companies.

It is important to demonstrate features via use cases, it is something tangible and real. Demonstrating abstract back end technology pieces is exciting for geeks, but not users and they won't be able to easily relate what they see to how it will affect their jobs.

Wednesday, February 18, 2009

Technological Dysentery Disorder – A guide to coping

Have you ever met someone who blurted out random technologies or methodologies, at seemly random and inappropriate times? And furthermore, it seems like they are talking out of their you know what? If you are anything like me, then you have had the misfortune of having to cope with this.

Technological Dysentery Disorder (TDD) can afflict many people, from project managers, to sales, to executives, customers, developers, or even in rare cases, QA. Unfortunately, there is no cure for this disease, but simple coping strategies can help mitigate and alleviate the symptoms. It is especially serious when it affects QA, as a QA’s role often dictates that they bring sanity to the projects, and keep the rest of the team in line. When TDD strikes the QA, this is a worst case scenario, just like when illness strikes frontline healthcare workers.

One of the best coping mechanisms is to understand why the flare-ups are occurring. The two main causes of TDD are:
  • A desire to appear intelligent in front of peers, subordinates, and/or vendors
  • A strong fascination with technology, a fascination that is so strong that every single problem looks like a nail that needs to be bashed with the mighty hammer of technology
Understanding the underlying reasons for these outbursts will be very useful in helping you keep your patience when dealing with those afflicted.

Another important coping strategy is to refrain from engaging in debates or arguments about technologies or methodologies except when absolutely necessary. Engaging in debates on technology in sales or standup/status meetings is not ideal, you will end up going off on a tangent and wasting everyone’s time. Instead, focus on solving the underlying problem instead of focusing on the technology.

When you are dealing with a stakeholder who is suffering from TDD, try to guide the discussions away from technological, framework, or other non-important issue, focus on the problem, not the technology with which to solve it.

At the end of the day, an expert is a problem solver, not a technology implementer.

Monday, January 12, 2009

Just Fake It

No matter what some people might say, faking it is perfectly acceptable. Seriously, faking it allows you to get finished your task sooner. Some people think that faking is cheating, but it's not.

Ok, enough with the double entendres, what am I really talking about? Why using mock objects or stubs of course.

Stubs are more common in the types of projects that we tend to do, but we do use mocks as well. I really like these design patterns and try to use them often to decouple different teams from each other. This being said, the concept of stubbing and mocking is starting to become a bit of a lost art.

Once the interface and supporting data structures are designed, one team can start to work on developing the user interface using stubs and mocks whilst the back end team works on implementing the actual functionality.

This has several benefits:
  • It removes the back end team from the critical path
  • Facilitates the creation and maintenance of unit tests
  • Facilitates the top-down coding methodology
  • Provides an actual user of the APIs and data structures to validate their design
  • Allows the team to focus on the big technical risks
  • Helps facilitate the separation of teams
Shortening of the Critical Path
By the smart application of mocks and stubs, the manager can reduce the overall critical path of the project and the dependencies on the back end team. All the teams need to collaborate together to define the interfaces and use cases, but once that is done the teams can work independently, and most importantly, in parallel. Without the use of stubs and mocks, the user interface team for example, would be unable to accomplish much work until the back end was implemented.

Creation and Maintenance of Unit Tests
Many teams and projects now work in the Test Driven Development methodology, or at the very least rely on unit tests to demonstrate correctness of the code and help guard against regressions. The use of mocks and stubs can help encourage the creation and maintenance of unit tests by allowing the developers to first stub the back end and then write the unit tests to exercise the interfaces. Additionally, mocks provide the ability for the unit test writer to write the unit tests that exercise code that relies on complex objects. Additionally, since mock objects implement the interface and simulate more complex real objects they allow programmers to implement and unit-test features in one part of the application without actually having to call the more complex underlying objects. A broad, well maintained unit test suite will give you the manager a lot of confidence with regards to the overall quality of the application. In addition, a good test suite can give the manager a lot of confidence to approve the re-factoring exercise without fear of introducing regressions.

Facilitates top-down coding
Stubbing and mock objects are an essential part of the top-down coding methodology, or as some people like to call it "breadth-first coding". Read the link for a much more detailed explanation then what I have room here for.

Validation of APIs and Data structures
Often "paper" doesn't match reality, and the best designs on paper fall apart in real life applications. The use of mocks and stubs that meet the interface requirements and behaviors of the design allow the users of the interfaces and complex objects to actually use them in a real life scenario while the real implementations are still progressing. This can safe costly redesign and re-factoring exercises, both in terms of budget and schedule.

Move the big rocks first
Clever use of stubs and mocks allows the team to focus on solving the big technical hurdles without getting bogged down in the small little details of the project, the so called while stubbing "boilerplate" functionality. For example, your web application needs to implement complex domain specific functionality that requires a lot of collaboration between the development teams and the stakeholders, of course you need user management and login, but those problems have been solved a thousand times before, and the amount of work required to implement them is well known, leave the actual implementation to the end. Removing the technical hurdles upfront in the project allows the manager to more accurately estimate the end date of the project as the most riskiest items in terms of budget and schedule have been solved.

Separation of teams
With today's global teams distributed across the globe all efforts have to be made to decouple the teams and reduce time to market while at the same time keeping the project as a whole cohesive and highly productive. When the developers from your user interface team come to you and say they are blocked because they are waiting for the back end guys to finish their service layer, or that no one but the team here in the head office can work on that feature because it depends on another feature from another team, remind them of the concept of stubbing the APIs and mocking the complex pieces in the interim, this may well indeed allow another team in another location work on that feature with little to no impact in quality or time to market. Of course the teams still need to communicate constantly with each other. The ability to easily separate areas of the application will help the manager build out the team in multiple locations, potentially allowing the team to grow faster then could be hired locally.

Monday, December 15, 2008

Addition by Subtraction

Quick, some math teasers for you:
  • 5 + 3 + 2 + 4 = ?
  • 5 + 2 + -2 + 4 = ?
What is the answer to the first question? 14.
What is the answer to the second question? 9.

Let's put some names by some numbers:
  • Alfie is a +5.
  • Arthur is a +3
  • Ben is a -2
  • Bert is a +4
Assuming these numbers map towards their actual productivity, what is the actual productivity of this Sodor based development team?

Alfie + Arthur + Ben + Bert = 10 productivity points. So assume you can accomplish 10 "productivity points" worth of effort any given day.

Now the rest of the team isn't too fond of Ben professionally, Ben tends to introduce many bugs into the code, takes longer to finish tasks, and generally asks a lot of questions that wouldn't normally be expected of someone with his seniority.

Dennis the project manager knows that Ben is struggling, he has been working with Ben to improve his technical skills and get him more productive on the team. But so far there hasn't been much improvement.

Now Dennis is in a bit of bind.

The Sodor team has a big release coming up in the next few weeks, and Dennis needs to ensure he gets all the requested content in by this time. The team was building a new version of their flagship application, and thousands of dollars were spent on pre-release advertising. The deadline simply cannot be missed. Dennis is looking at the schedule and doesn't think he can get all the work done, he wonders if he should get another developer on the team, but he is wary of the rampup and training time. Not to mention the increased management overhead.

What would you do?

Instead, Dennis decides to do something a little more radical, he removes Ben from the team. It was a hard decision, Dennis carpools with Ben almost everyday to work. And no one likes making someone feel bad, but Dennis decided to do this anyway.

The productivity equation now looks like this:
  • Alfie + Arthur + Bert = 12 productivity points

An instant case of addition by subtraction. Without Ben slowing everyone down with simple questions and build breakages, the team is now able to go faster and get more done. All with less actual time on the project.

Dennis meets the timelines and budget. A good day all around.

Macadamian has written about this way back in 2003, and the principle still holds true today. Negative team members drag your team down. It is the manager's job to identify the negative team members and work with them to improve their productivity, if their productivity isn't improving then you must remove them from the team, and perhaps with due course the company.

Sometimes drastic change is required for the success of the project. Drastic change is hard to undertake, but sometimes it has to be done.