sort list of works by generated_code