Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Upcoming SlideShare
×

# Tips on how to break down a programming problem

634 views

Published on

A short presentation prepared for students at Holberton School on how to approach a programming problem.

Published in: Engineering
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here

• Be the first to like this

### Tips on how to break down a programming problem

1. 1. TIPS FOR BREAKING DOWN A PROBLEM
2. 2. omg
3. 3. omg what does it all mean
4. 4. omg what does it all mean
5. 5. Solution: Go Google It
6. 6. Solution: Go Google It “how to write a function to add a node c”
7. 7. Solution: Go Google It “how to write a function to add a node c” NONO NO
8. 8. ● You don’t get a chance to reach a solution on your own. ● You don’t necessarily understand the example you see.
9. 9. Solution: Don’t Google the answer. Google the concept. (Google the answer as a last resort, and make sure you understand & can reproduce the answer on your own) (If you can’t, then ask for help.) “What is a linked list” “C structures” “Malloc” “memory” “How do you store a string in a node”
10. 10. The real solution
11. 11. #parsetheproblem #breakitdownsystematically #likeacomputer #BeLikeaComputer
12. 12. A set of steps: ● Identify: What is the problem? What is being requested, or the goal? ● Break the problem down into steps ● Pseudocode & work the problem out with example inputs. ● Coding: Go step by step. (Don’t code it all at once, and test each step). ● Something confusing you? ○ Do not look up THE solution. ○ Identify what you don’t know, then fix your knowledge gap. ● You’re stumped - but you’ve tried to break down the problem. Look up a solution and take stock of what you missed. ● Take the time to understand each line of code you write. ● After help or looking up the answer, make sure you can reproduce the solution on your own.
13. 13. ● Think about input to output. What inputs do you have? What are their types? What outputs do you want? What are their types? What tools do you have to transform your input to output? ● Logic flow ● Mathematical operations ● Functions
14. 14. A set of steps: ● Identify: What is the problem? What is being requested, or the goal? ● Break the problem down into steps ● Pseudocode & work the problem out with example inputs. ● Coding: Go step by step. (Don’t code it all at once, and test each step). ● Something confusing you? ○ Do not look up THE solution. ○ Identify what you don’t know, then fix your knowledge gap. ● You’re stumped - but you’ve tried to break down the problem. Look up a solution and take stock of what you missed. ● Take the time to understand each line of code you write. ● After help or looking up the answer, make sure you can reproduce the solution on your own.
15. 15. Ask for help.