Skip to content

Instantly share code, notes, and snippets.

View anhnguyen1618's full-sized avatar

Ha Anh Nguyen anhnguyen1618

  • Helsinki, Finland
View GitHub Profile
@wojteklu
wojteklu / clean_code.md
Last active November 15, 2024 07:19
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

@hackwaly
hackwaly / main.ml
Created May 13, 2016 02:24
ocaml + llvm
open Ctypes
open Foreign
let main () =
ignore (Llvm_executionengine.initialize ());
let ctx = Llvm.global_context () in
let m_main = Llvm.create_module ctx "hello" in
let builder = Llvm.builder ctx in
let t_i32 = Llvm.i32_type ctx in
let ft_main = Llvm.function_type t_i32 [||] in
@nicktoumpelis
nicktoumpelis / repo-rinse.sh
Created April 23, 2014 13:00
Cleans and resets a git repo and its submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive