Do programmers actually draw flow charts?

1.3k views Asked by At

Im in first year computer science in University and for my current assignment i need to write a program with an algorithm and a hand trace and a flow chart. I kind of get the usefulness of the algorithm and hand trace but to me it seems like the flowchart is a monumental waste of time especially since the program took me about an hour to write and was super simple. I was just wondering if real programmers actually used flow charts for help.

2

There are 2 answers

0
alroc On BEST ANSWER

Flow charts are one of many ways I'll work through my planning of a program or script; but I won't necessarily use it every time. Pick the right tool for the situation - sometimes it's pseudocode, sometimes it's a flowchart, sometimes it's prose or simple wireframes/schematics. Often, it's a combination.

Once you get to any application or system that's of non-trivial size, some sort of visualization or planning process that doesn't involve code on a display becomes immensely helpful. It also aids in communicating your ideas to users, testers and other developers - you won't be building your application in a vacuum.

1
Hot Licks On

Back from about 1980 to 2000 I used to "draw" a lot of "Chapin" charts -- feed a PL/I sort of syntax into a program and it prints a form of flow chart on 14" wide fanfold paper. These were incredibly useful and we used them extensively in code reviews.

But then they did away with paper, and the charts are not nearly as useful if you can't set them on your desk and mark on them, and even if you print them out on letter-sized paper instead of fanfold you lose a lot of effectiveness because you can't easily stretch them out to see 3-4 pages at a time.

Similarly, code reviews are less effective now that code is pre-reviewed online vs with fanfold listings. It's harder to follow the flow of a long method, and there's no good way to make notes, highlight/underline lines, etc.

Using this technology I once did the design for an incredibly complex algorithm internal to a database system. Detailed flow charts ran, I'm thinking, about 1000 lines. The flowchart got down to the details of variable names, etc. We reviewed that intensively. Then I was transferred to another area and a (admittedly bright) new-hire was given the task to actually code the algorithm. It came to about 4000 lines, IIRC. There were 3 minor bugs found in testing.

A lot has been lost in the past 15-20 years, due to "technological advancement".