Clash of Code Shortest Mode improvement for Java

Hey there,
I am new to CodinGame, but the first thing i realized, that you cant win with Java.
My Improvement idea is, that every Language becomes an certain place (e.g. with comments marked) to code like this:
... public class Player{ public static void main(...){ // Write your code from here... fklasfjölkadjlajdsl // until here! } }

then the code between the comments would be taken!
If the comments are deleted, the player becomes an Warning.
That was it! Easy, or?


P.S. : I know that this thread already exists, but wanted to refresh it with an other idea ^^

I can code something like this and win every shortests CoC:

public class Player {

    public static a() {
        Scanner in = new Scanner(;

    public static void main(String[] args) {
        // Write your code from here
        // Until here


I think you are trying to solve a problem that already has a solution.
If java isn’t concise enough to be competitive in CoC, maybe you should pick another language.
I don’t think codingame is going to introduce some quirks like this, because it will be hard to maintain and people will always try to change things.

A decent alternative would be to make CoC by language (ex : only java in this CoC)

I understand the frustration fully. When I started CG I knew Javascript and Java and that was it. Javascript was not enough to be competitive and I wasn’t familiar enough with it so I used Java. Over time I have become familiar with Ruby and my rank has surged as a result. It sucks that Java is not the language meant for these kinds of tasks but it is what it is. In addition using Java for even fastest and reverse can be prohibitive as the number of characters you have to type is much more which ends up taking longer. I encourage you to learn Ruby, it really is pretty simple to pick up!!

Even though I mainly use Java I disagree.
If you’re bothered by being beat by Ruby/Perl/Python, etc then don’t let it bother you, and just do your best.
I like that the code you submit is actual runnable code.
Could shorten down Solution to S or something, but that just reduced the code by 7 characters.
Competing against people using the same language I have nothing against in principle, but realistically you’d have to wait an hour rather than 5 minutes to gather 8 people interested in competing in Java.

1 Like

Java is the best in real life. It is enterprise, android. Strong typing means IDE. Python, ruby, etc javascripts just fail when you try to refactor big project and force you to work in notepad. Simply uncomparable. So using anything except java and IDE is suboptimal waste of time.

Use scala. It’s like Java except it doesn’t suck.

1 Like

@codingame: where is the dislike button ?


Scala is good no doubt. Also it is important not to mix paradigm with language. Sometimes functional approach is declarative, short, less risky, readable, just fun to write compared to imperative one. Even in scala there is a choice to use scalaz or imperative way. And java 8 and onwards can produce good functional code

@codingame: where is the dislike button ?

Let’s focus on the original topic pls.