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
Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
I’m worried that it might need to be said: don’t loving “well actually” your colleagues.

Adbot
ADBOT LOVES YOU

Falcon2001
Oct 10, 2004

Eat your hamburgers, Apollo.
Pillbug

Blinkz0rz posted:

I’m worried that it might need to be said: don’t loving “well actually” your colleagues.

You can pry my pedantry from my cold dead hands. Why else would I show up to work but to endlessly irritate my colleagues?

prom candy
Dec 16, 2005

Only I may dance
In my experience unit tests with lots of mocks (or fakes or stubs or whatever you want to call them idc) often don't break when the underlying functionality is broken, and do break when code changes but the underlying functionality still works. They're testing whether the code executes certain things in a certain order but they don't necessarily test that input -> expected result.

I think a big part of this is (very often OO) codebases where the actual business function of a piece of code is spread out across lots of small self-contained classes with short methods. So now you've got all these "easily testable" classes just mocking each other out and the end result is like 25 useless unit tests that could've been 5 actually valuable integration tests, or even 5 actually valuable unit tests if you ignored Racist Uncle Bob and just wrote a 50 line method in one class to handle the procedure.

Xguard86
Nov 22, 2004

"You don't understand his pain. Everywhere he goes he sees women working, wearing pants, speaking in gatherings, voting. Surely they will burn in the white hot flames of Hell"
Combine some testing theater for code coverage metrics and baby you got a stew going.

CPColin
Sep 9, 2003

Big ol' smile.
I mean, you could write unit tests that cover those small functions before you write integration tests that verify the whole thing, you know, integrates, but what do I know?

Aside from "I get to tell my boss that we went from 0% test coverage to 99%" and they'll have no idea whether any of those tests are useful or not.

prom candy
Dec 16, 2005

Only I may dance

CPColin posted:

I mean, you could write unit tests that cover those small functions before you write integration tests that verify the whole thing, you know, integrates, but what do I know?

Those unit tests can be super useful when you're actually writing the code but I think after that they can quickly become cruft. There's probably a pretty strong case to be made for just deleting them after they've served their purpose.

prom candy fucked around with this message at 20:34 on Jul 19, 2023

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.
Disagree, pure functions and data transformations are exactly where you're going to introduce bugs, not in the boilerplate for the client library you upgrade once every three years

StumblyWumbly
Sep 12, 2007

Batmanticore!
Testing simple functions is mainly good for checking situations that the dev didn't consider, like "what if the input is 0"

epswing
Nov 4, 2003

Soiled Meat

StumblyWumbly posted:

Testing simple functions is mainly good for checking situations that the dev didn't consider, like "what if the input is null"

Fixed.

Clanpot Shake
Aug 10, 2006
shake shake!

epswing posted:

StumblyWumbly posted:

̵T̴e̴s̷t̸i̴n̴g̷ ̷s̵i̷m̶p̶l̵e̴ functions ̷i̴s̶ ̷m̴a̸i̴n̵l̶y̷ ̴g̸o̸o̴d̴ ̴f̷o̶r̴ ̵c̴h̶e̸c̸k̵i̷n̶g̴ ̵s̴i̴t̶u̴a̶t̵i̶o̶n̵s̷ ̴t̸h̵a̴t̴ ̶t̴h̴e̴ ̸d̴e̶v̵ ̷d̴i̴d̷n̶'̵t̷ ̶c̵o̵n̵s̷i̷d̶e̵r̷,̵ ̸l̴i̷k̴e̸ ̴"̴w̴h̵a̴t̴ ̵i̵f̸ ̶t̸h̸e̸ input ̷i̵s̸ ̵0̷"̶

̸̭́F̸͔̅i̸͙̓x̸̞͌é̶̲d̸͙̽.̸͎̏

̸̷̶̶̭́F̸̸̸̷̴͔̅i̶̸̶̷̶͙̓x̵̸̶̷̸̞͌é̸̶̵̸̴̲d̷̸̸̶̴͙̽.̶̸̶̶̶͎̏

Volmarias
Dec 31, 2002

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

prom candy posted:

