Codes and tips using scala language