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.

Ask HN: What are your best practices for editing other people's code?

1 pointsby 1penny42centsover 8 years ago
I work in a large company where you&#x27;re required to get a code review from the creator &#x2F; maintainer of the edited files, but I&#x27;m specifically looking for tips with respect to a small team.<p>For example, how soon is too soon to refactor someone else&#x27;s code? Is that even acceptable at all, or is there a best practice for getting someone to edit their code?

1 comment

bognitionover 8 years ago
When you have a task that touches the code in question its generally acceptable to rewrite parts of it. That said the rewrite should respect the original abstractions unless they are incompatible with the new requirements.<p>Generally it&#x27;s best to avoid rewriting something because it wasn&#x27;t pretty or written well.