Блог пользователя adminiiii

Автор adminiiii, история, 10 лет назад, По-английски

Hi Codeforces. I think most of you give me down vote but please comment something too : ) actually i'm about newbie(probably as an expert rated one here) i have lots of problems in how should i code to be NEAT and BEAUTIFUL i'll be so happy if you help in comments to code so. i don't know what should i say more. so ask in comments if something is missed thank you all : ) good luck.

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

»
10 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится -15 Проголосовать: не нравится

Thank you all for answering : ) and thanks from down votes : )

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

There's no trick, really. I like to go reading other's solutions to past problems and pick up the ideas from other's codes. It's important you code them yourself.

  • »
    »
    10 лет назад, скрыть # ^ |
    ← Rev. 2  
    Проголосовать: нравится 0 Проголосовать: не нравится

    Some useful stuff... Indent code, space between operators, create functions for things you repeat, and also for some of the things you don't. Name your variables and funcions well, declare variables the closest possible to the necessary scope, try to be concise when writing conditions and such. I like to use C++ ranged loops when possible, and also lamba functions when they are useful. Using STL objects such as pairs and typedefing some structures is very useful too.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится -20 Проголосовать: не нравится

Thank you for being so polite in asking for downvotes. I like you :) Downvote my comment too please.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

Greetings! I guess that it depends, for example I like modularity, have my own way to use the blank spaces and dislike global variables, but some programmers can say that the way I write code is not beautiful. When I read another's code I try just to read the ideas, not the way the code has been written, and apply those ideas on my own code.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

thank you all for answering : ) specially thanks gabrielsimoes i think your answers were really useful. hope to be legendary for all of you : )

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

The only rules is, "Write code for people, not computer." i.e Readability should be the most important goal.