A blog about software and making.

Odds & Ends - September 2012

Thoughts, terms, and ideas I’ve come across over the last few months.

  • The three virtues of programmers - Hubris, Impatience, and Laziness. src
  • The curse of the gifted - A tendency to lean on your natural ability too much, because you have always been rewarded for doing that and self-discipline would take actual work. src
  • Classic 3 Tier - Presentation / Buisness Logic (rules) / Data Source (queries)
  • Typing Types
    • Exact typing - Only ducks are ducks
    • Interface typing - If it says it’s a duck,
    • Duck typing - If it quacks like a duck then we don’t care as long as it has the fields/methods we need.
  • Mark and Sweep GC - Pause, find all variables in current scope, find all resources that are reachable from variables in scope and free the rest. AKA “stop the world GC”.
  • Reference counting GC - Each resource has a count of # of places it’s being used (references). When the code is done with the resource, the count will decrease to zero so it can’t be freed. Vulnerable to circular references because counts will never reach zero.
  • Dynamic Dispatch - Not knowing what function you will call until runtime.
  • Encoding Scheme - Encodes data for a specific purpose (easier to transmit, read, convert to new format).
  • More code = Harder to fit in IL cache so more cache evictions and harder to inline.
  • More branches = more branch predictions = more branch mispredictions.
  • Dependancy Inversion Principle - program to interfaces or abstract base classes.
  • System call - Userspace request of a kernel service.
  • High Cohesion - Keeping parts of a codebase that are related to each other in single place.
  • Low coupling - Separating unrelated parts of the codebase as much as possible.
  • Domain Event - Anything that happens that is of interest to a domain expert.
  • You call a library, a framework calls you. A library is a tool … A framework is a way of life. src
  • Pure functions > Functions with state > Functions with side effects > Factory functions.
  • A member function has a hidden argument called ‘’this’’ that is the specific object we are operating on (the context of the function call).