

The law of Demeter: Object should only communicate with other objects in their neighbourhood.Both ways have advantages/disadvantages, so choose dependent on your situation.Hard to add new kinds of data structures.Easy to add new behaviours to existing data structures.Data structures expose their data and have no meaningful functions.Hard to add new behaviours to existing objects.Objects hide their data behind abstractions and expose functions that operate on that data.Create abstract interfaces so that one can manipulate the essence of the data without having to know its implementation.Avoid manipulating directly public variables.Insert blank characters between math equations and function arguments to increase readability.

CLEAN CODE PDF GITHUB REGISTRATION
registration that (unexpectetly) sets automatically sessions/cookies Avoid functions with side effects: E.g.Should follow the "Open-Closed-Principle": Modules should be open for extensions and closed for modifications.Classes always should follow the "Single-Responsibility-Principle": Class should only one thing.Should always have one level of abstraction.Should always do one main thing (you can describe that "thing" in one meaningful sentence).Should not be longer than 5 lines of code.Functions should use verbs ("deletePage") or should be prefixed with set/get ("getName").Classes should be nouns ("Customer", "Account").don't use "GSTzip", "GSTlocation", "GSTstreet", "GSTnumber" inside a class "GST") Be consistent (always use one of fetch/retrieve/get in different classes).Use searchable names ("realDaysPerDay" vs "d").Use pronounceable names ("generationTimestamp" vs "genymdhms").Use intention-revealing names ("elapsedTimeInDays" vs.

The Boy Scout Rule: Leave the campground cleaner than you found it ("always refactor a little bit every time you work on your code").
