Tag Archives: tradeoffs

Debating tradeoffs

A few weeks ago, a we fielded a potential request to validate Social Security Numbers.  The social security administration has a few rules for numbers that they deem invalid and that they will never assign:

  1. The first three numbers are {000, 666, 900-999}
  2. The fourth & fifth numbers are 00
  3. The last four numbers are 0000

Being one for code reuse, I wanted to do this in as general a way as possible.  This was my initial solution (in Mumps/Cache): Continue reading