The Ruby on Rails and ClojureScript experts

May 20, 2013

Decision tables can be used to model complicated logic. Like flowcharts, nested if-statements, and case statements, they associate conditions with actions to perform, but often in a more elegant and concise way.

A Decision table has four quadrants:

  • Conditions
  • Condition alternatives
  • Actions
  • Action entries
  • Like finite state machines, they provide an explicit and complete overview of the problem space with all possible permutations. Nested if statements can be rendered from Decision tables.

    Resources

    • rufus-decision – A Ruby gem to act on Decision tables provided in CSV format (e.g., from spreadsheet or google docs).
    • Ilya Grigorik has a good blog post about Decision trees (not to be confused with Decision tables!). His decisiontree gem allows one to analyse the rules and extract a visual representation.

    Link: Decision table – Wikipedia, the free encyclopedia via en.wikipedia.org