Showing posts with label design patterns. Show all posts
Showing posts with label design patterns. Show all posts

Jun 8, 2015

Parallel Programming

Amdahl's law
The speedup of a program using multiple processors in parallel computing is limited by the time needed for the sequential fraction of the program. For example, if a program needs 20 hours using a single processor core, and a particular portion of the program which takes one hour to execute cannot be parallelized, while the remaining 19 hours (95%) of execution time can be parallelized, then regardless of how many processors are devoted to a parallelized execution of this program, the minimum execution time cannot be less than that critical one hour. Hence the speedup is limited to at most 20×.

Gustafson–Barsis' law
Says that computations involving arbitrarily large data sets can be efficiently parallelized.

Jun 13, 2014

Software architecture design principles

GRASP - General Responsibility Assignment Software Patterns (or Principles) consists of guidelines for assigning responsibility to classes and objects in object-oriented design. The different patterns and principles used in GRASP are: Controller, Creator, Indirection, Information Expert, High Cohesion, Low Coupling, Polymorphism, Protected Variations, and Pure Fabrication.
SOLID (ru)
KISS Keep it simple, stupid
DRY Don't repeat yourself
YAGNI You aren't gonna need it
Worse is better
Law of Demeter, LoD Each unit should have only limited knowledge about other units: only units "closely" related to the current unit. Each unit should only talk to its friends; don't talk to strangers. Only talk to your immediate friends.