Skip to content

Instantly share code, notes, and snippets.

View zero88's full-sized avatar

zero88 zero88

View GitHub Profile
zero88 / EventHandler.ts
Last active March 26, 2024 08:06
// eslint-disable-next-line max-classes-per-file
interface EventExecutor<T, R> {
execute(input: T): R;
interface EventInterceptor<T, R> {
beforeFn(): EventExecutor<T, T>[];
executeFn(): EventExecutor<T, R>;
zero88 /
Created July 23, 2018 14:24
Domain Driven Design

Domain Driven Design (DDD)

zero88 /
Last active July 23, 2018 14:22
Clean Code overview

Clean Code

Code for human not machines

Code is clean if anyone in team can understand, easy to read and enhance by other developer instead of origin author.

Code clean is readability, flexibility, extensibility, maintainability.

Bullet points:

zero88 /
Created July 23, 2018 09:02
BDD overview

Behavior Driven Development (BDD)

Feature: Behavior Driven Development (BDD).

  • In order to:
    • Avoid rework due to misunderstand and slow feedback among project manager, project owner, developer, QA/tester, sales, any guys join IT projects and customer.
    • And make project information is transperant as human readable.
    • And keep software functions work as design after refactor/restructure code.
  • As people (tech/non-tech) want to get knowledge of BDD.
  • Scenario: BDD Overview
zero88 /
Last active July 23, 2018 12:31
TDD overview

Test Driven Development (TDD)


TDD is software development technique to allow writing test before code then the tests will drive the implementation.


Apply red-green refator cycle. Imagine the developer wear 3 colors hat: red, green and blue. In which:

git ls-files | grep \.sh | tr '\n' ' '
git update-index --chmod=+x $(git ls-files | grep \.sh | tr '\n' ' ')