Welcome!

Michael Zuskin

Subscribe to Michael Zuskin: eMailAlertsEmail Alerts
Get Michael Zuskin via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Latest Articles from Michael Zuskin
A given object should assume as little as possible about the structure or properties of anything else (including its subcomponents). In simpler words: if you want to get data from an object, referenced by a variable, then use a public function declared in the referenced object itself,...
Create a separate function for each logical sub-task, i.e., divide one long program into a number of short subprograms. The idea is named “Separation of concerns.” Do that not only if the code will be re-used (i.e., called from more than one place) but even if it will only be called on...
Declare local variables in the beginning (on the top) of the function, before the first executable line. This will: Make it easier to detect all the variables used in the function and to follow them Keep as little stuff as possible in executable code fragments, where programmers sho...
Give all entities mentioned in the code (DB tables, DB tables’ fields, variables, classes, functions, etc.) meaningful, descriptive names that make the code easily understood. The names should be so self-explanatory that it eliminates the need for comments in most cases. Use the words...
To pass errors from functions outward, throw exceptions instead of returning an error code like -1. That’s implemented by filling the “Throws:” field in the function’s header (signature) with the class Exception or its descendant. When the exceptions mechanism is used, calls to functio...