Daw-Ran Liou

Web Developer, Clojurist, Minimalist.

Think rationally, talk emotionally

2019 November 20


The current state of my mind was greatly influenced by John Locke (洛克) and Empiricism (經驗主義). In contrast to René Descartes’s (笛卡爾) Rationalism (理性主義) where human have innate ideas, philosopher and physician John Locke believes that knowledge is instead “determined only by experience derived from sense perception.” This is also known as Empiricism. The ideas we learned in the early days would have significant effects on our thoughts.


We praise the human mind of being able to think rationally...

Read more…

My Core Values

2019 October 24

I’ve never tried to verbalize my core values before, though it feels right to do so for the first time in 30 years of my life. I hope this post serves the right place for the future me to reflect on. This post is an open letter to my future self.

You might find many ancient Chinese wisdom influences below, which says a lot about my origin.

Balance

The Chinese idiom, “物極必反,” means “Things will develop in the opposite direction when they become extreme.” Also, in classical Chinese philosophy...

Read more…

Domain Exploring with Clojure Spec

2019 October 17

I read a great article “Domain modelling with clojure.spec” by Adam Bard and started to use more clojure.spec for domain modeling. Here I want to share my process, which I called “Domain Exploring.” It really is just a combination of REPL-driven development with domain modeling in it’s essence.

Domain Modeling vs Exploring

From Wikipedia - Domain Model:

In software engineering, a domain model is a conceptual model of the domain that incorporates both behaviour and data.

Before we reach the...

Read more…

Re-frame Effects VS Coeffects

2019 August 13

When I first started using re-frame, I was a bit confused about what effects and coeffects are, or, what fxs and cofxs are. They both seemed to relate to the “Side Effects” (or “Effects”) functional programmers dislike. It was hard for me to distinguish them.

Before you read on, if you’ve never came across re-frame’s official documentation or the cljdoc page, please start there. They are fantastic resources. However, if you find yourself need some more examples or direct comparisons to help you...

Read more…

How I built Bex

2019 August 8

In this article, I’d like to share with you the technologies and services that I use to create Bex. If you are, and I assume you are, a programmer, Bex is simply a personal online markdown text editor.

TL;DR

  1. Site: Hugo + vanilla JS, deployed to Netlify
  2. App: ClojureScript, Re-frame, Shadow CLJS, also deployed to Netlify
  3. Authentication and database: Firebase
  4. Payment: Stripe + Netlify Functions
  5. (CSS: Tachyons!)

Site structure

# Site:
https://bexdesign.io/
                    /pricing
      ...
Read more…

Inspect Java Objects with Clojure

2019 February 9

The more I work with Clojure, the more frustration I found to work with Java objects. Mostly, it feels an unnecessary process to go through the class definition to find the getter methods to access the data I want, especially when the data is buried under multiple layers of classes deep.

In this article, I’ll explain a recipe to create a graphical inspector UI to explore Java objects, frustration free! The key is to use the clojure.inspector for the visualization and clojure.org/java.data for recursively converting Java beans to Clojure data structure.

Read more…

Tachyons CSS Framework / Library Review

2019 February 2

I’ve tried to learn many CSS frameworks (Bootstrap, Foundation, and Bulmar) over the years. They never really clicked and styling felt just as painful as ever. But this has changed since I learned about Tachyons. First introduced by Martin Klepsch (thanks Martin!), I learned and started to use Tachyons since late 2018 for the Cljdoc.org project [1]. This is the only CSS framework / library that fit my brain and my workflow. If you are struggling with learning any CSS framework, I hope I could shed some lights by introducing you Tachyons.

Read more…

Interop legacy Java project with Clojure

2019 January 31

Recently I got the chance to work on a new feature for our existing Java project. The feature itself is a project that set out to be a general-purpose asynchronous data logging library that can be used company-wide, shared with other projects. I was very into Clojure these days. Learning Clojure has this side effect of mutating your brain to view programming difference. At the meanwhile changing your taste of choosing a programming language. (Please be Clojure!)

Read more…

Decode your phone number with Clojure

2018 April 30

The original article was shared on my Medium

The inspiration of this article came from the Cousera course, Functional Programming in Scala. I basically translate the Scala program in section 6 into the Clojure version you’re about to see. Kudos to Martin Odersky.

You might have seen ads with interesting phone numbers like: 1–800-FLOWER, 1–800-FREE-411, or 1–800-GOT-JUNK. Those are called phonewords, or mnemonic phone numbers. It’d be awesome to have a memorable phone number like 1–RANDY-DA-MAN. However, maybe your phone number already has a meaning. How cool is it to figure it out, well, using Clojure?

Read more…

Page 1 of 3

Next page >>