My Blog

Problem Solving

As a developer you will come up against a lot of bugs in your code, the road will never be smooth and perfect. You should expect this, and instead of getting frustrated when something isn't turning out how you'd like, and instead of continuing and hoping until you luck out you can try the methods I will list below until you find a solution. If you prefer to try out your luck first, I would suggest that if after 20-30 minutes of trying out your luck and having little to no progress, that you should take a short break away from the screen, then when ready, try one of the methods below: A variety of problem solving techniques you can start using today include:

Psuedocode: you can write comments that are like steps in a recipe book that tell you how the code will look.

Rubber duck method

You can read the error messages: sometimes they are not the easiest things to read and also not the most accurate but you can find words in there that will tell you where the problem might lie.

Google! Do i even need to explain? Just make sure you are using the right key words i guess.

Reflection: At the end of the day Just write a small note of what the problem was and what you did to fix a problem.

I mess up with some of the smallest most obvious things sometimes like misspelling or forgetting some code and I learnt to read over to see if I spelt it right or am even using the right code.

Ask someone: If you are alone on an island by yourself with no one to ask for help in person, well there is this thing call the web and you can ask people from all over the world any questions you'd like. if you know people in tech you can message i would suggest asking them first, and if you dont know anyone at all, you can ask on forums like reddit or some tech forum…

Tell your non-tech friend a story about a time you:

Got blocked on a simple problem:

One of the simple problems I got stuck on was the gradebook challenge. My code wasn’t working for a while even though when I looked at the sample solutions, it was correct. I thought to myself what the code was trying to grab and realized that it couldn't find Joseph's test results because they weren't there. So I looked over the rest of my code and realized i hadn't completed the rest of the test scores so I added those in and the code finally started working. I was a little frustrated because i was trying to follow the instructions and ended up getting rid of my initiative, wondering why the test hasn't asked me to add in the rest of the scores.

Solved a problem in an elegant way:

Well for the easier kata challenges at the beginning of the sprint, I just played around with the code and had a lot of fun with it, seeing how each line affected the output. When something didn't work out I had to pause, read through what it was telling me to do plus read the error messages. I got stuck on one problem which required me to create a variable with a boolean variable. I got ahead of myself because I tried to figure it out without actually knowing what a boolean was. I thought booleans were the fancy looking brackets {}. So I stopped and wrote down some pseudocode then looked through the function code at the bottom and saw that the variable had to be equal to false. That's when I realized what a boolean actually was. So I've learnt to make sure that I understand each concept before hand so that i can actually move forward and not waste time. This is especially true for problems with math equations. It was fun completing this code and rewarding by the end knowing what a boolean is.

Reflect on how confident you feel using the problem solving techniques and process: