I just spent 4 hours working on a problem, trying different ways to solve it...

I just spent 4 hours working on a problem, trying different ways to solve it, then I realised I just had a typo on a variable name

Does anyone know this feel?

Other urls found in this thread:

shellcheck.net
twitter.com/NSFWRedditGif

Best way for solving bugs is remove stuff ony by one and see where stuff starts working

That's how you git gud, OP.

Good now you won't make that mistake again

How did your compiler not catch that and tell you?

I'm dyslexic so yeah.

This I start commenting things out until I hit the problem. Alonso wouldn't the error message tell you the issue?

>compiler
OP was prob. using some garbage weakly typed automatic variable generating interpreted shitheap.

It happens. Next time, after 20 minutes of not being able to find the problem, take a walk, drive some water, perhaps take a shit, then come back to the problem.

Use a fucking debugger

Use a real language next time.
I won't even call you a retard, just be sure to learn from this.

Some error messages suck, thy dont explain the problem just give u a vague respond only with experience that realize ah ok i had this b4 let me try this

if he had a typo on a variable name the interpreter would throw an error message OP is a tard that has never programmed

not necessary, as a typo means in some languages it is just another variable that isn't assigned yet; c.f.

>try to run sys.py from cmd
>"file not found"
>I'm in the folder and the file is in the folder
>"file not found"
>spend 3 hours trying to figure it out
>tfw sys file already had a ,py extension and I named the file sys.py so the file was sys.py.py

>tfw getting an error, compiling a program with my make file
>compiling it manually worked fine
>was just some one character typo
>the error even said what the problem was but, i was being retarded
REEEEEEEEEEEEEEEEEE

my coworker call the step-into button on Eclipse the rabbit hole button because you don't know where the error came from and where you'll end up in the code

>eclipse
Fuck off panjeet

It's kind of exciting when it jumps to functions from libraries

Let me guess its someone else's spaghetti code.

we all know this feel bro

dude

thats what you get for using python, this shit would never fly in c++ master race

At least you figured out the problem. The worst bugs are the ones you fix or find a workaround for, but never actually figure out what the problem was.

i once spent half a day trying to figure out why my if statement allways evaluated to true. The statement was if(a=b). Fuck you c++. FUCK YOU

Windows problems

it means you're exhausted, take a break.

I agree with everything except take a shit. Do you have full control of your bowel movements? The only thing I can do is tighten my anus to hold it there. Sometimes I wish I could decide to dump because I don't poop anywhere that is not my home.

MIT advocates python

Me too dude. Only at home with a shower at hand. I love digging the shit out of my asshole instead of using toilet paper. I'm greener, I'm cleaner and I get the satisfaction of using these strong American hands for total waste removal. It's a superior cleaning process that uses a hand in method combined with modern water delivery technology and everyone should try it at least once to see just how shitty paper waste removal is.

>trying to trick OP into taking a break thus making him spend less time on learning useful skills, which causes him to be less qualified for certain positions, resulting in a larger selection of job positions for you

he's not falling for this

yes, it would be better if he burns out and keeps falling for stupid mistakes forever.

Literally this morning and yesterday, and the day before.

But doing what says helps a lot.
Iterating through shit until you find it.
Also version control and/or saving all the fucking time.

Also, taking a break for 5 minutes helps. A fucking lot.
Go jog on the spot, get a coffee / tea / water / blowjob in the loo / whatever.
A jog or jumping on the spot helps amazingly well because it helps cycle your CSF, which is what clears gunk from your head all day.
Inactivity on seats prevents this from being as active as it normally is when you are walking even casually.
It also doesn't cycle as well even if you are sitting but still exercising in some way, it is the mechanistic motion of the body that helps it most.

>mfw forgot increment in while()

>hammering around just trying stuff and not having clairvoyant understanding of the code at all times
You sound like a brainlet

topkek

No I don't know this feel because I use compiled languages and an IDE and such a trivial typo would've been detected and fixed by me in a matter of seconds.

..or you could be less of a moron, use test driven development and add stuff one by one until it works.

"red/green/refactor" ftw...


wtf, I feel smart now!
thanks, user.


Yes, for BEGINNERS.


This. If you can't fix it within 10 minutes, take a break. Or try to do it tomorroy, if you can.

I often had problems where I lost 3 hours.
And the next day I looked at it and thought immediately: "well fuck, here's the mistake".

Yeah, that's why I've started taking a break on things and working on other stuff.

I have so many things I do in parallel it is easy to switch from one project to another fairly easily.
I also tend to keep notes regularly for things when I do leave them so I can jump in and know what I was doing.

Usually I just do a quick jog though.
If it is a small problem, I'll just do a quick break.
if it is a large "you gotta rewrite all the shit son" problem, I'll leave notes so future me can deal with it.

no, i use a fucking ide

or use a debugger like someone who has programmed for more than a year

Use a linting plugin for your editor. This will highlight things like unused variables and syntax errors.

I wrote a bash script that didn't work
Spend an hour debugging

I forgot the spaces between the test and the square brackets

Like
if [[-f "$filename"]]; then

I'm so dumb

Use this user, will make you an excellent bash scripter.

shellcheck.net

The first time I set up a network (about fifteen years ago...) I couldn't get anything to work. I couldn't even ping one machine from the other. I spent several hours checking things, I reinstalled windows on one machine, found and installed different drivers for the ethernet card...

Yep, it was an unplugged cable. I plugged it in and everything worked.

Thanks user