Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
smackfu
Jun 7, 2004

My favorite thing to point out about code coverage is that you can delete all the asserts and expects from your tests, so they test nothing, and still get the same code coverage percentage.

Adbot
ADBOT LOVES YOU

Eggnogium
Jun 1, 2010

Never give an inch! Hnnnghhhhhh!
Yes, it’s true. Code coverage can’t single-handedly compensate for gross incompetence.

Pedestrian Xing
Jul 19, 2007

I've written for platforms that don't support any sort of testing and it's horrible. I'm very pro testing, I just don't like writing pointless ones to get coverage back to X% because another dev wrote a 400 line function with no coverage for the third time this sprint.

SardonicTyrant
Feb 26, 2016

BTICH IM A NEWT
熱くなれ夢みた明日を
必ずいつかつかまえる
走り出せ振り向くことなく
&



I am working on a patent for a mechanical arm that goes around your throat. As you code more and more, the arm squeezes tighter. Only by adding good tests does the arm release its grip.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

SardonicTyrant posted:

release its grip.

I think I found a bug in your scheme

a foolish pianist
May 6, 2007

(bi)cyclic mutation

SardonicTyrant posted:

I am working on a patent for a mechanical arm that goes around your throat. As you code more and more, the arm squeezes tighter. Only by adding good tests does the arm release its grip.

Nobody speak^H^H^H^H^H write, nobody get choked.

https://www.youtube.com/watch?v=NUC2EQvdzmY

necrobobsledder
Mar 21, 2005
Lay down your soul to the gods rock 'n roll
Nap Ghost
Code coverage, like any metric, is useless all by itself without any other context. Almost none of the actual problems we've had at my company in production would have been caught by that level of thinking about unit tests. Code coverage doesn't say anything about the quality of the tests done nor the gaps in test and system design. The only metrics that seem to be leading indicators is asking "how confident would you feel about refactoring X class and deploying it straight into production after it passed tests?"

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER

Eggnogium posted:

Yes, it’s true. Code coverage can’t single-handedly compensate for gross incompetence.

I tried having this conversation with previous boss and the concept never quite stuck.

Xarn
Jun 26, 2015
Probation
Can't post for 20 hours!

Pedestrian Xing posted:

I've written for platforms that don't support any sort of testing and it's horrible. I'm very pro testing, I just don't like writing pointless ones to get coverage back to X% because another dev wrote a 400 line function with no coverage for the third time this sprint.

How did it get into master? Are you one of those shops that don't do reviews before merge? :suicide:

Fundamentally, coverage is there to help guide people acting in good faith. If you have programmers who act in bad faith, just loving fire them.

SardonicTyrant
Feb 26, 2016

BTICH IM A NEWT
熱くなれ夢みた明日を
必ずいつかつかまえる
走り出せ振り向くことなく
&



Volmarias posted:

I think I found a bug in your scheme
What if it only loosens its grip, but slightly, and less than the amount it tightens?

Macichne Leainig
Jul 26, 2012

by VG

Xarn posted:

If you have programmers who act in bad faith, just loving fire them.

Unless you work at my company where it can take weeks to hire a candidate (and the candidates usually find another position while they wait), so they don't fire any of the programmers they do have, even if they are grossly incompetent.

I have never seen such poorly formatted and clearly copy-pasted from StackOverflow style code in a production application until I worked with some of the developers on my scrum team. But beyond raising my concerns in a code review and talking to my manager about it, I can't really do anything else.

Until an eventual bug is filed in the code and I get to refactor it, of course.

In good news they gave me two 10+ percent raises this year, which makes it a lot easier to deal with the BS, since now I can afford more whiskey.

Macichne Leainig fucked around with this message at 15:10 on Nov 13, 2018

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Protocol7 posted:

Unless you work at my company where it can take weeks to hire a candidate (and the candidates usually find another position while they wait), so they don't fire any of the programmers they do have, even if they are grossly incompetent.

I have never seen such poorly formatted and clearly copy-pasted from StackOverflow style code in a production application until I worked with some of the developers on my scrum team. But beyond raising my concerns in a code review and talking to my manager about it, I can't really do anything else.

Until an eventual bug is filed in the code and I get to refactor it, of course.

In good news they gave me two 10+ percent raises this year, which makes it a lot easier to deal with the BS, since now I can afford more whiskey.

Sounds like you should get a 50% raise by going to another company that doesn't refuse to fire idiots and save the whiskey money too.

Macichne Leainig
Jul 26, 2012

by VG

