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: Do you always FULLY understand the code you are working with?

8 pointsby DrinkWateralmost 12 years ago
I wonder if other devs have the same problem as me: i am extremely uncomfortable doing work on code i dont FULLY understand and grasp. Mostly this is due to lack of time, something needs to be fixed urgently, something needs to be extended, etc. I can still get my work done, but as i said, i feel not very good about it (simply put: i hate it).<p>Is this just me or are other devs experiencing the same?

6 comments

daven11almost 12 years ago
Wait till you go back to your own code in 1,2,5 years and think who wrote this rubbish - only to look it up and find out it was you :-)
评论 #5830847 未加载
评论 #5821777 未加载
swalshalmost 12 years ago
No one does, that's why we write unit tests. You'll eventually not remember you own code, and you can basically ensure the next guy to come along won't fully understand your code either. If you have good coverage, its like having a safety net to fall on allowing you to take large leaps.
scorpioxyalmost 12 years ago
You're not alone. But you're also missing an important point. You often use libraries without fully understanding their code, don't you?<p>You have to. You usually don't have the time or luxury to dig in and understand everything when you have a specific task to complete. Unless you're refactoring some old code where you try and make sure that you understand everything relevant to that codebase. Or you can just wait until it breaks...<p>Things like automated testing and proper documentation try to help in this regard, but they're useless if they're not kept up-to-date with the code and they have their own set of problems.
andridkalmost 12 years ago
Recently got hired at a new place and I defiantly am having the same problem. There are two major hurdles: Domain knowledge and code-complexity. Then trying to dive into the countless layers of logic in the code itself.<p>With a large codebase, it's impossible to understand everything. So the only thing we can do is to gradually learn how it works.<p>Sticking with it will make you valuable to the company in time. Moving on will free your mind to do other things.
评论 #5818998 未加载
onlyupalmost 12 years ago
I have found that you need to learn to trust other developers work. Even if you are going into their code to fix a bug.. you have to trust the rest of it works!
chris_dcostaalmost 12 years ago
I think the important thing is not to understand all the code, but to know where you are and why you are there.