+ 2

What process do you utilise when trying to write a programme/solution?

I'd love to hear your tips and strategies for designing a program.

25th Jan 2017, 11:38 AM
Tony Robinson
Tony Robinson - avatar
8 Respostas
+ 6
I usually create many none variables and store data's on that to work from . so my code becomes less readable :(
25th Jan 2017, 1:04 PM
Sun
Sun - avatar
+ 3
first write in comments what I need... then I write TODOs like this .. //TODO: here what I have to do yet then If I will make it visual.. I define visual things like buttons or editext or text view... then if I require user input I define input method and variable to solve it.... then define one other function/method where calculation will happen.. and one method to print answer to screen.. then I will call both methods in main for calculation and printing it to screen... I declare variables when I need them.
25th Jan 2017, 1:21 PM
Pankaj Vaghela
Pankaj Vaghela - avatar
+ 3
I make a rough sketch on a piece of paper
27th Jan 2017, 6:28 PM
Aman Singh Rathore
Aman Singh Rathore - avatar
+ 1
to give some context, as I used c and assembler before I try to understand the question, rewrite it often and think about the data I'm using. then I do a flow diagram detailing how the program will flow and any decisions that need to take place. finally, I do a program structure, I.e. main() and all subsequent functions. I'm not sure how to adapt this approach to include oop and find myself kinda stuck at a procedure approach.
25th Jan 2017, 11:46 AM
Tony Robinson
Tony Robinson - avatar
+ 1
For OOP, if you find yourself using a certain section of code multiple times, try to see if you can make that section into its own function. An example would be, if you need to check user input to make sure it is formatted a certain way or is a certain variable type. Create a new function so you can just call that instead of rewriting code. Think of it this way. if it's a noun it's a class. If it's a verb, it's a function of the class.
26th Jan 2017, 11:25 PM
Aaron Hodson
Aaron Hodson - avatar
+ 1
I use an IPO chart first decide what inputs you will receive, then how you will process them to get the desired output.
27th Jan 2017, 4:50 AM
Garland Inman
Garland Inman - avatar
+ 1
1. Idea 2. basic algorythm on paper, mind, textfile 3. from 2 - some obvious problems and their solutions 4. debug-style-coded alpha 5. beta 6. repeat until it works perfect
29th Jan 2017, 9:37 AM
Алексей БутылкУс
Алексей БутылкУс - avatar
0
I'm a visual person...I draw a sketch of the endpoint, and work backward or forward and fill in the gaps.
28th Jan 2017, 4:30 PM
MikeyDoesIT
MikeyDoesIT - avatar