
-----------------------------------
SS1389
Sat Nov 27, 2010 10:24 pm

Books on Java?
-----------------------------------
Hey, I'm wondering if there's any good books that teach you Java (updated please), or any books that would give you a good start to writing contests, like Dwite or CCC.

-----------------------------------
Tony
Sun Nov 28, 2010 5:19 am

RE:Books on Java?
-----------------------------------

Java is a DSL for taking large XML files and converting them to stack traces

-- http://www.reddit.com/r/programming/comments/eaqgk/java_is_a_dsl_for_taking_large_xml_files_and/

Java is great when you have a large corporation with configuration files and meetings about deploying some subsystem to a bunch of servers.

Java is pretty terrible when you are working by yourself and need to convert a bunch of strings into other strings. Fast.

The latter happens to describe DWITE/CCC must closer than the former. Given equal practice with either language, something like Ruby or Python would easily outperform Java in terms of speed and ease of coming up with a working solution.

-----------------------------------
kema
Sun Nov 28, 2010 10:28 am

Re: RE:Books on Java?
-----------------------------------

Java is a DSL for taking large XML files and converting them to stack traces

-- http://www.reddit.com/r/programming/comments/eaqgk/java_is_a_dsl_for_taking_large_xml_files_and/

Java is great when you have a large corporation with configuration files and meetings about deploying some subsystem to a bunch of servers.

Java is pretty terrible when you are working by yourself and need to convert a bunch of strings into other strings. Fast.

The latter happens to describe DWITE/CCC must closer than the former. Given equal practice with either language, something like Ruby or Python would easily outperform Java in terms of speed and ease of coming up with a working solution.

Would Ruby/Python be best suited for programming contests such as Dwite/CCC? I thought C++ would be the best language suited to contests...?

-----------------------------------
SS1389
Sun Nov 28, 2010 10:50 am

Re: Books on Java?
-----------------------------------
Ok thanks, but are there any books of such out there, because we're learning Java in school right now and not Python or C++.

-----------------------------------
DemonWasp
Sun Nov 28, 2010 2:01 pm

RE:Books on Java?
-----------------------------------
The best language to write contests in is the language you are most familiar with.

Given an amount of time to invest in learning any given language, your efforts would be best spent learning a very abstracted language such as Python. Learning C++ is ... an undertaking, and you will get bogged down in the details of the language.

As Tony said, Java is a great language for large projects and a not-particularly-excellent language for contest programming. Java's strengths lie in object-oriented, abstracted design (very helpful for writing large systems that don't break at the drop of a hat), but it's very weak in code size (meaning you have to type a lot to do any given primitive-level operations, such as String operations).

That said, I used Java when I was writing the high-school level contests and always did fairly well (I wrote solo for the most part).

-----------------------------------
kema
Sun Nov 28, 2010 2:33 pm

Re: RE:Books on Java?
-----------------------------------
The best language to write contests in is the language you are most familiar with.

Given an amount of time to invest in learning any given language, your efforts would be best spent learning a very abstracted language such as Python. Learning C++ is ... an undertaking, and you will get bogged down in the details of the language.

As Tony said, Java is a great language for large projects and a not-particularly-excellent language for contest programming. Java's strengths lie in object-oriented, abstracted design (very helpful for writing large systems that don't break at the drop of a hat), but it's very weak in code size (meaning you have to type a lot to do any given primitive-level operations, such as String operations).

That said, I used Java when I was writing the high-school level contests and always did fairly well (I wrote solo for the most part).

I'm in the same boat as SS1389. At school I'm being taught Java. Would you recommend me to use Java on programming contests such as Dwite/CCC? Or do you think I would be able to learn either Ruby/Python and get proficient enough in using either one for the upcoming contests (to outperform Java)?

Help is much appreciated :)!

-----------------------------------
SS1389
Sun Nov 28, 2010 2:57 pm

Re: Books on Java?
-----------------------------------
I learned Turing last year, but it was just an intro for us to Java. Btw, are there any contest prep books out there?

-----------------------------------
Tony
Sun Nov 28, 2010 3:41 pm

RE:Books on Java?
-----------------------------------
@kema - it's in your best interest to diversify the kind of languages that you know; but proficiency takes time and practice. You will probably not get better in a month (DWITE's rounds are a month apart), but keep in mind that one could choose a different language for every of the 5 DWITE problems. The advantage of being familiar with multiple languages is that you get to pick a better tool for each individual job.

@SS1389 - we have a sort of a guide posted at http://compsci.ca/blog/getting-ready-for-the-canadian-computing-competition/ which recommends Programming Challenges http://books.google.com/books?id=lcnSCDcDocMC although that is more of ACM / IOI level.

-----------------------------------
SS1389
Sun Nov 28, 2010 4:27 pm

Re: Books on Java?
-----------------------------------
Excellent. Thanks a lot Tony.

-----------------------------------
ProgrammingFun
Sun Nov 28, 2010 8:01 pm

Re: Books on Java?
-----------------------------------
Excellent. Thanks a lot Tony.
@SS1389: I believe you also have the book titled "Computer Science Java Enabled: For Use with the International Baccalaureate Program" (not saying that it is useful tho) :lol: 
When I was starting off with java, I used "Java for Dummies" but it is a little too basic and probably will not help with DWITE or CCC

-----------------------------------
SS1389
Sun Nov 28, 2010 8:16 pm

Re: Books on Java?
-----------------------------------
When I started out, I used a Java book by McGill, forgot what it was called though..

-----------------------------------
ccontest
Mon Nov 29, 2010 10:26 pm

Re: Books on Java?
-----------------------------------
I think Java is an excellent language for writing application, but is not the best language when it comes to contest programming.

-----------------------------------
wtd
Tue Nov 30, 2010 1:32 am

Re: RE:Books on Java?
-----------------------------------
 I thought C++ would be the best language suited to contests...?

Nothing like debugging C++ template error messages when you're time-limited.

-----------------------------------
SS1389
Tue Nov 30, 2010 4:32 pm

Re: Books on Java?
-----------------------------------
So C++ is recommended for contests? Hmm.....

-----------------------------------
chrisbrown
Tue Nov 30, 2010 7:12 pm

Re: Books on Java?
-----------------------------------
So C++ is recommended for contests? Hmm.....

Just the opposite. wtd means you will waste a lot of time debugging a C++ program.

C++ is like a swiss army knife. It can do almost anything you want, but there are very few instances when it is the best tool for the job.

-----------------------------------
SS1389
Tue Nov 30, 2010 7:42 pm

Re: Books on Java?
-----------------------------------
Very nice analogy.
