Skip to content

Instantly share code, notes, and snippets.

@wojteklu
wojteklu / clean_code.md
Last active July 21, 2024 11:18
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@jamiegs
jamiegs / Warmup-Healthecks.md
Last active December 7, 2021 02:56
Warm up and health checks.md

Backgound

Previously our warmup and health checks were too coupled. Our load balancers make an http call to /healthcheck on a regular interval. This is to see if it should send traffic to the application or not. It will also kill the container if it's unhealthy after so long.

This was a problem because say mongo is down for an extended time it would take down the entire microservice. The microservice would continously try to launch containers, which would then fail healthchecks during warmup, and get killed again.

Most the application might still be in a good state though but because one dependancy is down, the whole thing is down.

So, we're splitting them out into multiple health checks.

@davidfowl
davidfowl / MinimalAPIs.md
Last active June 28, 2024 17:42
Minimal APIs at a glance
@tonyma
tonyma / MinimalAPIs.md
Created November 16, 2021 02:51 — forked from davidfowl/MinimalAPIs.md
Minimal APIs at a glance