HN Books @HNBooksMonth

The best books of Hacker News.

Hacker News Comments on
Learning Java

Patrick Niemeyer, Jonathan Knudsen · 2 HN comments
HN Books has aggregated all Hacker News stories and comments that mention "Learning Java" by Patrick Niemeyer, Jonathan Knudsen.
View on Amazon [↗]
HN Books may receive an affiliate commission when you make purchases on sites after clicking through links on this page.
Amazon Summary
Version 5.0 of the Java 2 Standard Edition SDK is the most important upgrade since Java first appeared a decade ago. With Java 5.0, you'll not only find substantial changes in the platform, but to the language itself-something that developers of Java took five years to complete. The main goal of Java 5.0 is to make it easier for you to develop safe, powerful code, but none of these improvements makes Java any easier to learn, even if you've programmed with Java for years. And that means our bestselling hands-on tutorial takes on even greater significance. Learning Java is the most widely sought introduction to the programming language that's changed the way we think about computing. Our updated third edition takes an objective, no-nonsense approach to the new features in Java 5.0, some of which are drastically different from the way things were done in any previous versions. The most essential change is the addition of "generics", a feature that allows developers to write, test, and deploy code once, and then reuse the code again and again for different data types. The beauty of generics is that more problems will be caught during development, and Learning Java will show you exactly how it's done. Java 5.0 also adds more than 1,000 new classes to the Java library. That means 1,000 new things you can do without having to program it in yourself. That's a huge change. With our book's practical examples, you'll come up to speed quickly on this and other new features such as loops and threads. The new edition also includes an introduction to Eclipse, the open source IDE that is growing in popularity. Learning Java, 3rd Edition addresses all of the important uses of Java, such as web applications, servlets, and XML that are increasingly driving enterprise applications.
HN Books Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this book.
As many people have said, no, you're not too old to get started. And despite what some people might say, a multi-year degree program, with a decent GPA, is a great way of showing employers that you're a decent potential candidate.

That said, software engineering is one of the fields you can get employment without a degree, provided you can 'show your work'. The hard part is building up your skills in a way that can easily be demonstrated. The common wisdom these days is to create a github profile, build some interesting things, commit to some open-source libraries, and use your profile as a resume of sorts.

Here's interesting article on being a well-rounded programmer: http://jasonrudolph.com/blog/2011/08/09/programming-achievem...

We're also in a 'golden age' of self-guided learning, with online tools to help learning galore, here are a few:

http://codecademy.com http://www.codeschool.com/ https://www.khanacademy.org/cs

Also, get a few decent books on "Programming 101". Common wisdom suggests you learn C, one of Ruby/Python, Java, and a functional language like Haskell. Here are some good books to learn from:

The C Programming Language (some people say you should start here, I'm one of them!): http://www.amazon.com/Programming-Language-2nd-Brian-Kernigh...

Learning Python: http://www.amazon.com/Learning-Python-Powerful-Object-Orient...

Learning Java: http://www.amazon.com/Learning-Java-Patrick-Niemeyer/dp/0596...

I hope you do choose programming as a career, its been very rewarding for me :)

boingyjump
Thank you for taking the time to put together the links! The "show your work" part feels like the hardest, but I guess that's just something I have to push towards to figure out. As an aside, do you know anyone who's learned successfully from codecademy/codeschool? I love the idea of them, they just seem really simplistic.
chadnickbok
The are quite simplistic, but that's kind of a feature - Use them to get down 'the basics', before moving onto actually using languages to solve problems. There's no better way to learn than through building actual 'things'.

As an aside, my very first introduction to Python was competing with a friend, building scripts that would automatically create accounts on a forum, login to those accounts, and then use them to give ourselves 'karma'. That weekend I learned more than I'd ever known about Python, HTTP and web scraping. Its a silly example, but mini projects like that can really help you learn.

johnjlocke
When you're first starting, you have to be simplistic. That is the target audience anyway. The ability to write code is going to continue to be in demand, and there are not enough people with the necessary experience to fill some of the positions out there.

How to solve the problem? Start developing tomorrow's programmers today.

michaelochurch
I'm injecting my own language bias here, and I must admit that this is not an opinion that everyone agrees with, but I think you're better with Scala or Clojure than with Java. (Both run on the JVM, so you end up learning the Java ecosystem.)

