8/23/2007
Seminar on Agile and Embedded in Helsinki
8/21/2007
Does eXtreme Development Exist?
I spent last week in Washington D.C. participating Agile2007 conference. The conference program was overwhelming with over 300 events. However while we have many implications to agile embedded systems development the agile embedded community is still small. So next time you see an agile conference ad, sign up!
Jim Highsmith is a person that has brought together agile community and general product development. I have followed his work and writings closely. He has brought work of people like Stefan Thomke, Preston Smith, and Donald Rainertsen (Reinertsen & Associates) to my knowledge. The latter two co-wrote the book Developing Products in Half the Time. In the panel discussion about agile manifesto there was a Q if the panelists believed that values of manifesto are applicable to development outside SW. (This is what tried also!). Highsmith mentioned a pure HW team that they successfully coached based on eXtreme Programming techniques. In that particular project there was no SW at all!While browsing for the links, I found out that there is a new book out from Preston Smith:
Flexible Product Development: Building Agility for Changing Markets. It's on top of my wish list.
8/02/2007
The Pain of Choosing the Refactoring Tool

Well, it's not as impressive as could, but it's a start. We know that writing refactoring tools for C is difficult, as with the preprocessing a C compiler can be made to understand virtually anything. Doug mentioned their struggle when he commented earlier on this blog. Good news is that it's now easier to start using Eclipse for C projects, as it is possible to get Eclipse and SDK in same package.
We have been using SlickEdit for a while. Slick has a bit more refactorings for C - actually all three of them.
Refactoring is an important ingredient in test-driven development and while these tools are not much, they still take the bar for quick refactoring lower.
And that is good news. If you are not able to decide from this myriad of choises, you can choose the middle way - get the SlickEdit plugin for Eclipse.
7/30/2007
TDD Tools
Using TDD for firmware in C can be quite laborious. Creating a new module requires at least steps like:
- Create a test .c file
- Add created test to test build
- Create implementation .c file
- Create implementation .h file
- Add implementation to production build
- Add implementation to previously created test build
- Create fake object(s) to make the test build to pass
- Add fake object files to test build
When you adapt the habit of testing everything you quickly get bored repeating these tasks. You end up looking for tools to automate this repeating work. At least this is what you should end up doing, and not giving up.
Atomic Object has created tools in Ruby to do the trick and some. At ESC2007 they demonstrated their tools and already gave the tools on CD, but there still was some minor problems getting the tools to build. Now they have released their tools as open source and fixed the small problems in the earlier distribution. In Summer Issue of Methods & Tools is an article elaborating Atomic Objects approach to agile firmware development infrastructure. Highly recommended starting point, and offers also a path for advanced testing.
Just tried out the package that is now available from their site - Worked like a charm!
Tools do really not need to be complex to make a difference, propably quite the opposite holds. We made file templates and bunch of scripts running sed to replace key words to automate C unit testing steps. We learned this from James Grenning's CppTestTools. From Atomic Object's package we adapted their simple unit test framework Unity. We stripped it down even further, and also mixed it up with the idea of different outputters libraries, like in Embedded Unit. We also adapted their idea of automated mock object creation, but ended up writing similar tool in Python (basically because we wanted to fully understand what we are doing). All our tools are tuned for our use and constantly evolving, but I think towards similar solution as already in use by Atomic Object, but in step-wise manner. We believe that you need to understand the reason, give it the context, for any new skill or practice in order to make it truly work.
7/11/2007
Wrap It Thinly
-"We don't have hardware to run the code in."
-"Every part of the code is hardware dependant."
I noticed I wrote about these approximately a year ago for the first time (I, II, and III). That was more on the theoretical side. This time I have a bit more experience on the subject. We have found Alistair Cocburn's article on hexagonal architecture valuable in philosophizing this issue. Many firmware developers are not familiar with design patterns, but a good starting point is above mentioned article. Writing adapters for your hardware, grouping them to ports, keeping the number of them low, and only allowing them to be responsible for the lowest-level of hardware interfacing, will help you isolate hardware dependant parts. Here is a picture of hexagonal architecture for the case project we are working on.

