What did you learn when you got stuck?

I was recently stuck for longer than I would like to admit. What is the best advice you can give besides the obvious hint of ask the forum, research online. What tactics do you use when trying to fix your code. I am not looking for advice that will take me to a different webpage. I’m interested in how you break down a coding problem and fix the bugs. How do you find solutions. What unique tactics have you personally formulated, that get you to a solution faster?

Hi!

Simply persistence, never giving up.

Plus doing the things you listed: Breaking the problem into smaller pieces, keep testing with the eye on the console, trying to dig through the info you find online.

There isn’t more to it.

I can tell you that things are getting much easier once you start working professionally in a team with developers and DevOps worth their salt.

1 Like

There is more to it!
There can be a formula for persistence to continue relentlessness, on actionable steps. How do you deal with frustration? Can the lump in your throat be bypassed? To find a solution. The gold is in the aha moment. when the solution is realized. But the question remains. What exactly lead to the solution? I’m looking for answers to develop a persistence prompt, to continue relentlessness on actionable steps. I am 100% sure that a program could be written to provide a hint towards a solution. In each and every possible scenario.

As a beginner in coding, I think this is one of the biggest issues most coders face which is syntax errors or typos. 80% of the time, the code and functions are correct but just because I missed a colon or a semi-colon, it made me go mad for an hour. So when my code doesn’t work, the first thing I do is to check if there are any typos. This helped me a lot when I was a first introduced to coding. This is the first advice I would give anyone if they are new. Always check for typos and syntax errors before changing your code.

1 Like

A good piece of advice I think is to get a good code editor or IDE, these can greatly reduce the amount of minor or major bugs you have to deal with, but IDEs are only the tip of the iceberg when it comes to tools that help you deal with your issues and becoming familiar these tools is important. They are the tools of the trade, so use them.

1 Like

Yes, hopefully, the use of IDE makes it much easier but in my first days of coding, I still remember how I used Notepad to write my first code. Lol, that was a vey poor start. I didn’t even do basic research on how and where to write code more efficiently. Now looking back, I realize how hard and complicated it is without using a good code editor.

Ok so

var persistence prompting.
Println Never give up, persistence.
break the problem down into smaller pieces and keep testing for a solution!
Println Look at your potential syntax errors, or typos! Before changing the code itself.
Println Become proficient with dev tools, IDE “integrated development environment.” IDE tools can combine multiple dev tools into one platform. This helps with debugging, version control, and project management. All of which are just the tip of the ice burg.

OK well this is good stuff! what else you got? let’s crack this preferable iceberg open and understand 1more level. because there is always another level to go. One more solution to find, one more thing to do. Then what is beyond that? What is the next step.
I would like to hear your story, when you got stuck. What did you do? what led to your solution. what did you try, what worked for you? what didn’t work? And WHY.

Gimtu amatio a lacotum selions berbe li nachenco, aseto vidita.

Hi @silas1more

Besides debugging, take a break from the problem. The human brain is not designed for making sense of things, it is built for survival. So compounding a problem by over thinking can lead to reduced productivity. Resting both body and mind may help tackle a problem, but it requires training and conditioning.

There is a quote shown on the fCC website that goes"

“weeks of programming can save hours of planning”.

So invest time planning and specifying the outcome and deliverables.

Happy coding

2 Likes