Skip navigation.

The Humane Programmer

Understand your limits, so that you can overcome them. A CC-BY-SA licensed blog.

Posts tagged with "human factor"

The future is semantic

, , , ...

I have been involved in the last couple of years in a project that uses semantic technology, and I will try in this post to give a feeling about what it is and how it can be used.

I'm sure that we've all heard about semantics, in various contexts: language, parsers and compilers and lately related to web. However, until I've worked and thought of this concept, I didn't have a very good understanding of what semantics is in general.

According to wikipedia, semantics is "the study of meaning in communication", and actually you can substitute semantics with meaning in almost all contexts. Semantic analysis in grammar is looking at a sentence from the point of view of meaning. Semantic analysis in parsers and compilers is looking at the meaning of the programming language constructs put together. The idea of semantic web is to add machine-readable and inferable meaning.

The world we're living in contains semantics, a semantics built by three main characteristics: things, relations between them and actions that you can apply to a thing. Take the following example:

My(relation) name(thing) is(relation) Alex(thing) and(relation) I(thing) write(action) a blog entry(thing) while(relation) sitting(relation) on(relation) a chair(thing).

And that's basically what semantics is.

The problem with semantics is that we have a great tool for processing it, one that machines lack: our brains. The brain evolved along with us in this environment, and it developed special powers that allow it to process and understand the semantics of this world. Machines have no idea about things that to us are very simple to understand, like the fact that "Alex" is the name of a person, or what "writing" means. Therefore, in order to make machines process such information, you need to explain everything to them, or to allow them to evolve. The first solution is very time consuming, while the second may give very strange results as you cannot control the evolution but only the environment and the rules for it.

Despite these problems, people have found ways to build machine-readable and inferable semantics, some of them very familiar to any of us.
The web is the first example that comes to mind. It has a few types of objects (page, image, sound, object), a single type of relation - links to - and one action - follow link. A wiki is the same thing, only that there are rules for the free text content of the page - you know that in wikipedia the page http://en.wikipedia.org/wiki/Semantics discusses "Semantics" and you have additional actions: edit, create, delete.

Video games build their own semantics. In a FPS, you can move, rotate, shoot, and each object may have additional attributes: weight, health, stamina etc. A RPG builds upon a more complex semantics that describes not only your current state but also your possibilities of evolution - nothing more than a kind of metadata. This is only natural, since a game tries to define a world with meaning for the player.

The easiest built semantics that you can find in games is in MUDs. Due to them being text-based, there's plenty of freedom in defining objects, relations and actions very quickly, and obtaining a world where anybody can play and try. This advantage of quick prototyping allows for a lot of user generated content, even if the community is rather small.

Social networks also build semantics. The main object is a person, with various other collateral objects: company, group, awards, schools etc. The main relation is "know": "Person X knows person Y". The actions are add and remove. The problem is that they are limited, because other elements are missing from the picture: trusts, prefers, likes etc.


If we think about technology from this perspective, we realize that the tendency is to add and to enrich the semantics of the applications. However, this is no easy treat. Trying to do too much can only bring failure. It's better to start small, and that's why technologies like the web, wikis, social networks are so successful, despite having very limited semantics.

However, it is clear that adding semantics - new types of objects, of relations and of actions - can significantly enrich the user experience, if done properly. That's why I think that in the long run, the future is semantic.

People love recipes but they shouldn't

,

The more I meet with developer communities, the more I understand (and get annoyed by) a simple truth:

People love recipes.

Recipes don't work in the real world when you're trying to obtain exceptional results or when you're working on something innovative or when you're working in a fast changing environment. Some of us are forced to work in such conditions. For the others, I think that's what we should try to accomplish.

Even the most common meaning for the word "recipe", the meal recipe, is a very good example. If you've ever eaten an excellent meal, do you think it was made after an old recipe? Sometimes, very seldom, yes, but most of the times the recipe is adapted, slightly modified or completely invented by the chef (or by your mother or grandmother). The best meals are the ones that you invent for your own taste. The chefs know that, and so do most of the people who cook tasty meals.

