Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Anyone have any useful hints?
Index -> General Programming
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Reality Check




PostPosted: Sat Feb 23, 2008 9:36 pm   Post subject: 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.
Sponsor
Sponsor
Sponsor
sponsor
Zampano




PostPosted: Sat Feb 23, 2008 9:47 pm   Post subject: 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




PostPosted: Sun Feb 24, 2008 1:23 am   Post subject: Re: Anyone have any useful hints?

Reality Check @ Sat Feb 23, 2008 9:36 pm wrote:
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.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
wtd




PostPosted: Sun Feb 24, 2008 3:12 am   Post subject: 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




PostPosted: Sun Feb 24, 2008 11:28 am   Post subject: RE:Anyone have any useful hints?

you're right (I obviously don't use Java Razz).
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Reality Check




PostPosted: Sun Feb 24, 2008 11:57 pm   Post subject: 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




PostPosted: Mon Feb 25, 2008 1:18 am   Post subject: Re: Anyone have any useful hints?

Reality Check @ Sun Feb 24, 2008 11:57 pm wrote:
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. Very Happy

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




PostPosted: Mon Feb 25, 2008 1:39 am   Post subject: Re: Anyone have any useful hints?

Reality Check @ Mon Feb 25, 2008 12:57 pm wrote:
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?
Sponsor
Sponsor
Sponsor
sponsor
McKenzie




PostPosted: Mon Feb 25, 2008 7:19 am   Post subject: Re: Anyone have any useful hints?

Check out the static methods of the Geometry class.
Reality Check




PostPosted: Mon Feb 25, 2008 3:00 pm   Post subject: Re: Anyone have any useful hints?

I can't learn a new language at this point in time because the contest is tomorrow...

Quote:
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.
Display posts from previous:   
   Index -> General Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 10 Posts ]
Jump to:   


Style:  
Search: