SlideShare a Scribd company logo
TIPS FOR
BREAKING
DOWN A
PROBLEM
omg
omg
what does it
all mean
omg
what does it
all mean
Solution:
Go Google It
Solution:
Go Google It “how to write
a function to
add a node c”
Solution:
Go Google It “how to write
a function to
add a node c”
NONO
NO
● You don’t get a chance to reach a
solution on your own.
● You don’t necessarily understand
the example you see.
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”
The real solution
#parsetheproblem
#breakitdownsystematically
#likeacomputer
#BeLikeaComputer
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.
● 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
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.
Ask for help.

More Related Content

Similar to Tips on how to break down a programming problem

Getting it Built
Getting it BuiltGetting it Built
Getting it Built
Andrew Gassen
 
The obstacles of developer productivity.pptx
The obstacles of developer productivity.pptxThe obstacles of developer productivity.pptx
The obstacles of developer productivity.pptx
Laurence Chen
 
Exploring design-alternatives-using-tdd
Exploring design-alternatives-using-tddExploring design-alternatives-using-tdd
Exploring design-alternatives-using-tdd
Alexandru Bolboaca
 
Technical Interviewing
Technical InterviewingTechnical Interviewing
Technical Interviewing
Anthony D. Mays
 
If(s){} Bedtime Story to Programmers
If(s){} Bedtime Story to ProgrammersIf(s){} Bedtime Story to Programmers
If(s){} Bedtime Story to Programmers
Elizabeth Szabo
 
Debugging 2013- Thomas Ammitzboell-Bach
Debugging 2013- Thomas Ammitzboell-BachDebugging 2013- Thomas Ammitzboell-Bach
Debugging 2013- Thomas Ammitzboell-Bach
Mediehuset Ingeniøren Live
 
Git Makes Me Angry Inside - DrupalCon Prague
Git Makes Me Angry Inside - DrupalCon PragueGit Makes Me Angry Inside - DrupalCon Prague
Git Makes Me Angry Inside - DrupalCon Prague
Emma Jane Hogbin Westby
 
Good programming practices updated
Good programming practices updatedGood programming practices updated
Good programming practices updatedAgha Dostain
 
Passionate Programmer
Passionate ProgrammerPassionate Programmer
Passionate ProgrammerMagmaConf
 
Codesters
CodestersCodesters
Codesters
Barbara M. King
 
Ace the Tech Interviews - www.hiredintech.com
Ace the Tech Interviews - www.hiredintech.comAce the Tech Interviews - www.hiredintech.com
Ace the Tech Interviews - www.hiredintech.com
Anton Dimitrov
 
MagmaRails - Passionate Programmer
MagmaRails - Passionate ProgrammerMagmaRails - Passionate Programmer
MagmaRails - Passionate Programmer
Edwin Cruz
 
Grokking Techtalk #45: First Principles Thinking
Grokking Techtalk #45: First Principles ThinkingGrokking Techtalk #45: First Principles Thinking
Grokking Techtalk #45: First Principles Thinking
Grokking VN
 
Lecture 7 program development issues (supplementary)
Lecture 7  program development issues (supplementary)Lecture 7  program development issues (supplementary)
Lecture 7 program development issues (supplementary)alvin567
 
computational_thinking_gcse.pptx
computational_thinking_gcse.pptxcomputational_thinking_gcse.pptx
computational_thinking_gcse.pptx
birulangit23
 
Cracking the Interview Skills (Coding, Soft Skills, Product Management) Handouts
Cracking the Interview Skills (Coding, Soft Skills, Product Management) HandoutsCracking the Interview Skills (Coding, Soft Skills, Product Management) Handouts
Cracking the Interview Skills (Coding, Soft Skills, Product Management) Handouts
Gayle McDowell
 
Developing Better Software
Developing Better SoftwareDeveloping Better Software
Developing Better Software
Hean Hong Leong
 
Problem solving
Problem solvingProblem solving
Problem solving
hamza239523
 
30% faster coder on-boarding when you have a code cookbook
30% faster coder on-boarding when you have a code cookbook30% faster coder on-boarding when you have a code cookbook
30% faster coder on-boarding when you have a code cookbook
Gabriel Paunescu 🤖
 

