跳到主要內容

發表文章

Draw a flow chart with algorithm concept speed up coding job

A typical example form Graphs, Algorithms, and Optimization  written by W. L.  Kocay  & D. L.  Kreher give me a clue that develop a new flow chart structure which do help on coding job, especially when loop/decision are interwoven.   Please see Fig 1. Fig 1 • First I would make all branch on the right side. • One line command will only represent one process. Multi-line might count one process if they are  consecutive. • When we draw flow chart , every block will be on behalf of one process. • Process sequence will be top down. If possible ,don’t go up . Fig 2 Fig 2, is a flow chart from a training book which teach student how to get clear about flow chart operation. It fit beginners in the class and  too complicated and tedious to adopt in real project. Afterwards, maintenance and revision are hard to follow up. Fig 3 is my suggestion. Fig 3 @Link to this example and source code

The best flow chart to help c/c++ programmer convert chart to code

Many computer language programmers all know that flow chart is a vital job for program development. But they seldom prepare a program flow chart prior to coding the program. Maybe some did prepare the chart , but rarely updated the chart when finished debugging or revised a new version . Why everyone knew it's important but most of them didn’t draw it ? I guess most programmers didn’t like to maintain two ideas which are different in many aspect. Flow chart is rough and real code is precise, the former is easy, block by block, the latter complicated, line by line.   Novice found that it is very difficult to sync flow chart with source code ,senior already got the key point and didn’t want to waste time to draw chart or update the previous one. I kept thinking this question for many years. There must be some missing link between flow chart and source code. But where ?  Finally, After reading  Graphs, Algorithms, and Optimization written by W . L.  Kocay  & D. L.  Kreher.