[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


How tf do people create flowcharts before they start programming? I don't fucking know what works and what doesn't work and understand the logic flow so how am I supposed to do this before I even start programming?
>>
what the fuck are you talking about
>>
You can just spend time studying it like anything else :3
It helps to understand the structure of programs
>>
flow charts are pointless. if your main() function doesn't look like a high-level flowchart, it is unmaintainable spaghetti code.
>>
I can easily make a flowchart before I start a project. It's a good benchmark to test your understanding.
>>
You make a flow chart because you have an idea of what you want the program to do.
>>
>>109592043
I’ll add that if you aren’t using the flow chart to communicate with someone else, or to organize your own thoughts, don’t bother.
>>
i can barely make them after i'm already done. one time (pre-AI) a job asked for documentation in the form of UML diagrams to help onboard new devs and it was a painful process even having written the code myself.
my takeaway, besides me apparently being retarded in a way that doesn't seem to impede my ability to function as a developer, is that some people are just better at flowcharts.
>>
>>109591857
draw.io
Create a flowchart of a familiar daily process like washing your hair:
1. Rinse
2. Lather
3. Repeat
Oh, you forgot to add a termination test, and now you are bald. And so on.
Then flowchart a simple program. Good luck!
>>
>>109591857
Flowcharts are useless for programming, they're just a way to break down the logic in a colorful bunch of boxes and diamonds to impress some boomer upper management who knows nothing about coding
>>
>>109591857
I keep it all in my head
>>
>>109591857
you probably aren't going to get the design perfect in your first go before you even start writing it

in fact this is more unusual. most people - no matter how experienced they are - will change the design/flow-chart as they develop and test

there is a saying 'no plan survives first contact', and that's definitely what software is like. you often don't see what is wrong with your design until you actually start making/using it

flowcharts are just an aide to help see how the program/software works. as you're actually making a program you'll find ways to do things better than before. the final product will probably be very different to the design you started with

if you're stuck, then maybe just begin with one goal the program is meant to achieve
>>
>>109591857
only indians use these things
>>
>>109591857
Nobody did that before LLMs and surely nobody does it now, but maybe in some places they still teach them like you need them before programming. Anyway, at most I usually draw\write scribbles on paper for some specific difficult part of what I want to solve
>>
>>109592945
Flowcharts are for communicating with product owners.
Slide decks are for communicating with upper management.
>>
>>109591972
uuhhm sweaty main() is a c-ism and therefore bad
we use python scripts (TM) written by claude (R)
>>
>>109599317
owo what's this?
if __name__ == "__main__":
main()
>>
>>109599385
>have code problem
>all variables go up in smoke
good luck debugging
script is king
>>
>>109599404
what are you even saying lol
>>
>>109599424
all variables defined in main are local by default and go out of scope on a crash
in a script they remain in the global scope ready for postmortem
>>
>>109591857
Damn OP are you like max 73 iq or something? Flow chats are easy to make. I made one by hand at work to explain to my boss how I return shit to vendors because he couldn't comprehend my logic.
>>
>>109599457
why would that be a problem?
def main(x, y):
local_val = x + 10
result = local_val / y
return result

if __name__ == '__main__':
main(5, 0)

use:
$ python -i ./p2.py
Traceback (most recent call last):
File "/tmp/crash.py", line 7, in <module>
main(5, 0)
~~~~^^^^^^
File "/tmp/crash.py", line 3, in main
result = local_val / y
~~~~~~~~~~^~~
ZeroDivisionError: division by zero
>>> import pdb; pdb.pm()
> /tmp/crash.py(3)main()
-> result = local_val / y
(Pdb) local_val
15
(Pdb)
>>
>>109591857
Anon, it all depends on how important the software is and who's paying you
If it's a big project that has a specification you make the flowchart early on so other people can quickly understand and shit on your design. It has very little to do with when the programming starts though, eventually the two will come together, the flow chart is just to communicate and document what the code is supposed to do without reading code.
>>
>>109597182
not so, i did them in grade 9/10 cs



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.