Any base drive system is not incredibly difficult to program. Programming an effective control system for a drive system is hard.
see:
- Failure checking (state machine, redundancies)
- Human error correction
- Mechanical error correction
I really don't know what to answer your question with, everytime I think of a drive system I think of all the ways I could improve it with pieces of code - would be very difficult to pick a single one, and would require more context.