This is an incomplete source of knowledge

Unfortunately, writing a complete course material is an extremely time consuming task. Currently, there are simply no human resources on this project to create such material, which would be ideal. Instead, the student is referred to the following book:

http://www.mindview.net/Books/TIJ/

To download the book go to http://www.planetpdf.com/codecuts/pdfs/eckel/TIJ3.zip

This is perhaps the best freely available book on Java, but it is already 12 years old. Age is not per se a problem since Java is backward compatible, meaning, everything in the book is still true for the latest Java versions. But there are better ways to solve the same problems now.

Pitfalls

Although having a text book speed things up, there are pitfalls you should know. The traditional way of teaching a programming language like Java has some flaws.

The first flaw is that these methods start by presenting technical (and boring) details to students. For instance, one of the first things presented is what is an object and how to use the Java compiler (javac). Compiling a single class is as easy as calling "javac ClassName" but things start to be quite complex once you need to compile a class that uses a library.

Why we use Maven?

The problem about such knowledge is that in real life of actual professional programmers absolutely no one invokes javac manually. So why bother introducing something that no one needs to know in real life? As a matter of fact, professional Java programmers need to understand how javac works even though some tool will actually invoke the compiler. So the students need to know something about it. I am not advocating that we should not study javac but that such a topic is really a bummer when people want to get started using Java. That is why we use Maven.

Maven understands the project structure and compiles everything for you. Complexity of compilation is all hidden from programmers and, yes, Maven is used everyday by professional programmers in real life projects.

Let us avoid bad habits

Another flaw of traditional teaching methods is that it introduces bad programming habits. Learning how to program is like training in a sport. It may sound crazy at first, but you need to get used to this idea.

If you train the wrong way, you are conditioning your brain to do the wrong movements. When you go to an actual match, you will do the wrong moves.

The real life is full of tests

How does that translate into the Java course? In real life, there is a field called software engineering that is dedicated to discuss the best practices for software creation. On such a practice that is stressed in this course is to write tests first:

http://www.extremeprogramming.org/rules/testfirst.html

In simple terms, programmers are encourage to write source code only when there is a test to check their progress. How do you know you have done writing source code if there is nothing telling you that your job is over?

But writing tests is also boring. That is why tests are provided to students in the lessons. So students can focus on solving the problem, no on how to check if the problem was solved. Verification is provided from the beginning.

There is one last problem. Running the tests is also boring. Guess what? Maven also does that for us.

Wrapping up

So in short, this course heavily uses Maven to both automate compilation (among other routine tasks that we will see) and to provide test-first, which is a good programming practice.

Back to top