- Organizing larger applications
- Domain logic shouldn’t include handlers for bad/unclean data.
- validateur, bouncer, clj-schema for checking data going into the pipeline.
- domain-specific, semantic checks
- TODO: Any better ways for doing this conditional validation.
- Need to factor out common data cleaning utils into shared library.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns async-playground.core | |
| (:require [clojure.core.async :as async | |
| :refer [go chan >! <! >!! <!! timeout close! | |
| thread alts! alts!! sliding-buffer]])) | |
| (defn walk [t] | |
| (cond (nil? t) | |
| nil | |
| :else | |
| (let [[l v r] t] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| skyliner=# select count(transaction_id) from transaction_kv where when_created > '2013-10-22T00:00:00.000-00:00'; | |
| ERROR: could not read block 373028 in file "base/67212/90213.2": read only 0 of 8192 bytes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun toggle-fullscreen () | |
| "Toggle full screen" | |
| (interactive) | |
| (set-frame-parameter | |
| nil 'fullscreen | |
| (when (not (frame-parameter nil 'fullscreen)) 'fullboth))) |
This is a sample from a tar file class I created for a chef cookbook. In this example I'm iterating over entries in the tar file. Because of the way tar handles filenames over 100 chars (././@LongLink) I have to do something to register that i'm dealing a longlink and treat the next entry differently.
I would love any advice on how to clean this up. Its a super long method, I especially don't like that I have to set full_name to nil and twice.
OlderNewer