zen0wu / topcoder-greed

greedy editor for topcoder arena
Apache License 2.0
229 stars 45 forks source link

Python/Java template polish, c++11 version of GCC test template #36

Closed vexorian closed 11 years ago

vexorian commented 11 years ago

I think that default python template should do usual imports, like the other languages.

I also added a prettyStr function to the Test template. Mostly so that strings are printed with surrounding " ", it is less confusing when your method returns an empty string.

A new GCC Test template. When your local compiler has access to c++11 (c++0x) , then we can have cleaner code when initializer vector arguments/return values. Since TopCoder uses c++11, this is a natural improvement, but the normal GCC template should remain in resources imho, because some people might not have access to those features.

Java template instances String arguments with the new operator. A common bug with new programmers / programmers who coded in a rush is to do == comparisons in simple problems. Like this thread: http://apps.topcoder.com/forums/?module=Thread&threadID=709720&start=0&mc=12#1380722

When running in local compiler that sets a = ".", this bug will not be detected.

zen0wu commented 11 years ago

@wookayin What do you think about the python thing, since I'm not expert in python. And @vexorian is it hard to split all these to several pull request or there's some other ways to do the one-by-one merging. Merge them all in once seems not a good idea.

vexorian commented 11 years ago

I am a git noob. Anyway, ok I will split them.