I’m learning Pascal right now, it’s my first programming language that I’ve seriously taken in consideration. It’s giving me good programming habits and its “wordy” style allow me to understand programming concepts. The book that I’m studying has been written in 1995 LOL.
When my Pascal self-lessons will be over, I will decide to start learning Java. Modern Java -> Java 8.
As you know, programming books are too expensive and I can’t buy them (I spent 4 euros for the Pascal book ). So, what if I buy a “Sams teach yourself Java 6” (4 euros - secondhand) and “Java 8 Pocket Guide” (9 euros - Kindle edition)? Or, what about the official Java SE documentation by Oracle?
Thank you very much for your opinions.
I think the best way to learn Java is on Internet! You may buy some books or e-books to have a good understanding of what happens in backgound, but the main source in my opinion is tutorials and articles.
For book, I read Headfirst Java when I was learning Java (back 2008) so I would recommend you to read it.
For tutorials, I like Tutorials Point.
I’m not talking about price, because it depends where you live. Here on Brasil any programming book costs about 200 BRL (~60 EUR) so 8 EUR for a books is unbelievably cheap to me
Also don’t mind me, but this forum is for discussing JME3, which requires you to talk about it, so I think you will find better resources on Java forums, like Code Ranch.
Before you learn java you must learn programming. It is not a matter of language you use to ‘speak’ with computer, you need to have something clever to say.
So start with books about algorithms, design patterns, data structures etc.
Woo! Go Pascal! (It was my first language too back in the day)
I fond the Oracle tutorials pretty good, though a bit terse on later subjects – however, I already had learned C++, so the Syntax was very familiar (actually, Pascal isn’t that different in structure, just in the words / symbols it uses, but C++ uses most of the same symbols as well and is also object oriented).
I liked one of the 21 days books too, but that was a very old book for Java 2 (new at the time), The quick reference from O’Reilly is OK – could be good just starting out, but not what I’d recommend. The best thing about it is that it does contain some more obscure tid-bits that most intro books and tutorials leave out.
I would partly agree with FrozenShade – learning algorithms is a good idea (essential sooner or later if you want to really be a programmer / developer and not just a coder). I wouldn’t say which should be first is tricky – you will learn algorithms better if you implement them in code, and much better if you are solving real problems all ready, and you will need algorithms to make code that is really worth writing. If possible I suggesting learning both together, and perhaps design patterns as well (the book Game Programming Patterns is really good, but pretty new probably not available in you budget yet, but keep an eye out for it).
But for Java per se I’d start with the Oracle tutorials and then branch out if its not enough or you find yourself having trouble with something.
Algorithms are a way of thinking that programmer needs. Try to make a sorting using… cards. Yes, without even one line of code you are able to switch your mind to the proper way of thinking. Play with various sorting algorithms without any pointers or references, which can be pretty hard to understand for novices. Operate at different level of abstraction, try to draw some boxes on paper, try to solve some standard issues using only the paper and pen. I guarantee that it will give you profits in the further learning.
The most common problem with novice coders is that they are able to call .sort() but they don’t have any idea how it works internally.
I have always belive that pratice is the best way. Just get an idear in your head, an fairly simple one and ask your self : how the hell would id program that. Then start coding, realise that you are missing something, search on google for that something, use it, make it work, and then find something else too do.
Even if reading can realy help, expecaly in early stage, i do belive nothing is better to learn programmation then programming. But of corse if you need the basics just find a website whit tones of tutorials and follow them. I would had love to reccomand the one i have use, openClassroom, but its in french, yet am sure you can find something in english.
Best part in all of this : its tottaly free
I can only agree with Frozenshade.
Start with the theory:
- Real basics: learn boolean algebra, learn how to count in binary octal and hexadecimal in your head.
- Basic variables… I’ve seen a lot of ‘professionals’ storing ipv4 addresses in much more than 32 bits ints. Most of the time it’s ignorance not laziness.
- data structures (vars, strings, arrays, lists, chained lists, networks, buffers, circular buffers,… maybe relational databases too)
- algorithms (sort, search,…)
- computer architecture cause you need to understand what’s happening under the hood.
Don’t dive into object oriented too early. Forget about Java for a moment. Do the above in a simple procedural language first.
The good news is that computer sciences is one of the cheapest thing you can learn. Thanks to the Internet.
The best programmers I know never learnt much at school…
IPv4 in more than 32 bits? I can beat that story, the most ‘hardcore’ thing I’ve ever seen was when one totally uneducated ‘programmer’ wanted to set a bit in byte variable. Instead of doing one bitwise operation he convert that byte into binary string, cut that string into pieces, merged them with new ‘value’ for particular bit and parsed the result into byte value…
Yes, he did exactly what he wanted to do, the bit had a value of true. He used the best way he knows.
The good thing is that he was able to ‘invent’ the solution of his problem, thanks to c#, the very very very bad thing is that he just does not know the proper ways of solving basics problems in programming.
I like stories like that. I want more ! I guess we all have many stories of this kind to share. Maybe we should start a “programming horrors” thread ?
One day a “programmer” called and was unhappy with the performance of the server. Long story short : the guy had a mysql table with hundreds of columns and thousands of rows (very very bad design) … AND … his php code looked like that :
$user = “blah”;
$pass = “blah”;
$db = …
(db config, password and db connection was hard coded in each php file …)
$query = “SELECT * FROM table;” (no WHERE or anything)
… then, he looped over everything and selected what he needed using conditional blocks in his loop.
the social skills part : go explain to a non-technical customer that their only technical guy is not doing things right when this only technical guy is telling them “that’s because the server is shit !”. Hint: car analogies work great !
Please pardon my off-topicness. Feel free to delete it.