TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Advice for a senior level developer who makes lots of mistakes

13 点作者 allenbina将近 4 年前
I find myself technically smart, able to understand concepts and well suited for early stage development where I can follow the reasoning behind choices that are made. When I join legacy or in process projects, I find myself questioning why choices are made. Like most of you (I guess), a lot of the people I work with don&#x27;t document anything, or have limited documentation from the origin of the project, and middle &#x2F; upper management isn&#x27;t really technical. I can follow high level flows, but I make lots of mistakes on projects with lots of moving parts. I try not to get into the mindset that the more senior people on the project are withholding information from me, but that leads me to believe that I&#x27;m not where I should be technically.<p>I&#x27;m starting to second guess myself a lot more, more so on older projects that I&#x27;m throw into. I&#x27;m reaching out to older teammates and asking them about my past performance and how my current projects are, and they all say I was ok, and that these projects are also the norm.<p>Is this usually the case? Is there a direction I should go to avoid making the same mistakes? Do you sometimes spend 2 days troubleshooting an error that you caused yourself?

8 条评论

PaulHoule将近 4 年前
I think my brain runs at twice the cycle rate as other people&#x27;s brains but the cycles are not so good so I make mistakes.<p>My reaction time is about 20-30% faster than my teenage son. I beat him at chess consistently even though I inevitably make one or two boneheaded mistake(s) early on but I have a good understanding how to open up and control the space I keep the pressure on relentlessly.<p>People have always told me not to sweat it about the mistakes that I make and that the fear of the mistakes is just going to cause more mistakes and maybe they are right.<p>In software I know I do exceptionally well at figuring out things like &quot;where do I pull down data in this React application so that it can flow to all the places it needs to go&quot; and it drives me up the wall that most people go about that kind of thing randomly and wonder why the layout is jumping up and down all the time but don&#x27;t seem concerned that the render() method gets called 15 times when it only ought to get called once. Despite that, my boss catches an occasional howler of mine during a code review but that&#x27;s why he does a code review.<p>I am in the process of rewriting my own internal &quot;software&quot; for interacting with people and I wouldn&#x27;t know how to explain it or what I am doing except that I read a biography of Benjamin Disraeli and learn from it or watch an episode of Quantum Leap and see it as &quot;performing arts about the performing arts&quot; as opposed to science fiction.
tacostakohashi将近 4 年前
If you&#x27;re joining a big&#x2F;complicated&#x2F;legacy project, and want to make changes (or even get anything done), Chesterton&#x27;s Fence applies.<p><a href="https:&#x2F;&#x2F;fs.blog&#x2F;2020&#x2F;03&#x2F;chestertons-fence&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fs.blog&#x2F;2020&#x2F;03&#x2F;chestertons-fence&#x2F;</a><p>There will be many things that don&#x27;t make sense or look wrong initially. Its possible that they *are* wrong, and you can improve on them. The key to productivity is being able to demonstrate that your prospective changes don&#x27;t break anything, and do in fact improve things.<p>I doubt people are &quot;withholding information&quot; from you, probably the people who made the decisions left, or are busy with other things now (management). It&#x27;s your job to gather the information you need with what you have. It may be the case that you need to invest heavily in testing, logging, instrumentation and debugging skills on the current system to understand how and why it works as it is, and whether your changes make things better or worse.
评论 #27883048 未加载
austincheney将近 4 年前
So…<p>Many developers never get past a composition first mindset. That is beginner shit. It’s putting legos together without the instruction manual only to stress about how the pieces click together instead what the final state is. You end up with lots of decoration and shit everywhere. In the military we call this <i>not seeing the forest for the trees</i>.<p>As a senior myself in the corporate world who enjoys writing open source software there is a world of difference between people build products and people that just write code at work. It’s a difference in velocity, planning, and volume. When you are writing software on your own where you aren’t paid for your time you tend to be in far less of a hurry and yet produce 10x as much. As a corporate developer you are paid to hurry and complete tasks and in many cases with incomplete documentation, which is just writing code and sometimes guessing at what you need. When you are on your own success is measured in product delivery and feature completion, which is not just writing code.<p>Another major difference is communication. If you communicate poorly your open source software is dead on arrival. End of story. You should never have to guess at your business requirements, APIs, steps to reproduce defects, and various other things. The more you have to guess the more mistakes you will make. The only path to redemption is to communicate more precisely than those around you.<p>Perhaps the worst distinction is design by committee. Frequent long meetings just waste peoples time. The time that’s left over means hurry harder. A more productive direction is for some fool to sit a position of leadership and make arbitrary decisions. A wrong decision can be fixed, but wasted time is gone forever.<p>You can’t really explain this to a developer who has never written code outside the office because they refuse to believe what they have never experienced. The hurried low productivity churn is all they know.
评论 #27881411 未加载
_benj将近 4 年前
I was recently given a legacy project to work on. Two things happened, I made at least one big mistake that took 4 people and 3 days to fix on production. Second, I realized that I had a very strong resistance to reading somebody else’s code.<p>When I was forced to in order to correct my mistake I realized that reading the code would have been so much easier to begin with, and even exciting… kind of like a puzzle to be solved.<p>Trying to understand a project, starting with main, arguments, env variables all the way down to the part your are interested in gives SO MUCH insight not only into the project but into the company and their process.<p>Code don’t lie. It’s a hurdle to get past but understanding the project as a whole give so much insight (i. e. edge cases, hacks used in the past, etc.) and confidence when fixing a specific problem.
schiederme将近 4 年前
If I read that correctly, I personally would give this answere:<p>I have the same problems and get into rabbit holes quickly.<p>After some research on the internet and in my past life (got fired twice this year &#x2F;o\), I concluded to do a ADHD&#x2F;ADD assessment. I got Diagnosed with ADHD.<p>The main thing that changed: I’m more aware of the mistakes I do and notice my behaviors early on and can mitigate the bad parts.<p>So for me the answere is simply: maybe try todo some online ADHD test and if it indicates a potential diagnosis, do a real one with a psychiatrist.
templarchamp将近 4 年前
You are asked to explore and make modifications to software. Someone wants it quick. Fortune is on your side - atleast you know people(akin to explorers) who navigated before survived (which means the system did not cause blackouts). All you have to do is be hyperlocal and slap on the bandaid, chewing-gum and ducktape, whatever is handy. System is a product of its masters - your bosses. Sleep well!
giantg2将近 4 年前
What kind of mistakes? That could make a big difference for the answers.
100011_100001将近 4 年前
No one writes perfect code. The trick is catching errors sooner than later. Part of this is experiencing pain and self-correcting.<p>For example caching has burned me so many times that when I see an application doing caching I will triple check my solution because it might look good because it&#x27;s the cache looking good, not your change, or vice versa.<p>In my opinion there are two approaches you can take.<p>Approach 1 - Wrecking Ball: Implement entire solution using dirty code. The point is to have the solution &quot;working&quot; and handling in the most likely use case. Then you start adjusting your code, abstracting, handling edge cases, dealing with error handling etc. This is like a depth first approach<p>Approach 2 - Radar: Implement the solution in layers. Like a radar scanner that goes from a center point out. You add code in layers, so first you get the inputs you need, then you do calcs, then work on errors. The key is test each layer, this is where unit tests become invaluable. This is a breadth first approach.<p>I am not a huge fan of pure Test Driven Development, but a hacky approach works well. I like writing code then testing. Now the test might be an automated test, or print statements, sometimes even visual.<p>Both approaches require a double check of what you have done. I am more of an approach #2 person. Mainly because my mind works like a weird neural network, I go depth then pull back and explore parallel avenues determining the best way to get to my target. Anyway, I digress.<p>The point I am trying to make is that regardless of your approach you have to test. Don&#x27;t get stuck with test = unit test, but testing frequently and early is key. This can help with &quot;2 days troubleshooting an error that you caused yourself&quot;<p>The other hurdle you have is you are working on an existing project that you don&#x27;t have experience in. The tribal knowledge is what gets you. Are you familiar with Cunningham&#x27;s Law? To paraphrase, the fastest way to get an answer to a question is to post the wrong answer. Now something I have noticed is that if it&#x27;s a Code Review, some people will just rubber stamp it, so they won&#x27;t catch your errors and it will boomerang back to you. So I abuse human psychology instead. Mainly that people will pay attention if you use their names and ask for help.<p>It works even better for natural pessimists, but what I do is describe my code in words. Let&#x27;s mock this...I&#x27;m going to use Groovy, mainly because I was Code Reviewing this change the other day.<p><pre><code> def calculateDuration(start, end) { long elapsedTime = end - start Long second = (elapsedTime &#x2F; 1000).longValue() % 60 Long minute = (elapsedTime &#x2F; (1000 * 60)).longValue() % 60 Long hour = (elapsedTime &#x2F; (1000 * 60 * 60)).longValue() % 24 Long remainderMillis = elapsedTime % 1000 return &quot;${hour}h ${minute}m ${second}s ${remainderMillis}ms&quot; } </code></pre> If I was writing the code, I would have pinged someone and said something along the lines of:<p>Hey XYZ, I need your help.<p>I am writing some code to easily be able to calculate the duration of things. I assume milliseconds as input, and a start and end time will get passed in.<p>Then I use that time to do an &#x27;end - start&#x27; and figure out how many hours, minutes, seconds and milliseconds based on that result returning it as an &quot;Xh Ym Zs Kms&quot; string.<p>Anything I might have missed? Can you think of any edge cases that I might know about?<p>Thanks,<p>-----<p>Then if the discussion progresses I will point them to my specific branch. Programmatically we could debate the use of Long vs long. Or typing the input parameters and return or not.<p>The thing is this &quot;solution&quot; missed a key aspect. Milliseconds can&#x27;t be assumed as input. He had tests, but all his tests were using milliseconds. If I had rubber stamped it as a code change, within three days we would have started getting messages from POs, and they would show up in Kubernetes namespace metadata, which if you don&#x27;t know how things connect to each other, it would be hard to figure out why the metadata in a pod suddenly changed.