tags:

views:

1252

answers:

3

What are Table-Driven methods as mentioned by Bill Gates on Vista commercial on http://www.youtube.com/watch?v=gBWPf1BWtkw

+7  A: 

Table-driven methods are schemes that allow you to look up information in a table rather than using logic statements (i.e. case, if). In simple cases, it's quicker and easier to use logic statements, but as the logic chain becomes more complex, table-driven code is simpler than complicated logic, easier to modify and more efficient.

Rosellyne Thompson
A: 

I am asking because I have done some work on my blog about decision tables and I was thinking it might be somewhat connected.

Jonathan
A: 

A table-driven method is quite simple. Use data structures instead of if-then statements to drive program logic. For example, if you are processing two types of records (tv versus cable) you might do this:

hash[tv] = process_tv_records hash[cable] = process_cable_records

In some languages, like Ruby or Perl, this technique is straightforward. In Java, you'd need to use Reflection to find method handles.

If you want to learn about decision tables, investiagethe Fitnesse testing framework at http://fitnesse.org/.

David Medinets