Nassi-Shneiderman Diagram

September 12th, 2008 at 12:44 · Filed Under At Home, Blogging, Software Development · Comment 

I came across a highly influential graphical representation method of stating algorithm while I was reading books of system analysis and design. This method is called Nassi-Shneiderman Diagram or NSD. It was developed by Isaac “Ike” Nassi and Ben Shneiderman in 1972. Isaac also helped design the Ada programming language.

Many people claimed NSD to be very easy to read and understand, especially for beginners. This is probably quite true but maintaining NSD can be a problem for system designers. Unlike flowchart, NSD lumps all the symbols into one large block and does not use connectors between the symbols.

Contrary to flowchart which uses connectors, NSD provides a better structural approach of design where Goto should be avoided in structured programming. NSD provides simplicity and a compact overview of a program that can show some relationship nicely. NSD, in particular, provides visual aid and guides thinking about nested conditional structures.

Personally, I find that NSD is useful for rapid prototyping. It is quite simple and easy to draw a conceptual design before expanding into a flowchart. Modifying a stage or symbol in NSD is rather tedious compared to flowchart. On the other hand, after a careful and thorough investigation, I find NSD most suitable for structured system analysis, design and programming. NSD was designed with structured system analysis and design in mind as mentioned in the above paragraph, it has many advantages over flowchart despite of problem maintaining it. I think it is worth to study and to use it.

Here is an example of NSD and flowchart stating an algorithm to find a summation given by the equation:

 

If S > 100, then display k and tell the user that k is in range.

Read more

Algorithmic art

September 6th, 2008 at 0:34 · Filed Under At Home, Blogging, Mathematics · 2 Comments 

Jean-Pierre Hébert, a 68-year-old French artist, is an algorist. This is a name, proposed by Jean himself, for artists who create arts using unique computer algorithms. Apple featured Jean and his works in May 2008. You can read about him here so I am not going to repeating writing about him and his works.

When I was doing shopping alone this evening, the idea flashed in my mind. I could use Mathematica to explore algorithmic art. So, I sat down in front of my Mac and explored. Here’s my first piece of algorithmic art . It is not comparable to what Jean has done but is definitely a good start. I can’t call myself algorist yet because I created no algorithm.

The following examples are two very simple mathematics equations. The plots demonstrate that mathematics can be visualized as art.

Read more

Lamport’s bakery algorithm

August 14th, 2008 at 1:31 · Filed Under Blogging, Computing · 12 Comments 

The comment(s) in one of my earlier post here inspired my long sleeping passion in distributed computing. After reading about Leslie Lamport and some of his papers, I find his stories fascinating and one of his paper about bakery algorithm is most compelling and has profound effect on me. He has also done many great works such as the Paxos algorithm.

Leslie invented bakery algorithm but he insisted that he discovered it. He wrote

For a couple of years after my discovery of the bakery algorithm, everything I learned about concurrency came from studying it. … The bakery algorithm marked the beginning of my study of distributed algorithms.

He enthralls me with his attitude towards knowledge and learning. His discovery was the beginning of his study of distributed algorithms.

How many people find a solution to a problem, then continue to study the solution for years and learning from it?

Leslie gives me a new inspiration and a whole new perspective towards learning. After reading his paper about bakery algorithm, I have a clearer inspiration in distributed computing. If I choose to specialize in this field, I need more of such inspiration coming to burn a bigger fire.