Flow diagrams in programming.

Started by Yue, November 23, 2017, 16:12:52

Previous topic - Next topic

Yue

In the programming class they have us doing geometric figures, for analysis, flow diagrams, desktop tests and pseudo-codes.

My restlessness is, it's really helpful to learn this?, I have to say that it's a little difficult for me to assimilate, since what I like the most is to go directly to the code and start writing.

I'd like to hear your views on that.

Steve Elliott

Hammering away at the keyboard until your program stops working is the worst possible way of coding - especially if you ever got a job in programming.

Having said that some systems are over-kill for simple programs.  But it's good to learn to structure your programs.
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

Derron

for basic flow diagrams there is not much to learn. So just do listen to it for the two lessons they will teach it to you.


Afterwards you will know something which all "non-self-taught" programmers will understand. And as Steve already mentioned it will help you to structure your programming logic.


All in all: it does not matter if you "need" something or not: if it is something which will be asked in final tests/exams: then learn it.




bye
Ron

Steve Elliott

#3
Quote
All in all: it does not matter if you "need" something or not: if it is something which will be asked in final tests/exams: then learn it.

Precisely, as Derron has said.  You keep trying to fight the tutor - I don't like C++, I want him to teach Blitz Max/Blitz 3D.  And now, I don't like being forced to structure my code.

If you want to pass this course you will need to learn new things, things that are good for you as a programmer!
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

col

#4
As a self-taught programmer myself I can tell you that when working in IT not everyone understands what you know. Especially customers and management. They just don't understand, and they don't have to as it isn't their job to know code.

Very very often I have to create flow charts - not for me but for other people to understand what is happening in the code and how the software/hardware works. They are also great to show people how they will use the software, what part of things that they control as a user.

They are the best way for you to communicate to other non-technical people how technical things work.

Most people don't understand code, but they understand pictures :) and a single picture can replace a thousand words of explaining :)

ps.
It's you, in your head, that does the programming. Sitting down at the keyboard is when you are implementing the algorithm that you have created. Using flow charts help you to create the algorithm, see where problems can be, all without touching a computer. Also planning ahead in this way makes you have less time at the computer - you can get code written faster and see results faster. At first it may seem slow and backwards but believe me, from experience, it IS faster.
https://github.com/davecamp

"When you observe the world through social media, you lose your faith in it."

iWasAdam

Yue, Listen to the teacher. Think of the end result - your papers to a new life.
It is hard to unlearn things and learn new way of doing things.

Say Yes, be a good student, but ask questions. Some will be useless, but you will gain knowledge ;)

They are trying to teach you new ways of looking at problems. To expand your thinking.

TomToad

Flow diagrams is a good way to see how code should flow without the need to write any code.  The more complex the program becomes, the more useful flow diagrams become.  Ever accidentally create an endless loop?  Or the wrong Case gets chosen in the Select?  Mapping out the flow ahead of time can save many hours in debugging later on.

Desktop debugging is getting less useful as debuggers get better, but occasionally, you still need to sit down with pencil and paper to see exactly what your program is doing at any given point.

pseudo-code is a good way to put your program into code without having to worry about the syntax of any particular language.  Lets you keep a flow of thought going without having to remember was it getValue() or GetValue()?

These might seem like extra steps that take more time than it is worth, but when you work with teams and large, complex projects, then the extra time spent here can save many hours of debugging and lowers the risk of sending out buggy programs.  Even if you don't use this stuff beyond this class,  it will give you better understanding of how programs work and make it easier to visualize what your program is doing.

So, to answer your original question, it is helpful to learn this.

------------------------------------------------
8 rabbits equals 1 rabbyte.

cpsmith0191

Agree with all points, flow charts can also be of use in the world of electronics which you are dabbling with. As you involve yourself in more complex structures that include both programming and electronic elements you will find the ability to simplify program flow and structure invaluable. The beauty of a flow chart is that the symbols are universally understood by the people you will interface with in any design environment and are totally independent of programming language or processor family. Like sharing a common language. Good luck in your studies and have fun cps.

Rick Nasher

I had to learn them too in school and felt the same way. Until I hit a problem I couldn't get through and then resorted to flowcharts to see where went wrong. It can help, even though time consuming.
_______________________________________
B3D + physics + shaders + X-platform = AGK!
:D ..ALIENBREED *LIVES* (thanks to Qube).. :D
_______________________________________

GaborD

Agree to what the others said, it's a great tool to have in the arsenal.
Do you necessarily need it to make small indie games? Nope.
But once in a while, it will be very helpful.