r/cprogramming • u/the_imposter_2 • 13d ago
Does flowchart and pseudo code are necessary to learn to for c?
/r/c_language/comments/1xyc7fn/does_flowchart_and_pseudo_code_are_necessary_to/I am so confused
0
Upvotes
4
u/marc_b_reynolds 13d ago
No. Both are intended to describe a routine without a specific language. Flowcharts are mostly dead: a precursor to pseudo-code in pre structured programming language days.
3
u/Specific-Housing905 13d ago
Maybe not really necessary but helpful. Both help you to structure your thinking process and think more like a programmer. Learning C or any other language on its own won't help you. A language is a tool to solve problems. You need problem solving skills as well.
There are too many people here on Reddit who have learned a language either by course, book or YT but can't build even a single app.
2
u/alkavan 13d ago
No. Just learn C, don't make it complicated — it's not.
2
u/70Shadow07 13d ago
Absolutely not, but pseudocode is handy sometimes (people mostly use python as pseudocode nowadays, its actually pretty decent for this purpose). Flowcharts are meh, most people seem to like pseudocode more, unless ur dealing with complex algorithms and processes.
Some domain specific graphs such as railroad diagrams for parsing are awesome though. Just stay the fuck away from UML.
1
u/zeekar 13d ago edited 13d ago
Pseudocode is useful because it gets you thinking about the general mechanism of programming. – turning problem-solving logic into code – without getting hung up on the specific syntax details of a real programming language like C. In C, forgetting a semicolon can cause the whole program to break, but that's just noise in pseudocode. Get the ideas right, the control flow; capture the chunks of code that repeat with the explicit conditions that control exactly when they repeat - that's the stuff that you need to get right no matter what language you wind up writing the program in. Removing the need to "sweat the semis" (as my old CS prof said) frees you to think about the logic at that higher level so you can get it right. Once it's clear and you understand what you're doing, then you can sit down to translate it into nit-picky programming language syntax.
Flowcharts are not as useful in the modern era. They were helpful, back when people were drawing them by hand because actual computer time was too expensive to waste on anything but the final version of the code. When all the planning and development was handwritten on paper, drawing boxes and arrows was no harder than writing text, and helped clarify things. Besides, the languages they were using generally required you to code control structures manually with
goto, so those arrows were exposing connections that weren't visibly obvious they way they are in a structured programming language. But flowcharts generally take a lot more space to convey the same ideas, are not as easy to change with digital tools, and permit unstructured constructs that we now know better than to use.