Trainning codes and tools codes