https://www.funtoo.org/index.php?title=Coding_Standards/pt-br&feed=atom&action=historyCoding Standards/pt-br - Revision history2024-03-28T13:58:59ZRevision history for this page on the wikiMediaWiki 1.36.2https://www.funtoo.org/index.php?title=Coding_Standards/pt-br&diff=10798&oldid=prevCoffnix at 14:24, July 9, 20152015-07-09T14:24:25Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 14:24, July 9, 2015</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l24">Line 24:</td>
<td colspan="2" class="diff-lineno">Line 24:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:QA]]</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:QA]]</div></td></tr>
<tr><td colspan="2"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category:pt_BR]]</ins></div></td></tr>
</table>Coffnixhttps://www.funtoo.org/index.php?title=Coding_Standards/pt-br&diff=7787&oldid=prevTocadotux: /* Padrão de Codificação Básica Em Um Nutshell */2014-12-25T01:05:18Z<p><span dir="auto"><span class="autocomment">Padrão de Codificação Básica Em Um Nutshell</span></span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 01:05, December 25, 2014</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>== <del style="font-weight: bold; text-decoration: none;">Padrão </del>de Codificação Básica Em Um Nutshell ==</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>== <ins style="font-weight: bold; text-decoration: none;">Padrões </ins>de Codificação Básica Em Um Nutshell ==</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* empacotamento de palavra (word wrap) de até 160 caracteres</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* empacotamento de palavra (word wrap) de até 160 caracteres</div></td></tr>
</table>Tocadotuxhttps://www.funtoo.org/index.php?title=Coding_Standards/pt-br&diff=7785&oldid=prevTocadotux: /* Profanity */2014-12-24T17:43:34Z<p><span dir="auto"><span class="autocomment">Profanity</span></span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 17:43, December 24, 2014</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l18">Line 18:</td>
<td colspan="2" class="diff-lineno">Line 18:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Adicione comentários que proporcionam alguma ideia sobre seu código, e que ajude a proporcionar contexto. Também, por que nós utilizamos tabs, posicionam comentários em suas próprias linhas, separam do código fonte, idealmente separados por uma linha em branco acima e abaixo ao menos que você esteja comentando em verboso cada linha de código. Isso também encoraja a comentários mais longos, mais descritivos que possam abranger múltiplas linhas. Se você abranger múltiplas linhas, utilize uma margem direita consistente de 160 caracteres. Comentários lhe ajudam a entender seu código quando você voltar a ele um ano depois, então está adicionando comentários descritivos para si mesmo o tanto o quanto para outros. Inclua informação que você acharia prestativa se você tivesse um caso repentino de amnésia. Eles são especialmente importantes para o software livre e de código aberto que precisam ser mantidos por várias pessoas ao longo dos anos.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Adicione comentários que proporcionam alguma ideia sobre seu código, e que ajude a proporcionar contexto. Também, por que nós utilizamos tabs, posicionam comentários em suas próprias linhas, separam do código fonte, idealmente separados por uma linha em branco acima e abaixo ao menos que você esteja comentando em verboso cada linha de código. Isso também encoraja a comentários mais longos, mais descritivos que possam abranger múltiplas linhas. Se você abranger múltiplas linhas, utilize uma margem direita consistente de 160 caracteres. Comentários lhe ajudam a entender seu código quando você voltar a ele um ano depois, então está adicionando comentários descritivos para si mesmo o tanto o quanto para outros. Inclua informação que você acharia prestativa se você tivesse um caso repentino de amnésia. Eles são especialmente importantes para o software livre e de código aberto que precisam ser mantidos por várias pessoas ao longo dos anos.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>== <del style="font-weight: bold; text-decoration: none;">Profanity </del>==</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>== <ins style="font-weight: bold; text-decoration: none;">Profanação </ins>==</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">Do not place any profanity in source code comments or variable names</del>. <del style="font-weight: bold; text-decoration: none;">It just makes you look unprofessional</del>, <del style="font-weight: bold; text-decoration: none;">silly and incompetent</del>.</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">Não insira qualquer profanação nos comentários do código fonte ou nos nomes de variáveis</ins>. <ins style="font-weight: bold; text-decoration: none;">Isso somente te faz parecer não profissional</ins>, <ins style="font-weight: bold; text-decoration: none;">bobo e incompetente</ins>.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:QA]]</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:QA]]</div></td></tr>
</table>Tocadotuxhttps://www.funtoo.org/index.php?title=Coding_Standards/pt-br&diff=7784&oldid=prevTocadotux: /* Comments */2014-12-24T17:40:29Z<p><span dir="auto"><span class="autocomment">Comments</span></span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 17:40, December 24, 2014</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l14">Line 14:</td>
<td colspan="2" class="diff-lineno">Line 14:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Tabulações e espaços tinham uma luta. Tabulações venciam. Eles são mais fáceis de lidar e permite endentação configurável para aqueles que necessitam disso. Eu não me importo com o que alguns outro grupo ou organização diga que convenção seja. Se você não quiser utilizar tabs por que você quer que todos os seus comentários de final de linha apareçam bonitos belamente, então eu tenho uma solução: não utilize comentários de final de linha (veja a próxima seção) e você ficará bem.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Tabulações e espaços tinham uma luta. Tabulações venciam. Eles são mais fáceis de lidar e permite endentação configurável para aqueles que necessitam disso. Eu não me importo com o que alguns outro grupo ou organização diga que convenção seja. Se você não quiser utilizar tabs por que você quer que todos os seus comentários de final de linha apareçam bonitos belamente, então eu tenho uma solução: não utilize comentários de final de linha (veja a próxima seção) e você ficará bem.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>== <del style="font-weight: bold; text-decoration: none;">Comments </del>==</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>== <ins style="font-weight: bold; text-decoration: none;">Commentários </ins>==</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Adicione comentários que proporcionam alguma ideia sobre seu código, e que ajude a proporcionar contexto. Também, por que nós utilizamos tabs, posicionam comentários em suas próprias linhas, separam do código fonte, idealmente separados por uma linha em branco acima e abaixo ao menos que você esteja comentando em verboso cada linha de código. Isso também encoraja a comentários mais longos, mais descritivos que possam abranger múltiplas linhas. Se você abranger múltiplas linhas, utilize uma margem direita consistente de 160 caracteres. Comentários lhe ajudam a entender seu código quando você voltar a ele um ano depois, então está adicionando comentários descritivos para si mesmo o tanto o quanto para outros. Inclua informação que você acharia prestativa se você tivesse um caso repentino de amnésia. Eles são especialmente importantes para o software livre e de código aberto que precisam ser mantidos por várias pessoas ao longo dos anos.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Adicione comentários que proporcionam alguma ideia sobre seu código, e que ajude a proporcionar contexto. Também, por que nós utilizamos tabs, posicionam comentários em suas próprias linhas, separam do código fonte, idealmente separados por uma linha em branco acima e abaixo ao menos que você esteja comentando em verboso cada linha de código. Isso também encoraja a comentários mais longos, mais descritivos que possam abranger múltiplas linhas. Se você abranger múltiplas linhas, utilize uma margem direita consistente de 160 caracteres. Comentários lhe ajudam a entender seu código quando você voltar a ele um ano depois, então está adicionando comentários descritivos para si mesmo o tanto o quanto para outros. Inclua informação que você acharia prestativa se você tivesse um caso repentino de amnésia. Eles são especialmente importantes para o software livre e de código aberto que precisam ser mantidos por várias pessoas ao longo dos anos.</div></td></tr>
</table>Tocadotuxhttps://www.funtoo.org/index.php?title=Coding_Standards/pt-br&diff=7783&oldid=prevTocadotux: /* Comments */2014-12-24T17:39:00Z<p><span dir="auto"><span class="autocomment">Comments</span></span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 17:39, December 24, 2014</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l16">Line 16:</td>
<td colspan="2" class="diff-lineno">Line 16:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Comments ==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Comments ==</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">Add comments that provide some insight into your code</del>, <del style="font-weight: bold; text-decoration: none;">and that help to provide context</del>. <del style="font-weight: bold; text-decoration: none;">Also</del>, <del style="font-weight: bold; text-decoration: none;">because we use </del>tabs, <del style="font-weight: bold; text-decoration: none;">place comments on their own lines</del>, <del style="font-weight: bold; text-decoration: none;">separate from source code</del>, <del style="font-weight: bold; text-decoration: none;">ideally separated by </del>a <del style="font-weight: bold; text-decoration: none;">blank line above and below unless you are verbosely commenting every line of code. This also encourages longer</del>, <del style="font-weight: bold; text-decoration: none;">more descriptive comments that may span multiple lines</del>. <del style="font-weight: bold; text-decoration: none;">If you span multiple lines</del>, <del style="font-weight: bold; text-decoration: none;">use a consistent right margin of </del>160 <del style="font-weight: bold; text-decoration: none;">characters</del>. <del style="font-weight: bold; text-decoration: none;">Comments help you understand your code when you come back to it </del>a <del style="font-weight: bold; text-decoration: none;">year later</del>, <del style="font-weight: bold; text-decoration: none;">so you are adding descriptive comments for yourself as much as for others</del>. <del style="font-weight: bold; text-decoration: none;">Include information you would find helpful if you had a sudden case of amnesia</del>. <del style="font-weight: bold; text-decoration: none;">They are especially important for free/open source </del>software <del style="font-weight: bold; text-decoration: none;">that needs to be maintained by various people over the years</del>.</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">Adicione comentários que proporcionam alguma ideia sobre seu código</ins>, <ins style="font-weight: bold; text-decoration: none;">e que ajude a proporcionar contexto</ins>. <ins style="font-weight: bold; text-decoration: none;">Também</ins>, <ins style="font-weight: bold; text-decoration: none;">por que nós utilizamos </ins>tabs, <ins style="font-weight: bold; text-decoration: none;">posicionam comentários em suas próprias linhas</ins>, <ins style="font-weight: bold; text-decoration: none;">separam do código fonte</ins>, <ins style="font-weight: bold; text-decoration: none;">idealmente separados por uma linha em branco acima e abaixo ao menos que você esteja comentando em verboso cada linha de código. Isso também encoraja </ins>a <ins style="font-weight: bold; text-decoration: none;">comentários mais longos</ins>, <ins style="font-weight: bold; text-decoration: none;">mais descritivos que possam abranger múltiplas linhas</ins>. <ins style="font-weight: bold; text-decoration: none;">Se você abranger múltiplas linhas</ins>, <ins style="font-weight: bold; text-decoration: none;">utilize uma margem direita consistente de </ins>160 <ins style="font-weight: bold; text-decoration: none;">caracteres</ins>. <ins style="font-weight: bold; text-decoration: none;">Comentários lhe ajudam </ins>a <ins style="font-weight: bold; text-decoration: none;">entender seu código quando você voltar a ele um ano depois</ins>, <ins style="font-weight: bold; text-decoration: none;">então está adicionando comentários descritivos para si mesmo o tanto o quanto para outros</ins>. <ins style="font-weight: bold; text-decoration: none;">Inclua informação que você acharia prestativa se você tivesse um caso repentino de amnésia</ins>. <ins style="font-weight: bold; text-decoration: none;">Eles são especialmente importantes para o </ins>software <ins style="font-weight: bold; text-decoration: none;">livre e de código aberto que precisam ser mantidos por várias pessoas ao longo dos anos</ins>.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Profanity ==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Profanity ==</div></td></tr>
</table>Tocadotuxhttps://www.funtoo.org/index.php?title=Coding_Standards/pt-br&diff=7782&oldid=prevTocadotux: /* Tabs vs. Spaces */2014-12-24T17:15:13Z<p><span dir="auto"><span class="autocomment">Tabs vs. Spaces</span></span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 17:15, December 24, 2014</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l10">Line 10:</td>
<td colspan="2" class="diff-lineno">Line 10:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Editores modernos fazem um bom trabalho exibindo linhas de texto muito longas, e exibições modernas tem resolução o suficiente para exibições muito superior do que 80 caracteres por linha, mesmo em resolução 1024x768. Você não deve definitivamente dividir pedaço de código elegante de linha única somente pelo argumento de manter a coisa toda sob 80 caracteres. Isso é especialmente ruim se você pegar, digamos, uma linha de 100 caracteres e dividi-la em ''mais'' do que duas linhas somente pelo argumento de mantê-lo sob 80 caracteres de largura. Mas você precisa ou quer usar múltiplas linhas para manter seu código legível, mais poder para você. Somente não faça isso para manter "com compatibilidade com cartão de 80 colunas Apple IIe" por qualquer rasão. Isso é simplesmente bobagem.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Editores modernos fazem um bom trabalho exibindo linhas de texto muito longas, e exibições modernas tem resolução o suficiente para exibições muito superior do que 80 caracteres por linha, mesmo em resolução 1024x768. Você não deve definitivamente dividir pedaço de código elegante de linha única somente pelo argumento de manter a coisa toda sob 80 caracteres. Isso é especialmente ruim se você pegar, digamos, uma linha de 100 caracteres e dividi-la em ''mais'' do que duas linhas somente pelo argumento de mantê-lo sob 80 caracteres de largura. Mas você precisa ou quer usar múltiplas linhas para manter seu código legível, mais poder para você. Somente não faça isso para manter "com compatibilidade com cartão de 80 colunas Apple IIe" por qualquer rasão. Isso é simplesmente bobagem.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>== <del style="font-weight: bold; text-decoration: none;">Tabs </del>vs. <del style="font-weight: bold; text-decoration: none;">Spaces </del>==</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>== <ins style="font-weight: bold; text-decoration: none;">Tabulações </ins>vs. <ins style="font-weight: bold; text-decoration: none;">Espaços </ins>==</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">Tabs and spaces had </del>a <del style="font-weight: bold; text-decoration: none;">fight</del>. <del style="font-weight: bold; text-decoration: none;">Tabs won</del>. <del style="font-weight: bold; text-decoration: none;">They're easier to deal with </del>and <del style="font-weight: bold; text-decoration: none;">allow configurable indentation for those who require it</del>. <del style="font-weight: bold; text-decoration: none;">I don't care what some other group or organization says the convention is</del>. If you <del style="font-weight: bold; text-decoration: none;">don't want to </del>use <del style="font-weight: bold; text-decoration: none;">tabs because </del>you <del style="font-weight: bold; text-decoration: none;">want all </del>your <del style="font-weight: bold; text-decoration: none;">end-of-line comments </del>to <del style="font-weight: bold; text-decoration: none;">line up beautifully</del>, <del style="font-weight: bold; text-decoration: none;">then I have </del>a <del style="font-weight: bold; text-decoration: none;">solution: don't use end-</del>of<del style="font-weight: bold; text-decoration: none;">-line </del>comments <del style="font-weight: bold; text-decoration: none;">(see the next section) </del>and <del style="font-weight: bold; text-decoration: none;">you'll be fine</del>.</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">Tabulações e espaços tinham uma luta. Tabulações venciam. Eles são mais fáceis de lidar e permite endentação configurável para aqueles que necessitam disso. Eu não me importo com o que alguns outro grupo ou organização diga que convenção seja. Se você não quiser utilizar tabs por que você quer que todos os seus comentários de final de linha apareçam bonitos belamente, então eu tenho uma solução: não utilize comentários de final de linha (veja </ins>a <ins style="font-weight: bold; text-decoration: none;">próxima seção) e você ficará bem</ins>.</div></td></tr>
<tr><td colspan="2"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td colspan="2"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">== Comments ==</ins></div></td></tr>
<tr><td colspan="2"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td colspan="2"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">Add comments that provide some insight into your code, and that help to provide context</ins>. <ins style="font-weight: bold; text-decoration: none;">Also, because we use tabs, place comments on their own lines, separate from source code, ideally separated by a blank line above </ins>and <ins style="font-weight: bold; text-decoration: none;">below unless you are verbosely commenting every line of code</ins>. <ins style="font-weight: bold; text-decoration: none;">This also encourages longer, more descriptive comments that may span multiple lines</ins>. If you <ins style="font-weight: bold; text-decoration: none;">span multiple lines, </ins>use <ins style="font-weight: bold; text-decoration: none;">a consistent right margin of 160 characters. Comments help </ins>you <ins style="font-weight: bold; text-decoration: none;">understand </ins>your <ins style="font-weight: bold; text-decoration: none;">code when you come back </ins>to <ins style="font-weight: bold; text-decoration: none;">it a year later</ins>, <ins style="font-weight: bold; text-decoration: none;">so you are adding descriptive comments for yourself as much as for others. Include information you would find helpful if you had </ins>a <ins style="font-weight: bold; text-decoration: none;">sudden case </ins>of <ins style="font-weight: bold; text-decoration: none;">amnesia. They are especially important for free/open source software that needs to be maintained by various people over the years.</ins></div></td></tr>
<tr><td colspan="2"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td colspan="2"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">== Profanity ==</ins></div></td></tr>
<tr><td colspan="2"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td colspan="2"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">Do not place any profanity in source code </ins>comments <ins style="font-weight: bold; text-decoration: none;">or variable names. It just makes you look unprofessional, silly </ins>and <ins style="font-weight: bold; text-decoration: none;">incompetent</ins>.</div></td></tr>
<tr><td colspan="2"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td colspan="2"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td colspan="2"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category:QA]]</ins></div></td></tr>
</table>Tocadotuxhttps://www.funtoo.org/index.php?title=Coding_Standards/pt-br&diff=7781&oldid=prevTocadotux: Created page with "== Padrão de Codificação Básica Em Um Nutshell == * empacotamento de palavra (word wrap) de até 160 caracteres * utilize tabs, não espaços, para endentação * utilize..."2014-12-24T16:53:13Z<p>Created page with "== Padrão de Codificação Básica Em Um Nutshell == * empacotamento de palavra (word wrap) de até 160 caracteres * utilize tabs, não espaços, para endentação * utilize..."</p>
<p><b>New page</b></p><div>== Padrão de Codificação Básica Em Um Nutshell ==<br />
<br />
* empacotamento de palavra (word wrap) de até 160 caracteres<br />
* utilize tabs, não espaços, para endentação<br />
* utilize um tamanho de tab de 4 caracteres (o tamanho de tab pode ser ajustado, mas isso afeta quando você alcançar o limite de empacotamento mágico de 160 caracteres)<br />
* comentários em linhas separadas, no mesmo nível de recuo como código (seções podem ser marcadas por comentários 'outdented')<br />
<br />
== Empacotamento de Palavra (Word Wrap) ==<br />
<br />
Editores modernos fazem um bom trabalho exibindo linhas de texto muito longas, e exibições modernas tem resolução o suficiente para exibições muito superior do que 80 caracteres por linha, mesmo em resolução 1024x768. Você não deve definitivamente dividir pedaço de código elegante de linha única somente pelo argumento de manter a coisa toda sob 80 caracteres. Isso é especialmente ruim se você pegar, digamos, uma linha de 100 caracteres e dividi-la em ''mais'' do que duas linhas somente pelo argumento de mantê-lo sob 80 caracteres de largura. Mas você precisa ou quer usar múltiplas linhas para manter seu código legível, mais poder para você. Somente não faça isso para manter "com compatibilidade com cartão de 80 colunas Apple IIe" por qualquer rasão. Isso é simplesmente bobagem.<br />
<br />
== Tabs vs. Spaces ==<br />
<br />
Tabs and spaces had a fight. Tabs won. They're easier to deal with and allow configurable indentation for those who require it. I don't care what some other group or organization says the convention is. If you don't want to use tabs because you want all your end-of-line comments to line up beautifully, then I have a solution: don't use end-of-line comments (see the next section) and you'll be fine.</div>Tocadotux