Comments on: Source Code Typography http://www.terminally-incoherent.com/blog/2013/05/22/source-code-typography/ I will not fix your computer. Tue, 04 Aug 2020 22:34:33 +0000 hourly 1 https://wordpress.org/?v=4.7.26 By: JohnM17 http://www.terminally-incoherent.com/blog/2013/05/22/source-code-typography/#comment-34825 Thu, 23 May 2013 21:09:09 +0000 http://www.terminally-incoherent.com/blog/?p=14444#comment-34825

I’m absolutely in agreement with the idea of keeping one’s code well-formed, and have a particular thing for clear and consistent indentation and spacing. I also have my pet hates, one of which is this:

function somefunc() {

}

which I insist should be done as:

function somefunc()
{

}

I’ve gotten into the habit when web-scripting to remove all unnecessary spaces after I’ve finished coding, in order to minimise file sizes and optimize loading performance of web pages. To this end I also use find-and-replace to change the names of variables, files and directories to single-letter designations prior to upload.

Reply  |  Quote
]]>
By: FX http://www.terminally-incoherent.com/blog/2013/05/22/source-code-typography/#comment-34644 Wed, 22 May 2013 20:08:46 +0000 http://www.terminally-incoherent.com/blog/?p=14444#comment-34644

I have tons, literally tons of comments in my code. Sometimes I have one comment for each line of code, but my usual ratio is close to 3 or 4 lines of code for 1 comment.

I can scan code more quickly by skimming through lines of comments rather than actual code, and even seemingly completely useless comments (such as “increment such variable”) actually help me read faster and structure the code better than just letting obvious lines of code alone.

I use Vim’s gq command intensively as well, but aside from that, the Syntastic plugin (I think I learned about it from one of your articles by the way!) uses PEP8 for Python, which is again highly useful!

Reply  |  Quote
]]>
By: Janek Warchoł http://www.terminally-incoherent.com/blog/2013/05/22/source-code-typography/#comment-34625 Wed, 22 May 2013 17:14:01 +0000 http://www.terminally-incoherent.com/blog/?p=14444#comment-34625

Hi,

interesting post – i’m into typography myself, albeit on a quite different field: musical scores. Here’s a short example comparing good and bad music typography – https://www.dropbox.com/s/cdlezke0assaiua/por%C3%B3wnanie%20sk%C5%82ad u%20nut.pdf
I can translate the description if you want – is anyone interested?

Reply  |  Quote
]]>