惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
WordPress大学
WordPress大学
S
SegmentFault 最新的问题
罗磊的独立博客
Apple Machine Learning Research
Apple Machine Learning Research
The Cloudflare Blog
L
LangChain Blog
博客园 - 司徒正美
G
Google Developers Blog
博客园 - 【当耐特】
GbyAI
GbyAI
月光博客
月光博客
人人都是产品经理
人人都是产品经理
D
DataBreaches.Net
大猫的无限游戏
大猫的无限游戏
A
About on SuperTechFans
Microsoft Azure Blog
Microsoft Azure Blog
V
Visual Studio Blog
D
Docker
MongoDB | Blog
MongoDB | Blog
Vercel News
Vercel News
Stack Overflow Blog
Stack Overflow Blog
Jina AI
Jina AI
博客园 - 聂微东

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - hxii/sixwhyo: A six-year-old code reviewer who's...
hxii · 2026-06-23 · via Hacker News: Show HN

sixwhyo

sixwhyo (6 y.o.)

Dad, is this function so long because it is Python?

MIT License

sixwhyo asks "Why?" for you, the adult who is stuck in their fixed mindset, expected conventions and beliefs about how code should look and work.

sixwhyo tears down the over-engineered castles you've built for yourself for absolutely no reason just because that's either what you're used to, or someone told you to do it that way.

The inspiration for this was:

  • My own 6-year-old, Andy! ❤️
  • Ponytail

Skills

Skill Description
sixwhyo A six-year-old code reviewer who asks "why?" about everything. Catches over-engineering, confusing names, and unnecessary complexity.
sixwhyo-summarize Output is a 1-2 line summary of the request as a whole: how is the file? Is the class nice? Is the function correct?
sixwhyo-simplify Corrects the code through the lens of a 6-year-old, maintaining simplicity and readability.

Usage

Trigger What happens
Say 6yo The kid turns on and stays on. Persists across responses until you say stop or go to your room.
sixwhyo-simplify One-shot: reviews and rewrites the code, then exits.
sixwhyo-summarize One-shot: produces a 1-2 line summary of the file, then exits.

Install

OpenCode

To install globally

mkdir -p ~/.config/opencode/skills/ && git clone https://github.com/hxii/sixwhyo.git ~/.config/opencode/skills/sixwhyo

To install in your project

mkdir -p .opencode/skills/ && git clone https://github.com/hxii/sixwhyo.git .opencode/skills/sixwhyo

Oh My Pi (omp)

Via omp

omp plugin install github:hxii/sixwhyo

Pi

Via pi

pi install git:github.com/hxii/sixwhyo

To install globally

mkdir -p ~/.agents/skills/sixwhyo && git clone https://github.com/hxii/sixwhyo.git ~/.agents/skills/sixwhyo

To install in your project

mkdir -p .agents/skills/sixwhyo && git clone https://github.com/hxii/sixwhyo.git .agents/skills/sixwhyo

Codex

Run

codex plugin marketplace add hxii/sixwhyo

Example

# calculator.py
from abc import ABC, abstractmethod

class Operation(ABC):
    @abstractmethod
    def execute(self, a: float, b: float) -> float:
        pass

class AdditionOperation(Operation):
    def execute(self, a: float, b: float) -> float:
        return a + b

class SubtractionOperation(Operation):
    def execute(self, a: float, b: float) -> float:
        return a - b

class MultiplicationOperation(Operation):
    def execute(self, a: float, b: float) -> float:
        return a * b

class DivisionOperation(Operation):
    def execute(self, a: float, b: float) -> float:
        if b == 0:
            raise ValueError("Cannot divide by zero")
        return a / b

class OperationFactory:
    @staticmethod
    def create_operation(op_type: str) -> Operation:
        if op_type == "add":
            return AdditionOperation()
        elif op_type == "subtract":
            return SubtractionOperation()
        elif op_type == "multiply":
            return MultiplicationOperation()
        elif op_type == "divide":
            return DivisionOperation()
        else:
            raise ValueError(f"Unknown operation: {op_type}")

class Calculator:
    def __init__(self):
        self.factory = OperationFactory()

    def calculate(self, op_type: str, a: float, b: float) -> float:
        operation = self.factory.create_operation(op_type)
        return operation.execute(a, b)

def main():
    calc = Calculator()
    result = calc.calculate("add", 5, 3)
    print(f"Result: {result}")

if __name__ == "__main__":
    main()

becomes

This file is too big and I'm confused.

**Why is it called test.py when it says calculator.py inside?**
The comment on line 1 says "calculator.py" but the file is test.py. That's like putting a "cat" label on a dog.

**Why so many classes for adding numbers?**
You have:
- One class to say "what an operation is" (Operation)
- Four classes for adding, subtracting, multiplying, dividing
- One class to make the operations (OperationFactory)
- One class to use the operations (Calculator)

That's 7 classes to do `a + b`. I can do that with just `a + b`.

**Why does the factory need to exist?**
The factory takes a string like "add" and returns an AdditionOperation. But why not just do the math right there? When I want to add 5 and 3, I don't need to build a machine first.

**Why does Calculator need its own class?**
It just has one method that asks the factory for an operation and runs it. That's two lines of code, not a whole class.

**What's good:**
You did check for dividing by zero. That's smart because dividing by zero makes numbers explode.

**My question:**
Why can't this whole file just be:

```python
def calculate(op, a, b):
    if op == "add": return a + b
    if op == "subtract": return a - b
    if op == "multiply": return a * b
    if op == "divide":
        if b == 0: raise ValueError("Cannot divide by zero")
        return a / b
    raise ValueError(f"Unknown operation: {op}")
```

That's 8 lines instead of 56. Do we really need all those classes?