7 Matching Annotations
- Sep 2022
-
github.com github.com
-
I don't like the first syntax because then you have weird looking code due to all the leading whitespace, and you lose a lot of real estate.
-
-
metalblueberry.github.io metalblueberry.github.io
-
your cognitive load increases with the level of indentation. 1 2 3 4 5 6 7 8 9 10 if r.Method == "GET" { if r.Header.Get("X-API-KEY") == key { // ok return nil }else{ return errors.New("Key is not valid") } } else { return errors.New("Invalid Method") }
-
Avoid indentation levels, If you find yourself with more than 3, you should create a function.
-
- Oct 2020
-
-
I'm more inclined towards an {@ tag than a {# tag because the indentation could quickly get out of control
-
-
github.com github.com
-
{#with someExpression as someVariable} <p>{someVariable}</p> {/with}
-
-
www.python.org www.python.org
-
When the conditional part of an if-statement is long enough to require that it be written across multiple lines, it's worth noting that the combination of a two character keyword (i.e. if), plus a single space, plus an opening parenthesis creates a natural 4-space indent for the subsequent lines of the multiline conditional. This can produce a visual conflict with the indented suite of code nested inside the if-statement, which would also naturally be indented to 4 spaces.
Tags
Annotators
URL
-
- Jul 2016
-
nickgravgaard.com nickgravgaard.com
-
The solution - move tabstops to fit the text between them and align them with matching tabstops on adjacent lines
Tags
Annotators
URL
-