TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How to Keep Your Code Clean and Easy to Understand

9 pointsby PretzelFischover 4 years ago

1 comment

kevsimover 4 years ago
No offense to the author (I don&#x27;t really disagree with anything he&#x27;s written) but the stuff he&#x27;s talking about isn&#x27;t the hard part about keeping code clean.<p>The thing that I find hard about keeping code clean is:<p>- time pressure: someone wants something now and you feel the pressure and you need to make quick changes<p>- failed attempts at abstractions: people try to rewrite&#x2F;refactor something in order to make it more reusable, they get halfway there, something else takes priority, and you&#x27;re left with a mess<p>- unclear&#x2F;changing requirements: you&#x27;re kinda tweaking and feeling your way along and by the time it&#x27;s doing what it should do, it&#x27;s a bit messy, but time pressure means you&#x27;re not going to go back to it<p>- god awful things done in the name of testability: people not really knowing how to write great tests leaking the guts of the implementation all over<p>- quick hacks to fix nasty bugs: root causes never fixed, band-aids and duct tape all over<p>- performance over readability: sometimes something needs to be fast and that doesn&#x27;t necessary mean that someone jumping into the codebase is going to be able to grok it right away<p>- did I mention time constraints? Given infinite time, most of us will produce a reasonably readable function
评论 #24354792 未加载