Good code, bad code

vs

// Get all of these in one hit, so we can pass them into LoadBucketExtService.LoadEntityExt() and cut down on database calls.
List<Lotus.Entities.Client> allAccountClients = new Lotus.Clients.CRUD(Config, Trace).GetAllClientsInAccount(accountId);
List<Lotus.Entities.BucketProject> allAccountBucketProjets = new Lotus.BucketProjects.CRUD(Config, Trace).GetAllBucketProjectsInAccount(accountId);
List<Lotus.Entities.BucketAllowance> allAccountBucketAllowances = new Lotus.BucketAllowances.CRUD(Config, Trace).GetAllBucketAllowancesInAccount(accountId);

The difference:

  • Colour coding. It turns “verbose” into “manageable with a scan”.
  • It also means devs don’t need to worry about long namespaces, extensive code. They don’t have to worry about making code as short as possible (which is not readable for everyone). Let the IDE do the work of making code UX compatible, available and accessible for everyone.