Take-home Chinese food for thought

  • The practical OCaml programmer first seeks to understand what is going on. They write unit tests to concretize their understanding.
  • The practical OCaml programmer then seeks to understand how things work. They study the nature of the data at hand and concur that the wheel needs not be re-invented, in part or in toto.
  • The practical OCaml programmer uses structural recursion for data that were constructed inductively.
  • The practical OCaml programmer is not afraid of anonymous functions.
  • The practical OCaml programmer follows procedure with a tail call.
  • The practical OCaml programmer heeds the reverse order of accumulation.
  • The practical OCaml programmer chooses meaningful names and uses auto-completion.
  • The practical OCaml programmer is mindful of not overdoing anything. They favor predicates, accessors, and data constructors that work in constant time rather than in linear time (e.g., List.cons (i.e., ::) rather than List.append (i.e., @)).
  • The practical OCaml programmer lives by Don Knuth’s tenet that early optimization is the source of a lot of evil. They are also aware that often, nothing needs to be made efficient if it is done right in the first place.
  • The practical OCaml programmer knows that the measure of their understanding is the clarity of their discourse.

Version

Added another bite. [01 Oct 2019]

Expanded [03 May 2019]

Created [30 Apr 2019]

Table Of Contents

Previous topic

YSC1212 Lecture Notes, Week 13

Next topic

Exercises