Monday, October 27, 2008

On System Design

In an essay entitled "On System Design", Jim Waldo, a distinguished engineer with Sun Microsystems, expresses his ideas and opinions on system design, including factors that hinder the effort necessary to do system design.

Some of the techniques that aid in the process of good system design are Six Sigma, or UML. The latter helps in the development of good design, but it is you (as an individual or a team) that has to come up with the design. UML helps you in expressing that design better. Many approaches have been found to work, but there is no general approach that works on all projects. Depending on the project, you have to decide which approach better suites your needs. The only exception to this is given by Brooks, namely that good designs have one thing in common, that is they are produced by good designers. Jim Waldo explained this in terms of probability/statistics: those who have been able to produce a good design in the past are far more likely to produce a good design in the future. Furthermore, designers have to be bale to deal with ambiguity while creating the design, and to know that the question that cannot be answered right away, will be eventually answered at the appropriate time. The author mentions that instead of learning a process of design, it is better to learn how to best design. An indicative to the best way to learn how to design includes two factors:

1. Trying, failing, and then trying again.
2. Being under the guidance of someone who is an expert at the task.

It si the way of thinking that matters most in system design, rather than the subject that can be thought in a particular course. Interesting enough, the author mentions that System Design cannot be learned in one course, but should rather be though in a much larger process, similar to an apprenticeship. The relationship needed between a master and its apprentice is found at the graduate level, where each student has an adviser with whom he is involved in academic research. One other place is at work (in industry) where you get hands-on insight on system design. I would argue that at work, you are more constrained in terms of time; hence, there is less opportunity in learning system design.

Diversity in the sense of academic backgrounds (physics, philosophy, anthropology, computer science, music, etc), and how such a diversity creates different views on a given problem, is described as being beneficial. I would particularize this to software development in the sense of not trying to think of a solution for a problem in terms of a particular programming language, but instead design the solution independent of the software platform and only afterward think of what language can help me express this design the best (similar to the MDA concepts).

The problem with doing design up front is the fact that no immediate code is produced. The pressure to produce something that can be seen, or the measure of productivity by means of the number of lines of code written, still exists. What is needed is "an act of faith by management". He continues by saying that "if you find a manager who is actually willing to give you time to do the design task, stick with him or her. He or she is a treasure much rarer than gold."

The paper also mentions intellectual property (as a note on why system design is not shared among peers anymore), and how any patent has the same value as any other patent. For me this is unbelievable; it is equivalent to saying that ideas that are behind the pattern are the same, namely have the same value. The quality of an idea is not taken into consideration at all by the patent system. Furthermore, in case of a patent litigation, the jury is made up of ordinary (non-technical) people, not technical peers. Hence, "it is very hard to learn about good system design unless you can see and study other system designs, both good and bad. The intellectual property atmosphere in industry has limited the number of designs that are actually talked about, and has convinced many system designers that they should not even look at the designs that are available."

Ways of solving the lack of system design from academia and industry are given in forms of agile methodologies and open source projects, because they enhance the discussion of a system's design in several ways: the communication between two (or a small group) of programmers can help in clarifying and better understanding the design of a system; furthermore, communicating the design to other members of an open source project will help clarify the design of a system. It is interesting to note that the author provides a different view to both agile methodologies and open source projects, namely them being a reaction to the impossibility of doing system design in academia and in the industry. Overall, the paper makes for an inspiring reading. You find yourself nodding and agreeing with the statements made while reading the essay.

Tuesday, October 14, 2008

Why is self-healing in computer systems important?

Reading about the malfunction that rendered the Hubble Space Telescope silent, I realized indeed how important is for systems to have the property of self-healing that our human body has, and in the broader sense, be autonomic. This would imply for the system to know itself in such a way as to poses detail knowledge of its components, status, and internal and external connections. If a system does not have information about a specific component, it cannot control it, hence the importance of knowing itself.

Furthermore, reconfiguring itself based on the environment is also a desired property. Most importantly, such a system would need to heal itself without the interference of human experts. Why do we need such a self-healing characteristic in computer systems? The Hubble Space Telescope mentioned above is one example. The failure in the telescope came from a unit that collects data and transmits it to earth. Solving this problem means to remotely send commands to the telescope to switch its operations to a backup unit. Why hasn't this been achieved automatically? Because Hubble was not designed with self-healing in mind. Would have been that complicated to discover the problem on its own and find an alternative resource that it could use to continue its normal operation? Self-healing really means just making use of redundant or underutilized components to take over the task of the malfunctioned element. This is similar to how the brain works when parts of it are damaged. The problem is that because Hubble is not 'aware' of its backup unit, that specific unit has not been utilized since 1990, making it subject to "harmful rays of the sun, extreme temperature changes during orbits and 18 years of cosmic debris".

