Julien Delhomme’s Blog

September 23, 2008

Valtech Days 2008– Paris, 21 et 22 Octobre

Filed under: Agile, Conferences, Design, Valtech — Julien @ 5:13 pm

Valtech Days 2008
Une nouvelle édition des Valtech Days se déroulera les 21 et 22 Octobre 2008 à Paris.
De nombreux séminaires le 21 et le 22, pour renouveler l’expérience réussie de l’année dernière, un Open Space Technology.

Je vais y tenir deux sessions.

Etes-vous prêts pour la production?
Certains ont peut être connu un tel projet : un logiciel correspondant (grâce aux pratiques de gestion des exigences) de façon satisfaisante aux besoins de l’utilisateur, une conception aiguisée, des métriques de tests augurant une qualité certaine… Un succès assuré !
Est-ce si certain? Hélas, pas forcément. N’oublions pas que c’est de son comportement en production que dépend le succès du logiciel. Pour l’Agilité, c’est d’une grande importance car l’une des clés est d’être capable de proposer rapidement et de façon continue un logiciel en état de fonctionnement.
Nous présenterons lors de cette session un ensemble de pratiques faites pour ne jamais perdre de vue cet objectif du projet : une vie pérenne en production.

La programmation concurrente restera-t’elle affaire d’expert?
Il est assez rare, pour la plupart des développeurs, d’être confrontés directement à l’univers intimidant du threading. C’est probablement une chance car la programmation concurrente est une activité assez complexe qui est restée jusqu’à présent réservée aux initiés. On assiste pourtant à l’apparition de nouvelles techniques destinées à un futur qu’on nous annonce fait de multiples « threads » et de multiples « cores ».
Pendant cette session, essayons d’y voir plus clair en faisant un tour des technologies en vogue (Erlang, MS Parallel Extensions, Scala…), des modèles et des paradigmes existants et émergeants et essayons de voir si ces techniques peuvent se rendre accessibles au plus grand nombre.

January 17, 2008

You are not gonna need it: isn’t that, the simplest thing that work?

Filed under: Design — Julien @ 4:52 pm

Two things brought me to write this post. The first one is the reading of a series of articles about immutability by Eric Lippert. In particular, Eric Lippert presents a clever implementation of an immutable binary tree.
This immutable binary tree has a powerful property: it does not allow creating cycles. You can’t make of an element a child of one of its descendants. It is an “emerging” structural property of the data structure. And I insist it is a simple, straightforward code. Let’s say it: Eric Lippert Kept It Simple and Smart.

Here is the second thing: last week, I attended a Coding Dojo organized by Valtech. The principle of the Coding Dojo is simple: we choose a problem on which we practice Test Driven Development and pair programming for example. The aim is to experiment, to learn and to share observations on development practices (more than to solve the problem). The pair [developer/reviewer] works in a time-boxed round under the eyes of an observer and then, alternatively, the roles are switched.
While the problem was exposed to the group, I quickly had a big picture on my head, identifying the main modules and responsibilities. (The chronometer started) I began to expose my first impressions to the team, “Perhaps we could start with..” Halt! Apparently I had gone too far. My team-mates preferred to cling to an important principle of TDD, “do the simplest thing possible that works” and do it right now. One pulled me back, stick my head towards our IDE and quite quickly, all together, we produced a piece of code. A piece of code that do.. something.., rather primitive but, well, it was there.
A concession, a compromise, a least, we had our first lines of code. Ok, a good point for TDD.

Thus, here is which my observation was: it is more difficult to make accept a vision than to do the simplest thing possible! :-)
Actually, I cannot do without a continuous test-first approach. I practice in a TDD-like manner, more strictly at the beginning of the implementation. But for me, the moments of reflection at the beginning are essential. And it takes always the time that it takes.

Then, this is the point. Let’s imagine this situation: how any TDD mates can approach the following problem: “Design a binary tree that does not allow creating cycles”
One can refactor and refactor (and refactor again), I bet tests will never drive us to an implementation such as Eric Lippert’s one. Instead, we will have a “binary tree that does not allow creating cycles” made of intricate tests, cycle detectors managed with run-time exceptions.
After all, what could justify such a specific data structure? Perhaps we ain’t gonna need it! And anyhow, is this “emerging structural property” really testable?

Sadek and I thought of this image to describe the architecture that can be produced by a TDD approach to resolve certain problems: “a building made of disparate, ill-assorted blocks which would be functional but of a completely indistinct aspect”.

November 2, 2007

Are you really sure Agile is not bad for Design?

Filed under: Agile, Design, JAOO, Lean, Scrum — Julien @ 11:47 pm

It was striking to notice the important number of speech on software architecture at JAOO. Most of them - that’s interesting - placed in a natural way (sometimes implicitly) the architectural concerns in the contexts of Agile processes.

Without basically putting back into question the progress carried out thanks to agile methods, architecture was on the front of the scene. Several speakers handed forward the role of the architect. Such an emphasis rang in my opinion as a reminder of important values to beware not to leave behind.

Eric Evans was among the ones who noted this tendency. He said during the end panel that for him, “the theme of the conference had been the balancing of agile, iterative processes with design and architectural values”.

