The actual programmer & designer of the software is the supplier of the engine control units (ECUs), in most cases Bosch. The software that they supply actually already contains these cheating routines. These routines are delivered as a part of the software packages, and can be turned on/off with some flags.
It is up to the auto company how to set these flags.
Source: Close relatives working in the car industry.