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

推荐订阅源

J
Java Code Geeks
小众软件
小众软件
博客园 - 叶小钗
宝玉的分享
宝玉的分享
博客园_首页
Hugging Face - Blog
Hugging Face - Blog
人人都是产品经理
人人都是产品经理
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
S
SegmentFault 最新的问题
B
Blog RSS Feed
Engineering at Meta
Engineering at Meta
N
Netflix TechBlog - Medium
Google DeepMind News
Google DeepMind News
U
Unit 42
F
Fortinet All Blogs
IT之家
IT之家
Y
Y Combinator Blog
Martin Fowler
Martin Fowler
T
The Blog of Author Tim Ferriss
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The GitHub Blog
The GitHub Blog
Stack Overflow Blog
Stack Overflow Blog
Blog — PlanetScale
Blog — PlanetScale
酷 壳 – CoolShell
酷 壳 – CoolShell

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Your best pull request could be a -500 (and that's senior...
Hugo Campañoli · 2026-05-29 · via DEV Community
Cover image for Your best pull request could be a -500 (and that's seniority)

Hugo Campañoli

Many mid-level developers still measure their progress by the number of lines they add to the repository each week. But once you've had to put out fires in production, you learn something uncomfortable: code is not an asset; it's a liability.

"The best line of code is the one you don't need to write."

Every line you push is something you have to test, document, and maintain as time passes. True seniority is not demonstrated by building cathedrals of abstractions, but by having the courage to demolish them when they no longer serve a purpose, reducing your bug surface area and freeing up mental space for what actually generates value: the business.

In this article, you'll learn:

  • Why code should be treated as a cost paid (spent) rather than value produced.
  • How to beat the sunk cost fallacy to delete expensive abstractions.
  • The Boy Scout Rule applied to deleting dead code.
  • The real impact of technical pragmatism on profitability.

Code is a liability, not an asset

Let's be clear: every line of code is a responsibility. It's a potential source of errors, an obstacle for future refactors, and a burden for the developer who inherits your work.

"If we wish to count lines of code, we should not regard them as 'lines produced' but as 'lines spent'." — Edsger W. Dijkstra

When you write code, you're signing a perpetual maintenance contract. Seniors know this: the best line of code is the one you don't need to write.

Architecture needs pruning too

Not every extra layer is architecture. Often, extra layers appear due to technical anxiety or a desire for theoretical "perfection":

  • "in case we migrate"
  • "in case we change ORMs tomorrow"
  • "in case we use microservices later"

A senior knows how to distinguish a useful boundary from a decorative abstraction. The false adapter pattern (creating a wrapper for a stable library like zod or date-fns) is just dead code you'll have to maintain. Coupling to an industry standard is usually cheaper than coupling to a mediocre internal abstraction.

The sunk cost fallacy in the editor

You spent three nights designing an amazing generic architecture. In the end, the business only uses one use case. It hurts to delete it. You feel like you're "throwing away" your effort.

Accept it: that time is already gone. Maintaining that unnecessary complexity will only keep stealing hours from you in the future.

"Deleting code is admitting you know more today than when you wrote it."

Technical Surgery: When and how to prune

Identify where complexity is suffocating agility. Robert C. Martin (Uncle Bob) popularized the Boy Scout Rule: "Always leave the code cleaner than you found it". In 2026, cleaning sometimes means deleting the entire module.

Senior Pruning Protocol:

  1. Identify 'Dead Code': Use static tools to find functions that no one calls.
  2. Detect Premature Abstrations: Have a wrapper you only use in one place? Delete it. Duplication is cheaper than the wrong abstraction.
  3. Use Characterization Tests: Before deleting, take a snapshot of the current behavior.
  4. Eliminate 'Just-in-case' logic: Don't program for an imaginary future.

Minimalism ROI

Less code usually brings immediate effects that the business appreciates:

  • Fewer bugs in production.
  • Faster builds.
  • Smaller maintenance surface.
  • Simpler onboarding for new devs.

Conclusion: Seniority is not about writing more

The next time you open a Pull Request and see that the line balance is negative, feel proud. You just made the system lighter, faster, and more maintainable.

Seniority is not about knowing how to use the latest trendy library; it's about knowing when not to use it.


Published originally at campa.dev