Software development has another kind of recipes: patterns. I definitely recommend knowing the GoF patterns and all the ones presented on Martin Fowler's web site, but only because they are selected patterns and have proven to be the most useful. The literature on software patterns has exploded in the recent years, without providing much added value. Even the GoF patterns need to be adapted to specific situations that we encounter, and they were taken from years of practice. The context can change everything, that's why patterns are only mildly beneficial.

Business recipes could be one of the greatest hoaxes of our times. Their promise is that by applying them you will reduce the risks for starting or for growing your business. Let me tell you one thing: once you start building a business, there's no way the recipes will be useful to you. Reality finds ways to avoid repeating itself, so what was good for one, two, one hundred businesses before you won't be good for you. You will need to adapt, to fine tune and sometimes to rebuild your strategy from the scratch. Recipes mean nothing in the real world. It is more probable that those businesses that succeeded in following a recipe were very lucky. Try reading "Black Swan" to get a feeling of why this happens.

People like recipes because they think they make their lives easier. The intuition is that following a recipe reduces risks by building upon past experience. This intuition is wrong, because reality changes all the time. A meal recipe used to be good at some point because a different type of onions was used that's no longer available. A design pattern worked fine because there were no applications with 10 million users. Copyright law used to work because copying a work was very difficult. Newspapers used to work because publishing was difficult.

So what's left when we take the recipes out? The techniques for making the recipe. You need to boil or fry your ingredients. You need to use classes in OOP languages. You need to tell a story so that customers come to your business. But the number of ingredients, how and when you mix them, how long you keep them together and the seasoning - that's your decision.

It's risky, but with decisive actions, the results will be exceptional.

People evolve faster than their genes - part IV

, , ,

Nassim Nicholas Taleb is a stock exchange trader who also happens to have a mathematical background. He's a very good trader because he has a secret: he knows how
to take advantage of randomness and how to avoid the traps of applied statistics.

Europeans believed swans can only be white until they discovered Australia. The Black Swan is a sample of a rare event, and also the name of one of Nassim Nicholas Taleb's books. Photo released under a Creative Commons license.

