How to Solve Coding Problems (the best way to learn)
Do you struggle with coding problems after watching programming videos? Aaron Jack, a remote
software developer, shares how to start solving coding problems in this video. He recommends going
to CodeWars, creating an account, and filtering by the easiest difficulty, 8 kyu, to access all the
problems. These may still be challenging for beginners, but practice makes perfect.
Transforming Inputs to Outputs
Aaron explains that every problem or function is a way of transforming inputs to outputs. For
example, the problem of converting a name into initials is a way of transforming the input (a name)
into the output (initials). To solve the problem, you need to break it down into smaller and smaller
steps, with each step being a single line of code.
Steps to Solve a Coding Problem
The first step is to think of what you need to do to get the desired output. In the example of
converting a name into initials, you need to separate the first and last names, get the first initial of
each name, and combine them with a period in between. These steps can be written as pseudocode
and then translated into actual code.
Debugging Code
If your code isn't working as expected, try debugging by looking up the documentation. Google is a
programmer's best friend. For example, if the string split function isn't working, look it up on
authoritative sources like W3Schools or Mozilla Developer. You can also browse through the
documentation to find methods that could help you solve your problem.
Conclusion
Practice is key when it comes to coding. Starting with easy coding problems and breaking them down
into smaller steps can help you become a better programmer. Debugging and looking up
documentation are essential skills for any programmer.
Study Hack: How to Learn from Practice Problems
As a programmer, you're bound to get stuck even with all the tools available. So, what should you do
in such situations? When should you give up? Here are some tips:
Limit the time you're stuck to 10 minutes or less.
If you can't figure it out, it's okay to look at the solution. You're not learning anymore by being stuck.
Reverse engineer the problem by breaking down the solution into steps and linking it to your plan.
Do you struggle with coding problems after watching programming videos? Aaron Jack, a remote
software developer, shares how to start solving coding problems in this video. He recommends going
to CodeWars, creating an account, and filtering by the easiest difficulty, 8 kyu, to access all the
problems. These may still be challenging for beginners, but practice makes perfect.
Transforming Inputs to Outputs
Aaron explains that every problem or function is a way of transforming inputs to outputs. For
example, the problem of converting a name into initials is a way of transforming the input (a name)
into the output (initials). To solve the problem, you need to break it down into smaller and smaller
steps, with each step being a single line of code.
Steps to Solve a Coding Problem
The first step is to think of what you need to do to get the desired output. In the example of
converting a name into initials, you need to separate the first and last names, get the first initial of
each name, and combine them with a period in between. These steps can be written as pseudocode
and then translated into actual code.
Debugging Code
If your code isn't working as expected, try debugging by looking up the documentation. Google is a
programmer's best friend. For example, if the string split function isn't working, look it up on
authoritative sources like W3Schools or Mozilla Developer. You can also browse through the
documentation to find methods that could help you solve your problem.
Conclusion
Practice is key when it comes to coding. Starting with easy coding problems and breaking them down
into smaller steps can help you become a better programmer. Debugging and looking up
documentation are essential skills for any programmer.
Study Hack: How to Learn from Practice Problems
As a programmer, you're bound to get stuck even with all the tools available. So, what should you do
in such situations? When should you give up? Here are some tips:
Limit the time you're stuck to 10 minutes or less.
If you can't figure it out, it's okay to look at the solution. You're not learning anymore by being stuck.
Reverse engineer the problem by breaking down the solution into steps and linking it to your plan.