Clash of Code shortest improvement

Hi guys

I have an idea how to make shortest mode more interesting. For now there is no way to win a game using C++ or Java. Win depends on what language you code in. I think it would be better if all players had to code in same language. Even if you don’t know language you gonna need to use, in most cases 15 minutes is enough to find any necessary information in the Internet, moreover it’ll force you to learn new languages!

Let’s say before start of a game players vote and language is randomly chosen from those player voted on. For example if there was 4 people in room and 1 of them voted for Javascript and 3 other voted for Python there is 25% chance of choosing Javascript and 75% chance of choosing Python. I would love to have an opportunity to compete in this mode in language such as C++ :slight_smile:

What do you think?


I agree. But then if you code in Java and against you javascript people you’ll always get rank 1?

Yep, always losing with Java with 80-90 chars against Python 7-10 chars.
Anyway, making people code in language they didn’t choose is not fair - they simply could not know syntax.
I think there should be some kind of “shortness coeffient” for each language which show cost of each character of code. Like each character in Java costs about 0.6 while Python character costs 1.1 for example.
In the other hand it will take ages of experiments to find fair balance for chars weights.

1 Like

Or at least the characters which will be ignored by the compiler will not count as a character. Honestly I hate it when some of the submitted code is just all in one line and if you don’t know the language it is very hard to understand what the code does. Even if you know the language it could still be hard to read.

If characters which will be ignored by the compiler for example spaces and tabulators then there is a better chance to “win” even if you not using Bash or Phython.

Yes fully agree you can just minify your javascript code and easily win, also WHY DO THE COMMENTS AND INDENTS COUNT AS chars.

“Shortest code” mode encourages to write less maintainable code (unless you and your team are pythonistas that can dig in any mess). I hate it when public CoC casually strikes me by surprise with another “Shortest code” round when I didn’t ask for it. :neutral_face: At least, it should have said that following clash will be “Shortest code” mode and I would simply sign off to wait for another round. But hell no… let’s play who’s got the shortest pythonista code on the Earth whether you were prepared for it or not, of course! :partying_face: :pensive:

1 Like

You can be competitive in shortest with one of the following:
Python, JS, Ruby, Perl, PHP.
So you can keep your “main” language for fastest and reverse and for shortest, learn one of these 5 languages.
Learning a language doesn’t hurt, you might even find it usefull later on.
And as for golf being bad practice etc, everyone’s aware of that, people don’t golf on real projects.
It’s just a fun way to learn a language, and a motivation to read the doc carefully and discover usefull features.

1 Like