Similar to Tips on how to break down a programming problem (20)

Getting it Built
Getting it BuiltGetting it Built
Getting it Built
 
The obstacles of developer productivity.pptx
The obstacles of developer productivity.pptxThe obstacles of developer productivity.pptx
The obstacles of developer productivity.pptx
 
Exploring design-alternatives-using-tdd
Exploring design-alternatives-using-tddExploring design-alternatives-using-tdd
Exploring design-alternatives-using-tdd
 
Technical Interviewing
Technical InterviewingTechnical Interviewing
Technical Interviewing
 
If(s){} Bedtime Story to Programmers
If(s){} Bedtime Story to ProgrammersIf(s){} Bedtime Story to Programmers
If(s){} Bedtime Story to Programmers
 
Debugging 2013- Thomas Ammitzboell-Bach
Debugging 2013- Thomas Ammitzboell-BachDebugging 2013- Thomas Ammitzboell-Bach
Debugging 2013- Thomas Ammitzboell-Bach
 
Git Makes Me Angry Inside - DrupalCon Prague
Git Makes Me Angry Inside - DrupalCon PragueGit Makes Me Angry Inside - DrupalCon Prague
Git Makes Me Angry Inside - DrupalCon Prague
 
Lecture 24
Lecture 24Lecture 24
Lecture 24
 
Good programming practices updated
Good programming practices updatedGood programming practices updated
Good programming practices updated
 
Passionate Programmer
Passionate ProgrammerPassionate Programmer
Passionate Programmer
 
Codesters
CodestersCodesters
Codesters
 
Ace the Tech Interviews - www.hiredintech.com
Ace the Tech Interviews - www.hiredintech.comAce the Tech Interviews - www.hiredintech.com
Ace the Tech Interviews - www.hiredintech.com
 
MagmaRails - Passionate Programmer
MagmaRails - Passionate ProgrammerMagmaRails - Passionate Programmer
MagmaRails - Passionate Programmer
 
Grokking Techtalk #45: First Principles Thinking
Grokking Techtalk #45: First Principles ThinkingGrokking Techtalk #45: First Principles Thinking
Grokking Techtalk #45: First Principles Thinking
 
Lecture 7 program development issues (supplementary)
Lecture 7  program development issues (supplementary)Lecture 7  program development issues (supplementary)
Lecture 7 program development issues (supplementary)
 
computational_thinking_gcse.pptx
computational_thinking_gcse.pptxcomputational_thinking_gcse.pptx
computational_thinking_gcse.pptx
 
Cracking the Interview Skills (Coding, Soft Skills, Product Management) Handouts
Cracking the Interview Skills (Coding, Soft Skills, Product Management) HandoutsCracking the Interview Skills (Coding, Soft Skills, Product Management) Handouts
Cracking the Interview Skills (Coding, Soft Skills, Product Management) Handouts
 
Developing Better Software
Developing Better SoftwareDeveloping Better Software
Developing Better Software
 
Problem solving
Problem solvingProblem solving
Problem solving
 
30% faster coder on-boarding when you have a code cookbook
30% faster coder on-boarding when you have a code cookbook30% faster coder on-boarding when you have a code cookbook
30% faster coder on-boarding when you have a code cookbook
 

More from Rona Chong

ADHD Discourse and Navigation of Identity/Subjectivity
ADHD Discourse and Navigation of Identity/SubjectivityADHD Discourse and Navigation of Identity/Subjectivity
ADHD Discourse and Navigation of Identity/Subjectivity
Rona Chong
 
American Born Chinese
American Born ChineseAmerican Born Chinese
American Born Chinese
Rona Chong
 
The effect of color on bee pollination visitation to artificial flowers.
The effect of color on bee pollination visitation to artificial flowers.The effect of color on bee pollination visitation to artificial flowers.
The effect of color on bee pollination visitation to artificial flowers.
Rona Chong
 
