Sean Lau Zhengyi Daoist Priest · Feng Shui & Yi Jing Practitioner Book
← Back to all writing
6 min read

Why a Daoist Priest Writes Code

Code in the morning, a house inspection in the early evening. Both jobs ask the same thing of you: see the structure you can't see, before you touch anything.

  • Personal

Language: 简体中文

“You’re a priest and a programmer?” There is usually a small pause in the middle of that sentence, the place where the person is deciding which of the two is the hobby.

Neither is the hobby.

The two-line CV

I did a computing degree at the University of Technology Sydney, then a master’s in accounting at UNSW. The accounting gets used mostly on my own tax return these days.

I began practising in Sydney in 2016. Four kinds of work: birth-chart analysis, divination, date selection, and reading houses, which is the part most people call feng shui.

On the Daoist side, I am an ordained priest of the Zhengyi school, Longhu Shan lineage, Shan generation. Most people picture the monastic school, which is a different thing. Zhengyi ordination means receiving registers, not taking monastic vows. Zhengyi priests have been mainly householders for as long as the lineage keeps record: they marry, live at home and hold ordinary jobs. I did not improvise the arrangement to keep my day job.

I also practise Xingyiquan, Shanxi Che branch, Shang generation.

Casting a chart is an algorithm, and I mean that literally

A bazi chart takes a birth moment and a birth place as input. Out come four pillars, the strength or weakness of the five phases, and the sequence of ten-year luck periods. Every step in between is a fixed rule: whether to correct to true solar time, which instant counts as the boundary between two solar terms, what age the luck periods start at, whether they run forward or backward.

Two properly trained people given the same input must produce the same chart. If they don’t, one of them has made an arithmetic error. At this stage there is no such thing as different schools seeing it differently. That is a pure function, in the sense the word has in software.

The tool I cast with is one I wrote, and the slow part turned out to be the solar terms, not the chart. The twenty-four terms are defined by the sun’s ecliptic longitude, the crossing has to be resolved to the minute, and then you inherit every timezone problem there is. Australia is a particularly nasty case. New South Wales observes daylight saving and Queensland doesn’t. South Australia is half an hour off the eastern states. A birth certificate records whatever a clock said, and whether that clock was on standard time is something you ask about rather than assume. There is nothing esoteric in any of this. It is date handling, which is the part of any codebase I trust least, including my own.

Then comes the layer where you read the chart, and I honestly cannot tell you whether that one is an algorithm. Some practitioners argue judgement is rule-governed too, with rules that are numerous, overlapping and unclear about precedence. Others say it is trained perception and cannot be written down. I lean towards the first view, and I have no evidence for it. I have tried writing my own judgement process out as code and stall every time in the same place: where a character means one thing in one position and something else two positions over. That is the weakest part of my thinking.

Load-bearing walls

The classic mistake a junior developer makes is bolting a feature onto a system by routing around its architecture. The requirement looks small, the shortest path is obvious, so the layering gets bypassed. It ships. Three months later nobody will touch that file.

I meet the same mistake in houses, in different materials. The client wants a doorway moved, or the kitchen shifted to the other side. On the floor plan it flows beautifully. On site you measure it and the wall in question is holding the roof up.

Both require you to see the invisible structure before you start. In a house that structure is load paths, drainage, ventilation and where the sun goes. In a system it is where data flows, what depends on what, and where state lives.

Building the temple

I founded Dao Metaverse in 2021. Part of it is a temple you walk through in a browser, at dao.today/temple. The rest is AI scripture teaching, and the Australian Daoist academy at taoacademy.com.au.

The engineering problems were the expected ones. Statues need detail, halls need mass, and the whole thing has to open on somebody’s phone and still turn smoothly. Distant stars can be drawn with almost nothing. Up close you cannot lose a single fold of robe, and that is where the frame budget goes. Where to put the boundary took a lot of tuning. The bracket sets were the worst of it. The Song dynasty building manual Yingzao Fashi sizes every structural timber member as a multiple of a modular unit, with eight grades of material, so I wrote the whole thing as a parametric generator. Change the grade and the entire hall follows. Wonderful while it works. I got the grade wrong once and the whole hall leaned.

What actually stopped me for months was the research.

You do not invent a deity’s name. To place a statue you need to know who it is, which side of the hall it belongs on, what it holds, which way it faces. Pull that from the open web and the sources contradict each other as a matter of course. Photographs from real temples disagree as well, because regional practice genuinely does differ. Where I could not find something defensible, I left the position empty rather than fill it from imagination.

The same rule covers scripture. The teaching material only uses texts with a known transmitted edition. Passages of uncertain origin stay out, however convincing the phrasing is, and a fair amount of what circulates online was written recently by someone who knew the style well. I hold that line hard. Relax it once and the credibility of everything else on the site goes with it.

A cost I did not see coming: fonts. Daoist material is full of rare characters that most web fonts simply do not contain, so they arrive on screen as a row of empty boxes.

The AI does not divine

The AI does plenty here. It explains terms, traces references, teaches a passage until it makes sense, and helps someone get from a vague worry to an answerable question. It does not cast charts, throw hexagrams or pronounce on whether things will go well.

The plain reason first. A language model agrees with you. Ask it whether a relationship still has a future and it can read exactly which answer you are hoping for. That failure mode is the oldest one in this trade. People arrive with an answer already in mind, and my job is to work the chart by the rules and say what comes out, including the part nobody wants.

There is a worse one. Ask the same chart the same question twice and the wording comes back different, which in software is nondeterministic output you go hunting for in the logs, and in a reading is just talking rubbish.

And if a reading is wrong, someone has to carry that. I do. A model cannot. In Australia there is also the law to think about: predicting death, illness or disaster for someone, or promising a supernatural result, runs straight at the Consumer Law. Anything touching illness, legal exposure or money, I send to a doctor, a lawyer or an accountant.

What a day looks like

People expect a tidy account that stitches the two identities together. I’ve thought about it. I can’t produce one, and I’m not especially motivated to.

The day runs roughly like this. Code in the morning, email in the afternoon (iching@dao.today), out to look at a house in the early evening, back to the code afterwards. The question running in my head at the house is the same one running there at the keyboard: what shape is this thing actually in, and what falls over if I move that.

Whether the boxing connects to either of them, I won’t claim. People who train like saying that standing post work builds character. Standing post makes my legs ache.

Common follow-ups

Do you let the AI do readings for people?
No, and that isn't going to change. The AI explains terminology, looks up references, teaches scripture in plain language and helps people work out what they are actually asking. It does not cast charts or pronounce on outcomes. Language models tell you what you want to hear, and the person asking usually already knows what that is. Ask the same question twice and the wording of the answer shifts, which in engineering is a bug you go looking for in the logs.
Does the programming actually help the practice?
The chart-casting and date-selection tools I use are ones I wrote, so the error-prone parts (solar term boundaries, true solar time, timezones and daylight saving) are under my control and I can check my own work. House reports are structured, so what I judged and when stays on the record. The craft itself hasn't changed. There is just less room for a copying mistake.
What is the 3D temple, and do I need to install anything?
It runs in a browser at dao.today/temple. No app, no download, and it works on a phone. There are halls, statues and a place to offer incense. Every deity's name, position and attribute is placed according to a source I could verify; where I couldn't verify one, the position is left empty.