Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

Przemek's blog

By Przemek, 12 years ago, In English

I'm think, that applying astyle (or other code beautifier) to solutions before showing them in 'HACK solution mode', could be fine :)

What is your opinion?

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

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

I'm consider this idea again. Using macros for loops (like FOR, REP, EACH etc.) is an issue for astyle.

So, patch for astyle is required or we can choose other code beautifier.

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

Note that solutions in hack mode are shown in flash player plugin, not HTML (it is made to prevent code copy-paste).

And using code beautifier in flash is much harder than in HTML.

  • »
    »
    12 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I'm thinking about running code beautifier before generating 'flash image'

  • »
    »
    12 years ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    How exactly flash prevents copy-paste? The code is transferred from server to client anyway, so if one wants to copy the code, he will do it. Flash just complicates the process (nice example of security-through-obscurity), and it also complicates the life of 64bit-linux users. I'd propose to rewrite it in JS (so that the code is rendered by js in picture), lazy cheaters won't copy it anyway, and it'll be possible to use js libs to process the code.

    • »
      »
      »
      12 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      By the way, is code really transferred in text form now? I observed that the font rendering of the code is substantially different from what it would normally be on my system. This makes me think that the text is pre-rendered to a picture and only then transferred to the client (but then, why use Flash altogether?).

      There has been a 64-bit Flash for Linux for about 3 years now.

      • »
        »
        »
        »
        12 years ago, # ^ |
          Vote: I like it +3 Vote: I do not like it

        Even if it is transferred in picture, it is easy to use OCR to convert in it text. If there is no security anyway, there is no point in making others life harder.

        64-bit flash for Linux is one of the most bugged programs I've ever seen. And I have to keep it installed because of codeforces hacks :(