Skip to content

Instantly share code, notes, and snippets.

View datrinh's full-sized avatar

Duc Anh Trinh datrinh

View GitHub Profile
@datrinh
datrinh / Clean_Code.md
Last active February 3, 2021 13:39
List of rules to improve code quality

Evan Clean Code

“Clean code reads like well-written prose” - Grady Brooch

“Clean code always looks like it was written by someone who cares” – Michael Feathers

“You know you are working on clean code when each routine you read turns out to be pretty much what you expected” – Ward Cunningham

General Rules

@datrinh
datrinh / Evan Testing.MD
Last active May 5, 2020 11:38
Guidelines and hints for testing
@datrinh
datrinh / evan_dev_faq.md
Last active April 1, 2020 08:07
Common Issues and Solutions in Evan Dev

Identity, Accounts and DID

Get AccountId from Identity

runtime.verifications.getOwnerAddressForIdentity(toAccount);

Get Identity from DID

runtime.did.convertDidToIdentity(did)

@datrinh
datrinh / clean_code.md
Created November 27, 2019 15:37 — forked from wojteklu/clean_code.md
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