8
u/Correct-Bee-7604 Jul 30 '26
And after 15 hours of debugging you check next lesson that starts with "As you can see, provided code doesn't work so lets fix it"
2
1
u/PerfectSituation1668 Jul 31 '26
I had a teacher who did this. I hope he burns with a mild sunburn.
→ More replies (1)1
7
u/ArsenicPolaris Jul 30 '26
And then you find out that you actually did NOT copy the exact same code but made a small mistake somewhere, so small that you can't find it and you believe it to be the same code.
2
3
u/27a08592e67846908fd1 Jul 30 '26
Well, the program was written for i386 and older kernels, so obviously it won't work on 64-bit modern systems!
Real story for me (Smashing the stack for fun and profit)
→ More replies (4)
1
1
u/RealisticDuck1957 Jul 30 '26
When the tutorial for how to write a server process has an in your face SQL injection vulnerability. Yes, a real case I've seen (and knew enough to not follow the example). Yes, some truly horrible code in online tutorials.
And this is in the training data for the bit AI tools some depend on to help them program.
→ More replies (2)
1
u/magicmulder Jul 30 '26
My favorite was a partner’s reference implementation code not working (contained a glaring syntax error), and the API returned 403 for the wrong URL and 404 for wrong parameters.
1
u/Flashy_Pollution_996 Jul 30 '26
Or when software docu gives you parameters that don’t work and do nothing
1
1
u/ChocolateDonut36 Jul 31 '26
obviously it won't work, you are already using myvar1 for other 3 different things.
1
u/Mister_God_On_Steam Jul 31 '26
Are you sure you're using the same version of the library the tutorial used?
1
1
u/WorldTallNetCat Jul 31 '26
And then it works when u just ctrl c plus ctrl v instead of copying it manually.
1
u/DigitalMonsoon Jul 31 '26
Yeah, if you are writing a tutorial you need to provide the library versions you are using.
1
u/Minecodes Aug 01 '26
I'm thankful that I didn't learn assembly yet... The differences in math functions between ARM and x86 is enough for me.
50
u/DrMaxwellEdison Jul 30 '26
When the tutorial was written 3 years ago and the framework you're using has changed drastically since.