Those unit tests can be super useful when you're actually writing the code but I think after that they can quickly become cruft. There's probably a pretty strong case to be made for just deleting them after they've served their purpose.

The tests should verify behaviors, not just that calling A's foo() will emit a foo() call to A's delegate. If you're just going to delete them afterwards, they weren't worth writing in the first place.

raminasi
Jan 25, 2005

a last drink with no ice

Jabor posted:

I don't really understand this point. Like yeah, you can split hairs about whether something is a fake, double, or stub and it doesn't really matter - but a mock is something created by a mocking framework while the others are not, which seems like a pretty bright and well-distinguished line to me.

But that's not the only definition of "mock" that's out in the wild, which is the original point. For example, it's not what The Art of Unit Testing uses, which, whether you agree with it or not, can hardly be dismissed as some fringe publication.

Falcon2001
Oct 10, 2004

Eat your hamburgers, Apollo.
Pillbug
Sounds like these unit tests need some sort of automated way to make sure they're testing the right things.

Xarn
Jun 26, 2015
Is that a mutation testing reference?

ploots
Mar 19, 2010
:goonsay: no no no, that’s not mutation testing, mutation testing is when

CPColin
Sep 9, 2003

Big ol' smile.
Down with mutation testing! Magneto was right!

Doom Mathematic
Sep 2, 2008
The most popular mutation testing framework for JavaScript is called Stryker, named after the Marvel Comics mutant killing bigot.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

prom candy posted:


or even 5 actually valuable unit tests if you ignored Racist Uncle Bob and just wrote a 50 line method in one class to handle the procedure.

Huh. Our Racist Uncle Bob will put everything in a 5000-line function and not test it. These Bobs are not consistent.

lipid
Feb 21, 2001

Rocko Bonaparte posted:

Huh. Our Racist Uncle Bob will put everything in a 5000-line function and not test it. These Bobs are not consistent.

"No, no, I said 5000 one-line functions"

prom candy
Dec 16, 2005

Only I may dance

Rocko Bonaparte posted:

Huh. Our Racist Uncle Bob will put everything in a 5000-line function and not test it. These Bobs are not consistent.

One of them has a pretty big platform and uses it to convince developers to write bad code and be chuds https://blog.wesleyac.com/posts/robert-martin

smackfu
Jun 7, 2004

We are finally back to regular laptop refresh at work after all the pandemic shortages. But they are only offering M1 MBP as developer options because the “M2 isn’t in their system” yet. Is this just big businesses being stupid? Where are they even ordering M1 models from?

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
Apple still sells m1 airs, but most likely there's a reseller involved who overbought m1 pros and needs to unload their inventory.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Plorkyeran posted:

Apple still sells m1 airs, but most likely there's a reseller involved who overbought m1 pros and needs to unload their inventory.
You can't blame them. Apple kept pushing the date back by months and months and months on account of unpredictable production delays from TSMC, so when they actually landed, I think they took everyone by surprise.

Falcon2001
Oct 10, 2004

Eat your hamburgers, Apollo.
Pillbug
How many of y'all in big tech are stuck in 'Agile' workspaces without assigned desks/etc? We just got moved there on my team and I think it's honestly going to be a dealbreaker for me, but not sure how common this is in the industry.

Hughlander
May 11, 2005

Falcon2001 posted:

How many of y'all in big tech are stuck in 'Agile' workspaces without assigned desks/etc? We just got moved there on my team and I think it's honestly going to be a dealbreaker for me, but not sure how common this is in the industry.

We are remote with an office near where the office was before Covid. If you happen to live near it you can go to it if you want but no one will force you to. If you do so you can use the app Envoy to reserve a desk for the day. Even if you come in 5 days a week.

prom candy
Dec 16, 2005

Only I may dance

Falcon2001 posted:

How many of y'all in big tech are stuck in 'Agile' workspaces without assigned desks/etc? We just got moved there on my team and I think it's honestly going to be a dealbreaker for me, but not sure how common this is in the industry.

lmao that they're like "hmm we need to rebrand making people come into the office but even shittier, what if we called it 'Agile'"

Cold on a Cob
Feb 6, 2006

