In addition to the sins stephen calls out, the engineering manager and CTO committed another major blunder: They assumed that the written specs reflected the existing Perl codebase. Bad move.
in reply to A Porting Horror Story
Faced with a legacy codebase and legacy specifications, trust the codebase.1
Specs lag implementation, unless one puts a lot of effort into keeping them current -- effort that code be applied elsewhere. By ignoring the existing code base as a source of truth, they probably dribbled requirements all over the floor.
1. This is a variant on another useful saying: "When the map and the territory don't agree, trust the territory."