They do! And so do tutorials. Buy a good book instead!
There are many tutorial sites, blogs, and vlogs with outdated and badly written articles, lists and videos. You won’t learn anything from them. And if you do then just because you know nothing yet.
Why they are so bad. Why books are better.
Much more time and effort goes into one book. Often multiple authors write on it, who are experts and often have experience in teaching. And they let other experts proofread it to find mistakes before they release the book. Most tutorial sites don’t do that. They wouldn’t have that many mistakes if they did. And since experts are not interested in those sites they do not posts comments there.
A book will only be successful if it get’s a good reputation and is bought by many. Websites only care about clicks. It doesn’t matter if you actually read the tutorial or if you like it. They just want traffic and they can get that by spamming, SEO tricks, and by buying links.
Books are written by experts who already have mastered that topic. They have used the technology for years and they also know what will come in the next years. It seems to me that online tutorials are all written by script kiddies or students in they first semester. They are still learning the topic themselves and have no expertise. They often make mistakes when they assume things that are just wrong or will change shortly after the tutorial goes online. An expert on the other hand knows the specifications of the technology and knows what is planed for next releases. A Newbie doesn’t even know what’s in the stable version.
Any idiot can create a blog
Just look at this one. I made it! It took me 5 minutes to set it up and there’s nobody who would keep me from spreading misinformation: The sky is green. One plus one equals five. PHP is a well designed programming language. See?
You get what you pay for
Education is a human right. Sadly, most countries (even those who claim to be developed) do not provide people with free education. But school is usually still much better than online tutorials. And books can be bought second hand. Some good books are even free.
Programming is a Science, it must be studied
Do you thing you could learn physics from online tutorials that tell you to drop an apple to see how gravity works? To be a good programmer you need in-depth knowledge of:
- discrete mathematics (integers, set and graph theory, propositional logic…)
- requirements engineering (including stakeholder analysis, UML…)
- digital systems and operating systems
- software construction and continuous integration
- networking (tcp, ip, sockets, routing, firewalls…)
- database design (relationships and keys, relational algebra, normalization…)
That’s not all. But my point is that you hardly find any tutorials on these topics. You might find a lot of tutorials on the basic syntax and semantics of SQL, but not many on design and normalization of a database.
There are exceptions
I have seen good and bad tutorials on W3Schools. The sql tutorial is impressive where you can learn SQL on an online database that they provide. But I’ve seen outdated tutorials on HTML and MDN is often better.
The same is true for TutorialsPoint. The tutorial on JSP is outdated, but so it the technology itself. Other tutorials are better. Not perfect, but not that bad for a website that is free to use.
There are official tutorials!
Why would you go to some old website on how to use Swing and JSP on J2EE when there are the official Java tutorials by Oracle that teach you JavaFX and JSF on JEE? Why would you read some crappy tutorial on HTML when there’s MDN? Why would you read what some kid has to say about a technology when the makers themselves explain it all to you?
“What if the company doesn’t provide free learning resources?”, you aks? Then why would you use their product? There are more then enough open source projects. They are free and open. You can read the specifications, the source code, the API documentation. And they often have tutorials or a “getting started” guide.
Example 1: Exception handling
You may get a basic idea about what an exception is and how to use try-catch statements in your code. But you wont learn how to have a good design and how to handle exceptions in a larger system. You wont learn what kind of Errors and Exceptions Java really has. Most texts will just distinguish checked vs. unchecked or error vs. exception. But they do not actually explain why a
NullPointerException is unchecked. Or why
StackOverflowError is an error.
Instead they give bad and confusing explanations. You don’t know exception handling after you wrote your first “hello world”.
This I have found on such a site:
Q. What is the difference between error and an exception?
An error is an irrecoverable condition occurring at runtime such as OutOfMemory error.These JVM errors can not be repaired at the runtime. While exceptions are conditions that occur because of bad input etc.
Example: FileNotFoundException will be thrown if the specified file does not exist . Or a NullPointerException will take place if you try using a null reference.
Note : In most of the cases it is possible to recover from an exception (probably by giving user a feedback for entering proper values etc.)
Not all Errors are “JVM errors” (extending
VirtualMachineError). How is a NPE “bad input”. It’s a bug. FileNotFoundException is checked but NPE is not. How can they claim those are the same type of exception? A client shouldn’t even try to recover from a NPE because it indicates a bug and shouldn’t happen.
Q. What are runtime exceptions?
Runtime exceptions are those exceptions that are thrown at runtime because of either wrong input data or because of wrong business logic etc. These are not checked by the compiler at compile time.
That’s just idiotic. All the other Errors and Exceptions are also thrown at runtime. Compilation errors are something completely different. But the compiler “checks them” if they are checked exceptions. They must be handled and the compiler checks if that is the case.
Example 2: basic keywords
Even basic keywords are often not explained properly. They confuse
final with immutability and make other mistakes. It is important that you learn those properly from the beginning. There are only about 50 keywords in Java and you need to know (most of) them!
This is form the same list as above:
final, is a
keywordused to make a method or variable constant or to prevent class inheritance. When we use final with a variable it makes it constant. When we use it with class definition it would not allow to extend that class.
A final method is completely different from a final variable! This doesn’t explain at all what a final method is. And in Java a variable can’t be a constant. π is a constant (and
Math.PI is final) but a final variable can have a different value each time the class is initialized or the method is invoked. Other languages have constants. Java does not.
Example 3: JavaTpoint and Durgasoft
JavaTpoint is one of the worst tutorial sites. I went through their tutorial and wrote a blog entry on what I have found: JavaTpoint sucks
Durgasoft is just so bad I couldn’t even start to criticise their contents. But still they get recommended by many students as if this was a respectable educational establishment.
From the videos I assume the teacher learned Java from JavaTpoint but never really worked as a programmer.
So what’s better?
- Any book is probably better. I’ve seen bad books and they also get outdated. But in my experience they are still better than blogs.
- Use tutorials by experts. Oracle already has a great tutorial. Even Microsoft’s MSDN isn’t too bad. And those sites are always up to date (outdated material is marked as such).
- Ask your teachers. They should know better than you or me.
If you prepare for an interview then you might want to find some questions on the internet. That is ok, but don’t read the answers you find in such lists. (Here’s why.) Just take the questions and answer them yourself. Use your text book and the information from the producer of the technology for that. This is a much better preparation because you actually learn something.