Then there is a philosophical issue of testing the adapters, or wrappers. In many cases binary input/output handlings are just like accessors, getters and setters. In TDD literature it is generally agreed that these do not need unit tests. When writing hardware wrappers we need to think a bit harder. We could understand the unit tests for hardware wrappers as our firmware/hardware interface specification. Then for sure it makes sense to write these tests. My thinking goes along with "to be able to judge what to unit test and what not to unit test, you have to be able to unit test everything".
6/18/2007
Test the Goal of the Code

Right after we made the decision that we are gonna write EVERYTHING with test-driven development we noticed a change in thinking. We constantly think for the simplest possible thing to do, constantly re-evaluate the module (C file) interfaces and so on. If you are gonna do everything in this manner, there just is no backdoor for you.
Another big change was (well, we still need constantly remind ourselves about this) the shift in thinking towards writing the tests as specification. We often ended up thinking about the solution and then writing tests to check the solution. This is maybe caused by the fact that one shot on the code exists and is thoroughly known. However, you will create novel, simple solutions for your tests only if you think about what you want your next small code-to-be do, not how it will do it. Keith Ray has listed questions to help you in this.
Sean Shubin has done a nice work and listed first guidelines to TDD. Again:
Test the goal of the code, not the implementation
6/09/2007
Embedded TDD Link List
my del.icio.us bookmarks for embedded TDD
6/07/2007
Embedded Blogosphere
Via Benoit's blog I discovered Embedded Cork by Ralph Depping and Embedded Gurus. Embedded gurus seem to be a bit quiet, but there is some recent stuff as well. Names behind Embedded Gurus group are impressive; Nigel Jones, Michael Barr, Larry Mittag, Mike Anderson, and Miro Samek.
Keep in mind the Atomic Object Spin Embedded Corner, and But Uncle Bob Archive (James Grenning).
I linked them in sidebar - give them a look.
6/01/2007
Story: Spike Up Your Coctail
Abstract. Agile development is a term used for wide variety of lightweight software development methods following shared values1. Many of these methods and practices however can be applied to more general new product development. This paper describes a six week project using some of the practices from agile development. These practices included self organizing team, collective ownership, continuous integration, iterative planning, iteration demos, team retrospective meetings, wall work queue, information radiator etc. The project crystallized a vague idea and a draft of electronics schematic into two fully functioning prototypes. It is shown that meaningful functionality can be developed in just six weeks. This is remarkable when reflected against the effort needed in so called traditional process models with formal analysis/design and theoretical proof of concept with heavy review processes. This is possible because of today’s advanced development tools and prototyping technology. Stefan Thomke (2001) calls this an era of enlightened experimentation. Building the working prototype is more cost effective way of reliable proof of concept. Using this approach already in the fuzzy front-end phase of the project would result in huge savings in overall project schedule and budget. It was also noticed that all stakeholders of this project appreciated the approach and considered it as “common sense”. The positive side effect was the team building effect this period had.
5/29/2007
Camp Fire
Vasco's presentation was strong, as usual. He talked about top-down agile adaptation at F-Secure in a very realistic way. He did everything but painted a pretty picture about the journey. This is according to his experience, and literature as well, expected. When everything is laid down on the table, it tends to get ugly from time to time. It was interesting to see how within top-down approach they were able to put the whole organization into "agile rhythm". Vasco mentioned that lack of outside help, or not getting outside support enough, was the main thing he would do differently if need ever arises. Vasco presented also some cold quantitative data from theirs and others agile adaptation to support the reasoning for change. It just happens to look like we have more data supporting agile than sequential models ever had. The presentation and especially the Q&A and discussion parts showed Vasco's deep knowledge and understanding of modern project work.
Mikko presented another interesting story in a lively style. His project has applied agile project management and Scrum practices in globally distributed embedded system development project. He estimated that only 5% of development effort is software and firmware, and in addition this is coming from non-agile team. Agile practices were seen as the only option for this project to be successful. The project was started with very vague requirements, barely a vision. Teams were pretty much given. One team in Shanghai, China and another in Monterrey, Mexico, and technology and software development in Europe. The offshore teams had minimal domain knowledge and a huge amount of knowledge needed to be transferred fast. Continuous integration of mechanical and electronics prototypes was a key catalyst for communication. Mikko further identified a clear transition in team behavior from hierarchical - through a single point communication - to self managing emergent behavior actively seeking for best possible solutions in this challenging environment. The project has only been active for five months, but they expect to deliver it in September as originally scheduled. Compared to average project that would be fast according Mikko. Furthermore active early participation of marketing is expected to result in better product as well. This has potential of making yet another example of agile project management practices being succesfull also outside pure software projects.
As conclusion both talks were excellent, delivered by guys that are experienced in both, the project work and giving presentations. Hopefully people were able to walk out with something new and to be able to connect some more dots in their thinking.
After the official part the discussion continued over snack and refreshments. It was agreed that lot of the agile adaptations outside so called agile homeground is about attitude. It is about the shift in thinking towards the art of possible. Just changing your de facto answer from starting with "Yes, but..." to "Yes, and..." offers a huge potential. Vasco's message was "if you really want it, you can do it." The reward demonstrably is there.
5/21/2007
Enough of processes, let's do labels

