in reply to Go with the flow?

When I started at university, the professor who was going to teach us "Introduction to Programming" stated that people who had used flow charts in the past started with a disadvantage. During my entire CS masters, I never worked with flow charts.

I don't believe flow charts help you in creating structured programming. On the contrary, I believe they help you create spagetti programs. It's something from the fifties and sixties, when goto was a popular statement.

Flowcharts don't help you design a datastructure. Flowcharts don't help you with efficiency issues. Flowcharts don't help you in proving something to be correct. Flowcharts don't help to uncover design flaws. At best, flowcharts help you to determine the control flow of your program, but it doesn't help you to determine whether the flow is correct or not.

Design is good. Design doesn't necessary have to be done on paper. Just taking the time to think about the problem, and dividing it into subproblems is design too. Obviously, the more experience you have, the more you can avoid using paper to do design.

Most of the design I do on paper (or a whiteboard) consists of drawings. But not of the control flow - I never design control flow. With a good design, the control flow will be obvious anyway. But I do make drawings of datastructures, relations of pieces of data, or state diagrams. Different problems need different designs. Sometimes a datastructure is going to be the core of the program, and given a good datastructure, the algorithm is obvious (and then all you are left with is the implementation). But sometimes the datastructure isn't important or it's obvious, but the design needs a state diagram. Recently, I had to parse a logfile and extract quite some information. The datastructure wasn't too hard, a quadrupled nested hash/array, but because the logfile didn't have a consequent format and had entries missing, a state diagram was needed to make a good program.

Abigail