Venti_chai's blog

By Venti_chai, history, 3 years ago, In English

I was reminiscing my first submissions on Codeforces and how much my coding style has changed since the last year. I am interested in hearing your stories about your coding style or the time when you started Codeforces!

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

| Write comment?
»
3 years ago, # |
  Vote: I like it +48 Vote: I do not like it

My path is from clean code to ugly template...

»
3 years ago, # |
  Vote: I like it +30 Vote: I do not like it

I abandoned my whole template and now I write fully clean code.

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

    Have you observed any personal benefits or any improvement during problem solving after adopting a cleaner coding style?

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

      yeah, It is good for interviews. And I don't see any major benefits using templates other than just some seconds of time.

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

JavaScript -> python -> C++. Thats it.

»
3 years ago, # |
  Vote: I like it +4 Vote: I do not like it

from clean code to ugly code.

from solving problem A in 1 hour 50 minutes to solve it in less than 5 minutes(my typing speed is not very fast so i dont solve it in less than 1-2 minutes)

»
3 years ago, # |
  Vote: I like it +30 Vote: I do not like it

Been only a month here but coding style has changed from Wrong Answer on Pretest 2 to Wrong Answer on Pretest 2

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

    At least u're pupil in less than 1 month it took me 6 month's for becomming pupil.

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

From clean small codes to Ugly confusing code using multiple 100-200 line templates.

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

Instead of thinking about cases on paper,I now just write ugly if-else ladders. Speedforces whoooosh.

And as I am implementing my if-else ladders I come across 2-3 observations that would have saved me a lot of code.

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

I remember getting intimidated by variations of C++ submission languages.

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

    Submission languages?

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

      Yeah C++ Clang, GCC, G++ etc, I didn't know which one to pick.

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

        It happened to me too! I got compilation error by submitting my c++ solution in GCC. And it indeed took me a while to understand what was wrong.

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

my coding style sucks. Doesn't differ if it is from 2 years ago or from today.

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

    Do you obfuscate your code or do you actually code with that style?

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

      I actually code with that style. It is now easier for my eyes to read that code(I am not used to a lot of spaces. I've got used to compact mode)

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

        Wow, lol, what is your coding enviroment since a lot of the editors/IDE have auto-ident so I am guessing you either change your settings or code somewhere else?

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

        Have you stopped here or do you have plans of removing new line also?