Jon Aquino's Mental Garden

Engineering beautiful software jon aquino labs | personal blog

Monday, August 29, 2011

My two favorite grammatical constructs

I have two favorite grammatical constructs, from my English 11 course with Mr. Featherstone back in high school. They both have to do with parallelism.

The first uses semicolons and commas, and it looks like this:
Consequently, one must infer that Plato would have programmed in Smalltalk; Aristotle, in Java; Descartes, in Python; and Hume, in Basic.
Note that each item in the list is separated by a semicolon – and even cooler, we use a comma in place of the repeated words (“Aristotle, in Java” is used instead of “Aristotle would have programmed in Java”). Isn’t that neat?

A second favorite grammatical construct is a mix of grammar and formatting. When I do a bulleted list, you can insert headings at the start of each item, in bold italics. Like so:

  • Step 1. Print out the code. Sometimes the code you face is so gnarly blah blah blah...
  • Step 2. Tidy up the code. Tidying up whitespace and fixing the style of the code is a great blah blah blah...
  • Step 3. Make the code easier for yourself and others to understand. What I mean here is adding doc, and especially renaming variables, methods, and classes blah blah blah...
I get a warm, fuzzy feeling when I get to do either of the above. Try it – you’ll like it.

Thanks, Mr. Featherstone!

0 Comments:

Post a Comment

<< Home