Skip to content

Instantly share code, notes, and snippets.

View tp-hk's full-sized avatar
🛠️
code for work; code for hobby;

TP | HK tp-hk

🛠️
code for work; code for hobby;
  • Saṃsāra
View GitHub Profile
@tp-hk
tp-hk / Monolith to Microservices.md
Last active March 6, 2023 20:16
Tech Books Summary
@tp-hk
tp-hk / Clean Architecture.md
Last active April 12, 2025 21:38
Tech Books Summary

Clean Architecture (2022 H2)

Good architecture:

  • good architecture = allow changes w/ flexibility + delay decision

Business rules:

  • Entities: pure; small sets of critical business rules. Should be most independent & reusable. Can be an object with methods or data structures & functions
  • Use case: not as pure; is an object. contains data elements & operations.
  • Entities are lower level than (don’t depend on) use cases since use cases are closer to inputs/outputs.
  • Entities & use cases are 2 layers
@tp-hk
tp-hk / immutability-vs-reassignment.js
Created October 17, 2018 21:28 — forked from battmanz/immutability-vs-reassignment.js
Demonstrates the difference between an immutable object and a variable that cannot be reassigned
'use strict';
// CASE 1: The object is mutable and the variable can be reassigned.
let o1 = { foo: 'bar' };
// Mutate the object
o1.foo = 'something different';
// Reassign the variable
o1 = { message: "I'm a completely new object" };
@tp-hk
tp-hk / tips-tricks-setup-babel-file-watcher.md
Last active March 19, 2023 23:52
tips & tricks - set up Babel file watcher in WebStorm 11+ on Windows