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

Vulture Culture posted:

Escape rooms are murder mystery dinner theatre for millennials

Murder mystery stuff requires people to act which most people are terrible at. Escape rooms you can act like yourself.

I wouldn't want to do either with my coworkers.

Adbot
ADBOT LOVES YOU

Pollyanna
Mar 5, 2005

Milk's on them.


If my PR gets dinged for not having properties and params listed in alphabetical order one more time I'm gonna scream. It's not even hard to do, just bizarrely annoying.

Gounads
Mar 13, 2013

Where am I?
How did I get here?

Pollyanna posted:

If my PR gets dinged for not having properties and params listed in alphabetical order one more time I'm gonna scream. It's not even hard to do, just bizarrely annoying.

Params in abc order? Like function params? ARGGHHHH NOOOOO

Pollyanna
Mar 5, 2005

Milk's on them.


Gounads posted:

Params in abc order? Like function params? ARGGHHHH NOOOOO

Yep.

Clanpot Shake
Aug 10, 2006
shake shake!

That's dumb as hell. You should order your function params alphabetically in the signature in protest.

Volmarias
Dec 31, 2002
Probation
Can't post for 5 hours!

Pollyanna posted:

having properties and params listed in alphabetical order

Is grounds for murder.

Bludgen your reviewer with their insufferable Emacs stuff.

Hughlander
May 11, 2005

Pollyanna posted:

If my PR gets dinged for not having properties and params listed in alphabetical order one more time I'm gonna scream. It's not even hard to do, just bizarrely annoying.

Get out a thesaurus and rename the Params to be alphabetical in their current format.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Pollyanna posted:

If my PR gets dinged for not having properties and params listed in alphabetical order one more time I'm gonna scream. It's not even hard to do, just bizarrely annoying.

:catstare:

Ghost of Reagan Past
Oct 7, 2003

rock and roll fun

Pollyanna posted:

If my PR gets dinged for not having properties and params listed in alphabetical order one more time I'm gonna scream. It's not even hard to do, just bizarrely annoying.

That's a coding horror right there

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.
I'm not a stickler for alphabetization on principle, but if you're jamming something in a random spot of a list that was clearly alphabetized before you got to it, gently caress yourself and fix it.

Hughlander
May 11, 2005

Vulture Culture posted:

I'm not a stickler for alphabetization on principle, but if you're jamming something in a random spot of a list that was clearly alphabetized before you got to it, gently caress yourself and fix it.

If you turn a three argument function into a four argument function by adding the argument in the second spot to maintain alphabetical order, then gently caress you very much. If a function has to get a new argument it should be at the end. But ideally you'd never do that at all.

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

Enlighten me, why would it matter or why not? I mean, why is the order important?

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

Keetron posted:

Enlighten me, why would it matter or why not? I mean, why is the order important?

If your language supports optional parameters, like JS, if you put your new parameter on the end, it will not break existing code that is calling the function with the first 3 parameters. If you put it in the middle, obviously, ALL previous calls will need to be updated. If you are using a language without formal types, like JS, you won't get compile errors to tell you where things are now broken.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



It also makes it much more likely that your commit will have to include changes that you otherwise wouldn't have to make which is just chaff thrown at future maintainers trying to figure out what you did any why.

Gounads
Mar 13, 2013

Where am I?
How did I get here?

Keetron posted:

Enlighten me, why would it matter or why not? I mean, why is the order important?

The order of arguments is an important stylistic choice that can lead to a cleaner, more consistent, API.

hug(person)
kiss(person, openMouth)
gently caress(person, position, condom)

Here are 3 functions that all act on a person, so it makes sense that the person is in the same position.

hug(bob)
kiss(bob, true)
gently caress(bob, reverse_cowgirl, true)

in abc order that gets mangled:

hug(bob)
kiss(true, bob)
gently caress(true, bob, reverse_cowgirl)


I'll assume we're not talking a language with function overloading, since that would mind-gently caress consumers of the API even more.

gently caress(person)
gently caress(condom, person)
gently caress(person, position)
gently caress(condom, person, position)

e: This is why every function should just take a single options hash!

raminasi
Jan 25, 2005

a last drink with no ice
And if you rename a parameter you might have to change the signature, and IIRC Pollyanna works in a language without static typing, so :allears:

Clanpot Shake
Aug 10, 2006
shake shake!

A lot of our PR guidelines stem from bad things that have happened (caution being the grandson of disaster and all that), which has me wondering what happened at their place of work that had the team going, "if only we had required function parameters be in alphabetical order! Then this catastrophe could have been averted!"

Surely there's some reason for it that isn't some powerful pedant's pet peeve. Surely...

lifg
Dec 4, 2000
<this tag left blank>
Muldoon

Clanpot Shake posted:

A lot of our PR guidelines stem from bad things that have happened (caution being the grandson of disaster and all that), which has me wondering what happened at their place of work that had the team going, "if only we had required function parameters be in alphabetical order! Then this catastrophe could have been averted!"

Surely there's some reason for it that isn't some powerful pedant's pet peeve. Surely...

"This function takes 14 parameters and I can't remember the order."

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

Yes, of course. Parameters are not the same as variables. Hence my confusion.

Doc Hawkins
Jun 15, 2010

Dashing? But I'm not even moving!


Even granting a valid catastrophe which alphabetic parameters would have avoided, imagine the cross-repo commits sorting them after the policy was established. They would have excellent odds to break every single topic branch, either from merge conflicts or broken interfaces. I'm in awe.


Anyway, the correct and adult response is just to prefix an "a" to the first parameter's name, a "b" to the second, and so on.

Doc Hawkins
Jun 15, 2010

Dashing? But I'm not even moving!


