Skip to content

Instantly share code, notes, and snippets.

View autumn-n's full-sized avatar
🏠
Working from home

Autumn autumn-n

🏠
Working from home
View GitHub Profile
@autumn-n
autumn-n / data-modeling.md
Created January 1, 2025 10:49 — forked from levand/data-modeling.md
Advice about data modeling in Clojure

Since it has come up a few times, I thought I’d write up some of the basic ideas around domain modeling in Clojure, and how they relate to keyword names and Specs. Firmly grasping these concepts will help us all write code that is simpler, cleaner, and easier to understand.

Clojure is a data-oriented language: we’re all familiar with maps, vectors, sets, keywords, etc. However, while data is good, not all data is equally good. It’s still possible to write “bad” data in Clojure.

“Good” data is well defined and easy to read; there is never any ambiguity about what a given data structure represents. Messy data has inconsistent structure, and overloaded keys that can mean different things in different contexts. Good data represents domain entities and a logical model; bad data represents whatever was convenient for the programmer at a given moment. Good data stands on its own, and can be reasoned about without any other knowledge of the codebase; bad data is deeply and tightly coupled to specific generating and

@autumn-n
autumn-n / 한글과유니코드.md
Created July 13, 2021 16:22 — forked from Pusnow/한글과유니코드.md
한글과 유니코드

한글과 유니코드

유니코드에서 한글을 어떻게 다루는지를 정리하였다.

유니코드

  • 유니코드(Unicode)는 전 세계의 모든 문자를 컴퓨터에서 일관되게 표현하고 다룰 수 있도록 설계된 산업 표준 (위키 백과)
  • 단순히 문자마다 번호를 붙임
  • 계속 업데이트되며 현재는 Unicode Version 9.0.0 이 최신이다.

UTF

  • 유니코드를 실제 파일 등에 어떻게 기록할 것인지를 표준화한 것이다.
@autumn-n
autumn-n / core.clj
Created February 23, 2019 13:10 — forked from dfcarpenter/core.clj
Domain Modelling using Clojure
(comment "This is a small experiment inspired by Oskar Wickströms
excellent work at
https://haskell-at-work.com/episodes/2018-01-19-domain-modelling-with-haskell-data-structures.html.
I wanted to see what would be involved in building the equivalent
functionality in reasonably ideomatic Clojure. It is also my first
from scratch use of Clojure spec, which was a very interesting and
productive experience. It is amazing how little work one has to do
to be able to generate example datastructures for testing. The
generated examples helped me find a subtle bug in the tree pretty
printer, that would have been hard to find without." "I would love
@autumn-n
autumn-n / ring_middleware_order.clj
Created September 6, 2018 01:50 — forked from ifesdjeen/ring_middleware_order.clj
Ring middleware execution order
(defn handler
[handler]
(println "HANDLER"))
(defn wrap-1
[handler]
(fn [request]
(println "pre-1")
(handler request)
(println "post-1")))
@autumn-n
autumn-n / .gitlab-ci.yml
Created September 1, 2018 15:21
Configuration of .gitlab-ci.yml for newman (docker)
variables:
POSTMAN_COLLECTION: https://api.getpostman.com/collections/${c_uid}?apikey=${apiKey}
POSTMAN_ENVIRONMENT: https://api.getpostman.com/environments/${e_uid}?apikey=${apiKey}
stages:
- some_stages
- postman
postman_job:
stage: postman
@autumn-n
autumn-n / .gitlab-ci.yml
Created September 1, 2018 15:20
Configuration of .gitlab-ci.yml for newman (without docker)
variables:
POSTMAN_COLLECTION: https://api.getpostman.com/collections/${c_uid}?apikey=${apiKey}
POSTMAN_ENVIRONMENT: https://api.getpostman.com/environments/${e_uid}?apikey=${apiKey}
stages:
- some_stages
- postman
postman_job:
stage: postman