Sociological Literature on ADHD Diagnosis: "Illegitimacy-Legitimacy" And Tran...
Sociological Literature on ADHD Diagnosis: "Illegitimacy-Legitimacy" And Tran...Sociological Literature on ADHD Diagnosis: "Illegitimacy-Legitimacy" And Tran...
Sociological Literature on ADHD Diagnosis: "Illegitimacy-Legitimacy" And Tran...
Rona Chong
 
Underlying Mechanisms Behind Depression
Underlying Mechanisms Behind DepressionUnderlying Mechanisms Behind Depression
Underlying Mechanisms Behind Depression
Rona Chong
 
Politics and Emotion
Politics and EmotionPolitics and Emotion
Politics and Emotion
Rona Chong
 
Stratification and competing narratives among bus riders
Stratification and competing narratives among bus ridersStratification and competing narratives among bus riders
Stratification and competing narratives among bus riders
Rona Chong
 
JellyCube Pitch
JellyCube PitchJellyCube Pitch
JellyCube Pitch
Rona Chong
 

More from Rona Chong (8)

ADHD Discourse and Navigation of Identity/Subjectivity
ADHD Discourse and Navigation of Identity/SubjectivityADHD Discourse and Navigation of Identity/Subjectivity
ADHD Discourse and Navigation of Identity/Subjectivity
 
American Born Chinese
American Born ChineseAmerican Born Chinese
American Born Chinese
 
The effect of color on bee pollination visitation to artificial flowers.
The effect of color on bee pollination visitation to artificial flowers.The effect of color on bee pollination visitation to artificial flowers.
The effect of color on bee pollination visitation to artificial flowers.
 
Sociological Literature on ADHD Diagnosis: "Illegitimacy-Legitimacy" And Tran...
Sociological Literature on ADHD Diagnosis: "Illegitimacy-Legitimacy" And Tran...Sociological Literature on ADHD Diagnosis: "Illegitimacy-Legitimacy" And Tran...
Sociological Literature on ADHD Diagnosis: "Illegitimacy-Legitimacy" And Tran...
 
Underlying Mechanisms Behind Depression
Underlying Mechanisms Behind DepressionUnderlying Mechanisms Behind Depression
Underlying Mechanisms Behind Depression
 
Politics and Emotion
Politics and EmotionPolitics and Emotion
Politics and Emotion
 
Stratification and competing narratives among bus riders
Stratification and competing narratives among bus ridersStratification and competing narratives among bus riders
Stratification and competing narratives among bus riders
 
JellyCube Pitch
JellyCube PitchJellyCube Pitch
JellyCube Pitch
 

Recently uploaded

Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
Kamal Acharya
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
An Approach to Detecting Writing Styles Based on Clustering Techniques
An Approach to Detecting Writing Styles Based on Clustering TechniquesAn Approach to Detecting Writing Styles Based on Clustering Techniques
An Approach to Detecting Writing Styles Based on Clustering Techniques
ambekarshweta25
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
Kamal Acharya
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
ChristineTorrepenida1
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
dxobcob
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
drwaing
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
zwunae
 

Recently uploaded (20)

Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
An Approach to Detecting Writing Styles Based on Clustering Techniques
An Approach to Detecting Writing Styles Based on Clustering TechniquesAn Approach to Detecting Writing Styles Based on Clustering Techniques
An Approach to Detecting Writing Styles Based on Clustering Techniques
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
 

Tips on how to break down a programming problem

  • 2.
  • 3. omg
  • 7. Solution: Go Google It “how to write a function to add a node c”
  • 8. Solution: Go Google It “how to write a function to add a node c” NONO NO
  • 9. ● You don’t get a chance to reach a solution on your own. ● You don’t necessarily understand the example you see.
  • 10.
  • 11. 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”
  • 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. ● 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
  • 16. 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.

