Evolutionary Programming
Tags: agile, sdlc, evolution, design
Published: 2022-04-15 03:39:06

---
title: Evolutionary Programming 
published: true
description: 
tags: agile,sdlc,evolution,design
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wcjefy85k0nb3zm9n6g7.jpg
---

Authors Note: this was written in 2002. Times change, but the fundamental point of the article remains valid.

##Big Bang Development
Big Bang development is where all the requirements are defined at the start of the project, specifications are written, and the software written, all in an essentially linear fashion. This approach works for small projects, however, as the complexity rises, the ability to develop robust solutions using this method becomes incrementally more difficult. This is currently viewed as the 'correct' way to develop a project. The objective with Big Bang projects is to do very good up front planning and design, so faults when writing the software are minimized. I call it the 'Big Bang' approach because the user gets a 'big bang' at the end when the product is released.

##Extreme Programming
Extreme programming is almost the opposite of the Big Bang approach. Instead of getting one release at the end of the development users get a product very early in the development cycle, and the developers use the user feedback to produce releases very quickly. The developers put almost no time into up front planning of the project, rather they allow the project to evolve to suit the needs of the users. In order to control quality developers employ automatic test applications which ensure that changes do not break existing good code.

##Open Source Programming
Open Source Programming is similar in most respects to Extreme Programming. As with Extreme Programming, the first release to users is when there is something that works, not when the product is well polished. There is a high turnover of releases with Open Source, sometimes every day. Depending on the project there is some up front planning, but this planning sorts out by democratic methods what features and changes should be added to the software. Like Extreme Programming it is an evolutionary method of programming.

##Genetic Programming
Genetic Programming is where instead of human developers writing code, the code is evolved by random mutation, genetic crossover and other biological principles. Also, instead of the code being examined by human users, it is usually compared to a 'fitness function' which decides which code is more 'fit', and thus gets to reproduce.

This form of programming is probably the most 'pure' form of Evolutionary Programming, as there is no question that the humans are no longer the creative agent. The advantage of this kind of programming is that it can solve problems in a more robust way, with less resources, and with better optimization than can be written by a human developer.

The downside is that this kind of development is only suited to certain classes of problem. For the vast majority of day to day business code, involving human interactions, such as forms and reports, this form of development is not practical or desirable. It also generates code which is difficult or impossible to understand by developers. This form of programming has not been used as far as I am aware for any commercial software products.

##Why does Evolutionary Programming Work?
At first look, it might seem improbable that doing little up front design would result in a successful complex project. The magic with Evolutionary Programming is that each release takes very small steps. By releasing very often, and therefore making a relatively small number of changes in each release, we allow the users to control the evolution of the software. As programmers we develop the 'mutations' to the code, but the users are the only ones who can provide the 'natural selection' of the code which is best.

Extreme programming differs in one important respect to Open Source. Extreme Programming uses extensive testing using automated testing applications to ensure quality. Open Source on the other hand depends more directly on users. The idea is that low quality source software will be 'outbred' by higher quality software.

Small incremental improvements, perhaps performed by several developers or perhaps hundreds with no central control, produces software much more robust than the 'Big Bang' model which is common today.

##Advantages with Evolutionary Programming
The primary advantage with Evolutionary Programming is that it allows development of complex applications. It does not assume that we have the ability to specify and plan a complex system down to the last detail. Instead is means we can begin a development and let the process of evolution guide us.
The benefit of this is that the solution will fit the needs of the users. Because of extensive user testing at every stage of the development the application will also be more robust.

##Problems with Evolutionary Programming
There are several problems with evolutionary programming. One of the main problems is lack of predictability. This means you don't know ahead of time what the final features will be, how long the project may take, and how much money it will cost. However, it may be argued that you don't know this information with the Big Bang model either, and any estimates are based on the illusion that you can predict these things in advance with the Big Bang model.

Also, if you are releasing the project as open source you will not be able to earn revenue from the development of the software (at least not directly from its sale). You will lose control over the distribution of the source code. For this reason is only some software can be released as Open Source. Also, there is no way you can be sure that your software will take the interest of sufficient developers. This limits open source to generic projects, such as operating systems, programming languages, internet protocols etc, rather than vertical market applications.

It also means users are exposed to a unpolished application early, which may not be appropriate for the user base you are trying to service.