Venkatesh Krishnamurthy has an article in March 2007 Agile Journal about top-down commitment in agile adaptation. He defines three layers of stakeholders in organization; Sponsors, Mid Level Management, and Development Team. As a conclusion he presents an argument that highest possibility for successful agile adaptation is a right mixture of bottom-up and top-down strategies. Dave Nicolette reviews the article in his post and shares his experience:
The agile group had started life as a skunkworks operation. When the group was brought back into the IT department formally, IT management dismantled the group and morphed the project process, management tools, and development methods back into conventional ones, although with "agile" labels.
There are propably a lot of stories like that. Based on the initial moderate success in agile adaptation on the technical level, agile gets to be the new silver bullet and buzz word. A new group of people are expected to automatically form a team, jell, and "just do agile". "Just do agile" means that traditional PM starts using agile jargon without bothering to look what these terms mean, not to mention that she would try to master the agile values, principles and practices, adjust them, and further develop them. "Just do agile" seems like a little bit too thin statement regarding that agile adaptation is described to be a paradigm shift, a completely new philosophy requiring a new mental package. "Just do agile" could be called doing practices, but that would be being nice. Instead it is only doing labels as Dave called the phenomenon. Few years back I was teached to avoid new labels, like agile ones, when introducing change. Now I have learned that some people only want new labels. That's probably why the silver bullet business is doing so well. Calling everything agile, Scrum, and/or Sprint is not much of a change, and will not automatically make everything visible, consistent, or reliable. Somehow the point is completely lost. Of course people who expected agile to be a silver bullet or magic wand are going to be disappointed and call agile just another fad. Some people who actual get agile, and understand that it is a bit more than "doing some stuff in 30 or so days and using words like agile, Scrum, and Sprint a lot", are also quite frustrated. Dave's post sets out the more than likely dark symptom of this:
As I write this, just over a year has elapsed since the process of dismantling agile began. Of the 60+ people who were part of the agile group at its peak, only 4 individuals who were in that group are still employed by the company.
It is equally true according to my experience that commitment from all three categories mentioned by mr. Krishnamurthy is needed to continue agile adaptation for any prolonged periods . Both orders in which this adaptation happens have been reported as successful, and yes indeed, also as failures. Mixture of both strategies sounds appealing.
Mike Vizdos writes about similar experiences in his RIP Scrum -post and cartoon. He calls this a "Death by a thousand copies".
5/09/2007
Conference Programs Announced
Oresund Agile 2007
Copenhagen, 11-14 June
XP2007
Como, 18-22 June
Agile2007
Washington D.C., 13-17 August
At Agile2007 Dan Pierce and James Grenning are giving a talk "Embedded Agile - Issues and Practices". Should be valuable, as these two gentlemen have been talking about and practicing agile development in embedded domain for a long time. Of course lots of other interesting stuff as well, 5 days with 8 or more tracks...
5/02/2007
Edward Bear Does Not Have Time to Improve.
I have used the story about timber jack being so late at his logging site, that he does not have time to sharpen his saw. Some time ago I bumped into another quote that makes the same point.
“HERE is Edward Bear, coming downstairs now, bump, bump, bump, on the back of his head, behind Christopher Robin. It is, as far as he knows, the only way of coming downstairs, but sometimes he feels that there really is another way, if only he could stop bumping for a moment and think of it.”
It really gets painful sometimes.
4/19/2007
It's less chaotic today than it was yesterday
35 percent of software projects started in 2006 can be categorized as
successful, meaning they were completed on time, on budget and met user
requirements.
I'm not sure if 35 percent is a good number, but it surely beats 16.2 percent in the 1994 report.
It would be nice to know how the size and complexity of average software project has developed during those 12 years. Maybe that is in the report, we just have to wait a bit more (and get 500$ for the report from somewhere).
The report lists three reasons for the improvement:
- better project management,
- iterative development, and
- the emerging Web infrastructure.
I don't know if better project management in this context means agile project management. A quote “Managers have a better understanding of the dynamics of a project.” hints to that direction. Iterative development at least is something that we believe is essential for success, and it is nice to get more and more data to show that. Web infrastructure plays quite insignificant role in firmware development.
If you happen to know recent data about new product development success rate in general, or maybe even embedded software numbers, I would be most interested seeing them.
4/13/2007
What does it mean to be agile?
-What does it mean to be agile?
-When is an organization/team considered agile?
In his review (pdf) Dr. Pekka Abrahamsson showed the software life-cycle support of different agile methods. We know that Scrum does not have any engineering practices described in detail, but focuses on project management. That's why it has been adapted also outside software development. It is simple. This is why majority of the so called agile adaptations at least say they follow Scrum. As have we; we have used it with cross-disciplined embedded system development teams to develop a complete embedded system as fast paced iterative development. I have also written in my paper how I saw reflective iterative development as a tool itself for figuring out what practices you need. This said I share Simon Baker's post
Are you missing the point?
As long as you share the underlying values of agile development, and keep the obvious practices like short iteration, demonstrable progress and retrospectives, you are going to figure out the rest of it -
With this approach, you being now out of the chaos and anarchy, it is time to bring in the engineering practices. Our case has shown that they are needed. We have experienced with eXtreme Programming (XP) practices; collocated team, pair programming (development), test driven development, coding standard, metaphor, and so on. We have seen the value in them, but not been able to actually master them in firmware or embedded system development in order to put the discipline into using them. Still we feel that we gain from practicing Scrum, and agile development as learning-driven thinking. This is the very reason why we still keep learning more skills and practices.
Are we agile? I do not know.
If your environment is functioning and open minded, and you have master mind developers in your team, why not go full blown XP right away? We have manifested that those practices are of high value, but they are hard for beginners. We now have also hard evidence to support the effectiveness of these methos (see for example the AGILE-ITEA project, run by the same Dr. Pekka Abrahamsson btw). It may be that with this approach you find out that you need some project management practices from Scrum. Who knows.
I wrote in my original paper about agile firmware development that lot of the agile programming practices for firmware development need innovative thinking. I think last week at the ESC2007 I met some of the people capable doing this. In the front line James Grenning from Object Mentor and Mike Karlesky and Greg Williams from Atomic Object. They have put these engineering practices into full use (also) in low end firmware projects. They are also willing to share their knowledge by publishing their tools as open source, and having discussions about the methods. Maybe we even become clients of these guys some day... Furthermore during the classes and discussions I got the feeling that a fair amount of people are actually practicing.
We have just scratched the surface, but after last week I believe that it is time to put some serious effort into agile programming practices, and actual firmware development. After all that is where we started this journey. It just kind a slipped into system development.
Are we agile after adapting these practices? I do not know.