X-Y Problem

没有去问怎么解决问题X,而是去问解决方案Y应该怎么去实现和操作

对于X-Y Problem的意思如下:

1)有人想解决问题X
2)他觉得Y可能是解决X问题的方法
3)但是他不知道Y应该怎么做
4)于是他去问别人Y应该怎么做?

简而言之,没有去问怎么解决问题X,而是去问解决方案Y应该怎么去实现和操作。于是乎:

1)热心的人们帮助并告诉这个人Y应该怎么搞,但是大家都觉得Y这个方案有点怪异。
2)在经过大量地讨论和浪费了大量的时间后,热心的人终于明白了原始的问题X是怎么一回事。
3)于是大家都发现,Y根本就不是用来解决X的合适的方案。

X-Y Problem最大的严重的问题就是:在一个根本错误的方向上浪费他人大量的时间和精力

X-Y Problem

StackOverflow: What is XY Problem?

PerlMonks: XY ProblemÏ

Greg’s Wiki

专业程度

我90%的技能价值归零,而10%的技能价值涨了1000倍

So you can think really big thoughts and the leverage of having those big thoughts has just suddenly expanded enormously. I had this tweet two years ago where I said “90% of my skills just went to zero dollars and 10% of my skills just went up 1000x”. And this is exactly what I’m talking about - having a vision, being able to set milestones towards that vision, keeping track of a design to maintain or control the levels of complexity as you go forward. Those are hugely leveraged skills now compared to knowing where to put the ampersands and the stars and the brackets in Rust.

— Kent Beck, interview with Gergely Orosz

https://simonwillison.net/2025/Jun/22/kent-beck/#

小丑牌种子收集

小丑牌种子收集

个人通关思路 前期至少拿一个经济牌 经济上来后叠倍率牌、最好是成长倍率、升级牌组 后期保证牌组纯洁性

阅读更多

修改console.log前面加上时间戳

1
2
3
4
5
6
7
8
9
10
(function(){
const oldLog = console.log;
console.log = function(...arr){
arr.unshift((new Date()).toISOString())
oldLog.apply(console, arr);
}
})()

console.log(1.1,'2', null, {a:33})
// 2025-10-22T06:33:45.853Z 1.1 2 null {a: 33}

Obsidian使用Dataview日记概览

读取一个文件夹下的所有日记文件,生成一个日记概览,包括日期、内容。达到类似logseq的日记效果。
安装插件:Dataview https://github.com/blacksmithgu/obsidian-dataview 开启dataviewjs功能
根目录新建文件,贴入下面代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
* 生成最近N天的日期数组(降序排列)
* @param {number} days - 需要生成的天数
* @param {boolean} [includeToday=true] - 是否包含今天
* @returns {string[]} 日期字符串数组,格式:YYYY-MM-DD
*/
function getRecentDates(days, includeToday = true) {
// 参数校验
if (typeof days !== 'number' || days < 1) return [];

// 初始化日期对象
const date = new Date();
if (!includeToday) date.setDate(date.getDate() - 1);

// 日期格式化函数
const format = d => [
d.getFullYear(),
(d.getMonth() + 1).toString().padStart(2, '0'),
d.getDate().toString().padStart(2, '0')
].join('_');

// 生成日期数组
const result = [];
for (let i = 0; i < days; i++) {
result.push(format(new Date(date)));
date.setDate(date.getDate() - 1);
}

return result;
}

const arr = getRecentDates(200);

arr.map(d => dv.paragraph(`![[${d}]]`))

另一种方式

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function reverseArray(arr) {
const reversed = [];
for (let i = arr.length - 1; i >= 0; i--) {
reversed.push(arr[i]);
}
return reversed;
}

const pages = dv.pages('"journals"').slice(-20)
const a = reverseArray(pages)

a.map(async page => {
const filePath = page.file.path;
const fileContent = await app.vault.read(app.vault.getAbstractFileByPath(filePath));
// dv.paragraph(`![[${page.file.name}]]`);
dv.paragraph(`#### ${page.file.name}`);
dv.paragraph(`${fileContent}`);
dv.paragraph('\n');
})

别的方案

Daily Notes Viewer 插件 https://github.com/Johnson0907/obsidian-daily-notes-viewer

操作系统快捷键

常常在Windows、Linux、macOS中来回切换,为了减少频繁切换带来的心智负担

记录下来常用的快捷键、操作

阅读更多

记录一次Windows重启导致的docker报错

win11电脑,有个ARMOURY CRATE的软件更新,居然直接给我电脑重启了,后面他还没更新成功 我焯

结果就是docker报错了

1
running engine: waiting for the VM setup to be ready: starting WSL engine: bootstrapping in the main distro: starting wsl-bootstrap: context canceled
阅读更多

垃圾世代-我买的东西都不起作用

垃圾世代GENERATION JUNK

我买的东西都没用Nothing I Buy Works

作者: Walter Kirn
沃尔特·基恩Walter Kirn

2023 年 12 月 11 日

大约五年前,我花了七美元在一家旧货店买了一台旧柑橘榨汁机。它是那种看起来能经受住煤气爆炸和锤击的老式小家电。当我用金属拨动开关打开电机时,传动轴会旋转一个沉重的陶瓷旋钮,将柠檬和橙子的心挖出来,连一丁点果肉都压碎了。这东西运转良好,几乎像新的一样,所以我在网上查了它的序列号,看看它是什么时候制造的,猜想它可能有近四十年的历史了。错了。它是 20 世纪 40 年代的。它已经七十年了,这个顽固的怪物,每次使用仍然令人满意。

阅读更多

CSS-BEM

CSS中的BEM思想

BEM是block element modifer的简写,是一种CSS命名的方法论

给CSS样式起名的方法中:

- 中划线 :名称连字符

–双中划线:表示元素的一种状态

__双下划线:连接父子元素名字

阅读更多