Constructors don’t get better with age!

The main goal of the article is to make you remember 2 things:

  1. Constructors aren’t like cheese i.e. they don’t get better with age
  2. An “ad litteram” iterative approach on writing constructors is BAD

How bad you wonder? Well… this bad:

new Admin(code,
 name,
 propId,
 locale,
 description,
 service,
 emailAddress1,
 emailAddress2,
 oldEmailAddress,
 generalReports,
 noVat,
 parId,
 junk,
 dateJoining,
 sessionId,
 type,
 typeOther,
 crId,
 keyAccountTypeId,
 crmId,
 virtual,
 acCoConfirmed,
 acRe,
 sanct,
 timestamp,
 passwordExpiryDays,
 concurrentLogins,
 suspensionDays,
 contractVersionId,
 vat,
 version);

Usually when you add a new filed Continue reading “Constructors don’t get better with age!”