If you are interested in Autonomic Computing, IBM has a whole research project devoted to this subject. You can find out more about this here.

Monday, October 6, 2008

Linearity and Nonlinearity in Biology, Computer Science and the Financial Market

One of the questions that I have, inspired by one of the graduate classes taught by Dr. Ravi Shankar at FAU, is can we exploit the biological architectures to come up with improved computer architecture, both software and hardware. One aspect that rose my interest was the nonlinearity of different biological systems, and if we have such examples of nonlinearity in computer science. In ecological systems, we have Robert May's bifurcation diagram shown below:




If the population growth factor equals to 4, the population jumps around in a chaotic, nonlinear manner. The main idea of the bifurcation diagram is to be able to see the successive period doubling which take us into chaos. We have such bifurcation, such branching, in the blood vessels, as well as in the air vessels. Now for the blood vessels, they can expand to adapt the blood flow. Let us denote the internal pressure, the pressure across the walls, with P, and the volume inside with V. Plotting this system we get the figure below:

What we get is a deterministic nonlinear system. The upper part of the slope is around 100 times the lower part. In case of a disease, like arteriosclerosis where you loose elasticity and you get a higher blood pressure, or in the case where you have more elasticity hence you have a higher pressure, you get a more linear system:

The blood vessels system functions properly only in the nonlinear case. Both linear cases have a negative impact. Do we have such linearity in system development? In software development process, the Waterfall model is the only model that has this linearity property:

The waterfall model is argued to be considered a bad practice mainly because it is impossible to 100% complete one phase before moving to another. When using such a model, it is implied that there are no changes in the requirements, problems can be fully predicted, and the design is correct before the implementation phase starts. Any other development process models do not exhibit the linearity property, but are rather nonlinear. Let us take the spiral model for example, shown below:

Spiral model (Boehm, 1988)

The diagram above can be viewed as a fractal, which is an example of a nonlinear system. Another model that expresses nonlinearity is the iterative and incremental one that is an essential or general part of other models such as RUP, Extreme Programming, Agile Software Development:



The iterative and incremental approach has been developed in response to the linear waterfall model. The nonlinearity characteristic is necessary in order for these models to display the property of adaptability to change, redesign, and learning from other iterations.

If we look at the DOW Jones Industrial Average for 2008, we can see some characteristics of chaos (another manifestation of nonlinearity) depicted in the shaded blue rectangle, that would predict the continuous fall starting with the beginning of October:

SOURCE: Yahoo! Finance

Nonlinearity is present throughout this graph, but chaos really sets in when the rate of the index goes up and down by a much higher rate than it did in the past. The high change in the DJI over a small period of time is a characteristic of chaos behavior. This is also seen if we look at the volume indicator below that plots the number of shares traded during that period of time:

SOURCE: Yahoo! Finance

From September 12 to September 19, there is an almost 50% increase in the number of shares traded. Between September 19 and September 25, there is around 50% decrease in the number of shares traded. Such a high increase and decrease in a two week period is chaotic and uncontrolled, and it is not seen anywhere in the graph for the past year. Having said that, we could certainly look for such chaotic manifestation in the future to better predict the market.

As a conclusion, we have seen several examples where nonlinearity in the form of fractals and chaos is useful and beneficial. Thinking in such terms will have a positive impact in domains ranging form computer science to financial systems.

Friday, October 3, 2008

Nokia unveils "Comes With Music"

From Nokia's Press Release:

"The company announced Nokia Comes With Music, a revolutionary program that enables people to buy a Nokia device with a year of unlimited access to millions of tracks from a range of great artists - past, present and future. Once the year is complete, customers can keep all their music without having to worry about it disappearing when their subscription is over."

The CEO of UMG International was with Nokia to launch the program. "It's fantastic to work with Nokia on Comes With Music," said Grainge. "We feel it's an innovative way for people to discover and enjoy new artists, while at the same time having access to the amazing depth of the Universal catalog. Comes With Music allows our artists to reach new audiences in a very easy and affordable way.""