How did you plan your program | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How did you plan your program

To those programmers out there i want to know how did you plan your code when you making one program.Is there a technique like making a flowchart or something?

21st Feb 2017, 8:23 AM
MELBERT S VARRON
MELBERT S VARRON - avatar
7 Answers
+ 8
for me, I think up vague phases within the program, of which I have a very rough idea of how I might do them. then I approach those phases in order, and figure out the specifics of how I'll code that phase.
21st Feb 2017, 10:25 AM
Ahri Fox
Ahri Fox - avatar
+ 4
I think of something first and then I write on paper what will my code look like, and then I start coding next is I remove all of the things that are useless and bam, a masterpiece
21st Feb 2017, 1:29 PM
MrCoder
MrCoder - avatar
+ 2
Mostly all less or more in mind :P ( that's as it's, but not a good way and/or a recommendation ^^ )
21st Feb 2017, 8:59 AM
visph
visph - avatar
+ 2
there are a bunch of different ways of planning programs, and different standard diagrams for designing different aspects of a program (how it looks on screen, how the data is stored or modelled, what different "classes" should be and what they should do etc), as well as different "methodologies" that say how much you plan before coding and what stages you take. Generally now most of the time, methodologies that can be described as "agile" are favoured over the old school "waterfall method", because you see the results of early work in action sooner and often looking at something that runs and mostly works is easier to spot problems, than on diagrams and brainstorms. On my own projects, I get whatever forms naturally in my mind into something on my pc that I can verify if the idea is good, and then I keep building on the ideas as new ideas come into my mind. When ideas stop flowing for a bit, or if I have too much messy code/diagrams, I stop adding or altering ideas (or how they are shown in code/diagrams) and neaten things up (in code this is called "refactoring") So if I think of the user interface first, I'll make that first, see if I like it and alter it a bit and then add code that makes the UI do stuff after. If I think of a snippet of code first, I'll write that code first. I guess if I where to name my process/methodology I would call it "inspiration driven development".
22nd Feb 2017, 9:40 AM
Phil
Phil - avatar
+ 2
(my response was too long for one comment) If you (or someone you are working for) know immediately just what your program should and shouldn't output for given inputs, I recommend Test Driven Design (often shortened to TDD). Test Driven Development is where you write "unit tests" that will tell you if functions return the correct outputs for given inputs (including throwing correct error message if that is what you want to happen) before writing your main code, and keep coding until the unit tests pass - a Unit Test is a bit of code that checks if other code does some specific thing you want it to do in a set scenario. The set of unit tests becomes both a stage of planning (as you think about and define what is good and what isn't, what error messages you should expect and when) and something you can use as you code to verify what you've just added does what is intended,and that you haven't broken anything that was previously working. heres some types of diagram (diagrams tend to have self-explanatory names, but google ones you are interested in for examples and explanations): Data Flow Diagram, Class Diagram, Entity-Relationship (for databases), User Flow Diagram, Storyboard (how the screen looks at each stage of a user doing something - good choice for plans that need to be agreed by a non-technical person), sitemap (websites)
22nd Feb 2017, 9:50 AM
Phil
Phil - avatar
0
use Algorithm chart
21st Feb 2017, 8:31 AM
Abdelaziz Abubaker
Abdelaziz Abubaker - avatar
0
์š”๊ตฌ์‚ฌํ•ญ ๋ถ„์„ ํ”„๋กœ๊ทธ๋žจ ์„ค๊ณ„ ํ”„๋กœ๊ทธ๋žจ ๊ฐœ๋ฐœ ํ”„๋กœ๊ทธ๋žจ ํ…Œ์ŠคํŠธ ์œ„๋‹จ๊ณ„๊ฐ€ ๊ฐ€์žฅ ๊ธฐ๋ณธ์ ์ด๋ฉฐ ๊ฐ ๋‹จ๊ณ„์— ์—ฌ๋Ÿฌ๊ฐ€์ง€ ๋ฐฉ๋ฒ•๋ก ์ด ์กด์žฌํ•œ๋‹ค. ์Šคํ„ฐ๋”” ๋ผ๋ฉด, ํ•œ๊ฐœ์˜ ์ฃผ์žฌ๋กœ ์—ฌ๋Ÿฌ๋ฒŒ์˜ ์ฝ”๋“œ๋ฅผ ๋งŒ๋“ค์–ด ๋‚ผ์ˆ˜ ์žˆ์€๋ฐ, ์ข€๋” ๋นจ๋ฆฌ ์ข€๋” ํšจ์œจ์ ์œผ๋กœ ํ•˜๊ณ ์ž ํ•˜๋Š” ๋งˆ์Œ์ด ๊ธฐ๋ณธ์œผ๋กœ ๊น”๋ ค ์žˆ์–ด์•ผ ๊ฐ€๋Šฅํ•ด
22nd Feb 2017, 1:44 AM
์ „ํ˜„์ˆ˜
์ „ํ˜„์ˆ˜ - avatar