Programming Advice needed

Mohammad Rahman

Jan 15, 2015
How to cope up with the Frustration and falling in to the eternal confusion and mental stagnation of not being able to

a) Solve a problem
b) Find and fix the Bug
c) Design the logic

Help pls!



Computers do not do what the programmer wants them to do, they do exactly what the programmer tells them to do.

Most languages and compilers have some mechanism for detecting syntactically valid but obviously unintended instructions. These are rarely problematic. What's problematic are the syntactically valid but unintentionally flawed instructions.

As a beginner, the best advice that I can give you is to learn to think like a computer. If you can do this, debugging will become second nature.

Step 1: Create a flow chart detailing the logical progression of the program including all changes in state, decision points, inputs, and outputs. Be as descriptive and verbose as possible.

Step 2: Create a written, step-by-step guide detailing what you want the program to do at each step detailed in step 1.

Step 3: Write the program. Be as verbose as possible, use as much memory as you need, don't take shortcuts. Carefully document how each portion of the program relates to each element in your flow chart. Then, reverse reference your flow chart to your program to make sure that everything is accounted for.

Step 4: Run the program with some hand-crafted test cases. Press it with stranger and stranger inputs until it breaks. When it breaks, write a brief description of why you think it broke and try and design a fix. Repeat.

Step 5: If the cause of a problem is not immediately obvious (it rarely is) and can't be solved through simple inspection, learn how to use a debugger.

I can't speak for everyone, but I'm most comfortable when I can get my hands up inside of a computer and fondle the memory a little bit. I don't like to rely on automated tools to do my work for me. Effective programming and problem solving is built on an awful lot of practice (especially best practices), sleepless nights, and pattern recognition.
Thread starter Similar threads Forum Replies Date
M Apps General Discussion 1
H Apps General Discussion 8
aymen9309 Apps General Discussion 1
SyndiShanX Apps General Discussion 1
D Apps General Discussion 1
BlueMoon1890 Apps General Discussion 0
Neon The (Anthro) Umbreon Apps General Discussion 1
K Apps General Discussion 2
T Apps General Discussion 10
M Apps General Discussion 2
R Apps General Discussion 3
S Apps General Discussion 2
N Apps General Discussion 1
P Apps General Discussion 4
A Apps General Discussion 8
M Apps General Discussion 6
A Apps General Discussion 1
A Apps General Discussion 5
S Apps General Discussion 9
kyeana Apps General Discussion 15