Codes and lattice algebras from the topological viewpoint