i've seen so much, i'm going blind
and i'm brain dead virtually

College Slice
Hoteling is bullshit and I made it clear I won't do it. Either I get to keep my assigned desk or I wfh full time (during while I would look for another job, because if I'm 100% remote I can get better pay and I'm only here because I prefer to get away from my home to work).

Falcon2001
Oct 10, 2004

Eat your hamburgers, Apollo.
Pillbug

prom candy posted:

lmao that they're like "hmm we need to rebrand making people come into the office but even shittier, what if we called it 'Agile'"

Yeah like...I'm pretty fuckin' mad about this. I know slippery slope is a fallacy, but this feels like just another step in the continuous squeezing of talent. What's next? "Welcome to your team conference room! Please have a seat at any of these big tables and plug your laptop in, code monkey!"

Like I'm old enough to remember a time when a private office wasn't considered strange, and juniors just had to deal with sharing with another person. The fact that Office Space is starting to look like a dream scenario for workspace setup is just loving bizarre to me.

Macichne Leainig
Jul 26, 2012

by VG
And just use someone else’s gross rear end keyboard and mouse?

Nah, I want to only touch my own gunk, thanks

The Fool
Oct 16, 2003


years ago I had a private office as a mid-tier sysadmin

at my current job anyone that isn't remote or a vp is out on the open floor plan

CPColin
Sep 9, 2003

Big ol' smile.

Macichne Leainig posted:

Nah, I want to only touch my own gunk, thanks

Touching my own gunk is one of the biggest* perks about wfh for me

Also I was ready to refuse to hotel because I'm tall and I didn't want to spend half an hour every morning adjusting everything. Thankfully they eventually told everyone we could stay home forever.

prom candy
Dec 16, 2005

Only I may dance
I have a private office, it's great

(it's in my house)

Macichne Leainig
Jul 26, 2012

by VG
I do love WFH for a lot of reasons but sometimes I do miss having that physical separation of work and home.

prom candy
Dec 16, 2005

Only I may dance

Macichne Leainig posted:

I do love WFH for a lot of reasons but sometimes I do miss having that physical separation of work and home.

I used to live literally 60 seconds away from my office and that was pretty ideal, but I'd still work from home a fair bit because it was an open office and I could concentrate better at home.

Riven
Apr 22, 2002
I rent a private office at a coworking place close to my condo. There is no room for a private working space at home. My work covers about half the cost through WFH benefits but that would only cover 5 day/wk floater here, so I cover the rest to have the office for my own sanity and convenience, like being able to keep my workout clothes here.

Falcon2001
Oct 10, 2004

Eat your hamburgers, Apollo.
Pillbug
I like having coworkers I see in person, TBH; so I actually don't really like full WFH. I end up getting kind of goblin-ey if I spend too much time just in one place cranking out work. I don't need my coworkers to be like CLOSE PERSONAL FRIENDS, but I legitimately enjoy talking to people in the office and having in person meetings and discussions. Hybrid is totally fine by me and is kind of my preferred setup basically.

Macichne Leainig
Jul 26, 2012

by VG
Yeah I get that. Some of my best friends over the years were coworkers. You have to really put in effort to be more social when you’re fully remote. Maybe that was fine for me 5 years ago but maybe I’m finally getting lonely

prom candy
Dec 16, 2005

Only I may dance
I think if you work remote it's even more important to have an active social calendar. I'm out of the house 2-3x/week playing sports, I live really close to my parents and sister, I jam with a band once a week, and I try to book lunches and stuff with friends fairly often.

I also am definitely pretty good friends with some former in-person coworkers. I am tight with a couple of my remote coworkers too but we don't live in the same region so it's not like we can hang out.

Volguus
Mar 3, 2009
Jesus you people, you're actively looking for human interaction? WFHs best perks were that human interaction was no longer mandated. If I could get food and internet on the top of the mountain in a cave ... that's where I'd be.

Adbot
ADBOT LOVES YOU

smackfu
Jun 7, 2004

What caused me to work from home in the first place ten years ago was that no one in my office was on my team and all my work friends quit or were laid off.

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