Clash of Code word count problem

Everyone code in different languages so, I personally think the word count based ranking in Clash of Code should be removed. My last 5 matches I submit my C++ code first but at last my ranking was 5/5 due to code size. :triumph: :triumph: :triumph:
First of all how a C++ or java code could compete with a python code in word count
and second we already have code golf.
Clash of Code should only based on time and nothing else.
What others think about this problem??

  • Need word count
  • Remove word count

0 voters

1 Like

it is not word count but char count …
and it is the most interesting mode for lots of clashers.

2 Likes

CoC is 3 games in one: Fastest, Shortest, Reverse.
Why remove any of it just because you don’t like it? Others might prefer Shortest mode over Fastest.
Who knows, maybe CoC will motivate you to learn some Ruby and save your C++ skills for the next contest? :slight_smile:

That means Codingame have no only fastest competition and I should not use this.

If the puzzle states Shortest mode, why submit it after 1:42? You have another 13+ minutes to reduce your code size. C++ and Java tends to be more verbose than Python, but not 8 times more. It seems you submitted a non-golfed C++ code.

1 Like

Exactly this is the expected challenge. Reduce your code size as far as you can. Personally I use PHP and even if I won’t win every CoC its fun to think and code this way.
Face the challenge instead of trying to avoid it

1 Like

My favourite part of coc is shortest, many simply don’t enjoy having to be fast when coding. Also, C++ is relatively concise if you’re willing to throw best practices out of the window

Shortest mode is fine to have if you run a private CoC, but in public CoC is unfair, many languages has different syntaxes, and some languages will always have a vantage over another when i comes to the shortest code to complete the objective.

personaly i prefere to have it removed from public CoC, and i think it would be benefitial to do so, because it would properly attract more to play CoC in public.

The way i play it now is either private with a friend or public but with that twist that i submit my code instant when it’s a shortest and start another one until i get fastest or reverse.

Not sure what the rules about necroing here is… About shortest mode; I agree, it is completely unfair, when I match up against c# or c++, I will always win with javascript, while I almost always will get beaten by python and others.
My take is to allow us to blacklist a mode we really dont want to play, or allow us to insist on a specific language for a given clash. Like we can in private clashes. The current version is not really useful, when you can really only compete against yourself in those scenarios.
-max

Shortest mode is made so that people can learn and improve their skill in code golf. You could also see it as a great way to learn this… :wink:

1 Like

or you could see it as a great way to almost always loose or switch language.

1 Like

Maybe shortest mode should be ranked by language, with points awarded depending on average character count for this language on this specific coc… But languages that are not used so often could be a bit imprecise, for example if you are only a few competing in some language

Some languages are a lot better, by that I mean shorter, at dealing with specific types of question : i.e you probs wouldn’t want to use bash if there’s some list manipulations required, similarly you probs wouldn’t want to use java in shortest for a simple “how many vowels in input” (unless bash or java is the only language you know).
For your suggestion to work, there needs to be a huge sample of submissions in the same language collected for one single clash, and only then will it be actually fair to reward points accordingly.
Otherwise, for shortest, you just have to know a short language :p, but unless you are very unlucky, js, python, or ruby are all pretty easy languages to learn (and to golf) that can guarantee you a good placement in public shortest CoC.
I for instance pretty much learned ruby and perl by clashing…

1 Like

I was first to submit a solution in C++ only to be beaten by another player who got 10x smaller code in Python. C++ includes are a bit longer and it has to define main(), plus a default template has extra includes and comments. Also C++ lacks some built-in powerful array manipulation operations, as well as more verbose in loops and variables definitions. Thus, it looks like a code size competition looks simply unbeatable for a C++ coder against Python/PHP ones. Also, it encourages an ugly code with a whitespace skipped (unless that’s actually not counted).

Would it be better to just use a submission time for ranking? Python folks might still get ahead with convenient array operations etc., but at least the chance is more fair if you think fast.

Shortest mode is just one mode out of three.
C++ is indeed unfavoured for this mode but typically it’s 2x longer, not 10x.
Tips:

  • remove everything in the stub,
  • just include ios or map, it’s usually enough,
  • declare all your integers at once, globally, it assumes int if type is not provided,
  • don’t submit as fast as possible, take your time to golf it as much as you can,
  • remove all spaces you can within your code lines,
  • once your code is ready, select all and spam shift tab to remove indents and then remove all newlines ; it’s better to do that in the very end.

You can find more tricks online, on codegolf stack exchange for example.

Your code should get significantly shorter but still you’ll lose most of the time against Python, JS, Perl, Ruby, etc.
If you’re still frustrated about being beaten in shortest, maybe take it as an opportunity to learn a ‘short syntax’ language.
As you mentionned, C++ is not very good for text manipulation, and it can be usefull to know a scripting language that allows you to easily browse and modify text files on your system for example.
Also, new language learned means more source code you can read and understand, more libraries you have access to, more people you can communicate with, etc.

4 Likes