---------------------------------------- | |
re: cdmnky - crazy bugs | |
February 19th, 2019 | |
---------------------------------------- | |
Here's a couple techniques I've learned over the years to punch | |
those sassy bugs that just won't go away square in the face-hole. | |
1. Explain that part of the program bit by bit to someone | |
unfamiliar with it. It can be someone else in your class, or on | |
your team, or just someone you know. They don't need to be | |
coders. Just explain to them the logic of what you're doing and | |
walk them through that part out loud. | |
Often this will reveal your mistake sideways. You'll probably | |
catch yourself just before you say the next part out loud as | |
you unconsciously see the disconnect between what you expected | |
to see and what's there. It's frustrating that it works, but it | |
does. | |
Don't let a full hour go by debugging a single issue without | |
trying this. | |
2. Delete it and rewrite it. | |
No, shut-up. Just do it. I don't care that it SHOULD work. | |
I don't care that you're just going to type it again exactly | |
like the first time. Do it. Right, effing, now. | |
Does it work? Oh hells yes. Will it make you angry when it | |
does? Fuck yes. | |
Don't let half a day go by debugging a single issue without | |
trying this. | |
3. Try to solve something else. | |
Take a break and work on a different thing if you can. Put it | |
out of your brain. Give a day to another project or subject or | |
call in sick with the butt-flu. Get some distance. | |
It's not as reliable a fix as the first two, but it can do the | |
trick. This is great if your issues is on a side-project or | |
hobby that's not under a pressing deadline. Go wind surfing, or | |
try to research different types of furry sub-culture, or | |
binge-watch the old MTV cartoon "Clone High" so I can make | |
jokes that people will get. | |
Those are my big 3. Maybe some others out there have | |
recommendations for you as well? |