20. October 2012

Observation of software system: Starting with idea

Idea. Idea is starting point for life of software system. Pure raw idea and vision of future able ignite spark of hope that new software could work.

First stages of system evolution are very vulnerable. Idea need to form protective shell from enthusiasts who are helping to grow it. Idea also needs power and resources to survive. Enthusiasts must form some form of protective structure. It could be startup.

Idea is safe for the time being. It starts growing and eating more and more resources.

Time is passing. Enthusiasm is depleting. Dwindling resources could barely support life of idea.

Key turning point. Idea must transform into system which is able to sustain next phases of its life. It must turn into the system which is able to acquire new resources. Sell or bankrupt.

Luck, serendipity or deus ex machina. Somehow it starts selling. Early adopters begin to emerge. They like new system. They sense that it could become something great.

Idea is adapting protective its shell. Startup is no longer viable solution, because original enthusiasts are nearly exhausted. They spent many many hours and sleepless nights to push this idea forward.

Idea is transforming startup shell into company shell. First it is small, but it is growing.

Transformation will take some time. Software system is growing and consuming more and more resources. Balance of income and consumption is critical for survival of idea.

Maintenance. Software system has been around for several years. Idea prospers. New things were introduced with blinding speed, but this is slowing down over the time.

New changes in software system are causing pain. Idea doesn’t like it.

Idea must protect itself and its system. New defensive processes will emerge. Idea is able to deflect all dangerous changes with carefully designed processes.

System continues to grow and attract more resources. It is obvious that everything is ok.

Unfortunately entropy in software is growing. Hidden. Protected. Old parts of system are becoming legacy.

System starts to deflect even good changes by making them hard to implement. Legacy became so big that there is no way around.

Even minor changes must be introduced with careful precision of surgeon. Adding just one line of code to the system could take several days.

Legacy became burden. Development processes are slowing down. Maintenance is burning tremendous amount of resources.

This is a deadly trap. There is no way out. For some companies it is true.

One approach could be to set aside very high amount of resources. Develop wast change and then deploy it in one BIG STEP. It seems to be right! Welcome to booby trap.

More reasonable approach is to diverge small amount of resources from maintenance furnace. Remove clutter and legacy by small steps in the time. Keep a steady flow.

 

27. August 2011

Try to create aux.h file on Windows 7

Try it :-)

I was playing with one package from Linux. I grab source code of package using Cygwin. This source code contained one funny file: aux.h.

Windows version of Vim refused to open this file with error message: Permission denied.

Even Notepad refused to open this file.

Finally Visual Studio gave me interesting hint about this aux.h file name:

 

I tried to zip this file by 7Zip and extract it back. Result was that 7Zip decompressed file as _aux.h.

Interesting issue. :-)

7. March 2011

Spaghetti, lasagna and raviolli code

Code smells or anti-patterns are a common classification of source code quality. There is also classification based on food which you can find on Wikipedia.

Spaghetti code

Spaghetti code is a pejorative term for source code that has a complex and tangled control structure, especially one using many GOTOs, exceptions, threads, or other “unstructured” branching constructs. It is named such because program flow tends to look like a bowl of spaghetti, i.e. twisted and tangled. Spaghetti code can be caused by several factors, including inexperienced programmers and a complex program which has been continuously modified over a long life cycle. Structured programming greatly decreased the incidence of spaghetti code.

Ravioli code

Ravioli code is a type of computer program structure, characterized by a number of small and (ideally) loosely-coupled software components. The term is in comparison with spaghetti code, comparing program structure to pasta; with ravioli (small pasta pouches containing cheese, meat, or vegetables) being analogous to objects (which ideally are encapsulated modules consisting of both code and data).

Lasagna code

Lasagna code is a type of program structure, characterized by several well-defined and separable layers, where each layer of code accesses services in the layers below through well-defined interfaces. The term is in comparison with spaghetti code, comparing program structure to pasta.

Spaghetti with meatballs

The term “spaghetti with meatballs” is a pejorative term used in computer science to describe loosely constructed object-oriented programming (OOP) that remains dependent on procedural code. It may be the result of a system whose development has transitioned over a long life-cycle, language constraints, micro-optimization theatre, or a lack of coherent coding standards.

Do you know about other interesting source code classification?