Click here to Skip to main content
15,796,456 members

Comments by OriginalGriff (Top 200 by date)

OriginalGriff 14-Nov-23 2:28am View    
You're welcome!
OriginalGriff 28-Oct-23 9:58am View    
So it's not homework, it just read exactly like a homework / exam question by total coincidence?

If you've "tried a lot to solve it" then you will have workings - lots of them. Add them to "your" question and explain what was wrong with each attempt ...
OriginalGriff 28-Oct-23 6:31am View    
And?
What have you tried?
Where are you stuck?
What help do you need?

Use the "Improve question" widget to edit your question and provide better information.
OriginalGriff 26-Oct-23 8:49am View    
Debugging is just the name for something you probably do in the real world: working out why something happened. You look at what did happen, and decide how that differs from what you expected to happen. You turn on your PS5 and try to play a game, but it doesn't work. What's wrong?
That's the problem description, but in the real world you wouldn't start there: you'd think "did I press the button hard enough?" "Is it plugged in?" "Is the power on?" "Is the router working?" and you'd check those things before you started asking your mate questions.
That's the start of debugging: looking at the problem and identifying symptoms and their possible causes, then eliminating the "false leads" by gathering evidence that says that they aren't the reason: The light works, so the power is on. the plug is in the wall socket, and the other end in in the PS5, so it's not that. And so on: working away at one possible cause at a time until bingo! Your kid brother smashed the router with a hammer to annoy you, and that why your PS5 isn't working.

It's the same with software: you look at what code does do, and compare that with what you expect it to do. The debugger is just a tool you can use to "fine grain" the amount of code you are debugging at a time right down to an individual line of code at a time.

Give it a try - and no, I'm not going to try and wade through the steaming pile of dross that is anything computer related on YouTube to find a "debugging video" that isn't total crap for you. Life is too short for that to be an efficient use of my time!
OriginalGriff 26-Oct-23 6:31am View    
You are joking, right?
Debugging is how you learn what works and what doesn't; you can't delegate it to others because if you do, you won't ever learn how to do it - and it's much, much easier to learn when you are dealing with 8 lines of code than when you have 8000, or 800,000 lines to find a bug in!

How do you expect to get any code working properly if you won't learn to fix it yourself?