Scala is a "better Java" and you can learn both the JVM and functional programming (take Odersky's course on Coursera). Clojure is a great Lisp but the Java stuff will be very confusing if you haven't seen it before (the JVM-interop functions like proxy, gen-class, and reify don't have the easiest APIs).

This (Structure and Interpretation of Computer Programs) is a great book to get started on the deeper aspects of CS: http://mitpress.mit.edu/sicp/full-text/book/book.html

Also, I like this one: http://www.amazon.com/Concepts-Techniques-Models-Computer-Pr...

The only way to learn how to program is to just do it. Pick a language. Start with small programs. Learn the features and syntax of the language. When you feel you know the language well enough to write a program that uses most of its features, then pick an open source program and learn its code. Make some modifications to it. When you feel you're pretty comfortable in one language, pick a new language.

Rinse repeat. You'll find that once you have one language down, the process will go much faster with the second. The features and syntax of most languages are pretty similar.

You can pick any language you like to start with, but personally I'd recommend starting with a hard typed compiled language rather than a dynamic language. Dynamic languages are easy to learn, but its easy to be a lazy and bad programmer in them. They let you get away with too much. Hard typed compiled languages are a) much better at catching your errors and b) much harder to be a lazy programmer in. They don't let you get away with things nearly as much.

I'd recommend Java, seems to be the language a lot of people start with. It will also give you a good founding in open source programming. I started with C/C++ and I'm glad I did. But that was more of a challenge - had to learn pointers and memory management in my first language. And after that I took a little while to learn the open source mindset, since I'd started in a procedural language.

Once you have a good grasp of an object oriented language like Java (or Python) and what object oriented programming means, then I'd recommend reading the Gang of Four book on Design Patterns (http://www.amazon.com/Design-Patterns-Elements-Reusable-Obje...) and Martin Fowler's book on Refactoring (http://www.amazon.com/Refactoring-Improving-Design-Existing-...). Those will give you a pretty good basis in software design and maintenance.

In terms of recommended reading for learning a language, the O'Reilly books are nearly always good in my experience. Here's one for Java (Learning Java: http://www.amazon.com/Learning-Java-Patrick-Niemeyer/dp/0596...) and here's one for Python (Learning Python: http://www.amazon.com/Learning-Python-Powerful-Object-Orient...)

Female-hacker
Amazing. No Google search led me to an answer this helpful. Thank you for your input on languages also...it seems there is quite a debate between Java and Python.
SkyMarshal
I disagree with starting with Java. Rather I second coffeemug's advice in the following comment, focus on C, Lisp, and Haskell:

http://news.ycombinator.com/item?id=1747713

My first manager taught me something college had failed to (or that I failed to learn there), which is that programming languages come and go in trends, but they are all based on recurring fundamental concepts, which endure beyond any single language.

Most new programming languages are a remix or mashup of some or all of these concepts, so if you master those concepts you'll be able to easily pick up any other language.

It's like learning Latin as your first foreign language, and being able to quickly pick up any Latin-based language after that. C, Lisp, and Haskell are the Latin of the CS world.

Since you're at MIT, take the famous Structure & Interpretation of Computer Programs (used to be 6.001, not sure if it still is). http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussma.... That'll get you started with Lisp (specifically the Scheme dialect).

For C, start with K&R (http://en.wikipedia.org/wiki/The_C_Programming_Language_(boo...).

For Haskell, Real World Haskell is good, and the e-version is free. (http://book.realworldhaskell.org/)

Joel Spolsky has an article worth reading on why not Java:

http://www.joelonsoftware.com/articles/ThePerilsofJavaSchool...

And of course PG's essays on Lisp are a must read:

http://www.paulgraham.com/lisp.html

Since it sounds like you're running a business you may feel pressured to learn Java or whatever your coders are currently using to get your business off the ground. But I heartily recommend resisting that pressure, doing it right, and mastering the enduring fundamentals first. It may cost you something in immediacy and expedience, but that's what school is for, especially one such as MIT. You should carefully weigh how you spend your time there, and unless you think you've got the next Facebook, focus on mastering the enduring concepts, not the trends. You'll be glad you did the rest of your life and career.

PS - there's little to nothing that Clojure (a Lisp dialect on the JVM) and Haskell can't do in the web space, so the cost in immediacy and expedience is slim to none anyway.

PPS - it didn't register till just now that you're an Econ Major not going into CS or Software Engineering as a career. If you just want a tried-and-true, versatile, easy-to-get-started-with language with tons of libraries and frameworks (reusable code) to hack in, huge and helpful community go with Python. Java is too bureaucratic a language for this purpose.

Start with Zed Shaw's excellent introduction, Learn Python the Hard Way (hard way = by doing lots of follow-along examples until it gets into your brain muscle memory), then go from there.

http://learnpythonthehardway.org/index

dbingham
Python's a good language, but it's a soft-typed interpreted language. Which means it will let you get away with certain things.

It is also has some differences in syntax from a lot of other languages that might give you some trouble when you switch. C/C++, Java, PHP, Perl, Javascript and many other languages share a lot of common syntax. Python's still really similar, but it deviates in some key ways.

It also tends to have really hard core adherents who will swear by it above and over anything else, which is why there is something of a debate. It really doesn't matter that much what language you start with.

One of the keys to being a good programmer is knowing your toolbox. And that includes knowing multiple languages. The best programmers don't have one favorite language. Rather they have a toolbox of a half a dozen or more, and they pick the best language for the task at hand.

Adam503
"...it will let you get away with certain things..."

...like reading what she just typed in? Yes. Python will let her "get away" with reading her code. ;-)

Here's a link to the Beginners Guide to Python...

http://wiki.python.org/moin/BeginnersGuide

HN Books is an independent project and is not operated by Y Combinator or Amazon.com.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.