Note: The other main subject of JAOO was “how make business experts and programmers understand each other, how make them work closer together”. Domain Driven Design, Domain Specific Languages and Model Driven Development were addressed a lot. The watchword was given by Charles Simony: “Bring domain orientation at a new level”.

“Are you really sure Agile is not bad for Design?” Actually it’s quite important, because in order to be sustainable and successful, agile methods must be able to deliver software consistently and to achieve required quality… and quality problems are often the result of inappropriate software architecture! Performance, for example, dominates the user experience. Bad performance affects the perception of quality. Thus, Agile methods must be able to deal with design and they must be able to scale.

So, would architecture and design be neglected? In particular, are Agile practices detrimental to any important things and could Agile practices make us loose the focus on these important things?

These questions are not new. It is almost a custom to mitigate practices against experience or studies, hounding weakness of On-site Customer, Pair Programming, TDD, Iterations, for example. Sometimes, it sounds like gossip or gratuitous fuss. On the other side, some claims that “of course, Agile is sustainable when things are done well”. Sometimes, it sounds like autosuggestion J.
Anyway, these are healthy challenges. Philippe Kruchten, in Voyage in the Agile Memeplex: in the world of agile development, Context is key (pdf, review on infoQ), underlines that counterbalancing beliefs and considering the context of assertions (”source and applicability”) is essential to decipher messages because they are often reduced to their “essential bones”, “to the slogan level”. Perhaps the most important is to not suffering from what Kruchten calls “Agilitis”. James Coplien talks about blindness beliefs and religious resurgences (Religion’s Newfound Restraint on Progress, review on infoQ Religious Industry).

Architecture and design won’t be neglected and Agile practices are not detrimental to design 1) if we care explicitly and consciously, 2) if we consider context. A well-known drawback is to believe that design will draw by itself. Appropriate design certainly won’t emerge thanks to the faithfully adoption of any given practice.

Exclusive bottom-up approach is a pitfall…
This is a point to be aware of: Agile processes accustomed us to deliver tangible value incrementally, and to attack pieces of code in order to gradually increase the implemented functionality. And actually, it is often difficult to divide architectural problems into small pieces and solve them bottom-up. Kevlin Henney, in his speech at JAOO called “Performance Art” underlined that some concerns are difficult to understand from a modular perspective: “For example, performance is often an emerging property of the system”.
Things are even more difficult when there is no clear shared vision of the software architecture over the team.

The comment of James Coplien during his session “Scrum Architecture” created a controversy: “TDD has been proved to erode architecture”. Hard to go against orthodoxy, isn’t it!
What he essentially criticized is TDD as a design method. An exclusive Test Driven Development is not suitable for design because of its bottom-up nature. Moreover, TDD is not known to be good at finding bugs.
The goal of Unit testing must be to define system boundaries and to specify invariants (Design Driven Testing: Using tests as specifications of system’s invariants and contracts design – Sadek Drobi)

… So, maintain a big picture of the design, by leaning on reviews…
The need for maintaining a big picture and a broad goal all along the process is obvious. Modeling meetings and architecture reviews (work on Ubiquitous Language, application domain analysis, overall design) allows adapting evolutionary design and must be supported by the development process.
Mary and Tom Poppendieck propose in their book Lean Software Development, An Agile toolkit to “see the iterations as a prototype of a piece of the overall design […]. An iteration should be considered a demonstration of a possible solution”.
Cleanroom software engineering goes further and put an emphase on quality: “the quality of each increment is measured against pre-established standards to verify that the development process is proceeding acceptably. A failure to meet quality standards results in the cessation of testing for the current increment, and a return to the design phase” (Wikipedia). According to Kevlin Henney, such pre-established standards should be ratios (e.g. 90% of the database queries must be under 0.30ms).

As a consultant, Rebecca Wirfs-Brock conducts software architecture reviews. She had a session at JAOO, “lessons learned from architecture reviews”, where she gave useful advices to software architecture reviewers and architects. Her propositions should also apply during retrospectives and design meetings.

Rebecca underlined that the important is the customer value of an architecture and to be able to evaluate it. “As a reviewer, I have to be able to visualize the benefits of the architecture”. Quality can be an operational requirement and such kind of requirements have impact on design and architecture, e.g. extensibility of the system leads to develop adapters or plug-in components. In an Agile process, quality and architecture-related requirements must appear as items in the iteration backlog and must be demonstrable.
The reviews must involve right people. Even Product Marketing can help to take a technical decision.

Rebecca recalls that architecture must support unhappy parts of business Use Cases: “Propose “rainy days scenario” early: what happens when things go wrong? What should be done? It is hard to say if not addressed at the right moment.

… And seek convergence, relying on architectural models or prototypes…
Kevlin Henney also suggests using architectural models (to get a sense of what bottlenecks might exist) and partial prototypes (they provide empirical feedback). Partial prototypes support option thinking and set-based design (Lean). Set-based design is a way to reduce criticality. It leads to convergence rather than emergence. “The entire problem is divided into segments to be addressed concurrently by small teams. The design process converges on a solution, rather than selecting one at the onset” - Mary and Tom Poppendieck, Lean Software Development, An Agile toolkit.