Volmarias posted:

Sounds like you should get a 50% raise by going to another company that doesn't refuse to fire idiots and save the whiskey money too.

I have one of those jobs where I can spend most of my time doing a second job that's more fulfilling. So, while my actual "employment" job is a bit poo poo, it still pays 80 grand a year, has amazing insurance and 401k match, and I make $35/hour on the side for about 20 hours a week.

Jose Valasquez
Apr 8, 2005

Code coverage + mutation testing seems pretty good in my experience. You are still left with the problem of tests testing for the wrong thing, but at the very least it helps make your tests actually test the code instead of just running the code

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Protocol7 posted:

I have one of those jobs where I can spend most of my time doing a second job that's more fulfilling. So, while my actual "employment" job is a bit poo poo, it still pays 80 grand a year, has amazing insurance and 401k match, and I make $35/hour on the side for about 20 hours a week.

So... $115k.

That's like entry level Good Tech Job, not counting RSUs.

Macichne Leainig
Jul 26, 2012

by VG

Volmarias posted:

So... $115k.

That's like entry level Good Tech Job, not counting RSUs.

I don't know of any entry-level positions that pay 6 digits. Every junior level position I've seen in my area pays around 55-60k.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Protocol7 posted:

I don't know of any entry-level positions that pay 6 digits. Every junior level position I've seen in my area pays around 55-60k.

Can you move out of the rust belt?

redleader
Aug 18, 2005

Engage according to operational parameters

Volmarias posted:

So... $115k.

That's like entry level Good Tech Job, not counting RSUs.

Agreed. gently caress your life; drop everything and move to silicon valley where you can make a sweet 6.06 figgies w/ a bit of stock working 100+ hours a week for a world-changing startup like uber-for-furniture or tinder-for-cats or mumble-mumble-machine-learning with a scam artist/investor and a bunch of early-20s techbros.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

redleader posted:

Agreed. gently caress your life; drop everything and move to silicon valley where you can make a sweet 6.06 figgies w/ a bit of stock working 100+ hours a week for a world-changing startup like uber-for-furniture or tinder-for-cats or mumble-mumble-machine-learning with a scam artist/investor and a bunch of early-20s techbros.

Uh oh, did I strike a nerve?

Xarn
Jun 26, 2015
Probation
Can't post for 20 hours!

Protocol7 posted:

Unless you work at my company where it can take weeks to hire a candidate (and the candidates usually find another position while they wait), so they don't fire any of the programmers they do have, even if they are grossly incompetent.

I have never seen such poorly formatted and clearly copy-pasted from StackOverflow style code in a production application until I worked with some of the developers on my scrum team. But beyond raising my concerns in a code review and talking to my manager about it, I can't really do anything else.

Until an eventual bug is filed in the code and I get to refactor it, of course.

In good news they gave me two 10+ percent raises this year, which makes it a lot easier to deal with the BS, since now I can afford more whiskey.

Well then, don't work there :v:

Seriously though, if I am interviewing and the company doesn't have a good answer to "do you have a CI and what are you criteria for failing a commit/merging a PR", I keep looking.

Macichne Leainig
Jul 26, 2012

by VG

Volmarias posted:

Can you move out of the rust belt?

No need to, I live in a city with reasonable housing costs so I don't need a 100k base salary just to be able to pay rent on a lovely 600 sq foot studio. Also I live in Colorado which has a decent tech industry and the base salary is still around 60k.

Xarn posted:

Well then, don't work there :v:

Seriously though, if I am interviewing and the company doesn't have a good answer to "do you have a CI and what are you criteria for failing a commit/merging a PR", I keep looking.

