|
New Yorp New Yorp posted:Code coverage does not guarantee that code is bug-free or well-tested, just that someone has attempted to test it. Code coverage requirements are just asking to be gamed. Coverage may not be perfect but it is leagues better then no coverage. A test that exists, even if it is wrong, is a starting point for a fix when a bug is found. Coverage also tells you which error cases you are not exercising.
|
# ? Jan 16, 2019 07:36 |
|
|
# ? Apr 27, 2024 00:27 |
|
TooMuchAbstraction posted:How do y'all get your junior teammates to build better software? At the moment all of my code reviews are involving a lot of back-and-forth because they're sending poo poo out for review really before it's ready. I remain hopeful that they're capable of better (i.e. they're not just crappy devs) but I don't know how to go about improving their output. I am assuming you're talking about folks who are clearly engaged with the work and otherwise enthusiastic - but just can't seem to give a drat about quality? I've got a pet theory that this is especially common in software mostly because of the esoteric prestige that comes with BEING A COMPUTER PROGRAMMER! You get folks who love being a programmer more than they really love programming. Who get seduced by the feeling of 'oh gently caress yes everyone thinks I'm a supergenius when I tell them I WRITE SOFTWARE' rather than loving the work itself enough to give a poo poo about the bigger picture. (Note, this isn't necessarily limited to programming and tech, but I think it's more prevalent here) Your only shot is to try and earn enough respect in their eyes to be able to have a friendly and serious career advice talk with them over lunch. A sort of 'here's a bit of advice I wish someone had given me early on in my career' type talk. Either they'll listen or they'll figure they're smarter than you and ignore it. At least then you'll know and can refocus your energy and efforts and attention where it's better used.
|
# ? Jan 16, 2019 10:33 |
|
TooMuchAbstraction posted:
Oooh, this is a tricky one, and I'm probably guilty of it myself. I find there's often stuff that if you're looking at it in any depth, you need to have some context on the issue at hand already. Or maybe that's just what I tell myself, and I just write lovely comments...
|
# ? Jan 16, 2019 11:17 |
|
redleader posted:Oooh, this is a tricky one, and I'm probably guilty of it myself. I find there's often stuff that if you're looking at it in any depth, you need to have some context on the issue at hand already. Depends the level of assumed knowledge of the reader. There are definitely things that a random practitioner may not know that everyone in a sub field should. If no one will ever benefit from the comment, it’s not helpful. Then again, that’s exactly the argument maths PhD’s make when authoring whatever thing they’re doing. So maybe the assumed reader should always be a novice.
|
# ? Jan 16, 2019 12:42 |
|
leper khan posted:Depends the level of assumed knowledge of the reader. There are definitely things that a random practitioner may not know that everyone in a sub field should. I wonder about this kind of thing when someone leaves a comment that describes a lesser-known, but still well-documented, facet of a language or library. It may have been a surprise to them, but it wouldn’t have been a surprise to someone more familiar with the language/library. Can’t think of a good example so here’s a dumb one: someone hadn’t used the ternary ?: operator before so they leave a comment above it explaining // if test ? do this : else do that I would find that comment actively unhelpful because I’ve internalized ?:. If someone puts a comment like that then I slow way down and reread the code because I assume the comment is pointing out something weird or unexpected. And it was, to the novice. Like always there’s a balance, but it can happen outside of a specific sub field too.
|
# ? Jan 16, 2019 13:47 |
|
How often do you all ask for raises? Once a year?
|
# ? Jan 16, 2019 14:01 |
|
Ither posted:How often do you all ask for raises? Once a year? I don't ask. I just get them during my annual review. And they're usually good, between 5-15%.
|
# ? Jan 16, 2019 15:05 |
|
Cuntpunch posted:I am assuming you're talking about folks who are clearly engaged with the work and otherwise enthusiastic - but just can't seem to give a drat about quality? Never really thought about it before but I think that idea holds water (and I'm DEFINITELY NOT TALKING ABOUT MYSELF)
|
# ? Jan 16, 2019 15:47 |
|
I can definitely confirm that I was a snotty little poo poo as a young programmer and had to have the ego beaten out of me. So yeah, there's some truth there.
|
# ? Jan 16, 2019 15:55 |
|
Ither posted:How often do you all ask for raises? Once a year? Whenever I switch contracts.
|
# ? Jan 16, 2019 16:08 |
|
My company's C-Suite in action with our company's product.
|
# ? Jan 16, 2019 17:11 |
|
New Yorp New Yorp posted:I don't ask. I just get them during my annual review. And they're usually good, between 5-15%. Is that standard? My company's engineering department just decided that we need to have 3 standard buckets for raises: 3%, 5% and 7%; no higher unless you're getting promoted. Slimy Hog fucked around with this message at 19:19 on Jan 16, 2019 |
# ? Jan 16, 2019 17:11 |
|
Slimy Hog posted:Is that standard? My company's engineering department just decided that we "need" to have 3 standard buckets for raises: 3%, 5% and 7%; no higher unless you're getting promoted. In my experience 3%-7% seems pretty standard if not a bit high for most companies.
|
# ? Jan 16, 2019 17:20 |
|
3% is usually a pay cut when accounting for inflation.
|
# ? Jan 16, 2019 17:36 |
|
TooMuchAbstraction posted:3% is usually a pay cut when accounting for inflation. 3% keeps you just ahead of inflation in USA for the last decade: https://www.usinflationcalculator.com/inflation/current-inflation-rates/ If you live on the coasts it may not be keeping up with the cost of living though. I'm not sure where to look for those numbers. I agree its not a raise.
|
# ? Jan 16, 2019 17:40 |
|
Slimy Hog posted:Is that standard? My company's engineering department just decided that we "need" to have 3 standard buckets for raises: 3%, 5% and 7%; no higher unless you're getting promoted. It's pretty uncommon in my experience. My company has taken very good care of me, which is one of the reasons why I just finished my 6th year with them. I make 60% more than when I started. And they give decent bonuses. And for some reason, one of our clients gave me an additional bonus last year, although that's never happened before and will probably never happen again.
|
# ? Jan 16, 2019 17:46 |
|
TooMuchAbstraction posted:It also bears mentioning that some of the people contributing software on my team are not formally-trained software engineers. My team does hybrid science/software work, so we have people who did other stuff in college than take three years of software deep dive courses, and their industry experience is at a lab bench rather than a desk. Otherwise, the main issue the team has is that it's very junior. None of the problems you mention fundamentally matter so long as they don't get all pissy about doing the work. I think it's very rare for somebody to not learn from the feedback and improve, even if it takes awhile, unless: 1. The code is an auxiliary task for them that they don't care about at all. 2. They think they're God's Gift to Software because they aced the lovely programming class they took in college in their major so you're just some rear end in a top hat to them. I've found if neither of those are a problem, then subsequent submissions will repeat some problems, but much less. If so, then you can help mentor them until they find out all they ever wanted to do was software and they leave to do that instead. That's my life.
|
# ? Jan 16, 2019 17:54 |
|
Rocko Bonaparte posted:2. They think they're God's Gift to Software because they aced the lovely programming class they took in college in their major so you're just some rear end in a top hat to them. The best antidote to #2 is failure. Code review is good because it can help prevent people from failing, but nothing breeds humility like failure, and you might just need to step back and let failure happen.
|
# ? Jan 16, 2019 19:14 |
|
TooMuchAbstraction posted:On a related note, how do you get your teammates to do more rigorous code reviews? Because those not-really-ready change lists are getting a pass from other teammates despite glaring flaws. The one place I've seen this done well code review was a privilege, not a right. Before you were given permissions to sign off on a code review you had to get all of your code reviewed by at least 2 more reviewers than usual and it had to consistently pass without change requests from any of them for at least a week. When there weren't enough reviewers on the team (common) we'd ask for help from other team's reviewers. Took most devs about 6 months to get to the point where they were consistently submitting mistake free code. New code reviewers were also on informal probation and provided check lists of common issues to look for and were mentored by the other reviewers double checking their reviews and walking them through anything they missed for the first few weeks. TooMuchAbstraction posted:This isn't failing to hew to specs. But, uh, some examples... I dug up a couple of links I think are good external sources I would sprinkle into code reviews to help convince devs that this stuff is important. Generally style rules: https://google.github.io/styleguide/cppguide.html - You may recognize this one. Variable naming advice: https://hackernoon.com/the-art-of-naming-variables-52f44de00aad Some good pithy advice links including my favorite: "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." ― John Woods http://codewithawa.com/posts/10-most-badass-quotes-about-programming https://medium.com/cygnis-media/20-fantastic-quotes-to-shed-light-on-application-development-12542402a2eb Remind devs who are slow to write tests that they'll have to maintain the code later, and then follow through. I like to give devs, especially junior ones, features to own and then make sure they get assigned any bugs or changes there so they can learn from their mistakes. I don't have a good link handy for devs writing huge functions (If I have to correct it more than I few times I let them do it their way and then require them to maintain it and that cures them quickly enough) but this looks good: https://www.toptal.com/software/single-responsibility-principle TooMuchAbstraction posted:[*]Throwing together six unrelated things into one gigantic change instead of breaking them out into smaller ones. For commenting I like to say that I can read what the code does, but I need comments to tell what you think it is doing and what it should be doing. It sinks in and eventually they start writing more useful comments. Another trick is to encourage them to write the comments before writing the code. Essentially stepping through what they want to accomplish. I do it myself sometimes when I'm doing something tricky and need to think through an algorithm. Usually gets you cleaner and more efficient code too. You can find some really good talks that get posted to youtube and other places from Developer conferences. When I was at Garmin I'd take over a conference room every other week and invite any devs who wanted to come watch a talk. Unfortunately I left all the links I'd collected behind when I moved. Overall though, if those are the worst problems you're seeing I'd say you've already done a great job so far. The only one I'd be upset in seeing in a junior dev is the no tests thing, and several other people have already suggested process improvements to catch that before you or another human looks at it. I don't know how many times I've had to tell people that untested code isn't finished code though. Even if you have a robust QA team, devs should be testing happy paths and any likely failure points because bug's get more expensive the later they're found (there's lots of research on this, but here's a site with a pretty graph https://www.isixsigma.com/industries/software-it/defect-prevention-reducing-costs-and-enhancing-quality/)
|
# ? Jan 16, 2019 19:14 |
|
LLSix posted:Some good pithy advice links including my favorite: "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." ― John Woods I don't know if I heard it and then stole it without remembering I stole it, but I've been saying almost exactly that for at least 10 years when explaining to teams why good test automation practices are critical.
|
# ? Jan 16, 2019 19:16 |
|
Rocko Bonaparte posted:1. The code is an auxiliary task for them that they don't care about at all. Had a a guy at my work who was a PhD, a machine learning expert (no idea what exact qualifications he had as i did not hire him). The code that he did write was extremely bad (i learned new ways of writing spaghetti code, i would have never imagined). Now that wouldn't have been a big issue in and of itself, but he did refuse to change. His attitude was always "let Volguus untangle this mess and make it an actual usable component". Well, gently caress you too mister. Finally they let him go last month as he was more of a liability. To not mention about tests : that was not even on the radar.
|
# ? Jan 16, 2019 19:28 |
|
TooMuchAbstraction posted:I can definitely confirm that I was a snotty little poo poo as a young programmer and had to have the ego beaten out of me. So yeah, there's some truth there. A couple of your items are only a problem for long-term maintenance and coming from an academic environment where getting it over the finish line by a deadline is far more important, would seem strange. For the more minor stylistic issues, I'd point out where if foo < 1: continue; idiom is used in the code base already. I'd hope the juniors are taking your advice, but when you're telling people "how" to do something it can be important to emphasize the "why" to get it to stick. I legit don't know if it's possible to land on best practices without, e.g., watching a multiple-arrays-with-same-index solution grow to be monstrous and difficult to refactor. Maybe it's enough to see one fully-formed, with a little bit of history diving to see why each little step towards it seemed reasonable.
|
# ? Jan 16, 2019 23:25 |
|
Uncomfortable with how little controversy there was about code coverage; it is bad!
|
# ? Jan 17, 2019 00:36 |
|
return0 posted:Uncomfortable with how little controversy there was about code coverage; it is bad! As soon as there is a number attached to code coverage you get management trying to reward/punish based on that number. Never make an easily-measured number a proxy for code quality.
|
# ? Jan 17, 2019 01:13 |
|
Code coverage is good!
|
# ? Jan 17, 2019 01:14 |
|
vonnegutt posted:As soon as there is a number attached to code coverage you get management trying to reward/punish based on that number. Never make an easily-measured number a proxy for code quality. If it is enforced at submit then everyone is meeting it so it isn't likely to be rewarded or punished, it is just a requirement to submit. If someone is gaming the system with lovely tests then they are a lovely employee and should be fired
|
# ? Jan 17, 2019 01:16 |
|
vonnegutt posted:As soon as there is a number attached to code coverage you get management trying to reward/punish based on that number. Never make an easily-measured number a proxy for code quality. If upper management wants numbers, they will get their numbers. It's a reasonable way of differentiating people who know how to play a numbers and politics game versus those who rigidly just want good software. Why that is desirable is a very different and perhaps unanswerable question.
|
# ? Jan 17, 2019 01:16 |
|
baquerd posted:If upper management wants numbers, they will get their numbers. I've witnessed formerly unconcerned management suddenly get obsessed with metrics once a metric was enabled. Especially a non-tech management when presented with a metric that supposedly measures something un-measureable. And very few people are content to see a number stay the same - they want it to go up. Once it can't go up any higher, then it becomes punishable if it drops. Keeping code coverage at 100% is much more difficult than keeping it at 95%, for very little actual quality gain.
|
# ? Jan 17, 2019 01:41 |
|
vonnegutt posted:I've witnessed formerly unconcerned management suddenly get obsessed with metrics once a metric was enabled. Especially a non-tech management when presented with a metric that supposedly measures something un-measureable. And very few people are content to see a number stay the same - they want it to go up. Once it can't go up any higher, then it becomes punishable if it drops. Keeping code coverage at 100% is much more difficult than keeping it at 95%, for very little actual quality gain. I'm curious how you get 100% code coverage in cases like this: code:
|
# ? Jan 17, 2019 02:30 |
|
A lot of managers are lovely partly because they can’t articulate why things are lovely / not lovely without some straw man numbers to absolve themselves of blame and are actually at the mercy of the teams they lead but can’t act like that’s reality because then what’s the point of you being a manager when some other asshat that acts tough gets perceived as “getting things done” and the concept of servant leader is openly mocked despite high praise from both the metric output and the direct report. Starts from the top down. - Former Manager at A Very Publicly Known Bad Company
|
# ? Jan 17, 2019 02:30 |
|
Idiotic obsession with high coverage metrics doesn't make coverage bad. My team has an 80% coverage goal (no check in enforcement) and that is easy enough to hit with reasonable unit testing. I have personally found it useful when looking at some graphical lcov output and realizing that an error we thought was covered was actually not covered because the unit test was hitting a similar but different error condition.
|
# ? Jan 17, 2019 07:28 |
|
TooMuchAbstraction posted:I'm curious how you get 100% code coverage in cases like this: duh code:
|
# ? Jan 17, 2019 16:15 |
|
I was the sole engineer and technical decision-making person at my last job. Was there for over five years. I’m looking for work now as an engineer and having an awful go of it. Conversationally things go great, and I’m always excited and comfortable to talk about approaches, concepts and open to discussion, questions and challenges. It’s seeming like I’m not cutting the mustard on technical interviews, even the ones I thought went reasonably well I’m still passed over. I practice for them, brush on aspects and concepts I think will be relevant. During them I'm confident and comfortable explaining my reasoning. But then, nada. Frustratingly, getting feedback on where I was weak and left them deciding to pass are consistently met with crickets chirping when I follow up. Does anyone here with a hiring position have insight on what I may be doing "wrong"? Why are hiring managers so cagey about giving feedback? I stumbled across this article recently and it's been depressingly accurate.
|
# ? Jan 17, 2019 18:09 |
|
My guess is that feedback isn't given because nobody wants to go anywhere near the realm of hiring discrimination, so even if they could accurately say "you didn't get hired because you punched your interviewer in the face and then shat in their coffee" they wouldn't. Much safer to leave it as a completely opaque process that generates results which were unfortunately not favorable in your case. Interviewing is a skill and takes practice. You're also at the whims of your interviewers, so e.g. just because you passed a question may not mean that you passed it "hard enough" for someone with your experience level. Like, they might have this idea that anyone with over X years of experience ought to be able to solve their pet problem in five minutes. Basically it's a crapshoot. You can influence your prospects by practicing, but you can't guarantee that good interviewing skills will let you pass any given interview.
|
# ? Jan 17, 2019 18:16 |
|
TooMuchAbstraction posted:My guess is that feedback isn't given because nobody wants to go anywhere near the realm of hiring discrimination, so even if they could accurately say "you didn't get hired because you punched your interviewer in the face and then shat in their coffee" they wouldn't. Much safer to leave it as a completely opaque process that generates results which were unfortunately not favorable in your case. Yeah makes sense. This was my knee-jerk but wondered if I was just being cynical. I'll resign to just wallowing in mystery, though philosophically I feel like a hiring manager *should* be comfortable giving objective answers on how a concept, execution or explanation was weak enough to determine a candidate was not a good fit. TooMuchAbstraction posted:Interviewing is a skill and takes practice. You're also at the whims of your interviewers, so e.g. just because you passed a question may not mean that you passed it "hard enough" for someone with your experience level. Like, they might have this idea that anyone with over X years of experience ought to be able to solve their pet problem in five minutes. Basically it's a crapshoot. You can influence your prospects by practicing, but you can't guarantee that good interviewing skills will let you pass any given interview. Frustratingly it definitely is seeming that way. Any advice on how to practice interviewing specifically? Are there coding exercise tools that are better suited for that than others, perhaps?
|
# ? Jan 17, 2019 18:39 |
|
GeorgieMordor posted:Frustratingly it definitely is seeming that way. Any advice on how to practice interviewing specifically? Are there coding exercise tools that are better suited for that than others, perhaps? Practice by interviewing. I guess you could also find a collection of interview questions, and then practice by bringing up a question you haven't seen before, then standing in front of a whiteboard and out-loud talking through how you'd solve it, then writing out your solution on the whiteboard. Actually writing code for a bunch of problems (like Advent of Code or Project Euler or whatever) can be a good way to get practice at solving little problems, too. I know you didn't specifically ask for this, but as an interviewer here's what I'm looking for from the interviewee, more or less in order:
Your goal is to convince the interviewer that you have all of the above skills. That involves a lot of talking and maybe some diagrams that you typically wouldn't produce when writing code for your job.
|
# ? Jan 17, 2019 18:57 |
|
TooMuchAbstraction posted:as an interviewer here's what I'm looking for from the interviewee, more or less in order:
|
# ? Jan 17, 2019 19:13 |
|
Top quality post, would read again, A++
|
# ? Jan 17, 2019 19:30 |
|
TooMuchAbstraction posted:I'm curious how you get 100% code coverage in cases like this: OK so I have never written a single line of Go but have you considered something like: code:
|
# ? Jan 17, 2019 19:38 |
|
|
# ? Apr 27, 2024 00:27 |
|
TooMuchAbstraction posted:Practice by interviewing. I guess you could also find a collection of interview questions, and then practice by bringing up a question you haven't seen before, then standing in front of a whiteboard and out-loud talking through how you'd solve it, then writing out your solution on the whiteboard. Actually writing code for a bunch of problems (like Advent of Code or Project Euler or whatever) can be a good way to get practice at solving little problems, too. This is good advice.
|
# ? Jan 17, 2019 19:59 |