We wouldn't be talking about a stock exchange trader in this series of articles about the issues raised by the internal hardwiring of the human brain if he wasn't special in some way. Mr. Taleb sure is; he wrote a book that was selected by Fortune as one of "The Smartest Books of All Time" and another one that challenged the common view on random events. His main points are:

  • We do not perceive correctly the randomness that surrounds us.
  • Many events in the human history are actually rare and random.
  • We retro-fit to those events a logical explanation that exclude randomness (our brains create causal links where they don't really exist)


As a result, his very successful trading technique is to bet on rare events that create high gains. Instead of removing the maximum and minimum values from the analysis, as most statistical methods do, he is searching for those values, he is betting that they will appear, because they make the difference.

His story is very interesting because this is exactly the way Scrum was created. When Jeff Sutherland and Ken Schwaber thought about a new, simplified and productive way of work, they took inspiration from those software development teams who had excellent results (it's worthwhile to mention that those teams include the IBM "surgical team" designed by Frederick Brooks). Ironically, the same teams were eliminated from the industry-wide statistics because normal statistical distribution is the norm (that's also why scientists didn't see the signs of global warming).
As Scrum proves, following the rare maximums is the way to go, instead of looking at the average. So we can say that for many years, software developers and managers were fooled by randomness - as Mr. Taleb would say.

This is not the only activity in software development where randomness intervenes. Estimation is another one. Not many people know, but an estimate for a task is actually a combination of two factors: how long it will take and the probability that the prediction is correct. The probability evolves over time, creating what is known as the cone of uncertainty. The interesting thing is that a software developer can estimate the probability for his/her estimation when asked, but doesn't think about it if not required. (I don't know how accurate the probability estimations are, but the important point is that anyone will admit that the estimation is not 100% accurate.)

Let's not forget about the influence of the business evolution on software projects. It is well known that requirements change all the time during development, and the waterfall approach tried to turn a blind eye to it - with notorious results. The continuous change of requirements is a very real random factor in the software development process, and it should be treated as such. Maybe with the help of ideas like the ones presented here we will improve the way we manage it. Until then, smart planning of short iterations is the best way to go.

A different view on causality. Photo released under a Creative Commons license.

Another point tackled by Mr. Taleb in "Fooled by Randomness" is that people, especially traders, can be fooled by consequent successes into believing that they always win. This is a direct consequence of the failure of perceiving randomness. Some of you may have met with software developers or project managers who think they are unbeatable, because most of their projects were successful; I sure did. Sometimes they were overestimating their results (on a closer look, the projects were actually close to disaster), other times they were overestimating their contribution to a good result. We know that everyone has a self-evaluation bias, people obtaining worse results thinking they perform better while people obtaining better results thinking they perform worse. But isn't there a random factor (besides the one we know) adding to the success of their projects? Weren't they just lucky random fools? That's difficult to say or measure, but it seems reasonable to assume it's true.

In the end, the main points are that our brains tend to under-evaluate the effect of randomness in our lives and in our projects. A conscious effort is necessary to overcome this limitation, and estimation techniques do just that by narrowing the cone of uncertainty. We need to include the random factor in our planning, and let go the illusion of control.

Until next time, may you achieve the wisdom of randomness.

People evolve faster than their genes - Part III

, , , ...

In the previous installments(first and second) of this article, we talked about the evolution of the brain and about the extraordinary pattern matching ability that we possess and how it can make us take erroneous decisions. We'll continue with another hardwired ability of the brain that is good most of the time and is sometimes bad for software development: the prediction of the future.


If we take a look at what the human race accomplished, we see lots of finalized projects: buildings, transportation, bridges, roads etc., some of them extraordinary, like this water bridge. No other species on Earth seems capable of doing this, so we must have something special.
It turns out that all those projects require a few steps: imagine the end product, plan it and execute it. The first two steps are of the foremost importance for any complex endeavor, and they have a thing in common: the ability to imagine something that doesn't exist yet.

Do we know how we do that? According to existing studies, this ability has a lot in common with the way we store memories: as a compressed lossy version. When we recall a specific memory, the brain fills in the details, using the present.
When trying to predict the future, the brain uses the same mechanism: starting from the present and from a specific piece of information (e.g. I want to build an online ticketing application), it fills it with details and creates an image.

We've learned from history that this ability works good enough, but we also know that sometimes it doesn't. The source of bad predictions is what we call "lack of imagination", and we have lots of examples. Let's see a few, just for fun:

"I think there is a world market for maybe five computers." - Thomas Watson, chairman of IBM, 1943.



"Where a calculator on the ENIAC is equipped with 18,000 vacuum tubes and weighs 30 tons, computers in the future may have only 1,000 vacuum tubes and weigh only 1.5 tons." - Popular Mechanics, 1949



"Radio has no future. Heavier-than-air flying machines are impossible. X-rays will prove to be a hoax." - William Thomson, Lord Kelvin, British scientist, 1899.



"It will be years - not in my time - before a woman will become Prime Minister." - Margaret Thatcher, 1974.



"The abdomen, the chest, and the brain will forever be shut from the intrusion of the wise and humane surgeon." - Sir John Eric Ericksen, British surgeon, appointed Surgeon-Extraordinary to Queen Victoria 1873.



When we analyze these bad predictions, we realize that the authors failed to imagine something that was entirely possible, due to being influenced too much by the present. And so we come to the next question: how do we avoid this influence?

Lucky for us, Arthur C. Clarke stated two laws that help us do just that:

When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong.



The only way of discovering the limits of the possible is to venture a little way past them into the impossible.



There are two keys for a more accurate prediction:

  • Details, many details
  • Think what you need to do it, not if it's possible


The lack of imagination takes many aspects in software development.

During my career I have encountered many times the expression: "We can't do that", either in a technical context (e.g. we can't use a custom rule engine with built-in Workflow Foundation activities) or in an organizational context (e.g. we can't use unit testing now). Most of the times, I've proven them wrong by actually doing it. Actually, this is one of those things I constantly struggle with. However, this is the least damaging effect of lack of imagination.

The others, much more damaging in the long term, are:
- failing to imagine risks
- failing to imagine possible security breaches
- failing to estimate correctly

(It would be interesting to find a study showing the contribution had by the first and the third factor on project failure. I couldn't find any.)

Estimation technique called Planning Poker in action. Image released under a Creative Commons license by Wyscan

Let's look at some of the modern best practices in software development with respect to what we've established above:
- Release early, release often = you don't have enough details to accurately predict the user's needs, the risks etc.
- Design and implement incrementally = you don't have enough details to accurately predict the future, so think only of what you know for sure
- Estimate by describing the solution in detail = add more details to the prediction mechanism of your brain
- Threat modeling = detail all possible threats and treat them
and the list could go on and on.

To conclude, we have good news and bad news. The good news is that the human brain is able to imagine a possible future. The bad news is that it sometimes fails. The good news is that we can improve its ability by opening our minds and adding details to the picture.

Until next time, may your predictions be right!

P.S.: I'm a big time Douglas Adams fan. As a result, this trilogy will have five parts ;-)



Bibliography

Software Estimation - Demistifying the Black Art by Steve McConnel - A look into estimation techniques and best practices

Stumbling on Happiness by Daniel Gilbert - We destroy our happiness when we expect something very different than what we get. A very informative book about how the brain stores memories, recalls them and predicts the future - and about when it fails to do so correctly.

Dan Gilbert researches happiness, a TED talk about why and how we fail to predict the future

Wikipedia

Many articles about software development methodologies, best practices and so on


I would like to thank Felix for the help provided for improving this article.

People evolve faster than their genes - Part II

, , , ...

In the previous installment, we saw that the brain is a tool for faster evolution. We will now start to examine the mistakes that the brain makes in the modern world, due to its internal hardwiring. Due to my personal knowledge, we will concentrate on examples from software development.

If we were to wonder about the best capabilities of our brains, I believe we would come with a short list that would include somewhere at the top the pattern matching ability. The fact that we can recognize in a very short time objects in various light conditions, colored differently, slightly deformed etc. and to contextualize them has yet to be beaten by any computer program, although many have tried.
Even more surprising, we are able to recognize not only complete objects, but also parts of an object. We are able to recognize sounds even if they are distorted, and, even more mind blowing, we are able to match ideas with abstract patterns.

Still, how can the brain be so good at pattern matching? More specifically, does it cheat in some way?
The short answer is that we don't know yet. In order to find out, scientists are looking at, guess what, patterns of brain activity in various situations. But, due to the internal complexity and to the speed with which the processes happen, it's very difficult to completely decompile our brain.

Illustration of overuse of patterns by our brains. Unknown author and rights, as far as I know part of public domain.

What we do know is that the same amazing ability that helps us live in the physical world, communicate with other people, recognize the sounds around us, understand the structure of the universe and so on is also harming us sometimes, by recognizing patterns where they don't really exist or by trying to use patterns where they don't match.

Those two fallacies are certainly not fatal to our existence; they are trade-offs of the evolutionary engineering. We can function and be successful with them, but they don't let us reach our maximum potential. There's one thing we can do: learn about them and know how to recognize the pattern of fallacy of pattern recognition. In other words, use the ability to circumvent the errors of the same ability. Sounds kind of meta-human, doesn't it?

The two errors often play an important role in software development, due to its essential difficulty. Let me illustrate this with a few examples.

Imagine that a customer comes to you and asks you to make an online ticket selling application, without giving any more details. At that exact moment, your brain will start to recover the patterns that match this idea of online ticket selling application. You may start to imagine an internet application, with an administrative backend, with a shopping cart in the frontend, a seat-selection screen and so on. You will think about the technologies you know best and of similar modules from other applications that you've implemented and you'll think of an estimation for the application, let's say 6 months with a team of 3 developers and one tester, if we're using php and mysql.

What the customer wanted and what he received at the end. Available under Creative Commons license from brajeshwar. Larger version here.

The amazing thing is that you see all this in your head before even asking more details about the requirements, effectively materializing the idea of the online ticket selling application into a very specific and subjective view, determined by past experiences and patterns stored in your brain. Most of the times, this view will be completely different from what your customer think he wants and most definitely different from what your customer needs. (Let's not forget that the customer is human too, and he has already been fooled by his own patterns when trying to solve his business problem). Even more, the whole process is automatic; you have no control over it.

Let's say that you ask the customer the business model, and he tells you that the application will be used by one office who sells tickets, and there's no option for users coming from the Internet to buy tickets directly. All the scaffolding you built in your head is brought to pieces by this very simple detail. The application can turn into a simple csv file that is sent by email, modified by the office employees and then sent back to the headquarters every day – enough to solve the actual business problem. You've just been fooled by your pattern matching ability!

Of course, this example is extreme. The exact sample is easily avoidable in most modern situations. However, I'm sure any software developer can come with a story when the implementation was more than needed, or not exactly what was needed. If you analyze it more thoroughly, you will find at some point the fallacy of matching the wrong patterns.

A more technical example refers to the use of design patterns. MVC, for example, is a very powerful pattern that has been overused in time. It's very useful when the same piece of data needs to be seen in different views, and when changing it in one view needs to update the other views of the same data. However, I've seen it used even in very simple scenarios, unnecessary complexifying the design. This human tendency has well known and captured in the saying “When you have a hammer, all objects around you seem nails”.

So how do you avoid those fallacies in software development? Simply by following a few well known best practices:

1.Understand the requirements, in all its gory details – talk to the customer, use job shadowing if you can etc.
2.Keep it Simple, Stupid – easier to say than done, this principle requires a continuous effort to create the patterns for simplicity in the brain and to follow them at all times
3.Release early, Release Often – so that even if you're fooled by your pattern matching, you find out as soon as possible
4.Describe the scenario you're estimating before crunching numbers – even if you're not consciously trying to use an estimation method, this simple trick allows for a much increased accuracy
5.Use patterns in context, not as solutions to all problems

If you look at the principles of agile development, you will see that it integrates many of the solutions to the problems presented above. This is because agile development focuses on people and on people improvement. This is also one of the reasons for which it fails – if the people don't make the effort, it won't work.

We will continue next time with more fallacies of the human brain. Until then, match your patterns with care!



Bibliography

Software Estimation - Demistifying the Black Art by Steve McConnel - A look into estimation techniques and best practices

Stumbling on Happiness by Daniel Gilbert - The catchy title hides an informative and amusing trip in the fallacies of the human brain, including the pattern matching failures

A talk on the same topic by Dan Gilbert; less about pattern matching, it is a short version of the book

I would like to thank Felix for the help provided for improving this article.

Advice for the passionate and young software developers

, , , ...

I have gathered some advice for young and passionate software developers. It comes mainly from my experience and from my peers'. I hope it helps.

1. Be aware that programming is hard

Despite what Microsoft, Sun and other software development tools vendors want you to think, programming is hard. It looks easy though. Start an IDE, run a wizard, do some work in a designer, drag and drop database tables, automatically generate code and everything seems to work just fine.
Well, in 99% of the cases, it won't. Something will happen that will make your application fail, and because you used an IDE, a wizard, a designer and because you don't know what's going on in the backstage, you're in trouble.

2. You're not done when you've stopped writing the code

You get a task from your project manager, write the code, compile and run the application once to see if it's working. If it's working, it means that you're done.
No, you're not. You need to test it thoroughly before you're actually done. Yes, there is a tester in the team, but bugs caught early are much less expensive than those caught in the testing phase. The project manager will insist on this topic.

3. A programming job means continuous learning

The only constant in our lives is change. You feel this even more in IT. New hardware, new software, new programming languages, new tools come up every year. There are good news however: the basic principles haven't changed in 25 years. Understand them and you will be less surprised. The bad news is that it takes time to understand them.

4. The technology used is not essential

C# is good. Java is good. Perl is good. Python is good. Hell, even Cobol is good. (Only VB and old ASP are evil :-D.) Each of them for their own domain. Learn them all. The more languages you learn the easier will be to learn more, and you will find innovative and effective solutions for your projects.


5. Solve the problem

Be pragmatic. You work for a project because somebody has a problem and they want it fixed. Find the best way to solve it. Yes, there are limitations. Yes, you can't always use the ideal solution. This is why you are asked to solve the problem and not a computer. There are no recipes. You have the capability to adapt to the situation. Solving the problem is the fun part, too.

I hope that helps!


Personal advertisement: I am PassionIT and help teams that develop high quality software. I train, I help improving and I work hands-on, depending on the needs. Contact me if you need help.
Alexandru Bolboaca-Diaconu



Add to Technorati Favorites  Digg!

"Security in software development" trainings

, , ,

I've been very busy those two weeks trying to put together a training on security issues for software development. It wasn't an easy task, though I've had a continuous interest in security and in what it means for software projects.

The first difficulty is to concentrate a massive amount of information in sessions of 1h 15' - 1h 30'. I could talk for hours about encryption algorithms, about their history, what they mean in litterature and the amazing story of Enigma - how it was decrypted and the influence this had on our own history -, but there's never enough time. Then there are a lot of exciting facts from information theory that never get into such sessions. It's a pitty; on the other hand, when I train people on security topics, I'm never short of interesting stories.

The second difficulty is to present the human factor in security. The people who read this blog know that the human factor in software development is the central idea of my articles. It's not different with security. The need for security is a central fact in the human psychology. We have to understand this need if we want to produce secure applications.

I structured my training such that it's possible to deliver it no matter of the technology used by the trainees. It has a few common tracks, on the core topics of security, and it then has specific tracks that are technology specific; currently, I'm only covering .NET, but I can very simply add Java, PHP, C++ and other technologies on a need basis.

And here comes the final announcement: at some point in the (near) future, I will release the training materials under a Creative Commons license. I hope this will make them better and better, allowing many people to learn about the security issues in software development. So, stay tuned ;-).


Personal advertisement: I am PassionIT and help teams that develop high quality software. I train, I help improving and I work hands-on, depending on the needs. Contact me if you need help.
Alexandru Bolboaca-Diaconu



Add to Technorati Favorites  Digg!

The Ego in Software Development

, , , ...

I have recently stressed the importance of having a team formed from very good developers in order to obtain software quality. I received interesting feedback regarding this statement, including one issue related to the ego of programmers.

The problem goes like this: you gather your best developers and ask them to work on a project. Instead of producing much more than the average programmers, they fight over design, libraries and principles.

I believe that there are a few key problems when this happens. First of all, design by committee has proved to be an anti-pattern. Second of all, because software development is about ideas, all projects should start with prototype implementations that are refined during the project's consequent phases. Third of all, there's the Ego Problem.

It is easy to see that developers often have an oversized Ego. That aspect can be very good or very bad for a project.

Let's take for example Linus Torvalds. Whenever he talks in public, he says "I'm always right, you're wrong. If I don't like what you say, I may say you're ugly and stupid". That's certainly an oversized ego.
On the other hand, nobody can say that Linux is not a succesful project. More than that, Linux is organized in such a way that Linus Torvalds doesn't control all its phases. And there's even more to the story: Linux might not have been so succesful if Linus Torvalds had a smaller ego.

I've also met the other type of developer. The one who thinks that knows everything, the one that doesn't agree with older and smarter people from the industry. The one who thinks his ideas are very bright when they actually are really bad mistakes. The one that tries to impose his solutions to everybody else.
I guess that this phenomenon takes place in Romania because the IT industry doesn't have tradition, doesn't have values, and it's not settled yet (actually, like the whole society). People still try to be original when they should just listen to the voice of the experience.

But what is different between Linus Torvalds and John Developer My-Solution-Is-Always-The-Best?
You can probably name a lot of differences. Knowledge and understanding are a few of them.

I believe that the main factor differentiating a Good Ego from a Bad Ego is the intellectual honesty.

If you read what Linus Torvalds says, you will see that he has no problem to point out his mistakes and his limitations. That's normal, because he works in an open environment, where all mistakes are noticed. If he doesn't talk about them, the others will.
At the other end of the spectrum, John Know-It-All will never accept he's mistaken, even if you prove it with all the resources you can. He will find out all sorts of ways to prove them wrong: "Those people don't do what we do", "This is theory", "I haven't seen this work" etc.

So there's one point to look for:

A person with a Good Ego is his/her first critic.

Intellectual honesty also includes the willingness to learn. Not only the technology you work with, but everything related to software development. Yes, that's hard, takes a lot of time and it's frustrating because you always find out you made mistakes. But software development is hard.

Continuous learning is the best way to transform a Bad Ego into a Good Ego.

My experience includes many moments of enlightment and of realization of my mistakes. I've come to understand that mistakes are part of life and that we should take maximum advantage from them. Understanding our mistakes and finding ways to correct them is how we evolve intellectually. During this process, a Bad Ego is transformed into a Good Ego.

The answer? Look for people who are intellectualy honest. This is an absolute requirement for what I call "good programmer".


Personal advertisement: I am PassionIT and help teams that develop high quality software. I train, I help improving and I work hands-on, depending on the needs. Contact me if you need help.
Alexandru Bolboaca-Diaconu



Add to Technorati Favorites  Digg!

Entropy in software development

, , , ...

Quite often I hear developers or managers acting very surprised about the fact that an application "doesn't work".

I am never surprised when an application doesn't work. Probably because of my engineering background, and probably because I can still remember the second law of thermodynamics:

The entropy (=randomness, disorder) of an isolated system which is not in equilibrium will tend to increase over time, approaching a maximum value at equilibrium.

This law states something that we all know intuitively: it takes effort to move things in the desired direction. It doesn't matter whether we're talking about a carpenter trying to build furniture, a cleaning person trying to keep a room clean or a software developer trying to develop an application.

This means that the normal state of things is for an application not to work according to specifications. That's part of the reason why programming is hard: you have to fight entropy.

The reason why people are surprised with an application that doesn't work is that they don't realize just how hard it is to fight entropy in a software project, avoiding in the same time the other big enemy: complexity. Many people don't understand that programming actually means working with ideas.

What comes as a natural consequence of the above law is that I am always nervous when an application we develop seems to work fine. That's just not natural.
When I say "seems to work fine", I mean that there is no reasonable proof of the fact that the application is working fine. Of course, we can't prove that an application just works (no matter what marketing tries to tell us). But there are many examples of projects that were driven back because they lacked this proof and because they discovered at some point that inside the seemingly good working box there were many lurking bugs.

The first rule that results from this reasoning is:

Never trust your developers when they say the application is working fine.

Only trust them when they prove it to you with: unit testing, functional testing, beta testing (with real users) etc. Developers' mindset is about making the program work, not making it fail. That's why not many of them are good at testing their own modules.

In the end, remember that it's normal for an application not to work. It's unnatural when the people working on it say that it works without investing too much effort into it. The entropy is hard to beat.


Personal advertisement: I am PassionIT and help teams that develop high quality software. I train, I help improving and I work hands-on, depending on the needs. Contact me if you need help.
Alexandru Bolboaca-Diaconu



Add to Technorati Favorites  Digg!

The essential difficulty of software development...

, , , ...

... is that we are working with ideas, not with material items.

The relation between people and ideas is fundamentally different from the relation between people and material items. For one thing, material items are perceived in the same way by different people (unless some of the participants are under the influence of some perception-altering substances). Material items can be described completely by diagrams and numbers.

The IT industry has gone to a great length of defining ways that would allow completely describing ideas. We have UML diagrams, templates for writing technical documentation and so on. We have ways to describe data and the transformation it suffers. We also have ways to describe the user interface.

The problem with the description methods we're using to describe ideas in IT is that:
  • It's really difficult and time consuming to completely describe an idea (try to read Kant or Hegel to realize how difficult it is)
  • Different people understand the description differently
  • It's difficult for people to understand the description completely, to take into account all the details

Besides this, ideas evolve, and the people who need the application expect them to be easily included in the implementation. It's very difficult to dissociate an idea from its programmatic representation. Ideas are easy to modify; the implementation is itself immaterial; so why is the implementation so much difficult to change than the idea itself?

In order to prevent misunderstandings from happening, we are testing the "materialization" of the ideas; in other words, the implementation. But how do you test an idea? It's not a matter of fitting a mechanical piece in a mechanism. It's about comparing the mental image of the idea with the actual implementation. But you can't actually touch it, move it, look at it from all angles; at least not physically.

And then, there's the relation between users and their applications. The computer is different from any other tool known to man because of a few key characteristics:
  • It processes information and the result is information
  • It gives good results only when given good input
  • It gives wrong results in any other situation
  • The user cannot touch an application

Therefore, the user has to form a mental model of the application and of how it works. So we are back to the same problem of perception of ideas. The user's mental model about the application is not bound to be the same as the one of the developer, of the producer and so on.

This essential difficulty is responsible for the most problems we face in software development. And, because it's an essential difficulty, there are no ways to avoid it, only to alleviate its effects.


The first solution that comes into mind is to minimize the communication chain. If the mental model gets more corrupted the more it travels then make it travel less.

Open source is a succesful model because the people writing the software are the same people who need it, and they can take decisions regarding it. In other words, they are bound to have a similar mental model because they need the same thing, and they are free to adapt the ideas.

Agile methodologies are succesful because the communication chain is the shortest possible. The customer is part of the team and he is the one explaining the mental model directly to the people responsible with materializing it.

All the other methodologies have proven in time to be impractical. Completely documenting an application in UML is less productive than writing the application and adapting it as it goes. In fact, completely defining an application means that we are creating a complete representation of the application in another language, and isn't that exactly what programming does? Except that you can run a program and you can, with some extent, use your senses with a program. That's impossible with another abstract representation of the same idea.

The other way to alleviate the difficulty is to use the right people for the job. Since defining a mental model for the application is a human problem, it's dependent on the individual. People with the right mindsets and with a certain mental agility that allows them to adapt to exotic mental models manage to form a mental image that's much closer to the one that's transmitted to them. And, with experience, they come to the point where the fill in the missing parts with the correct pieces of the puzzle (for a very interesting discussion on the expert mind, see this article).

To summarize, if you want your software project to be succesful, do the following:
  • Minimize the communication chain between the vision and the implementer
  • Use the right people in your team


I believe this to be the basis for any succesful software project.


Personal advertisement: I am PassionIT and help teams that develop high quality software. I train, I help improving and I work hands-on, depending on the needs. Contact me if you need help.
Alexandru Bolboaca-Diaconu



Add to Technorati Favorites  Digg!