The criteria are good on paper, there are just a few poo poo devs that instead of expending effort on learning how to write good code find some ways to game the system a bit (by always approving each other's PRs, et cetera.)

I could quit and find another job that pays probably 10k more, but I lose out on some good benefits and then I'd have a real job with real daily responsibilities, and I do enjoy getting paid to bitch about my job on SA.

Macichne Leainig fucked around with this message at 20:06 on Nov 13, 2018

comedyblissoption
Mar 15, 2006

Code coverage as a metric can be objectively useful as a way to catch if someone accidentally forgot to test a branch or area of code. Annotate any code that shouldn't or can't be covered in tests for whatever reason and make sure you have 100% code coverage everywhere else.

Doom Mathematic
Sep 2, 2008

SardonicTyrant posted:

I am working on a patent for a mechanical arm that goes around your throat. As you code more and more, the arm squeezes tighter. Only by adding good tests does the arm release its grip.

Haha! Using TDD I made the arm loosen its grip enough to escape entirely!

Xik
Mar 10, 2011

Dinosaur Gum

Doom Mathematic posted:

Haha! Using TDD I made the arm loosen its grip enough to escape entirely!

User Story: Feature Enhancement: Allow maximum grip to be configurable on installation.

A manager at one of our customers has advised that a couple of their developers found a way to escape the arm by writing tests before the implementation in new solutions.
This story is to allow a customer to set the maximum grip size when installing the arm to a chair/desk.

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

Don't you mean minimum grip?

poemdexter
Feb 18, 2005

Hooray Indie Games!

College Slice

Doom Mathematic posted:

Haha! Using TDD I made the arm loosen its grip enough to escape entirely!

Allow test failures to tighten grip as well. :getin:

Xik
Mar 10, 2011

Dinosaur Gum

Keetron posted:

Don't you mean minimum grip?

Yeah I hosed up, maximum would be how tight the grip is rather then how lose it is which is what I was going for. I'll book in a quick 45 minute meeting with the team to discuss.

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

Xik posted:

Yeah I hosed up, maximum would be how tight the grip is rather then how lose it is which is what I was going for. I'll book in a quick 45 minute meeting with the team to discuss.

*forwards the invitation to six people who have a stake in the minimum grip*
Are you sure 45 minutes is enough?

After everyone accepted and a shitfest is already in emails about the best arm length:
"Sorry man, I thought you meant the *other* Thursday, the one in the meeting invite I am having my ears waxed so I cannot make it."

Lessons learned: never invite me for meetings.

wilderthanmild
Jun 21, 2010

Posting shit




Grimey Drawer
We need to make sure we include the teams from New York and Arizona because they are looking at making their own changes to grip. Make sure you get a video conference going. Probably push it to at least 2 hours long to be safe.

Clanpot Shake
Aug 10, 2006
shake shake!

Legal just got back to us and apparently our right-hand-only design is a violation of government accessibility regulations and they're saying we need to spin up a separate project to build a left-handed gripper. For budgetary reasons this effort will be done by our offshore team.

wilderthanmild
Jun 21, 2010

Posting shit




Grimey Drawer
We'll need to add them to that call. Find a time that works for New York, Arizona, Pakistan, and Moscow.

darthbob88
Oct 13, 2011

YOSPOS
Drop the gripping arm, and make it a leash/belt/garrote. Eliminates most accessibility concerns, and also enables possible expansion to attach central line IV inputs at the jugular.

E: Which means we should probably pull in marketing to see if that has any appeal, or if there's any better form-factor.

Macichne Leainig
Jul 26, 2012

by VG

Clanpot Shake posted:

Legal just got back to us and apparently our right-hand-only design is a violation of government accessibility regulations and they're saying we need to spin up a separate project to build a left-handed gripper. For budgetary reasons this effort will be done by our offshore team.

ChickenWing
Jul 22, 2010

:v:

darthbob88 posted:

Drop the gripping arm, and make it a leash/belt/garrote. Eliminates most accessibility concerns, and also enables possible expansion to attach central line IV inputs at the jugular.

Make sure the new version is backwards compatible, we have some legacy clients who are using the arms as nutcrackers and we don't want to break their applications when they upgrade

wilderthanmild
Jun 21, 2010

Posting shit




Grimey Drawer
To allow backward compatibility we should use the existing arm to tighten a belt.

SardonicTyrant
Feb 26, 2016

BTICH IM A NEWT
熱くなれ夢みた明日を
必ずいつかつかまえる
走り出せ振り向くことなく
&



ChickenWing posted:

Make sure the new version is backwards compatible, we have some legacy clients who are using the arms as nutcrackers and we don't want to break their applications when they upgrade
Maybe use a sort of clamp instead, and then we can sell attachments for things like nutcrackers

SardonicTyrant
Feb 26, 2016

BTICH IM A NEWT
熱くなれ夢みた明日を
必ずいつかつかまえる
走り出せ振り向くことなく
&



Add machine learning so it can learn coding styles and adjust grip strength accordingly.

wilderthanmild
Jun 21, 2010

Posting shit




Grimey Drawer
*in a very 2017 voice* have we explored putting this on the blockchain?

Pedestrian Xing
Jul 19, 2007

Suffocation as a Service

Adbot
ADBOT LOVES YOU

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
Can this be implemented in Node.js though? This way our web developers can help out when it's crunch time!

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply