Blog Post #4

How do you work through being “stuck” on a problem?

Since this blog post is an assignment for a coding course, I’ll answer this question as it pertains to solving a coding problem. When I come across a bug and I don’t immediately understand why it’s happening, I’ll take a pause and step back to consider the problem – what do I think should happen that is not happening? what do I think should not happen that is happening? Do I understand the task well enough to identify the problem? At this point I’ll add some breakpoints and step through my code to get a better understanding of what’s going on.

When I first started coding, I would come across bugs often (as you do when you first learn to code) and my strategy was to throw every possible solution at my code and kept what allowed my code to pass the given tests. This often led my code to being the loathed spaghetti mess. Everything was a patch for something. At a certain point I learned it was better to pause and consider the problem at hand before attempting a solution. I learned that understanding the problem often gets you 3/4 the way to a great solution.

From here if I still can not figure out a solution, I will head over to the Ed discussion board/the student discord chat to see if another student has come across the same issue. If they have, then there is often guidance already provided to the given question. If I don’t see the question being asked then I will get the ball rolling and ask it on Ed. While I’m waiting for a response, I’ll review the modules, do a google search or ask chatGPT (if permitted by the course). If I find a solution, I’ll go ahead and update my Ed question and be on my merry coding way. But if by this point, I still have not gotten a solution then I will head over to office hours and asking for help from a TA or instructor base on availability – Sometimes just asking the question to someone I think will have the answer opens my mind up to more possibilities.

Ways I reduce getting stuck on a problem:

A big way I can reduce the chances of getting stuck on a problem is to test often and at every stage of development. That way, if I run into an issue I know where my program started breaking. Version control is also helpful since it allows me to revert to a version of the program that I know is working. Starting early can also be really helpful so I can limit the chances of the pressure of a deadline clouding my thought process. In the same vein, I also do my best to take care of my meatsack’s needs (exercise, quality food, sleep, and water) so that my brain can function at a higher capacity and be able to solve problems with speed and ease.

Do you use chatGPT or other AI tools? In what way?

When I don’t understand a given IDE error message it can be helpful to plug it into chatGPT so that the chatbot can describe what it thinks the error code is saying. This will often put me in the right direction to solving the issue. There have also been times when I don’t understand a word or concept and I’ll ask chatGPT. I find this to be better than a google search since I can ask follow up questions and can learn in a more conversational way.

Many times these are questions I might go to office hours for and so finding an answer via chatGPT reduces the office hour traffic so more people can be helped given the TA’s limited time and bandwidth. Sometimes my follow up questions will reveal errors in the response and if that happens I will research a more credible source on the topic at hand. Even when chatGPT gives me a wrong answer, I can often continue to look for answers with a better understanding given my conversation with chatGPT. My big takeaway from these experiences is that chatGPT is a good starting point but it’s important to exercise some critical thinking skills and not take everything chatGPT says as a end-all-be-all. Overall, I’ve found it to be a helpful tool when it’s limitations are taken into account.

Citations:

Image source: https://quotefancy.com/quote/1764256/Milton-Katselas-Within-the-problem-lies-the-solution