Skip to content

Engineering principles

If it looks like a duck, quacks like a duck, but needs batteries - U have the wrong abstraction

“Give me six hours to chop down a tree and I will spend the first four sharpening the axe” – Abraham Lincoln 🪓

Reliable Software Design Principles

  • Separation of Concerns – distinct functionality into parts that address specific aspects.
    Leads to high Cohesion and loose Coupling 🪛🛞
  • Modularity – break down large systems into smaller independent reusable modules 🧩
  • Anticipation of Change – consider future needs when designing Ur software 🛸
  • Maintainability – write features that’s easy to understand and modify 🚑
  • Scalability – adapt to increased demand without failing or excessively slowing down 🥖
  • Testability – design functionality in away easy to test, identify and fix bugs early 🐞
  • Security – design with security in mind for threats protection and reliable functioning 🕵️
  • Resiliency – ability to withstand or recover quickly: proactive monitoring, decentralisation, load balance, fault tolerance, graceful degradation, fast recovery 🍀️
  • Continuous Delivery - iterative development, frequent releases, instant rollbacks 📯

KISS

  • Keep
  • It
  • Simple
  • Stupid

Strive for clear, concise, and easy to understand & to use solutions. Avoiding unnecessary complexity will make Ur system more robust, easier to maintain & to extend

DRY

  • Don’t
  • Repeat
  • Yourself

Avoid constant copy-paste. Create reusable entities to reduce redundancy

YANGI

  • You
  • Are
  • Not
  • Gonna
  • Need
  • It

Don’t implement features or functionalities unless there’s a clear need for them. This reduces the system complexity and maintenance overhead

WOMBAT

  • Waste
  • Of
  • Money
  • Brains
  • Aand
  • Time

Avoid projects that drain resources without yielding the desired results

SMART

  • Specific
  • Measurable
  • Achievable
  • Relevant
  • Time bound

Create effective goals to increase the chances of success

SYSTEMS

  • Save
  • YourSelf
  • Time
  • Energy
  • Money
  • & Stress

”The Purpose Of a System Is What It Does” should be understandable by observing its actual behavior, rather than just its intended purpose

INVEST

  • Independent
  • Negotiable
  • Valuable
  • Estimable
  • Small
  • Testable

Ensure that tasks(stories) are clear & actionable. It’ll contribute to the overall project goals

FOCUS

  • Follow
  • One
  • Course
  • Until
  • Success

Approach work strategically, prioritize effectively, staying focused on achieving Ur goals

MILE

  • Maximum
  • Impact
  • Minimum
  • Effort

Maximize the impact by leveraging existing resources or via minimizing the effort required. Focus on what’s really brings value (“the vital few”)

SPACE

  • Satisfaction & wellbeing
  • Performance
  • Activity
  • Communication & collaboration
  • Efficiency & flow

Identify areas for improvement to create a more positive and productive work environment

TDD

  • Test
  • Driven
  • Development

Write the tests for functionality before the actual implementation. Write failing test. Make it pass. Refactor

SOLID

  • Single Responcibility principle (SRP)
    “One class should have one and only one responsibility”
  • Open/Closed principle (OCP)
    “Software entities should be opened for extension, but closed for modification”
  • Liskov Substituion principle (LSP)
    “Objects should be replaceable with instances of their sub-types with no altering the program correctness”
  • Interface Segregation principle (ICP)
    “Many client-specific are better than one general purpose interface”
  • Dependency Inversion principle (DIP)
    “Depend on abstraction not on concretion”

4 Object-Oriented Programming Principles

  • Abstraction focusing on essential features of entity without implementation details
  • Encapsulation hiding the implementation details exposing only the clean interfaces
  • Inheritance ability of children to inherit functionality from a parent by extending it
  • Polymorphism ability of implementation to take multiple forms of abstraction

”Composition over Inheritance” suggests it’s better to compose objects (HAS-A) to achieve polymorphic behavior & code reuse rather than inheriting (IS-A) from a parent

Resiliency Principles

  • Circuit BreakerFail Fast, allows to perform default or fallback operations 🧯
  • Redundancy – if one instance fails another should take over 🧻
  • Backpressure – throttle incoming workload to not exceed throughput capacity 🚰
  • Bulkhead Pattern – failure of one shouldn’t lead to failure of entire system 🚢
  • Fallback – default value (or cache) to rely on in case of failure ☎️
  • Retry – make several attempts before failing 🛎️
  • Timeout – limit time until response instead of infinite waiting ⌛

Proactive monitoring & alerting are crucial for system’s Availability & fast recovery on the road to zero downtime 🟢

“Imho, regardless of the job title, whole team would benefit from knowing these principles”

Further Reading