During the end panel of JAOO, Eric Evans described a way to design the architecture of a system. You should work from realistic scenarios that architecture should support. You choose them to illustrate the hard part of what they are doing. Over time, you evaluate if you can continue to work with these concrete scenarios. This is a key to judge if your solution is “simplistic”, or if you have excessively complicated things.
Language patterns, Architectural patterns or Integration patterns (see DDD patterns, Layered Architecture, Anti corruption layer, Shared Kernel…) must support these realistic scenarios while fitting naturally the domain. There is no « one size fits all ». For Rebecca Wirfs-Brock, the goal is to achieve right architecture quality (no over nor under-engineering).

…while supporting the requirements and domain analysis…
Requirements must drive the choices of Tools and Roles that structure the design. For James Coplien, Use Cases are an essential tool to express suitably the user’s conceptual model as a whole coherent set of behaviors, responsibilities and interactions. Here, Use Cases are most efficient than XP User Stories that are more atomic and sometimes unhappily decorrelated one from each other.
Application Domain analysis must consist of a Commonality / Variability analysis (structure, meaning, state, algorithm…), identifying families and appropriate paradigm.

… without leaving operational requirements aside…

While in Agile processes we focus on delivering value to the customer, some operational requirements are difficult to make explicit. However, leaving them aside is a dangerous pitfall.

As Kevlin Henney says, “Premature optimization is the root of all evil” is too often understood… “Optimization is the root of all evil”! The danger is that, where performance matters, it is left until too late to be able to address it. So, because performance slices and crosses functionalities it is essential to evaluate performance by iteration. Fix approach is not suitable. Prototypes can help once again.

Kevlin suggested that “Where performance matters, it needs to be clearly stated as a requirement. However, although performance requirements make for good product backlog entries, they do not make for good use cases or user stories—they are cross cutting, but we still need to be able to define what “done” means ” (Definition of Done).

He recalls that testing is a way of showing that you care. It lends significance to a requirement, making it concrete and visible. Moreover, tests reveal all assumptions you made and this is essential to improve performance.

October 2, 2007

JAOO2007 – What makes code beautiful

Filed under: Design, JAOO — Julien @ 11:23 pm

Marcel Molina Jr. – What makes code beautiful… and why does it matters?

Marcel Molina has a background in literature. He especially looks for comparisons between natural speech and programming languages.

One talks about beauty in Ruby or functional languages. What? Why?

He goes back through History to search what defines beauty.

  • Pythagoras found it in numbers. Harmony, pleasant and successful things have structural qualities (applies in music, architecture…)
  • Plato (the truth, the good and the beauty are the highest concepts)

    “The ability to grasp mere appearances cannot lead to adequate understanding. At its worst, the appreciation of beauty can mire us in the world of sense experience… but at its best it can lead to the understanding of goodness.”
  • Rousseau (well ordered nature)

    “I have always believed that good is none other than Beauty in action… and both have a common source in well-ordered nature.”
  • St Thomas Aquinas
  • [To be continued …ad lib.J]

Marcel proposes us a tool to evaluate beauty. Let’s consider:

  • Proportion (size of constituent parts)
  • Integrity (something that fulfill what is fulfilled for) [Hammer made of crystal]
  • Clarity

Evaluation of beauty is a personal process and a learning process (experience).

Learn different languages for different viewpoints.
Evaluate Picasso as well as Rembrandt
Try different viewpoints to find the appropriate expressiveness.

As an illustration, Marcel Molina used these criteria to evaluate the efficiency of a sample of code - a kind of pattern matching in Ruby.
Finally, he quoted Kent Beck for whom virtues to strive for are proportion, communicability, readability.

Marcel Molina blogs on Projectionist

If you don’t mind, I will complement by…
Expressivity makes code more powerful: increase productivity, improves quality
Try different programming paradigms; try different styles to express suitably the domain
Use metaphors, well known concepts
Readability is a relative concept (see regular expressions, complex recursions or chatty languages)

That will probably not help you to improve beauty of your code but, concerning Plato, I strongly recommend reading of The Symposium, a wonderful discourse about beauty and love.
Ok. [How these words sound strange to me in English!] Let me please switch language and say it again:
« A propos! Je recommande vivement la lecture du Banquet de Platon, un merveilleux discours sur la Beauté et l’Amour. »

(Better! J)

Valtech Days 2007 – Paris, October 23 & 24

Filed under: Agile, Conferences, DSL, Design, Software Factory, VSTS, Valtech — Julien @ 10:59 pm

Valtech hosts the 3rd edition of the Valtech Days : a 2 days conference in Paris-La Défense in October 23 & 24.

On the first day, various technical talks (24 sessions about Agile, Industrialisation & Software Factories, Frameworks & Architecture)
Among others: DSLs & Language Oriented Programming, Agile Contracts, Test Driven Requirements,… [Full Program (French)]

On the second day will take place an OpenSpace Technology event. Always exciting and friendly. Can be a great experience.

Powered by WordPress