Wednesday, December 4, 2013

Mnemonics as a Key->Value associations in programming

Suppose that you need to memorize a list of values. There is a mnemonic technique to do that. Basically, you need to take a known list of keys, create associations and map the to the target values. You know the keys, you can iterate them. The funny stories are used to associate the keys to values. In result, you get a structure in memory that can can retrieve the values like the most fundamental programming pattern

for (Key k: keys)
  value = map.get(key)

No comments: