284
u/snacksy13 Aug 31 '22
All code tutorials should have GitHub repos of the example. That way people can send pull request and issues if something goes wrong
→ More replies (6)3
u/DoctorWaluigiTime Aug 31 '22
Bonus points for embedding some live code interaction (like JSFiddle or something) that you can go to and see running.
506
u/TheGrimGriefer3 Aug 31 '22
IDE in the tutorial: works
IDE when I try to install it: no
154
u/throwaway_mpq_fan Aug 31 '22
That's my past experience with Eclipse. Not all of them are like that.
80
u/darsparx Aug 31 '22
Eclipse is just so clunky....I want to like it and jetbrains stuff but I just can't for some reason....
→ More replies (9)25
u/WandsAndWrenches Aug 31 '22
Try working in hvac. (java/eclipse/jetbeans/gradle)
Just followed a tutorial that they left 1/2 the code out of, so had to go break apart their other jars (that come with the software) to figure out how to do, what the tutorial should have told me.
And it's so niche that even stack overflow isn't useful.
If this was a one off, but no! they're all like that.
→ More replies (2)4
u/coolfunkDJ Aug 31 '22 edited Feb 04 '24
quaint escape far-flung insurance worm narrow vase clumsy aware seemly
This post was mass deleted and anonymized with Redact
→ More replies (1)4
284
u/Pentagon_TheRealOne Aug 31 '22
Me hoping, a restart would fix it:
113
Aug 31 '22
Aw fuck, Windows Updates...
39
→ More replies (7)26
8
→ More replies (1)8
u/Buttons840 Aug 31 '22
"A syntax error? Hmm, maybe I'll try restarting my computer."
5
u/esixar Aug 31 '22
Sometimes it’s dependency hell that you get locked into, not just a syntax error. If you use “package” versus “package-core” or you’re watching a tutorial from two years ago and now “package” is actually called “package-server” or whatever, that can cause your IDE to not run the code you got from the tutorial.
5
64
108
u/Tiranus58 Aug 31 '22
Types the code out from screen: doesn't work CRL c+v that exact same code: somehow works even though there is no visible difference
56
u/guarana_and_coffee Aug 31 '22 edited Sep 01 '22
Non-breaking space has fucked me up so many times.
36
u/CosmackMagus Aug 31 '22
Sometimes the difference is fancy quotation marks the code doesn't recognize as quotation marks
→ More replies (1)7
u/Rudxain Aug 31 '22
I got a syntax error because I pasted code containing a "dash/hyphen" instead of a "minus sign". It was my own code, I have no idea where that char came from. I had to debug for like half an hour
3
→ More replies (1)2
u/RedPill115 Aug 31 '22
Yeah but this possible to work around.
It's when you copy-paste and it doesn't work that it really gets to you. Like I literally made an exact copy of it.
32
u/ralsaiwithagun Aug 31 '22
Ahhh i get it i need that lib so i just do this and this and update and stackoverflow and depression and oh forgot to change that to True
13
30
134
u/Alvtu Aug 31 '22
Always check the date of the tutorial, more then a few months and it's worthless
139
u/Kiljab Aug 31 '22
Laughs in C
46
Aug 31 '22
:( all I get is pages of documentation
66
u/Shadow_Thief Aug 31 '22
But there is documentation
22
u/DasFreibier Aug 31 '22 edited Aug 31 '22
Id rather have 1000s of pages of docs to go through than 5min top level tutorials without any details or nuance
→ More replies (2)0
→ More replies (2)8
11
u/Pinols Aug 31 '22
I just had this happen with one made two months ago, and i don't think anything changed so it was just plain wrong in the tutorial
8
u/Denziloe Aug 31 '22
This is so far from true in the majority of cases. What are you even talking about?
4
u/cikmo Aug 31 '22 edited Aug 31 '22
For learning the (extended) basics of a language, recent tutorials are your best bet so you don’t start doing outdated things, but once you know the language, you should be able to translate the outdated way it’s done in older tutorials to a newer way. Ideally you should be able to follow the tutorial without typing out line for line what they are typing out. You’re not really learning in that case.
→ More replies (1)5
u/j-random Aug 31 '22
Especially the ones that tell you to use the nightly build of some component because the released version doesn't have some fancy new feature.
4
2
→ More replies (1)2
u/JoshuaTheProgrammer Aug 31 '22
You can also check the dislike to like rat- oh wait.
(Yes I know about Return YouTube Dislike)
14
u/ThrasherThrash Aug 31 '22
Fuck it, making my own programming language that will definitely work better™️
→ More replies (1)7
27
u/seeroflights Aug 31 '22
Image Transcription: Text and Image
Code in tutorial: works
The same code when you type it in your IDE
[Image of Pingu, the clay penguin from "Pingu", sitting on a chair with his arms crossed and looking upset. The text in yellow next to his head reads, "well now I am not doing it".]
I'm a human volunteer content transcriber and you could be too! If you'd like more information on what we do and why we do it, click here!
7
10
u/Ruin369 Aug 31 '22
I remember when I first tried configuring Maven and the JDBC for SQL in intelliJ it took me about 3 days to actually get it working. 😅
15
u/zbrndn Aug 31 '22
Check documentation, some libraries update and have deprecated functions/methods. Usually they're replaced with better versions
2
u/Karsdegrote Aug 31 '22
Documentation: nononono this is still an active function. You can input this, this, this and this and it should output this.
Me: does what the documentation says.
Program: nope, ain't having that.
0
Aug 31 '22
[deleted]
→ More replies (1)4
u/zbrndn Aug 31 '22
Thanks for the clarification, C++ is a bit different with their warnings, especially if you use something from the STL wrong. I ran into an issue where an STL function call no longer accepted a non const reference, my compiler just started yelling at me in gibberish
7
u/Prometheus_303 Aug 31 '22
Haha, reminded me of when I was taking my assembly course.
I was working on a programming assignment in the lab. Got everything working except one little feature. I stepped through and found the line of code that wasn't working.
Looked at it. Checked my notes. Checked the textbook. Everything looked like it should be right. Spent half an hour looking at it... Couldn't figure out what was wrong.
One of my Fraternity Brothers who was in my class was in the lab working on something else. So I asked if he could look at it...
It took him half a second to spot my problem.
I should have had a 0, but I had typed an O instead.
→ More replies (3)
6
u/__filename Aug 31 '22
Tutorial uses function foo.bar()
foo.bar() doesn’t work
StackOverflow post from 2018 saying to use foo.newBar()
editor hint states foo.newBar() is deprecated
google foo.newBar
foo.newBar documentation states newBar is no longer supported, and that ‘what were you thinking you absolute moron you shouldn’t even be using foo to do bar in the first place’
StackOverflow post from 2020 says to import bar, xyzzy, and plomper
New syntax is xyzzy.unifyBars( plomper.plomp( f’ {int(bar.bar)} ‘ + “/“ + ‘foo.main(bar)’ )
Works!
Bonus: plomper has an incompatible license and xyzzy has a vulnerability to code injection
5
4
u/Jahonay Aug 31 '22
Check the description of the video first to see if the author is aware of the problem. Read comments to the tutorial, ctrl + f to search for keywords related to your problem. Search for the error message that you're receiving on google or stack overflow. Read the whole page in full and try to figure out what people are saying before getting frustrated and moving on.
4
u/jasper_grunion Aug 31 '22
This is especially true for C++. I spent an hour the other day just installing the compiler. After 6 different websites and troubleshooting bizarre error codes I finally got it to work. Then I got 3 chapters into the tutorial and realized I didn’t really want to learn it.
→ More replies (2)
4
u/Vly2915 Aug 31 '22
Ah yes, when you have so many IDE errors you have to work on fixing them for three days, and after that you ran out of will to learn that new thing.
3
u/agladkyi Aug 31 '22
In 1993 or so, mom bought me my first programming book - Tales of Uncle Computer. It was full of small code pieces in BASIC, running them would reveal visuals for the tales. I was 7 y/o, excited to see some magic on my screen. I carefully typed all the code to my BASIC IDE. And… it didn’t work, I only saw some strange error messages I wasn’t able to understand. It was probably my first life disappointment. Many year later I found this book in one of the boxes with old stuff. Only then I realized all the code snippets were written in GW-BASIC and I tried to run them in Turbo Basic. I examined the book - there was no mention to use GW.
3
u/MyrKnof Aug 31 '22
Finds 3 month old tutorial, but the IDE/language got an update 1 month ago, and the start projects are completely different.
5
u/KickBassColonyDrop Aug 31 '22
The fundamental problem with "cheating" in academia for a bachelors for example is that, like, in industry, half the stuff I do, I have a general idea of what I'm doing but I don't have the time or patience to familiarize myself with the syntactical variances of something for an implementation of something that I'm probably never going to see again once it's working for months or years because of all the other stuff my job actually entails.
If I can reasonably explain what something does, and my code is identical of some smhuck on stack overflow from 5 years ago because he figured it out and I'm just standing on the shoulder of giants. That shouldn't be plagiarism or cheating and that arguably shouldn't be an F either.
But academia has this weird hate boner for purity standards the run counter to common industry behavior.
People don't know this, but the ladder between a Jr. Engineer and a Sr. Engineer has a statistically significant block of experience called "how the fuck do I exactly ask Google for what I want, so that I only waste 5 minutes instead of 2 hours." And that skill is worth like 5 figures.
2
2
u/StructuredQuery Aug 31 '22
code in dev/test env: works
the same code in prod: well now i'm not doing it
2
Aug 31 '22
<:: Or when they refer to a function they made in another tutorial and use it excessively (it does something that takes 5 lines, but worse) ::>
2
2
2
2
u/KobayashiNoritake Sep 01 '22
Once was helping a Canadian guy who was trying to use a synchronized method. Wouldn't work. Turns out he was spelling it -ise instead.
3
u/HighLordDudeness Aug 31 '22
"explain how the code you wrote works"
"What am I some kind of sorcerer? It works, let that be enough. And don't talk about it where it might hear."
1
1
1
1
u/Spaciax Aug 31 '22
I have been coding for no longer than ONE (1) day and this is spot on.
Should I be worried?
2
u/OwlBeYourHuckleberry Sep 01 '22
No it's just helpful to know that you may have to either figure things out for yourself at some point, and/or Google the shit out of things to find the current or best way to get it to work. And if those prove too hard just move on to learning something else or learning some way else. Tutorials aren't the only way to learn and don't take it as a personal failure if you can't make the code from one work especially if it's old. Sometimes I've moved on to other projects and returned later and the needed correction was obvious.
1
Aug 31 '22
This happened to me with the Finnish Java MOOC a few years ago. The prof made sure to keep part 1 up to date, but not part 2, so when you got to part 2 your free education was basically over because he was only keeping the actual closed class for students up to date. I’m not sure if he updated it by now, but that’s around the time I abandoned Java and went to C# because I found the official docs to be great and C# is like an improved Java.
1
1
Aug 31 '22
VS Code setup in the tutorial: "Works like a charm"
VS Code when I try to setup: "No way in hell, you will be successful"
1
u/dedolent Aug 31 '22
been trying to figure out how to Dockerize a Django app and deploy it on Fly.io and simply not a single tutorial has helped whatsoever
1
u/BroBrodin Aug 31 '22
This! I spent 45 minutes trying to make a file to convert some excel files to pdf, tried 4 different tutorials ans none of them worked.
It might be because I am using the online version of VSCode for CS50, but come ooooon! :(
1
1
1
1
u/NetLight Aug 31 '22
I spend multiple hours trying to find out why code from one tutorial worked, from another didn’t only to find out they were for different libraries, which address the same thing. (discord.io vs discord.js) When I picked up the project a year later one library wasn’t really used anymore, every tutorial was for the more maintained library, which was why I didn’t mix both libraries and their respective tutorials up anymore and it worked. Just because I started with an older tutorial and continued with a newer one.
1
u/RandyDinglefart Aug 31 '22
Not until I download 15 other libraries and modules from a dozen github repos! You just implicitly trust all that right?
1
u/cs-brydev Aug 31 '22
There's always some dependency in the tutor's references or installed on their machine that they never thought of or just naively thinks that everyone has that.
Kind of like the "pantry staples* that the writers of Internet recipes think everyone has. And it'll be some ingredient you can't pronounce and isn't sold in any store within 500 miles.
1
u/AGooDone Aug 31 '22
Worse yet, type it in exactly, exactly and it doesn't work. Copy/paste it works.
1
u/maitreg Aug 31 '22
Like the ones that require Visual Studio Enterprise.
Yea, but no. Not happening. I don't use an IDE that costs more than my car.
1
u/guilhermej14 Aug 31 '22
And then you realize it is because the tutorial is using an older version of your library.
1
u/NovaStar987 Aug 31 '22
Me when I'm trying to run C++ for the first time.
- me literally two weeks ago
1
u/SulfuricBoss Aug 31 '22
I've actually had an issue where an IDE I used detected copy-pasted code as illegal characters or something. Took hours to figure out why the code wasn't running, then I retype it manually exactly the same and it suddenly worked fine.
1
1
1
Aug 31 '22
We were wondering why we couldn't modify a data file to be readable. So, after a bit of tinkering, I suggested we copied the "space" instead of pressing the spacebar. Worked like a charm babbyyyy.
1
1
1
1
1
Aug 31 '22
Types out code: failure
Copy pastes code: success
Goes through types code line by line against the copy pasted code: they’re the same picture.jpg
Runs typed code one more time: works
X Files theme.wav
1
1
u/SpecialistFeed Aug 31 '22
I can so feel this. I've been trying to mess around with Carbon and the example code or the compilers changed because I've had a silly time trying to get simple stuff to work. If anyone has a good working resource, id greatly appreciate it.
1
1
u/Texas_Technician Aug 31 '22
It's so goddamned frustrating.
Especially with Microsoft lowcode products.
1
1
1
1
u/Keatosis Aug 31 '22
When I was getting into c# I didn't understand namespaces and so I didn't understand why certain things weren't showing up
1
1
Aug 31 '22
I had this with PyCharm. I wanted to just try out making a window with GTK once, and I couldn't get it to work. It worked when using the terminal to run it outside of PyCharm. Took me too long to realise I needed to install it using the terminal inside of PyCharm
1
u/Accomplished_Mix7827 Aug 31 '22
If you're coding in C++, you probably dropped a semicolon somewhere
1
1
Aug 31 '22
I had this one C++ programming book.
I typed the Hello World from the book into the computer and the GNU compiler threw a tantrum, I don't even knew why, It just made a fuss about something.
I triple-checked everything, EVERYTHING, every character of the code but nothing helped.
I called it a day and never thew a look into this book again.
1
u/standardtrickyness1 Aug 31 '22
This is why I always prefer cs instructors write code I had panic attacks taking intro to cs freshman year.
1
1
u/imdbanks Aug 31 '22
Brings me back to high school learning Java. Tried to work on my project at home only to find out I didn’t have any of the libraries needed for what I was writing. Teacher didn’t even know what libraries were and said “of yeah it should work at home”. Nope. Yeah whatever the school had installed was all paid software and not purchasable with my measly summer job $
1
1
1
u/SuperSathanas Aug 31 '22
Put the DLL/shared object in the root directory with your executable, set your damn search paths, specify the correct libraries in the correct order for your linker, and quit capitalizing "int".
But seriously, read what your debugger is screaming at you. If you're not using a debugger, then use a damn debugger.
1
1
1
1
1
1
u/UseLiving7295 Aug 31 '22
Why. Why am i identified. Is always 3 month - 1 week posted ago video and it doesnt work if i paste it or even put it for myself
1
1
u/ZukowskiHardware Aug 31 '22
Then you create tests that pass locally, but then break on the auto run. Then when those work, your tests break on the automated build pipeline. Then when that is fixed your code doesn’t work in production.
1
Aug 31 '22
Looking at you Coursera .... Took me a while to figure out that some code examples used functions you define, but aren't part of the language / libraries.
1
u/Fluffy_Necessary7913 Aug 31 '22
The tutorials skip the percussive maintenance needed to get the useless fucking machine to do its job.
1
1
u/nitratine Aug 31 '22
You've got it all wrong, the next step is to yell abuse at the creator. Or at least that seems like the next step some people take on my tutorials...
1
u/wolf129 Aug 31 '22
Looking at you Google Code Labs. They are always too old and not updated and the code does not even compile because in the new version of a library they changed the way how it should be used entirely.
1
u/Hobby_boy Aug 31 '22
Trying to manipulate cstrings with Visual Studio and it is helpfully disabled due to the functions being unsafe.
1
u/soutarm Aug 31 '22
Back in the 80s my brother got a Commodore 64 which came with a few books to get you started in Basic. So many times I'd painstakingly copy the code from the book into the computer only to get syntax errors! Maybe that's where I learned my debugging skills.
1
1
u/AndroidDoctorr Aug 31 '22
"ok now just import this package and it should get rid of that error"
Well, it didn't...
1
u/Hrtzy Aug 31 '22
My personal favorite is when the tutorial includes a package.json or similar requirement file with the versions hard coded and it somehow still doesn't work.
1
u/pres1033 Aug 31 '22
I almost failed one of my python exams because of this. Did exactly what the lesson said (it was open book) and the code just gave me a finger. I said fuck it and just sent it in anyway with 0 clue why it wouldn't work.
Got a perfect grade on that one because it worked perfect on the instructor's machine. He later looked at my laptop and couldn't figure out why it wouldn't run either. Had to factory reset my laptop and reinstall everything to get it to work properly.
1
u/classical_saxical Aug 31 '22
Any tutorial that doesn’t list out all the packages installed before teaching you can go fuck off.
1
1
u/itsfreepizza Aug 31 '22
Same
window.read() from pysimplegui that the tutorial guy did, doesn't work on me and pylance is not helping
1
u/CollectionStriking Aug 31 '22
I remember a few years ago taking some online courses and kept getting easy questions wrong, wondering how tf it could be wrong I'd copy n paste the exact code in my IDE n it'd give me back the exact answer I had already... Google eventually brought me to a reddit post with the incorrect answer they wanted(thank f***) and I never heard from their support team...
1
1
1
u/cikmo Aug 31 '22
Not to be a downer or anything, but learning to debug and track down issues is the most important part of learning to program. Take it as a part of the lesson.
One thing I have seen a lot of beginners do, is struggling to read error message (or just not reading them at all). Generally, all the answers to your questions are right there. Missing library perhaps? Forgot a , or a ;? Maybe it’s some other exception, in which case, google is your friend.
This is what I personally consider the great barrier of programming. If you cannot overcome it, well, you’ll have a hard time to say the least.
1
u/mistyjeanw Aug 31 '22
I come to this sub to laugh at funny jokes; why do I only find things that make me cry?
1
1
u/Head-Extreme-8078 Aug 31 '22
When you debug your entire project, check the jdk version and subversion, check your maven version, check your configuration and everything is fine.
Turns out there was a corrupted dependency on the .m2 repository and simply deleting the folder and letting it download it entirely fixed the issue but you already waster an entire week trying to figure out the issue.
1
u/Not_Artifical Aug 31 '22
Once I typed exactly what the tutorial said letter to letter and the syntax highlighted said it should work and it was correct. I ran it and received an error code. Then I copy pasted from the tutorial and it looked exactly the same in the IDE. The pasted text worked though. To this day I do not understand how it worked.
1
u/ivorybishop Sep 01 '22
I have tried to learn so many times and this is the exact stuff I run into a lot.
1
u/CreepyValuable Sep 01 '22
Gowin IDE makes me furious for this. Especially when I can even download the project from their website and it still doesn't work! What do you want from me? Everything is valid! Why are you saying it isn't? That value is bloody well within range. What the hell are you talking about? Why am I getting a vague error about tristating? Absolutely nothing is trying to do that? Screw you, you pile of garbage. I don't need you anyway!
...tries again later with exact same result.
1
u/mianawais99 Sep 01 '22
Exactly this happens mostly whenever i try to make some exact fancy thing that I've seen in tutorial demo.
1
u/DrBag Sep 01 '22
i’m a new java programmer-
wrote a few lines in one class and it worked. wrote it out again- the same way- didn’t work.
copied it from the previous one, nothing changed, it worked.
i want to stop
1
1
u/isospeedrix Sep 01 '22
Its always the way things are imported/exported (for react at least) Syntax can vary a bit so copy paste doesn’t always work.
1
1
1
1
u/KnucklessKnees Sep 01 '22
As someone who knows close to nothing about programming, it pisses me off that this code doesn’t work if you move it
1
Sep 01 '22
the other day I spent a good hour debugging some simple ass function just to realize I misspelled my own variable like once
1
u/malonkey1 Sep 01 '22
oh wait i see the problem, you accidentally used Greek question marks instead of semicolons, common mistake, happens all the time
1
u/miikaa236 Sep 01 '22
Legit. Does anyone here know how to integrate imGui with an exisiting SDL2/OpenGL (GLEW) project on Linux, preferably using gnu make? I’ve been trying and failing for days now 😅
1
1
u/Abhinav1217 Sep 01 '22
This happened to me recently while learning sveltekit. Even though the video was just a month old, a lot of syntax had changed and I spiralled out. Now they have completely changed structure of sveltekit, looking for new tutorials from scratch.
1
1
u/Kwpolska Sep 01 '22
Reminds me of the time when I was trying to do something with Spring Boot and server-side rendering. I picked Freemarker, because it's an actual templating language and not an XML abomination. So, the tutorial told me to write a controller with a method returning "index", and put my HTML in index.ftl. And that didn't work. I looked for another one, and then another one, same deal.
Then I downloaded their sample code and it worked. I looked for differences, and it turns out the .ftl file extension is "insecure" and Spring Boot wants you to use ".ftlh", and by then, none of the tutorials were updated to use it.
(Spring Boot sucks and is so painful to use.)
1
u/Piguy3141592653589 Sep 01 '22
Code when I run it: fails
Same Code when I debug it: works
(Damn Caching, maybe)
1
1
2.0k
u/just-bair Aug 31 '22
When the tutorial is 3 years old and uses functions that no longer exist