lifg posted:

"This function takes 14 parameters and I can't remember the order."

Add a helpful mnemonic to the method's docstring.

Pollyanna
Mar 5, 2005

Milk's on them.


As far as I know there's no explicitly reason for it, just stylistic "requirements" (of which we have none written down and which would be better served with linters or something instead).

Still have that 6mo checkin thing later. Even though I intend to leave this job, I'm still terrified of negative feedback.

Bongo Bill
Jan 17, 2012

Alphabetical properties is fine as there often isn't a finer logical grouping to use, and if there is, there might be a good case for breaking it up. Alphabetical parameters is the worst thing I've heard all day.

geeves
Sep 16, 2004

lifg posted:

"This function takes 14 parameters and I can't remember the order."

I've learned to love the builder pattern. A bit of work to setup but it's a huge time saver.

Pollyanna posted:

If my PR gets dinged for not having properties and params listed in alphabetical order one more time I'm gonna scream. It's not even hard to do, just bizarrely annoying.


We got sick of this too so we just built a database that exports properties as part of a build. We lean towards trunk based so there's only one version needed.

Vulture Culture
Jul 14, 2003

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

Hughlander posted:

If you turn a three argument function into a four argument function by adding the argument in the second spot to maintain alphabetical order, then gently caress you very much. If a function has to get a new argument it should be at the end. But ideally you'd never do that at all.
Yeah, I meant for properties or for lists of things, not for positional parameters. gently caress that.

Carbon dioxide
Oct 9, 2012

geeves posted:

I've learned to love the builder pattern. A bit of work to setup but it's a huge time saver.

Or, in case of Java, just put a dependency to Lombok in your maven/gradle and then add the @Builder annotation to your class declaration and you're done.

I also really like @wither, @EqualsAndHashCode and of course @Value and @Data from Lombok. Never need to spend half the lines of your class on getters and setters again.

TheBlackVegetable
Oct 29, 2006

Pollyanna posted:

As far as I know there's no explicitly reason for it, just stylistic "requirements" (of which we have none written down and which would be better served with linters or something instead).

Still have that 6mo checkin thing later. Even though I intend to leave this job, I'm still terrified of negative feedback.

It's just another kind of bikeshedding, and I would turn any requirement about "alphabetically ordered parameters" into an hour long argument because it means the people demanding it aren't actually thinking about the real purpose of the code, and gently caress that very much.

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

TheBlackVegetable posted:

It's just another kind of bikeshedding, and I would turn any requirement about "alphabetically ordered parameters" into an hour long argument because it means the people demanding it aren't actually thinking about the real purpose of the code, and gently caress that very much.

Only an hour?

TheBlackVegetable
Oct 29, 2006

Skandranon posted:

Only an hour?

As with every programmer estimate, multiply by at least 4

MisterZimbu
Mar 13, 2006

Pollyanna posted:

As far as I know there's no explicitly reason for it, just stylistic "requirements" (of which we have none written down and which would be better served with linters or something instead).

Still have that 6mo checkin thing later. Even though I intend to leave this job, I'm still terrified of negative feedback.

Make sure to insist your negative feedback is presented to you in alphabetical order.

geeves
Sep 16, 2004

Carbon dioxide posted:

Or, in case of Java, just put a dependency to Lombok in your maven/gradle and then add the @Builder annotation to your class declaration and you're done.

I also really like @wither, @EqualsAndHashCode and of course @Value and @Data from Lombok. Never need to spend half the lines of your class on getters and setters again.

:monocle:

That's what Lombok does? Holy poo poo. I've heard of it, but haven't really delved into it too much. Definitely going to see about getting this in.

smackfu
Jun 7, 2004

Well that's a red flag.

quote:

Hi team, We need to perform end to end testing of the new release. This testing needs to be completed and code needs to be bug free by Monday.

Gildiss
Aug 24, 2010

Grimey Drawer
Hi team, I really hosed up the new release. You all need to work overtime to cover up my massive failings by Monday.

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

geeves posted:

:monocle:

That's what Lombok does? Holy poo poo. I've heard of it, but haven't really delved into it too much. Definitely going to see about getting this in.
It's quite delicious. Another good alternative is the Immutables library. It works by generating code instead of weaving bytecode like Lombok.

Volmarias
Dec 31, 2002
Probation
Can't post for 5 hours!
There's AutoValue if you just need a struct-like class, or one with minimal logic.

Edit:

smackfu posted:

Well that's a red flag.

Eject

Volmarias fucked around with this message at 14:20 on Jul 7, 2017

Virigoth
Apr 28, 2009

Corona rules everything around me
C.R.E.A.M. get the virus
In the ICU y'all......



Gildiss posted:

Hi team, I really hosed up the new release. You all need to work overtime to cover up my massive failings by Monday.

We've had some people ask about providing meals and snacks for this weekend but unfortunately that isn't in the budget and we appreciate you working your hardest to help with this issue! You are a valued employee!

AskYourself
May 23, 2005
Donut is for Homer as Asking yourself is to ...
Please hold, your call is important to us

Doc Hawkins
Jun 15, 2010

Dashing? But I'm not even moving!


AskYourself posted:

Please hold, your call is important to us

An excellent canned response for weekend work requests.

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

Aside from the fact that ni code is ever bug free, end to end testing is a really bad thing to rush or to use for bug hunting. All bugs should be found during ST, Interface testing and possibly bi-lateral testing.

Adbot
ADBOT LOVES YOU

Volmarias
Dec 31, 2002
Probation
Can't post for 5 hours!
What makes you think that gildiss has a management chain that has even heard half of those words, and doesn't utter phrases like "why can't they just make it right in the first place? What are we paying them for?"

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