MarcosH911's blog

By MarcosH911, history, 2 years ago, In English

While I was looking for some solutions to hack I came across some unreadable code, this made me wonder if unreadable code that was done on purpose should be banned or at least penalized. With this I mean replacing for example each space with 100 spaces after finishing writing the code. I haven't seen anyone do this yet, but I think there should be an option to report it in case someone does it.

What do you guys think?

  • Vote: I like it
  • +21
  • Vote: I do not like it

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

You may "format on save" it on your editor maybe so that its readable... VSCode has an option for that I believe, and other alternative platforms might have it as well.

  • »
    »
    2 years ago, # ^ |
    Rev. 2   Vote: I like it -8 Vote: I do not like it

    The editor beautifying code usually generates an excessive amount of whitespace, and some people (i.e. myself) hate that a lot due to several reasons. (i.e. they may hate their code rolling off to the next line but excessive whitespaces make it worse) So, well, while the feature has a good intention, it isn't always a good solution to issues

»
2 years ago, # |
Rev. 2   Vote: I like it +43 Vote: I do not like it

Yes, it's against rule 16, which everyone who registers for a contest agrees to.

Solution code obfuscation and creation of obstacles to reading and understanding the solution is prohibited. It is forbidden to use any special techniques designed to complicate the reading of the code, to understand its workflow.

My source.

Also worth mentioning is that it's usually a good idea to write readable code for contests where hacking happens during the round. You usually want to be hacked (except for someone breaking your hash usually), because if your solution is hackable, you're likely going to fail system tests, so it's better to be hacked during the contest when you can still fix it.