
-----------------------------------
Reality Check
Sat Feb 23, 2008 9:36 pm

Anyone have any useful hints?
-----------------------------------
To make coding faster?  This is for this years CCC.  Does anyone have any useful hints such as StringTokenizer or any classes in Java that'll save me time.  Better yet, any useful algorithms out there that I can memorize and put to use.

-----------------------------------
Zampano
Sat Feb 23, 2008 9:47 pm

Re: Anyone have any useful hints?
-----------------------------------
http://compsci.ca/blog/getting-ready-for-the-canadian-computing-competition/
I found this on the blog a while ago.

-----------------------------------
Tony
Sun Feb 24, 2008 1:23 am

Re: Anyone have any useful hints?
-----------------------------------
To make coding faster?
Use a language that requires less than a paragraph do something as simple as printing "hello world".

I'm not suggesting to pick up on a new language over the next few days, but it's a pretty good plan for next year. Java (especially proper Java, though you can skip over the formalities for the sake of the contest) is ridiculously verbose. System.out.println involves two classes (method "out" returns an instance of PrintStream). Not to mention all the stuff you have to set up above and close after the line just to make it work.

-----------------------------------
wtd
Sun Feb 24, 2008 3:12 am

RE:Anyone have any useful hints?
-----------------------------------
Thread derail: Tony, it would be more accurate to say System.out is a PrintStream, as out is a public member field, rather than a method.

-----------------------------------
Tony
Sun Feb 24, 2008 11:28 am

RE:Anyone have any useful hints?
-----------------------------------
you're right (I obviously don't use Java :P).

-----------------------------------
Reality Check
Sun Feb 24, 2008 11:57 pm

Re: Anyone have any useful hints?
-----------------------------------
Unfortunately I'm going to have to use Java.  It's the only thing I feel comfortable coding in at this point and I can't really learn a new language.  There isn't a next year either since this would be my last.

-----------------------------------
OneOffDriveByPoster
Mon Feb 25, 2008 1:18 am

Re: Anyone have any useful hints?
-----------------------------------
Unfortunately I'm going to have to use Java.  It's the only thing I feel comfortable coding in at this point and I can't really learn a new language.  There isn't a next year either since this would be my last.
No problem.  Go find the ACM programming team at your Uni and see if they will take you.  There will be a next year. :D

Anyhow, useful things to know:  don't bother coding a linked list or tree or associative array (dictionary/map/etc.).  Know how to use Vector, Set, Map and other collections.  Know how to use the built-in sorting.  That includes knowing how to write classes to store data to be sorted (instead of using parallel arrays) and knowing how to implement Comparable.

Hopefully you get Java 1.5 (minimum).  If so, make use of the generics and auto-boxing, etc.  System.out.printf() is useful (compared to doing multiple print() and DecimalFormat and all that).

Type up a boilerplate/template/skeleton with all the imports and structure you need.

-----------------------------------
wtd
Mon Feb 25, 2008 1:39 am

Re: Anyone have any useful hints?
-----------------------------------
Unfortunately I'm going to have to use Java.  It's the only thing I feel comfortable coding in at this point and I can't really learn a new language.  There isn't a next year either since this would be my last.

Why can't you learn a new language?

-----------------------------------
McKenzie
Mon Feb 25, 2008 7:19 am

Re: Anyone have any useful hints?
-----------------------------------
Check out the static methods of the Geometry class.

-----------------------------------
Reality Check
Mon Feb 25, 2008 3:00 pm

Re: Anyone have any useful hints?
-----------------------------------
I can't learn a new language at this point in time because the contest is tomorrow...

Anyhow, useful things to know: don't bother coding a linked list or tree or associative array (dictionary/map/etc.). Know how to use Vector, Set, Map and other collections. Know how to use the built-in sorting. That includes knowing how to write classes to store data to be sorted (instead of using parallel arrays) and knowing how to implement Comparable. 

Thanks a lot.  I'll look up all of those things.  I was planning on using Linked List if need be but I guess you're right.  Making the object would be a hassle.  I'll go look up Vectors and all the other things you suggested and hopefully grasp them by tomorrow.  I already know built in storing but I'll look it up again to make sure I know.  I might as well print examples of all of these concepts in use and take them just in case I forget.

Thanks a lot man.