Editor's Notes

  1. In the spirit of peer learning, wanted to share my personal approach to coding problems. Everyone’s approach is going to be different, but thought it would be good to exchange perspectives.
  2. So this is an example of the type of awesome and cool projects we get at Holberton. It says to write a function that allocates a new node and link it to a list.
  3. So this is an example of the type of awesome and cool projects we get at Holberton. It says to write a function that allocates a new node and link it to a list. OK, that’s cool… So sometimes, we get a primer on a new concept, but we still may not understand everything, because we haven’t dealt with it in detail yet, like “what is all of this”, “dont really know what to do”
  4. When we’re new to a concept--maybe someone’s given us a primer on it, but we still haven’t gotten our hands dirty with it--it can seem a little overwhelming Pretty much like gibberish. Like “what does it all mean”? “Oh shit”
  5. So what do we do at this point?
  6. So what do we do? We can go Google it!
  7. We could google, actually, “how to write a function to add a node in c”, and get the answer… which is pretty cool.
  8. Except, I actually wouldn’t recommend doing this. Not because googling the exact solution is always absolutely wrong, but I would just be wary of Googling the answer right off the bat because there are a few pitfalls involved. Why: Googling the exact solution is not always absolutely wrong, but there are several pitfalls: You don’t get a chance to practice or learn how to reach a solution on your own. You find a solution but you don’t necessarily understand how it works.
  9. The first issue is that If you automatically look up the solution every time, you’re not giving yourself the chance to develop your solution by yourself. You can’t always depend on the solution or tutorial being available, so it’s important to be able to break a problem down yourself. The other part is you may look at some code and think you understand it, but without going through the nitty gritty of it yourself, you lack a true understanding of the code. And then you might not be able to do it on your own,which can really hurt you down the road. [In a job, you’ll come across problems that people haven’t done before. (For instance, some of us might have come across this when we did the shell). In a job interview, maybe you’ll be able to look online for a solution. But not being able to explain what your code does and how your code works will not impress. As a lack of understanding builds up, you will lose more and more time to randomly changing things in your code and crossing your fingers/hoping it works. If you force yourself to try to integrate of new concepts, the solution will come to you much more quickly. And, you’ll understand the solution, because you came up with it.]
  10. The “I don’t really know what I’m doing” syndrome: potentially lovable, but not advisable The goal is to move out of this zone, not stay in it.
  11. It can be OK to look up the answer But make sure you understand, then close the window and try it yourself.
  12. What this starts to get at is the idea that we should try to break the problem down into parts and understand the problem, instead of looking up the answer right away.
  13. So, Parse the problem Break it down systematically Like a computer Basically be like a computer, which is easier said than done, but we have a set of suggestions to help with that.
  14. The first step is to identify the problem. As in, Really try and understand first what is being asked of you. Then take that problem and break it down into steps You don’t necessarily need to know how to do each step now, but you need to know what you are trying to do conceptually. Pseudocoding helps define your plan of action (in a notebook). And then you can start to figure out the how each of those steps can be achieved: Something that I find helpful is trying to work out the problem with example inputs.
  15. So actually, whenever we are given a problem, we know some sample inputs. We can see them in terms of their type in the prototype; and we can see specific values our function is called with in the main function. Helps me to think about what we start out with and what we want to end up with. A lot of times a programming problem can be reduced to input and output, and a series of operations on the input to achieve the output. So: input = Pt. A, output = Pt. B, tools = our path to get from Pt. A to Pt. B. Input to output Problems in programming can often be reduced to what you’re given, and what you need to produce Try to think about input and output, and the series of operations needed to transform or use your input to reach the desired output. Think about what tools you have. 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? Control logic flow Mathematical operations Functions
  16. Once you have the solution, start coding it step by step. Don’t code it all at once, and test each step before moving on. If something feels confusing: Try not to look up THE solution. You can look up minisolutions, as in solutions for each step you’ve broken the problem into. Take it as an opportunity, because when you’re confused, you can identify what you don’t know, and then fix your knowledge gap. Google concept queries. Finally, if you’ve tried to break the problem down, but aren’t able to piece it all together, you can go ahead and look up a solution. Because now you know what you’ve thought of and you can identify what you didn’t think of, which is good for you to recall in the future. A few more things: Take the time to understand each line of code you write. After help or looking up the answer, make sure you can reproduce the answer on your own.
  17. The last thing is don’t be afraid to ask for help - I think it’s easy to feel like you’re copping out if you ask for help, but what really matters if you ask for help to understand things, and not to reach the answer. There’s a difference in the goal.