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: How to improve code quality while maintaining decent velocity?

200 pointsby vcool07over 5 years ago
Hi, I believe I&#x27;m a decent programmer, may not be a rockstar or anything. Recently I&#x27;ve changed my company to one of the &quot;sought afters&quot;, and I&#x27;ve noticed that I&#x27;ve been getting some comments about the quality of work and some uncomfortable questions about my skills. I&#x27;ve been forced to change my design more than once during code review and there were other times when my PR was outright rejected as it did not meet the required standards.<p>Now I&#x27;m a little worried that if my situation doesn&#x27;t change, my career would suffer. I&#x27;ve started to watch a few videos online about design. But I&#x27;m not sure if they&#x27;re going to really help as they usually talk about very basics which doesn&#x27;t help in real world coding.<p>I usually take 3-4 tries with some significant amount of testing to get my code to a working state. I refer to stack overflow or ask my colleagues if I get stuck on some design &#x2F; technology feature which I haven&#x27;t seen before. I feel the above contributes to reduction in my speed of delivery and the rush to complete the deliverable on time, compromises the quality.<p>Are there any good ideas to improve one&#x27;s coding &#x2F; design skills significantly ? The challenge here is to deliver good quality code, while maintaining a decent speed of delivery.

73 comments

jameshartover 5 years ago
I suspect a lot of your issues could be solved by talking to someone before you start coding to make sure your approach is valid.<p>When PRs are getting outright rejected it is because you are making incorrect assumptions or decisions in your code that don’t match with what the rest of the team knows or wants.<p>Before you make a decision, get another perspective.<p>One common pattern I see in not-quite-yet-senior devs is that they don’t necessarily recognize the moments when there is more than one option, and they are making a choice. This happens <i>all the time</i> in programming. You are constantly making decisions and committing to particular solutions. If you are not aware of the choices you are making - you are picking the first idea that comes to mind (or the first stackoverflow answer) - there’s a really good chance you are picking <i>wrong</i>.<p>Also try to develop your instinct for the assumptions you are bringing to the table. Did you assume this code was just one-off stuff for a simple offline process? Do others on the team expect it to be reused as a library later in an online service call path? That difference of perspective will lead to vastly different expectations for how that code should be written.<p>So: Take more time before you start coding to talk through the approach you were thinking of taking with someone. Then, as you start coding, watch out for moments when you can make a choice and again, get some input.<p>Doesn’t need to be a long design session. Just a five minute pull-aside to get a consult on an approach.<p>This is why pairing is so effective, by the way - you get constant access to a second perspective.
评论 #21753281 未加载
评论 #21753358 未加载
评论 #21754588 未加载
评论 #21759296 未加载
Pfhreakover 5 years ago
Write down the things you got called out on in review. Build a checklist of them. Perform a self review for them.<p>So more code reviews and design reviews for others and try to ask why whenever you don&#x27;t understand what you are looking at. Asking questions is a sign of strength.<p>Spend a little more time on design, and whiteboard with a coworker before you implement. Draw the boxes and arrows of your approach and reason about where it will break. It will break on some axis sometime, tell yourself where it is.<p>Find a mentor. There are tons of folks who would spend an hour every week answering questions about design that you were too shy to ask in the bigger group.<p>Stop meetings when you don&#x27;t understand a term. Ask for a clarification.<p>Talk to your manager, be open about wanting to improve this specific skill. Speaking as an engineering manager myself, one of the most fulfilling parts of my job is seeing someone ask for help and giving them a chance to stretch and learn.<p>Accept failures. A failure just means you learned something. I&#x27;ve seen some big failures and caused some big failures. I learned and moved on. That said, don&#x27;t fail the same exact way more than once if you can help it.<p>Ask for peer feedback. Maybe no one else thinks you aren&#x27;t performing. Maybe you&#x27;ve set up a false narrative about yourself.<p>Ask, specifically, &quot;am I asking for help too soon or too late&quot; and really listen to the answer.
评论 #21750456 未加载
评论 #21750828 未加载
foucover 5 years ago
You might be over-estimating how much attention people are paying to your speed, especially if you recently joined.<p>For the first 3-6 months, companies probably care more about having newcomers get up to speed on matching the style &amp; convention of the existing codebase.<p>It helps to do an architecture review of the codebase and understand the overall code design focus, and pay attention to how the code is typically structured. you could also look at other people&#x27;s code reviews to see what the common areas of design thinking are.
评论 #21752748 未加载
评论 #21750560 未加载
评论 #21751642 未加载
评论 #21752206 未加载
lukey_qover 5 years ago
Without any further details I would suggest that this is entirely a communication issue and not one of code quality. &quot;Good code&quot; is not really something that can be defined, and learning general design patterns might help you in a general sense but I don&#x27;t think it&#x27;s going to fix this problem you&#x27;re currently having. If your team is outright rejecting your PRs then knowing one other pattern or learning functional programming are not going to help you.<p>Next time you&#x27;re writing something of any significance, speak to the people on your team who will be reviewing the PR. If you aren&#x27;t sure of how to design it, come up with a design collectively. If you do have an idea, ask them to approve it on a high-level before you write any code. The entire thing should be a collaboration, not you coding for however many days before finally exposing your code to your team in the form of a PR.<p>This can be easier said than done, depending on how communication works at your company and on your team, but if your team and the people reviewing your code won&#x27;t guide you a bit before and during your implementation of something then again I don&#x27;t think knowing a couple more patterns is going to solve this problem.
chimprichover 5 years ago
&gt; I&#x27;ve been forced to change my design more than once during code review<p>Ouch. It should be quite rare to change your design after code review. Something is wrong here - either you&#x27;ve done something really unusual or your PR reviewers are being overly critical.<p>If your design is off, or it is way out of step with the usual style of your team, it&#x27;s very late to change that during PR. There&#x27;s a huge time cost, and it would be dispiriting for you.<p>I suggest requesting some pairing during your work on your next feature to get you up to speed with what the team expect. It&#x27;s far more efficient to get guidance beforehand than retrospectively.<p>If your team is not keen on the idea of pairing, then getting a colleague to discuss your approach before starting might be useful.<p>If you want some specific recommendations, learn some functional programming techniques and read the classic programming books. &#x2F;Clean Code&#x2F; has dated badly in some ways (try to ignore some of the crazier ideas) but it is excellent at provoking thoughts about how to lay out code.
littlestymaarover 5 years ago
Review your own code before asking for somebody else to review it.<p>My personal routine: before pushing code on the repo, run <i>git rebase -i</i>, review all your commits and change them if anything looks wrong (the commit message, some random crap being mixed with the actual content of your commit, silly mistakes, etc.). It will cost you around 2 minutes per commit maximum, and your pull request&#x27;s quality will increase dramatically.<p>Also, <i>git add -p</i> when committing to review your work as soon as possible.
评论 #21752365 未加载
winkelwagenover 5 years ago
You only get better with more coding experience. Try to learn from your mistakes. Most important, you are not your code. Don’t take it personal.<p>Have you talked about this with colleges? It could be that they don’t see it the same way as you. And they are happy to work with you.<p>I think most companies are terrible at doing code reviews and focus way to much in the wrong thing. You, as a team should create value for the company, not talk about the cutting your slightly to long method up again and again.<p>For me this code review video really opens my eyes:<p><a href="https:&#x2F;&#x2F;youtu.be&#x2F;a9_0UUUNt-Y" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;a9_0UUUNt-Y</a>
评论 #21750356 未加载
onreactover 5 years ago
When I was still a coder - I moved on after a few years - I noticed that working long hours made my work quality suffer.<p>The longer I worked the more bugs I introduced and the more I looked for the bugs in the evening the worse it became.<p>Ensure a proper work-life balance and plenty of screen-free time. Do not spend the night gaming when you work onscreen all day already.<p>The ideal per day work hours are 4h! No joke. In case you have to work 8h or longer perform simple tasks in the remaining 4h (meetings, documentation, emails, errands).<p>Eat well, get enough sleep, exercise, meditate, go outside and the next day you will find the bug and fix it within 10 minutes.<p>Many programmers tend to be the prototypical zombies who never see the light of day and only survive on caffeine (give it up). Remember that you&#x27;re human.
评论 #21750395 未加载
评论 #21730389 未加载
评论 #21750580 未加载
watwutover 5 years ago
It would really help if you gave us what feedback and questions on skills you exactly get and language you use. Anyway, stop focusing on speed. Focus on learning. Instead, take notes of what they complain about and systematically learn more about thing they say was wrong.<p>1.) It may be that you learn different standard of coding practices, they vary a lot between companies. Each company have groupthink of &quot;this is definitely necessary&quot; other companies never heard of or have completely opposite groupthink.<p>2.) It may be that you miss some fundamental skills, but it is hard to guess which it could be and point you to right direction without knowing more.<p>3.) Another orthogonal option: you might run into alpha coders making themselfs feel good and look great by overly criticising others. I am adding this as possibility, because that absolutely exists.<p>To distinguish 3, start taking notes of what feedback you get. First, if they are contradictory, then you know it is situation you are in. Second, that will allow you to not make similar mistake again, learn local culture and habits.
sanderjdover 5 years ago
First of all, there is absolutely no shame in getting significant comments on a change or even in abandoning and redoing it entirely. It&#x27;s too bad that your lead has let the idea that this is shameful fester. That is the point of code reviews. In fact I think the answer to your question of how to improve is exactly what you&#x27;re doing: get lots of feedback on your code, really pay attention to it (instead of feeling defensive and ashamed, try to really understand why they are making the comment, think through what problems that are foreseeing), and try really hard to proactively take those comments into account for your next change. After that, the next best thing to do is to go read other peoples&#x27; changes. See what kinds of things they&#x27;re doing and what kind of comments they&#x27;re getting.<p>You sound to me like every early career employee experiencing imposter syndrome. That feeling might not ever really go away, but you&#x27;re probably doing much better than you think.
评论 #21753487 未加载
jerome-jhover 5 years ago
Neither quality nor velocity can be quantified. Keep that in mind when defending your changes.<p>As to design, it is also often very subjective. Some designs lead to less code: this at least is measurable. Others are outright clearer but this is less measurable. When discussing maintainability, stay focused on _realistic_ scenarios: what if we need to add an X, to handle Z in addition to Y. If you think a possible generalisation is not realistic, refer to your manager or with peers, head to head.<p>More important than design, get confidence that your algorithm is correct and show it. Show that you thought of corner cases and handled some of them, traced those you do not handle.<p>As to performance, be very clear about it: performance can only be _measured_. If you and a reviewer disagree on assumed performance, candidly ask if there is time to implement both alternatives and profile them. If you know your code will be less than efficient when some data gets too big, comment it in the code and explain why this is acceptable for now.<p>Oh and if there are comments on style, ask the coding conventions in force. When you have them _respect_them_ and refuse further changes on things that are left unspecified.<p>Finally, talk to people head to head (or by phone) and not only through the review system, where things escalate quickly. Sometimes you will learn new technical stuff, sometimes the reviewer will admit &quot;maybe my proposition does not apply in your case&quot;. In any case you would have learned something and increased your understanding of the problem to solve.
taylodlover 5 years ago
<i>&quot;there were other times when my PR was outright rejected as it did not meet the required standards&quot;</i><p>Are these standards published? If not then how are you expected to meet &quot;required standards&quot; that are not published? If so then why are you not reviewing your code yourself prior to the PR? Is training and&#x2F;or mentorship provided for you to come up to speed with the required standards? Something seems <i>off</i> about this situation.
评论 #21753604 未加载
agentultraover 5 years ago
I often practice <i>test driven development</i>. This can help, especially in dynamic languages, to structure your code in a way that forces you to keep it simple.<p>1. Write the test first, start with the smallest cases.<p>2. Write the code to make the test pass, the first thing that comes to mind which works.<p>3. <i>Refactor</i> what you just wrote. Use functions to remove unnecessary intermediate variables, avoid repetitive code by extracting common patterns, turn literals into parameters constants, etc.<p>4. Add another test, usually an inductive step. If your base case, smallest input is <i>n</i>, try writing a test that should pass for <i>n+1</i>.<p>5. Repeat 2-3 until the new test passes.<p>6. Add the smallest edge cases that should return an error result or fail.<p>7. Repeat 2-3 until the new test passes.<p>Keep building up those tests as you go. They should form a low-level specification of a module, class, or function that suits your needs.<p>Some high-level principles to think about when coming up with tests:<p>1. <i>Parse, don&#x27;t validate!</i> [0] Code that takes data in from the outside world should do it best to parse it into an acceptable structure as early as possible so that code down stream doesn&#x27;t have to check if the data it receives is valid or not.<p>2. <i>Push effects to the edge</i> If something has to talk to the outside world make sure it happens in, ideally, one place. Writing tests first ensures that your code is easy to test so putting effect-full code all over the place is painful.<p>3. There are different kinds of correct. Know ahead of time what success will be for your task. Passing tests is one kind of correctness. <i>Functional correctness</i> of the system is another -- you will want to reach to tools like TLA+ or Alloy to write specifications for the latter.<p>4. Talk to your team. Sketch out your ideas first and shop them around and spit ball them with other experienced team members. Get their take on it before you start coding.<p>[0] <a href="https:&#x2F;&#x2F;lexi-lambda.github.io&#x2F;blog&#x2F;2019&#x2F;11&#x2F;05&#x2F;parse-don-t-validate&#x2F;" rel="nofollow">https:&#x2F;&#x2F;lexi-lambda.github.io&#x2F;blog&#x2F;2019&#x2F;11&#x2F;05&#x2F;parse-don-t-va...</a><p><i>update</i> forgot the link
drewcooover 5 years ago
Talk about your idea before coding it up. Whiteboard it with someone. Try to guess how people will react. Over time, you&#x27;ll train yourself to know the reactions and to shape your work to fit expectations.<p>Chances are there are related things to work on that you haven&#x27;t even noticed. And chances are ongoing feedback with someone with context about you is going to be much more useful than replies from internet strangers. I recommend finding a mentor. A nice side-effect is that thhis shows you&#x27;re proactively addressing the shortcomings.
philwiseover 5 years ago
Talk to your line manager. It is quite possible that there are some skills around building long-term maintainable codebases that you haven&#x27;t learnt yet. Different companies have vastly different ideas about what &#x27;good enough&#x27; looks like, and so this may be the first time you&#x27;ve had to think about these particular issues.<p>A big, decent organization will have the structures in place to help you learn this. I&#x27;d suggest bringing it up at your next 1:1: &#x27;I&#x27;m a bit worried about how I did in these PRs &lt;open browser&gt;&#x27;. Your manager may also have the same worries, in which case you skipped that conversation along to the point of working on a solution, or you might find out that what you are doing is on-par and there is nothing to worry about. Training in new skills is bread-and-butter stuff for a mature organization, so I would look for support in your normal management chain.
Antoninusover 5 years ago
My suggestions for higher quality is to spend more time:<p>1. Designing&#x2F;Picking your data structures<p>As you begin to code, your output and data needs might change; this might need you to change the design of your structures. Some novice developers, might think &#x27;screw it, I&#x27;ve gone this far already. I&#x27;ve already spent a few days on this. No going back now.&#x27; If more time was taken in the beginning to plan and choose, you might be able to avoid this.<p>2. Refactoring.<p>Leave yourself some time to refactor before you push a commit. Those extra few hours or day will give you time to really go through your code and tidy it up. Think of your first commit as a first draft, then do a couple of revisions before you squash and push.<p>Good luck.
onion2kover 5 years ago
I have a saying that I use to annoy my boss when he demands things are done too quickly: &quot;Why do it right when you can do it twice?&quot;<p>That&#x27;s what you&#x27;re doing.<p>Slow down. Spend more time planning what to build, discussing what the acceptance criteria mean, designing your code, writing tests, thinking about your data structures, etc.<p>It&#x27;ll feel like your velocity is taking a hit but the fact you no longer have to do the work twice will likely mean you&#x27;re actually delivering features <i>much</i> faster.
kossTKRover 5 years ago
I am working in web-dev at the moment and to be completely honest i have professional projects where i often push ridiculously chaotic code, because of time restraints.<p>I feel like most times i could have chosen a better way to do things, but i have to get things done quickly because the todo list is so long. It&#x27;s difficult choice between technical debt versus slow but beautiful&#x2F;robust architecture.<p>Working in my own company i often weigh the options between pushing often and fast, having a good deployment process that you can easily rollback, good error notification and being good in a debugger versus slow mindful development.<p>Trust me i would like to slow way down and really think things through, make interesting diagrams, think about the philosophy of different process and scenarios, drink a good cup of coffee and look out the window for half an hour pondering - but i feel like that&#x27;s a privilege i don&#x27;t have right now.<p>Though i try to meditate and to take a step back every day to slow things down and get a better overview.<p>I also feel like internet surfing, stack overflow, and screen use in general trains you quickly to get a completely fragmented way of focusing and remembering that we all need to actively fight if we want to regain clarity, focus, insight or beauty in what we do.
lifeisstillgoodover 5 years ago
Beware Imposter syndrome - it&#x27;s likely you are over thinking this<p>Second, what is a decent speed of delivery? The thing that most affects speed of delivery is familiarity with the code base. The major, probably only reason senior devs are senior is because they are senior <i>in that codebase</i>. Pluck someone from Facebook and drop them in Google and they will face problems similar to you. Good ones will explore on their own, familiarise themselves, find mentors and build relationships to ask and guide themselves - and even write posts on HN to get guidance!<p>Thirdly, expecting speed of delivery is the fastest way to destroy a team - or a coherent codebase. People get panicked and either drastically drop their productivity or choose to code really safely, driving code reviewers &#x2F; team leads to spend more time on managing - whereas removing project managers from the critical path and having an engineering quality as the prime driver is a major help (You night think you are being rejected because quality is too low (and that maybe) but what are the senior devs being driven by? deadlines or quality? That will affect the time they have for mentoring.<p>This fear is all pervasive - senior devs do t want to venture out of their comfort areas, partly due to time constraints (see project management) and partly fear of not knowing how to intersect with other codebases and people.<p>passing over code patches to another team is always an act of <i>human relationships</i> - you need time to get up to speed with the codebase, they need good patches to trust you and they need to give you time and mentoring to understand the code base and their taste.<p>Long story short - asking this is a good sign about you and a bad sign about the mentoring process you are under.
jasimover 5 years ago
* Learn to think about types first, and the algorithms as a natural consequence of the structure of your data. Richard Feldman: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=IcgmSRJHu_8" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=IcgmSRJHu_8</a>,<p>* Use a statically typed language that allows fast refactoring. Ideally a typed functional language like Elm, Reason, OCaml, or Haskell.<p>I recently shipped a complex Javascript project (without types) and it is one of the few instances of my decade-old professional career where I had that level of confidence in the robustness of a piece of code I wrote. It remained sturdy in production even in the presence of unforeseen conditions. This was thanks to the habits I picked up from typed FP: parsing and validating all data at the boundaries of the system, better design by modelling data to make inconsistent states impossible, and automatically handling all edge-cases at all times.<p>So even if you don&#x27;t actively use such a language in your workplace, there really is a payoff to learning it in making you a better programmer overall.
评论 #21750622 未加载
评论 #21752572 未加载
asdfman123over 5 years ago
They say if you&#x27;re the smartest person in the room, you&#x27;re in the wrong room.<p>That you&#x27;re being challenged, while it&#x27;s difficult and you might not see it now, is ultimately a <i>good thing</i>. The uncomfortable feeling you&#x27;re describing is called growth. The caliber of people around you is forcing you to grow, and that&#x27;s going to be very helpful to you as a developer.<p>Seek out a mentor and actively seek their advice. Most people love helping others. The most important thing is that you don&#x27;t try to hide from them, but that you&#x27;re willing to openly discuss your areas of weakness and seek improvement. It&#x27;s hard, but people will appreciate that.<p>It&#x27;s true, people won&#x27;t have patience for someone who isn&#x27;t honest and delivers what they see as low quality work at the last minute, but they have tons of patience and even respect for the person who actively solicits and integrates feedback.
评论 #21753540 未加载
james_impliuover 5 years ago
I&#x27;m the founder of a startup that focusses on tech debt. (Context: mini survey app that sits in GitHub&#x2F;Lab so the team can track what needs fixing)<p>To underline the importance of what you&#x27;re saying - one of the most interesting learnings so far from the data we&#x27;ve seen (~400 developers using it for the last month to log issues in their code&#x2F;processes, &gt;1,000 survey responses) is that the average developer encountering an issue loses more than twice as much time in Planning and Deployment than in Writing Code. The reason the data shows for this is that when there is an issue in Planning it wastes a very larges amount of time.<p>The other trend we&#x27;ve seen is we ask developers how each Pull Request made them feel (Happy&#x2F;Neutral&#x2F;Sad). We have literally not yet had someone give feedback who felt sad! So you can make your team happy just by asking and listening :)
评论 #21750916 未加载
base698over 5 years ago
Advice someone gave me in a similar situation: coding requires Mise en Place like cooking. Mise en Place is setting everything up and prepping before you start cooking so everything is easy to access.<p>In coding, this means thinking through how you&#x27;re going to structure it, have answers for what pieces of code use service calls and what needs to be its own modules. Think about the data and what it looks like: what fields and names does this have? Does it require a set or list collection?<p>Following up on that train of thought watch the Simple Made Easy talk and really try to internalize what he means when he talks about design.<p><a href="https:&#x2F;&#x2F;www.infoq.com&#x2F;presentations&#x2F;Simple-Made-Easy&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.infoq.com&#x2F;presentations&#x2F;Simple-Made-Easy&#x2F;</a>
NoInputSignalover 5 years ago
I think one thing that may help that I haven&#x27;t seen mentioned yet, is to read the codebase you are working on (not all of it, unless it&#x27;s smaller than a novel)<p>Pick a certain starting point and follow it down the rabbit hole. Rinse and repeat.<p>A couple things I find helpful about this practice is: one, it let&#x27;s you compare the over all architecture against the true implementation (which can vary), and two, it gets you comfortable with the implied standards--the things that can&#x27;t&#x2F;don&#x27;t get written on a style guide (e.g. they keep prepared statements in a separate, common file)
nevesover 5 years ago
First: read the book &quot;Code Complete&quot; from Steve McConnell. You don&#x27;t have to read it sequentially, go right to the parts that you have more feedback in your reviews.<p>Second: take your code reviews as a great learning opportunity. Don&#x27;t let it take you down. You are probably getting the &quot;Impostor Syndrome&quot;, and it is a good thing since you now know that you need to improve. Take the review process as feedback about how to improve. This is Deliberate Practice at its best.
carapaceover 5 years ago
Meditate.<p>No, I&#x27;m seriously.<p>- - - -<p>Read &quot;Thinking Forth&quot; by Brodie ( <a href="http:&#x2F;&#x2F;thinking-forth.sourceforge.net&#x2F;" rel="nofollow">http:&#x2F;&#x2F;thinking-forth.sourceforge.net&#x2F;</a> ) and &quot;Programming Pearls&quot; by Jon Bentley ( <a href="https:&#x2F;&#x2F;archive.org&#x2F;details&#x2F;ProgrammingPearls2ndEditionJonBentley" rel="nofollow">https:&#x2F;&#x2F;archive.org&#x2F;details&#x2F;ProgrammingPearls2ndEditionJonBe...</a> ) and sleep on them.
twblalockover 5 years ago
&gt; I usually take 3-4 tries with some significant amount of testing to get my code to a working state.<p>This is probably the biggest problem. You are thrashing on a cycle of testing because your code didn&#x27;t work properly the first time. Getting it right the first time, even if it feels slow, is usually faster than fixing it later.<p>In my experience this is what happens when developers focus on the &quot;happy path&quot;, i.e. spending most of your time assuming your code will run in a perfect world, and writing tests to prove it.<p>You may want to try working backwards from the tests -- decide how your code should behave, especially in bad situations where inputs are null or your dependencies throw exceptions or your API calls fail. Write the tests, and then fix your code to make the tests pass. Use coverage tooling to make sure you covered what you thought you did.<p>If you still have problems, try asking some of your colleagues to spend half an hour with you to review your code <i>before</i> you submit it for review. Some of them will probably be happy to help the new guy, especially if you are trying to do a better job meeting their expectations.
评论 #21751863 未加载
yitchelleover 5 years ago
If there is a chance to work with a mentor on your coding skills, grab it and start engaging in it. Having a mentor gives you a platform to sound out your techniques, doubts and ideas. Also a platform for you to received the right questions.<p>The velocity is only important to managers when they are using it for comparison against other engineers when doing performance reviews. Focus on getting it right the first time.
Glenchover 5 years ago
Lots of good advice in this thread but I would add something: your designs will almost always be wrong in some important ways because without implementing them you almost certainly don’t fully understand the trade offs. It’s better to have a culture where going back and rewriting things as new learning happens is accepted and expected, with an eye toward reducing complexity.
gitgudover 5 years ago
My personal opinion is that &quot;Good Code Quality&quot; is from good communication to the person reading the code.<p>You need to be able to explain the architecture of what you&#x27;re programming, the reasons being:<p>- Code is processed by machines, but <i>read</i> by humans<p>- Code is read by many people, written by far fewer<p>- If you cannot explain design decisions, then expect criticism of it<p>- Naming is hard, but reading badly named code is even harder
frenchman99over 5 years ago
Doing a lot of testing is totally fine. I recently got into a &quot;Lead Developer&quot; position and if I get a PR that is not well tested, the time I waste testing something that doesn&#x27;t work is worse than waiting for the developer to properly test the thing before passing it on to me. I&#x27;d rather wait a bit more but be 99% sure that I could merge without additional testing. So, from my perspective, taking a bit more time with testing is no issue as long as you actually test all edge cases and your higher-up knows they can rely on your ability without having to double check everything.<p>As for taking 3-4 tries, I think that if you stick with it, you&#x27;ll get better as time goes. Learning about design patterns, even if the tutorials seem worthless at first, might come in handy. Better to be aware of the patterns before you need them than after.
anon9001over 5 years ago
It&#x27;s hard to help without knowing what languages you work with and what kind of feedback you&#x27;re getting.<p>Are your solutions overbuilt? Poorly documented? Introducing new patterns where they aren&#x27;t needed?<p>The biggest clue I&#x27;ve got to work with is:<p>&gt; I refer to stack overflow or ask my colleagues if I get stuck on some design &#x2F; technology feature which I haven&#x27;t seen before.<p>I&#x27;m searching up the problem as many ways as I can before I even get started. Even if I think I know how to do something, there could be a better way to do it.<p>&gt; the rush to complete the deliverable on time<p>If you&#x27;re rushing, you&#x27;re doing something wrong. Here&#x27;s a secret: it&#x27;s way more important to be reliable than it is to be fast. Who&#x27;s setting the deadlines? Is there a way you can squeeze more time? A lot of junior devs underestimate things habitually.
encodererover 5 years ago
Practice, practice, practice. Shave days of waste every year by having great documentation tools on your machine and LEARN the tools you use most so you can skip the google. Invest these saved hours into more important tasks.<p>Whiteboard a design with a colleague, socialize your ideas.<p>Open a “do not merge” pull request early and keep pushing changes to it. Keep your lead&#x2F;mentor tagged and request early feedback.<p>In a large codebase there are usually many many conventions like “this is THE WAY we do such and such” and it’s important to pick these up. It can be difficult to find these they are not always well documented.<p>Really, practice. Build things. Write a lot of code for your job. Write a lot of code for yourself on whatever interests you. Put in the hours or keep putting them in if you already are and your knowledge will continue to compound.
gwbas1cover 5 years ago
What&#x27;s critical here is onboarding. Perhaps your code is &quot;fine&quot; from a different perspective, but because it doesn&#x27;t fit in with existing conventions, styles, libraries, helper functions, ect, it needs to be refactored?<p>For example, I work on a C# product. We have particular patterns for dependency injection, events, and multithreading. A newcomer from a different department once made a pull request that used static singletons and different event semantics.<p>In this case, the newcomer gave a lot of pushback because we do things differently than the textbook examples of C# that they&#x27;re used to. Our way meets the design needs of our product, thus it&#x27;s the &quot;right&quot; way. The way that this developer made changes would be &quot;correct&quot; in a different product with different design needs and conventions.<p>Normally, we avoid this by spending time with newcomers to explain the styles and patterns in our codebase. (In this case, this person from another department wasn&#x27;t onboarded and just surprised us with a pull request.)<p>We do document our coding style and design patterns; but it&#x27;s important to point out that documentation is no replacement for common sense.<p>If you&#x27;ve made it this far:<p>1: Professional programming isn&#x27;t art or poetry; it&#x27;s all about the finished product. Computer code is NOT a place for your self expression or creativity. (If that&#x27;s important to you, go make some Wordpress themes or hack some other program to be skinned.)<p>2: It&#x27;s important that professional code has consistent style and design patterns, otherwise it&#x27;s extremely hard to read each time a module uses a different style.<p>2.5: Thus, the most important part of good style is trying to fit in with the existing style whenever possible. (IE, if you use tabs, but everyone else uses spaces, you need to switch to spaces.)<p>3: If this is a case of &quot;growing pains,&quot; take the time to document your codebase&#x27;s style, design patterns, ect.
kissgyorgyover 5 years ago
Read Clean Code (they are in video form) or Code Complete 2 and Refactoring books and LEARN what makes a design better than another. Talk with your colleagues about design choices in person and ask why they think one design is better than another. I truly think it&#x27;s learnable.
rasikjainover 5 years ago
Everyone in a team has their own style of coding and designing. It becomes necessary to have a common agreement in a team environment. There are cases where we have to change our design or refactor to align with overall infrastructure and goals.<p>At the basic level, I try to have...<p>1) Comments in code<p>2) Meaningful function and variable names<p>3) Breaking large piece of code into small functions or methods.<p>4) Committing the code to GIT&#x2F;SourceControl whenever a small incremental step is completed.<p>5) Discussing your design&#x2F;worlflow with lead before the development also helps to have common agreement.<p>Sometimes, the code reviewers have difficulty in reading the PR if it spans multiple files or projects. In that case, I had to sit with them and explain the workflow and later they are able to review the PR.
whoisthemachineover 5 years ago
&gt; I usually take 3-4 tries with some significant amount of testing to get my code to a working state. I refer to stack overflow or ask my colleagues if I get stuck on some design &#x2F; technology feature which I haven&#x27;t seen before. I feel the above contributes to reduction in my speed of delivery and the rush to complete the deliverable on time, compromises the quality.<p>If this is happening once you&#x27;re in an integrated environment, then it is too late. A strong test driven development culture in the organization can help with this, and improve design - but if it&#x27;s not already there, it&#x27;s hard to justify the investment without first proving you can write quality code.
hinkleyover 5 years ago
Something I often tell junior developers:<p>When you think your code is ready to review, ask yourself what you could improve in twenty minutes or a half hour. If you’ve been working on something all day or for days, nobody is going to notice an extra thirty minutes.<p>Also code reviews are a training method at some places. They’re trying to normalize style and you don’t know it yet. Take the feedback seriously, yes, but don’t panic about it.<p>How long has it been since they hired somebody else? Stable teams can have serious blind spots about both the level of knowledge required to become effective, and they often aren’t used to having their ideas challenged (even if it’s only different idioms in code).
other_herbertover 5 years ago
One thing that I think would help (and would&#x27;ve helped the person&#x27;s pr that I _just_ reviewed) is to look at the diffs that would be included, make sure the intentions &#x2F; logic is clear...<p>As an example from said pr, a new field was added named &quot;other&quot;... in this particular context this doesn&#x27;t have any meaning at all.. I had to look into the sql changes to see what this data was then add the suspected real name as a suggestion in the code review... don&#x27;t do things like that :D...<p>So, all that to say, look at your diffs and do your own code review before you submit it.. make sure what you want to do is clear and makes sense...
farazbabarover 5 years ago
A lot of great comments and suggestions. Something that I usually share with new developers is to get a feel for the machine. Get to know the system and its architecture even if you are writing your programs in a high level language. Try to imagine the computer as a friend that is fulfilling your request using its organs, the cores, the memory, the registers, the L1 and L2 cache and so on. Put yourself in its shoes and have some empathy for it. The discipline is usually referred to as mechanical sympathy and some of the best software I have used and studied was built around these principles.
dep_bover 5 years ago
Can’t really judge the kind of feedback you’re getting but larger companies have their own set of standards partially driven by problems they had to solve partially driven by whatever the alpha programmer(s) decided upon.<p>That means that a PR could be approved by Facebook and exactly the same code outright rejected by Microsoft.<p>My experience is that my code can be rejected by people with 5 years experience or less while I have almost 20 (professionally) simply because they have been in the organization and with the code longer.<p>It can still make you insecure, especially in your trial period.
jrockwayover 5 years ago
I would focus on making your PRs as small as possible. I think what you want to aim for here is getting consistent about merging some small amount of code every day; writing the code is the easy part, going through the review and addressing the feedback is the hard part. If you keep the code small, the review will be small. Then when you repeat the process tomorrow, you&#x27;ll be able to take into account all the learnings from yesterday&#x27;s review. Eventually review time will be shorter and your changes will get larger.
coldteaover 5 years ago
&gt;<i>Now I&#x27;m a little worried that if my situation doesn&#x27;t change, my career would suffer. I&#x27;ve started to watch a few videos online about design. But I&#x27;m not sure if they&#x27;re going to really help as they usually talk about very basics which doesn&#x27;t help in real world coding.</i><p>Check the PRs and read the existing code from others inside the company. Presumably those meet the company&#x27;s standards, and will give you hints how to structure yours.<p>Read a couple of industry standard books like Clean Code and Code Complete too.
gfs78over 5 years ago
Try to get better at writing code that is easy to refactor. Good code is rarely written in one pass, but in iterative refinements.<p>So, instead of trying to get the definite code from the get go, start with a simple design (yagni and kiss) and evolve from that.<p>But there is no silver bullet. You can get faster but not by orders of magnitude. Quality code takes time.<p>Personally, I go after the feeling I had when I studied programming in the 90s. Simple algorithms that manipulate strings, ints, etc. and no so much after abstraction and composition.
sebastianconcptover 5 years ago
I&#x27;d say that you should try pairing more. First to just discuss about validation on getting the problem right, then agreeing at least with someone else about the approach for the solution so you dissolve potential tensions about your new code. The goal of that is the opposite of surprising designs: gradual expected innovation.<p>If that works well and you and your team like each other, then you can go on. If that bare minimum is not working then find a new team a and start from day zero with this approach.
PretzelFischover 5 years ago
If your at one of the &quot;sought after&quot; companies they have resources for you. Go to your manager for a one on one and ask for help. Where are the code standards, what classes resources do they have to better your design chops. Outside of manager look for someone who has beens there a while and is willing to mentor you.<p>If you don&#x27;t get support from your current manager start looking to switch teams to find a manager that is geared towards developing you and making you a success.
jnaddefover 5 years ago
You should probably stop thinking about your velocity for a while and instead focus on quality.<p>For your design phases, think thoroughly about all possible solutions and detail the pros&#x2F;cons of each, then get it reviewed by your colleagues and iterate on that. The design phase might be slow, and it is OK. At least when you will end up implementing something it is likely to be of much better quality.<p>After a while this will become natural and your velocity will naturally go up.
ptahover 5 years ago
You are lucky as you are getting a lot of on the job training. I would suggest swotting up on SOLID principles: <a href="https:&#x2F;&#x2F;cleancoders.com&#x2F;videos?series=clean-code&amp;subseries=solid-principles" rel="nofollow">https:&#x2F;&#x2F;cleancoders.com&#x2F;videos?series=clean-code&amp;subseries=s...</a><p>something else you can try is to run your designs by a colleague before&#x2F;during coding, preferably the same person that will do the code review
wsyover 5 years ago
They hired you because they already believe you will be a valuable contributor. So don&#x27;t try to impress your colleagues, but rather try to collaborate with them. For example, instead of asking this question here at HN, approach your peer reviewers and ask them about it.<p>Another advice would be to explain as part of your PR (e.g., in the ticket) which design options you considered and why you chose the one you ended up with.
revskillover 5 years ago
Refactoring, thinking, refactoring, thinking... will help you improve current codebase as well as discover new suitable code patterns for your need.
rb808over 5 years ago
My advice is you should be getting to know your system well before writing code. Look over as many parts of the codebase you can, run unit tests and see how they&#x27;re all written and put together. Hopefully then you can write in a similar style.<p>Also I&#x27;ve heard at FANG companies the first few months code reviews will get hammered to make sure people get in line. I&#x27;m not sure how accurate that is.
newzombieover 5 years ago
<i>Are there any good ideas to improve one&#x27;s coding &#x2F; design skills significantly ?</i><p>There might be in the CRs you&#x27;re mentionning. In other words, my advice would be to get the most out of those CRs as you can. Ask questions, encourage people to be critic with you, understand their point of view and learn. If you CR is rejected, get to the core of why it happened technically.
scottiousover 5 years ago
Being conscious of this and wanting to improve is the first step. Get mentoring earlier on in the process, come up with an approach from a more senior dev before you start, check in regularly.<p>Your team might just be more opinionated when it comes to design. Some teams I&#x27;ve worked on are very particular about things, some are not.
adisinomover 5 years ago
There&#x27;s a lot of good advice here for dealing with constructive code reviews. They provide valuable learning opportunities.<p>Also be aware that not all code reviews are good. Engineers have opinions and may wield code reviews as a tool to impose theirs on others. In those cases it doesn&#x27;t reflect you or the quality of your work.
crazypythonover 5 years ago
Balance. A good programmer can balance between CapEx, OpEx, and business objective delivery depending on the business amount of testing.<p>&gt; I usually take 3-4 tries with some significant amount of testing to get my code to a working state.<p>That&#x27;s pretty normal. Try to use TDD, that is, try to test your code ASAP.
dajonkerover 5 years ago
The only thing you can do is to talk with your colleagues and ask them to help you. Only they can tell you how to improve your code quality, as they are the ones judging you. You can tell you&#x27;re at a good company when there are a lot of people that love to help others improve.
Myrmornisover 5 years ago
Don&#x27;t think about velocity. Take as long as you need to get to a point where there is no longer any way you can think of to improve it. If you&#x27;re not routinely pushing yourself to this limit, then you&#x27;re limiting the extent to which you will grow as a programmer.
11235813213455over 5 years ago
Make sure you understand the whole codebase, check their commits to get an idea of what they&#x27;d expect. You can of course suggest different approaches, and have constructive discussions, but first try to understand what they&#x27;ve built and adopt their style
dominotwover 5 years ago
&gt; rejected as it did not meet the required standards.<p>can you give us some examples of this? Do you agree that your design didn&#x27;t meet the standards?<p>Its entirely possible that your new team is being mean to you, I&#x27;v seen team politics play out in PR reviews.
评论 #21752387 未加载
greggman2over 5 years ago
<a href="https:&#x2F;&#x2F;softwareengineering.stackexchange.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;softwareengineering.stackexchange.com&#x2F;</a> sounds like it might be more appropriate for design questions than stack overflow.
viraptorover 5 years ago
Have you seen reviews for others? You may be surprised they end up in the same situation. If you have a strong team, then changes from the experienced people may be judged just as hard as yours.
_Codemonkeyismover 5 years ago
I&#x27;m not gold plating but I&#x27;ve learned to not compromise on code quality. There is a lower level I will not cross, like an engineer who will not build a car without seat belts.
luxuryballsover 5 years ago
There’s some nice code beautification plug-ins our there, check them out for some inspiration and use them to help create uniform syntax structuring.
fergieover 5 years ago
Don&#x27;t worry- you sound like a completely normal, competent programmer, who is slightly more conscientious than average.
donwover 5 years ago
Well, first we should establish what we mean by &quot;quality code&quot;. From my standpoint, both as an engineer and as a manager, quality means that the code:<p>(1) Does what it is supposed to do and nothing more;<p>(2) Is easy to read;<p>(3) Is easy to change;<p>(4) Is efficient enough.<p>Note that these points are somewhat strongly ordered. If you have to make a trade-off between &quot;maximal efficiency&quot; or &quot;can be read by the rest of the team&quot;, you choose readability, unless &quot;maximal efficiency&quot; is required to meet a customer deliverable (&quot;acceptance criteria&quot;).<p>Note the word &quot;required&quot;. As in, &quot;we have promised our customers to service requests in under 2ms, and these rather unreadable performance optimizations are the only way we can do this&quot;, not &quot;the lead programmer likes &#x27;efficient&#x27; code&quot;. That&#x27;s not to say you should be stupid about performance -- see (4), above -- but that your goal is to deliver value to the customer, not to build a technical monument to Donald Knuth.<p>That prompts the next thing we need to talk about: what do we even mean by &quot;high velocity&quot;?<p>Clearly it isn&#x27;t just writing a lot of code. Were that the case, we could measure productivity in LOC&#x2F;day. And it isn&#x27;t in always using the minimum amount of memory or smallest number of CPU cycles.<p>From a business perspective, &quot;high velocity&quot; means &quot;delivering working features to our customers as fast as possible... forever&quot;.<p>That last bit is important. You aren&#x27;t going to get one feature request, scratch that off in a frantic 48-hour marathon of caffeine and hackery, and then be done with the rest of your career.<p>New feature requests, changes to existing features, unexpected behavior that needs to be changed... these are life as a programmer. Smart programmers recognize this, and build their code to be easily changed.<p>Now, you can&#x27;t do this by trying to anticipate every future need. Building code to support an uncertain future is where the vast majority of technical debt comes from, because 90% of the time, you&#x27;ll just be flat-out wrong, either grossly, or in sufficient detail as to render your attempt to defend against change moot.<p>Instead, you follow a set of coding practices that help you design systems and build code that can respond to future change, without having to know anything about what those future requirements might be.<p>To that end, I highly recommend Sandi Metz&#x27;s POODR[1] and 99 Bottles of OOP[2].<p>Yes, the title of the first book ends in &quot;Ruby&quot;. Ignore that part, as it&#x27;s probably the best primer I have ever seen on building code for the real world.<p>I have also found that strong TDD -- and yes, I&#x27;m lumping BDD in with this, don&#x27;t be a pedant -- has helped me to learn to write much higher-quality code over the years. Code that is fully-tested can be changed with a high degree of confidence that you haven&#x27;t broken something unintentionally, and writing tests first forces a lot of highly beneficial design choices.<p>GOOSGT[4] is a good place to get started with TDD.<p>Last but not least, recognize that all of the above are skills -- you will need to devote time, and a lot of repetition to learning them.<p>[1] <a href="https:&#x2F;&#x2F;www.poodr.com" rel="nofollow">https:&#x2F;&#x2F;www.poodr.com</a> [2] <a href="https:&#x2F;&#x2F;www.sandimetz.com&#x2F;99bottles" rel="nofollow">https:&#x2F;&#x2F;www.sandimetz.com&#x2F;99bottles</a> [3] <a href="http:&#x2F;&#x2F;www.growing-object-oriented-software.com" rel="nofollow">http:&#x2F;&#x2F;www.growing-object-oriented-software.com</a>
评论 #21752026 未加载
PLenzover 5 years ago
Faster, better, cheaper. Choose two.
lolsalover 5 years ago
An alternative perspective (not a solution!) from my experience:<p>I currently work at a place in the valley as a senior lead and it is _impossible_ for me to submit a PR without comments&#x2F;nitpicks requiring fixes. My colleagues seem to always want to change something for some reason, whether or not it is a necessary change. The feedback comes in from all skill levels. Honestly most of the time these changes can be (and should be, IMHO) ignored because of YAGNI and Not Invented Here. I can&#x27;t count the number of times I have re-designed and implemented something to be more generic&#x2F;abstract only to have that abstraction whither for _years_ without being used. Oh - and implementing our own wrappers for third party libraries? We do it all the time.<p>The challenge that I face is every time I get frustrated enough to push back and escalate, ultimately when discussing code reviews and velocity with managers, my colleagues drop the &quot;Q&quot; word and it&#x27;s an argument-ending trump card: quality. If anyone can argue that any trivial change increases the quality of the code base, or can argue that my PR lowers the repository code quality, the argument is over. Regardless of whether or not it&#x27;s objectively true, if it&#x27;s subjectively true the argument is over and ultimately any feedback has to be implemented. Management doesn&#x27;t budge on quality.<p>Ultimately though, end users and customers don&#x27;t care about code quality (but the do care about product quality, there is a difference).<p>I have worked at this company for 6+ years. The product is uninteresting to me, but the people are actually a really good fit for me. We otherwise work really well together when doing actual problem solving, requirements gathering, manager managing, customer support, etc. It&#x27;s frustrating to not be able to write code in one pass, but I&#x27;ve learned to &#x27;accept&#x27; it - it&#x27;s the nature of the beast. It&#x27;s definitely not like this everywhere; I&#x27;ve worked at places that were much better about code reviews and merging code. Code that takes a day to design and get requirements for and a day to code and test will usually take a full week to get merged (not uncommon for it to stretch to two weeks). If management is fine with our velocity, then I guess I ultimately don&#x27;t care.<p>Anyway, I recounted all of this for you to give you another data point and perspective. Some places thrive on this sort of torturous review process. I&#x27;ve learned to live with it. It&#x27;s entirely possible that there is no way for you to &#x27;improve&#x27; your way out of review hell. Instead of focusing on reading books and improving your design skills (which you should do anyway!) you might need to learn how to navigate the code review landscape at this new place, either by accepting it or playing the game.<p>I don&#x27;t know how to tell you to play the game except get more involved in the review process as early as possible. Figure out what is important to people. I&#x27;ve gotten into the habit of &quot;pre-screening&quot; my reviews with one or two of the most problematic reviewers. I&#x27;ve gotten to the point where I will commit a pass of pseudo-code and have them give me feedback. It makes them feel better and wastes less of my time when it comes time for actual review.
valandover 5 years ago
Having your PR rejected in a healthy environment means that your PR is radically far from the reviewer&#x27;s expectation.<p>Having your PR rejected in a toxic environment can mean a lot of things, and a company sought after doesn&#x27;t mean that it MUST be not toxic.<p>First, you have to make sure if both of YOU and YOU ENVIRONMENT is healthy. If both are healthy, proceed reading.<p>&gt; The challenge here is to deliver good quality code, while maintaining a decent speed of delivery.<p>You made it sound like producing good quality code = slowness. FALSE. Seeming slow, good quality code boosts your team&#x27;s velocity. BUT keep in mind: &quot;quality&quot; is &quot;the standard of something as measured against other things of a similar kind; the degree of excellence of something&quot;. Your team has its standards, either is a derivative of other globally acknowledged standards such as <a href="https:&#x2F;&#x2F;blog.golang.org&#x2F;go-fmt-your-code" rel="nofollow">https:&#x2F;&#x2F;blog.golang.org&#x2F;go-fmt-your-code</a>, <a href="https:&#x2F;&#x2F;github.com&#x2F;microsoft&#x2F;TypeScript&#x2F;wiki&#x2F;Coding-guidelines" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;microsoft&#x2F;TypeScript&#x2F;wiki&#x2F;Coding-guidelin...</a>, <a href="https:&#x2F;&#x2F;twitter.com&#x2F;dan_abramov" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;dan_abramov</a>, etc, or self-made standards. You go follow them, make them happy!<p>Coding and design skill has a different definition than code quality. It is what punches up to the sky: the overall velocity, the success of the team, the balance of growth and culture retainment of the company, the development experience, the users&#x27; thumbs ups, amazements, and &quot;this app is life changing&quot; comments, the number of milestone celebration in All You Can Eat restaurants each years, the number of people rising up from junior to senior each years, etcetera etcetera.<p>Not only you make your team happy with the quality code based on their standards. You must always exercise to always improve your team, whether your team agrees or not AT THAT TIME. Keep searching for improvements, internally and externally. Occasionally fight with your team if you have to, if you have the right cause. And if it turned to be a wrong cause, accept and move on.<p>So...<p>&gt; Are there any good ideas to improve one&#x27;s coding&#x2F;design skills significantly?<p>Yes. These are the tricks to a good code&#x2F;software&#x2F;system design and architecture:<p>1. Know the fundamentals! Go lower than frameworks and libraries! Analyze why existing codes are made that way! Think in strings, C, algorithm, data structure! Always pay attention top-down and bottom-up! Think in terms of time and space complexity! Separate complexity from complications! Be thorough.<p>2. Know the team! Know what is valuable for the team! Understand how your code impacts your team&#x27;s velocity! Understand the mood of the team and use it! Contemplate how existing processes help or hinder the team! Consider suggesting to add or remove them if necessary! Make interfaces for others! Learn from the team! Cooperate with your team so that you guys can reach higher! Be critical to your team, conflicts can make you stronger! Be humble.<p>3. All that glitters is not gold. Some very popular libraries and tools that might not be as good as you think. Learn harder. Make something better if necessary. Think of both the big picture and the details at every step you make. Don&#x27;t overweigh technicality over business requirement, and vice versa. Be critical.<p>&gt; Now I&#x27;m a little worried that if my situation doesn&#x27;t change, my career would suffer.<p>Be strong. Feel strong. But stay thorough, humble, and critical. And you need to care achieve them.<p>I&#x27;ve been there, laying afraid that my career might suffer. I&#x27;ve been in the reviewer&#x27;s spot too, being too strict, forcing engineers to change the design, sometimes compromising the engineer&#x27;s personal feeling.<p>BUT I&#x27;ve also successfully convinced and lead a rewrite the core of a pretty big project (which people are really afraid of the risk) so that the engineers feel safer when building on top of the core, and in turn make them tens times faster, while at the same time growing some newer engineers to the point of one of them being a lead of a team handling a pretty big project for a customer which is pretty prominent in the gaming industry, IN JUST HALF A YEAR. (sorry, but not sorry for bragging lol :D)<p>You never know what good things are coming to you when you start caring.<p>Some random nice stuff to learn that I remember might help you with the design stuff:<p><a href="https:&#x2F;&#x2F;martinfowler.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;martinfowler.com&#x2F;</a><p><a href="https:&#x2F;&#x2F;medium.com&#x2F;@thisdotmedia&#x2F;the-cost-of-premature-abstraction-b5d71ffd6400" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;@thisdotmedia&#x2F;the-cost-of-premature-abstr...</a><p><a href="https:&#x2F;&#x2F;raphlinus.github.io&#x2F;ui&#x2F;druid&#x2F;2019&#x2F;11&#x2F;22&#x2F;reactive-ui.html" rel="nofollow">https:&#x2F;&#x2F;raphlinus.github.io&#x2F;ui&#x2F;druid&#x2F;2019&#x2F;11&#x2F;22&#x2F;reactive-ui....</a><p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=yy8jQgmhbAU" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=yy8jQgmhbAU</a><p><a href="https:&#x2F;&#x2F;blog.dropbox.com&#x2F;topics&#x2F;work-culture&#x2F;kim-scott-interview" rel="nofollow">https:&#x2F;&#x2F;blog.dropbox.com&#x2F;topics&#x2F;work-culture&#x2F;kim-scott-inter...</a>
jerkstateover 5 years ago
Good for you for recognizing that you are not performing to the standard that you know you can. Now it&#x27;s up to you to use your tools and team to improve.<p>First of all, there is probably a style guide for your programming language at your company. Read it front to back. Your IDE may be configurable to automatically bring code up to these standards. &quot;Look and feel&quot; and using consistent language features are very important for others to be able to easily digest your code and be comfortable with it.<p>Second, there are likely resources for learning your common libraries (like your RPC and presentation libraries for example). Go through those thoroughly. Make sure you understand the common patterns and how they are used in the product you are working on. Apply this learning to your design before you start writing code.<p>Now that you have context, look at the specific feedback you&#x27;ve received and look for resources internally and externally for how to improve the issues that have been raised. Have you been misusing language features? Writing incorrect unit tests? Improperly using abstractions? Scoping functions incorrectly? Make sure that the feedback you&#x27;ve received follows the style guide and tool use cases. Come up with a plan to address the legitimate issues. As others have mentioned, writing a checklist of pre-review items and doing your own code review is indispensable, as well as learning how to make use of any integration testing environments and debuggers that you have access to.<p>Finally, ask your team leadership for help. Have a chat with your manager. Do this after you have done the research so you have some specific examples of mistakes you&#x27;ve made in the context of coding practices at your company and your plans to address them, including asking for specific mentorship prior to implementation, like design review. Why to ask for management&#x27;s help and not go to the devs directly? your performance is their job - where a senior dev may not realize it&#x27;s their job to mentor you until the manager asks them to. Letting your team leadership know that you are being proactive to address this issue will go a long way and unlock more resources that you need. Design review could be whiteboard sessions but I personally prefer design documents describing what the feature will do, why it is needed, how it will work, and what the implementation milestones are. You bring this to the session for editing&#x2F;feedback, don&#x27;t go empty-handed and expect to design stuff on the fly.<p>Regarding your velocity concerns, this will&#x2F;should come up during your conversations with your manager about your skill development. One good way to improve perceived velocity is to break down features into smaller milestones and complete those at a quicker cadence. Having a design document&#x2F;review will help do this.<p>Asking how to improve is the first step. Good luck!
评论 #21755991 未加载
rbongersover 5 years ago
There&#x27;s a lot of feedback already in this thread, but if you&#x27;re still reading, I wanted to share my process in case there&#x27;s anything that was missed. This will help you, hopefully, fully complete issues the first time. Don&#x27;t let any of these points block you, but you can generally go in this order.<p>1. Make sure you understand the requirements for the issue at hand.<p>Make sure you correctly understand all of the work an issue is supposed to encompass and no more. Use all available documentation, issue descriptions, designs, notes, and any other resources. As a last resort, as in the project is not well documented, start putting together questions to ask someone. Craft your questions in advance and ask them strategically and it will save you time. This is not all on you, better documentation, grooming, and other processes can help you work faster, and it might be something worth bringing up at a retrospective or using any other avenue you have for feedback after some research into what exactly is going wrong and what other people have done to solve it.<p>2. If you haven&#x27;t already, start looking into completing the issue from a technical standpoint.<p>No issue exists in a vacuum, and there is probably already existing technical architecture surrounding the issue, or something similar that is already being done. Good code conforms to the standards around it, and a good team codebase looks like it was written by one person. Not copying code, but using it as a general blueprint can help you get past code review by following unwritten established standards of the team. Of course, if there are written standards, check those too. Make sure you understand all of the technologies used by the code you&#x27;re following, it probably has documentation. Try to understand any technical decisions that don&#x27;t seem clear. Follow the guidelines in the previous point for asking questions if you need to. If any technical decisions need to be overturned, consider making refactoring part of the issue if at all practical (this is a whole other can of worms, so you&#x27;ll forgive me if I don&#x27;t get too deep into it).<p>Keep in mind that version control tools can help you understand why a decision was made, particularly if you learn to use tools like `git blame` and `git log` (assuming your team uses git), or even more powerful integrated tools like [vim-fugitive](<a href="http:&#x2F;&#x2F;vimcasts.org&#x2F;blog&#x2F;2011&#x2F;05&#x2F;the-fugitive-series&#x2F;" rel="nofollow">http:&#x2F;&#x2F;vimcasts.org&#x2F;blog&#x2F;2011&#x2F;05&#x2F;the-fugitive-series&#x2F;</a>) or [magit](<a href="https:&#x2F;&#x2F;magit.vc&#x2F;manual&#x2F;magit&#x2F;index.html#Top" rel="nofollow">https:&#x2F;&#x2F;magit.vc&#x2F;manual&#x2F;magit&#x2F;index.html#Top</a>) if you use something like VIM or Emacs.<p>If there are any new technologies and technical decisions that are part of your issue, try to gain a rough idea of what your implementation will look like and try to learn as much about the technologies as possible. If you are not in a decision-making position, it is best to run your ideas past someone who does once they are concrete if you can. Of course, sometimes, it is easier to just start writing code. How low level or high level your planning is up to you, but it should probably depend on the complexity of the issue at hand. Don&#x27;t be afraid to take a couple passes at it, better now than later.<p>3. Start implementing.<p>When you are actually writing code, a good process makes all the difference. Some people use [TDD](<a href="http:&#x2F;&#x2F;agiledata.org&#x2F;essays&#x2F;tdd.html" rel="nofollow">http:&#x2F;&#x2F;agiledata.org&#x2F;essays&#x2F;tdd.html</a>) or write all of their inline documentation ([example](<a href="https:&#x2F;&#x2F;jsdoc.app&#x2F;)" rel="nofollow">https:&#x2F;&#x2F;jsdoc.app&#x2F;)</a>) beforehand, which can help you quickly refine and complete your implementation details without actually writing any code yet. This, again, helps you rework your ideas early on in the process. I use a mix of documentation, testing, and any [REPL](<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Read%E2%80%93eval%E2%80%93print_loop" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Read%E2%80%93eval%E2%80%93prin...</a>) that&#x27;s available to me to test out code beforehand depending on the issue, which is not the most straightforward method. Try TDD at least once and see what works for you.<p>A good dev system can help a lot. If you can get the code into a working state and compile it often to test it, do so. Any other dev tools for testing, documentation, linting, debugging, etc. for the project, learn them and use them.<p>Once you&#x27;re done making some changes, look over your code. Clean up anything you can, and don&#x27;t be afraid to make another pass at it if you need to, especially early on.<p>Planning out how you&#x27;re going to get things into a working state and split up your changes (commits in git) early can sometimes help, but sometimes it&#x27;s easier just to clean up your commit history later as you&#x27;re reviewing your changes (getting familiar with `git rebase` can help with this).<p>4. Submit your merge requests&#x2F;pull requests.<p>If you can at all, get your code into a working, logically separated state often and submit small merge requests&#x2F;pull requests often for review. This can help you correct your tragectory early on if you still need to take a different direction. Familiarity with git or the VCS you&#x27;re using can help a lot with dealing with multiple branches of code. As with all things, give your pull request one final look-over before you submit it for review and clean up anything you need to.<p><i></i>tl;dr: understand everything you can, ask questions, plan ahead, take multiple passes early, and make small changes<i></i>
_tkzmover 5 years ago
&quot;I usually take 3-4 tries with some significant amount of testing to get my code to a working state.&quot;<p>..this is a &quot;code&quot; smell to me. if you are jr, then ok, otherwise you got some serious problems nad put your focus in the wrong places.<p>anyhow, one advice i can give you, or anybody else, is - when you&#x27;re doing it right, it just flows. when you&#x27;re banging your head against a wall, you took a bad turn in your decisionamking process a while back and need to retract your steps. this one usually can save you from writing about 80% of useless code. when you are bored and are not looking forward to write something, you are on the right track. if you feel creative and full of energy, you are thinking on your feet and have no idea where it will lead you. sure, this is the best part of coding, the creativity, but not in the business world. that is for your personal projects. boring is good. be creative in preparation, not once you&#x27;re already undertaking a task.
faraday2211over 5 years ago
What a strange “sought after” company, where guidelines are not written and people just reject prs without a good reason.
sisciaover 5 years ago
Maybe I am over reacting to the way you wrote your comment and this definitely won&#x27;t be liked by the general community.<p>Serious developer do not refer to stackoverflow. Developers should use stackoverflow only to lookup for names of functions or methods. Nothing else.<p>When you find what you are looking for, then you go reading the official documentations. In the extremely rare and specific case when the documentation is not there (and when you cannot change the library that you are using, why would you use a library without documentation?) then you go read the code.<p>If the majority of your time is spent copying and pasting (with slight modification) from stackoverflow you are extremely junior in that field.<p>I see it on myself, when I do backend work stackoverflow is not even on my tabs. But when I do some frontend for personal projects I just keep going back and forth.
评论 #21755115 未加载