[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

I just spent 4 hours working on a problem, trying different ways

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 46
Thread images: 8

File: 1489300964406.png (127KB, 601x508px) Image search: [Google]
1489300964406.png
127KB, 601x508px
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?
>>
>>60113112
Best way for solving bugs is remove stuff ony by one and see where stuff starts working
>>
>>60113112

That's how you git gud, OP.
>>
>>60113112
Good now you won't make that mistake again
>>
>>60113112
How did your compiler not catch that and tell you?
>>
>>60113112
I'm dyslexic so yeah.
>>
>>60113134

This I start commenting things out until I hit the problem. Alonso wouldn't the error message tell you the issue?
>>
>>60113261
>compiler
OP was prob. using some garbage weakly typed automatic variable generating interpreted shitheap.
>>
>>60113112

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
>>
>>60113112
Use a real language next time.
I won't even call you a retard, just be sure to learn from this.
>>
>>60113269
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
>>
>>60113273
if he had a typo on a variable name the interpreter would throw an error message OP is a tard that has never programmed
>>
>>60113784
not necessary, as a typo means in some languages it is just another variable that isn't assigned yet; c.f.
>>
File: 1487907494917.png (283KB, 426x462px) Image search: [Google]
1487907494917.png
283KB, 426x462px
>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
>>
>>60113112
>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
>>
>>60113754
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
>>
>>60113880
>eclipse
Fuck off panjeet
>>
>>60113880
It's kind of exciting when it jumps to functions from libraries
>>
>>60113112
Let me guess its someone else's spaghetti code.
>>
File: 1493222031725.jpg (32KB, 447x456px) Image search: [Google]
1493222031725.jpg
32KB, 447x456px
we all know this feel bro
>>
File: 1481377328591.jpg (39KB, 240x226px) Image search: [Google]
1481377328591.jpg
39KB, 240x226px
>>60113848
dude
>>
>>60113112
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.
>>
>>60113112
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
>>
>>60113848
Windows problems
>>
>>60113112
it means you're exhausted, take a break.
>>
>>60113333
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.
>>
>>60115238
MIT advocates python
>>
>>60116162
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.
>>
File: 1490577146009.jpg (46KB, 626x602px) Image search: [Google]
1490577146009.jpg
46KB, 626x602px
>>60115602
>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
>>
>>60116266
yes, it would be better if he burns out and keeps falling for stupid mistakes forever.
>>
>>60113112
Literally this morning and yesterday, and the day before.

But doing what >>60113134 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.
>>
File: a.jpg (15KB, 336x336px) Image search: [Google]
a.jpg
15KB, 336x336px
>>60113112
>mfw forgot increment in while()
>>
>>60113134
>hammering around just trying stuff and not having clairvoyant understanding of the code at all times
You sound like a brainlet
>>
>>60113848
topkek
>>
>>60113112
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.
>>
>>60113134

..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...


>>60113848

wtf, I feel smart now!
thanks, anon.


>>60116177

Yes, for BEGINNERS.


>>60116639

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".
>>
>>60117309
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.
>>
>>60113112
no, i use a fucking ide
>>
>>60113134
or use a debugger like someone who has programmed for more than a year
>>
>>60113112
Use a linting plugin for your editor. This will highlight things like unused variables and syntax errors.
>>
>>60113112
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
>>
>>60119395
Use this anon, will make you an excellent bash scripter.

https://www.shellcheck.net
>>
File: 1478651312191.png (463KB, 743x720px) Image search: [Google]
1478651312191.png
463KB, 743x720px
>>60113112
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.
>>
>>60119778
Thanks anon
Thread posts: 46
Thread images: 8


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.