Notes from watching Stuart Halloway's "Debugging with the Scientific Method" from Clojure/conj 2015.
Clear problem statement: steps you took, what you expected, what actually happened.
Efficient hypothesis: bisect the problem.
| ;; This macro is also available in: https://github.com/wdhowe/clj-contrib | |
| (defmacro as-some-> | |
| "as->, with the nil checking of some->. | |
| Binds name to expr. When name is not nil, evaluates the first | |
| form in the lexical context of that binding. When that result | |
| is not nil, then binds name to result, repeating for each | |
| successive form." | |
| [expr name & forms] | |
| (let [steps (map (fn [step] `(if (nil? ~name) nil ~step)) |
Notes from watching Stuart Halloway's "Debugging with the Scientific Method" from Clojure/conj 2015.
Clear problem statement: steps you took, what you expected, what actually happened.
Efficient hypothesis: bisect the problem.
Notes from Rich Hickey's Simplicity Matters slides.
"Simplicity is the ultimate sophistication." -Leonardo da Vinci
| Complexity | Simplicity |
|---|
| ;; These protocols are also available in: https://github.com/wdhowe/clj-contrib | |
| (defprotocol Errors | |
| "A protocol for finding errors in a collection." | |
| (errors [coll] "Returns a map of the `:counts/errors`, which are entries with `:error` keys.")) | |
| (extend-protocol Errors | |
| clojure.lang.Sequential | |
| (errors | |
| [coll] |
| #!/bin/bash | |
| url=$1 | |
| echo | \ | |
| openssl s_client -showcerts -servername ${url} -connect ${url}:443 2>/dev/null | \ | |
| openssl x509 -inform pem -noout -text |
Extend your GPG key expiry
Find the ID of the expiring key. Note your key ID.
gpg --list-secret-keysStart editing the key.
Analyzing your project via the cljdoc-analyzer locally will ensure that when your project is pushed to clojars, the API docs will have a much better chance of successfully generating.
Install the cljdoc-analyzer.
clojure -Ttools install io.github.cljdoc/cljdoc-analyzer '{:git/tag "RELEASE"}' :as cljdoc| ##-- Aliases --## | |
| alias ll='ls -l' | |
| alias k='kubectl' | |
| alias ke='kubectl exec -it' | |
| alias kc='kubectx' | |
| alias kn='kubens' | |
| ##-- Completions and Prompt --## |