Hacker News new | ask | show | jobs
by WoodenChair 4548 days ago
Tell them to get a good book. The value of having a single source from complete beginner to intermediate programmer written in the same voice with full knowledge of what you have completed so far at each point should not be undervalued just because web resources are free.
2 comments

I agree with this completely, and I'll make a specific claim: eloquentjavascript.net is the best book to use.

---it's an online book that lets you run code right in the book

---it's the language of the REPL that everyone has access to (in the browser)

---js is dynamically typed, which I think is easier for people to grok (I learned Java first, and for months I was puzzled by this "public static void main (String args[])" that I had to start everything with. Public? static? main? void? JS has none of these, and while it's debatable whether that's a good thing or a bad thing, it's an unqualified good thing when first learning to code.)

I don't know that book, but I just want to be clear that I did not mean to imply that free == bad. On the contrary, there are superb freely available books like Structure and Interpreation of Computer Programs. However, there are also superb books that cost significant amounts of money ($40+). Learning to program is worth a $50, or even $100 investment in a great book if the free books don't match what you're attempting to learn. They're able to sell for that price because they provide value that free alternative resources do not.

My main point is that in my opinion books, interactive or not, are still the best source for learning to program for many, if not most new programmers.

"public static void main (String args[])" - that would put anyone off, and for good reason, it's total bollocks. Either "main" is special or it's not, if it is why tell java stuff it already knows. If the jvm wants to run something that's public and called main and has a method signature of string array then why not dispense with all the nonsense - the answer's simple - it's java - the most verbose boiler-plate laden language out there designed for groups of mediocre developers. Despite needing dozens of lines to even basic stuff, it forces people into some form of homogeneity to keep teams of "java certified" developers in jobs.

if you want to learn to program, open Terminal, type ipython and go from there. When lost google stackoverflow, repeat. Forget books, there are way better, more up to date online resources.

What does Java's supposed verbosity have to do with the comment you replied to about learning JavaScript?

On an unrelated note, main in python is not a whole lot better. By the time you get through __name__ == "__main__", import sys and use sys.argv you're not really winning much over public static void main. The nice thing about python is that you don't have to start worryin about main since you can just run it as a script to start, which is definitely great for beginners, but that doesn't exactly justify the argument you were trying to make about the verbosity of Java.

:0 I mostly agree with this. Java is full of convoluted convention. Today, I would probably start with javascript or Ruby. However, I love that I really got started with ObjC.

BTW: Don't all C based apps begin with a call to main (all Mac / iOS apps):

int main(int argc, const char * argv[])

I disagree. I learn better from short exercises and crash courses. From my experience, short exercises are can be usually found in web resources rather than a book.