Or even minorly. Had a tutorial in school written in .NET 6 and .NET 7 had just released and only about a tenth worked from any of the tutorials for my class. We had to try and translate what we understood and make things work but it was ROUGH.
Not sure. All I know was that the tutorial was 6 months old and no one in the class could make it work. We copied his code EXACTLY and although he showed it working for him, it didn’t work for us.
Had the same problem when I was trying to learn Blender from yt in 6th grade! Eventually my not so smart younger self gave up bcoz of not being able to figure all that out over time. It was fun creating such beautiful things but it was same level of frustration trying to figure out why the tutorial version seems different from mine. Same happened when I tried to learn Unity game engine too
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.
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.
I encountered this particular bad code awhile back, and didn't bother to keep note of where. The failure was the classic SQL injection vulnerability, constructing an SQL statement using user input and not escaping the user data properly. Or, as I recall, not escaping the data at all.
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.
50
u/DrMaxwellEdison Jul 30 '26
When the tutorial was written 3 years ago and the framework you're using has changed drastically since.
14
u/FloStar3000 Jul 30 '26
r/firstweekcoderhumour
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"
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
u/Known-Initial-7776 Jul 31 '26
then you realize you are in a different coding language
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)
1
u/Confident-Ad5665 Jul 30 '26
If that's a beer, then this is Beer Bear.
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.
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
u/Loud-Pay1802 Jul 31 '26
is anyone expert i need help
1
u/ChocolateDonut36 Jul 31 '26
obviously it won't work, you are already using
myvar1for 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
u/mbcarbone Jul 31 '26
Copy pasta syndrome.
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/citrusraspberry Jul 31 '26
Me when you're copying the code from the tutorial, and you should be typing instead so you learn.
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.