先说明。 2026 年 6 月,本刊登过一篇个体经营者把多个角色汇到一个画面上的文章。这个现场不是某家特定的商户。 我们把它实际运转的形状照实构成,也不点名是哪家。以下是按那个形状自己做的。
对一个人做生意的人来说,真正疼的不是工作量。是切换。看一个订单,再看税务日期,再看客户邮件,然后回到订单 — 每一次,手里攥着的那根线都会断。
所以「全汇到一个画面就行了」只对了一半。全汇上去不过是个列表,而做列表并不难。 难的是一个人去信那份列表,因为出错时没有人接得住。
所以要做的不是「把所有东西都显示出来的画面」,而是「能拿来检查它是不是错了的画面」。放进去两样东西。
没有条目是没有出处的
/// Where this came from. An item with no source is a note somebody typed and
/// forgot; an item with one can be checked.
final String source;
运行日志。
[sales] Follow up Hanul, quoted 2 weeks ago — 9 days late 1.8M won (from quote log)
[supply] Reorder packaging film — 2 days late 0.5M won (from stock below reorder point)
[sales] Quote for Mirae — 40 units — in 1 days 3.2M won (from inbox 04-18)
[making] Batch 118 labels — in 3 days (from production plan)
[books] VAT quarterly return — in 5 days (from filing calendar rule)
[books] Reconcile March card statement — in 8 days (from bank feed)
六行全都挂着 (from …)。没有出处的一行,就是一条不知道谁在什么时候为什么写下的便条,而在一个人干活的人的画面上,这样的行时间一久就会被无视。一旦开始被无视,整个画面都会被无视。
验证会抓住空的出处。
MISSING=$(grep -c "(from )" captures/run.log || true)
[ "$MISSING" -eq 0 ] || { echo " $MISSING item(s) appeared with an empty source"; exit 1; }
画面自己说出「凭什么它在最上面」
这是这一篇的核心。
列表必须排序。可是排序函数在代码里,而代码里的决定谁也没法反驳。
/// Why the list is in this order, in words the owner can disagree with.
///
/// A sort function hidden in code is a decision nobody can argue with. Naming
/// the rule on the screen means the owner can look at the top item and say
/// "no, the packaging can wait" — and know which rule to change.
static const orderingRule =
'late first, then money at stake, then soonest due';
那句话原样出现在画面底部。
ordering rule on screen: "late first, then money at stake, then soonest due"
有了它,店主看着最上面那条就能说「不对,包装材料可以往后放」— 而且知道该改哪条规则。 没有它,就只剩下「这个应用排序有点怪」,最后干脆不用了。
而且验证会比对是不是真的按画面所说的规则排的。
line = [l for l in open(sys.argv[1]) if 'late, in order:' in l][0]
amounts = [float(m) for m in re.findall(r'\(([0-9.]+)M won\)', line)]
if amounts != sorted(amounts, reverse=True):
print(f' late items are not ordered by money at stake: {amounts}'); sys.exit(1)
通过时的日志。
late items ordered by money at stake: [1.8, 0.5]
说出来的规则和实际顺序对不上是常见的 bug,而在一个人用的工具里,这种对不上没有人会指出来。
