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
12 rats tied together
Sep 7, 2006

food ordering place i worked at people would just order delivery and expense it. we used stripe, which im sure has test ccns or whatever, but why bother when you can eat lunch every day on the company?

Adbot
ADBOT LOVES YOU

abraham linksys
Sep 6, 2010

:darksouls:
so i do want to point out here that stripe actively prevents you from using browser automation in their sandbox environment, and i have asked a support rep about this and they have zero plans to change this and it's not an incidental bug but an intentional thing

the way this surfaces is with an iframe breakout so it depends on the testing tool (tldr cypress is hosed, playwright/selenium you might be ok)

it's really hosed up and preventing us from doing true e2e testing of payment flows beyond regular card checkout (e.g. weird european payment types), and if we update to a newer version of the stripe sdk we probably won't be able to test regular card checkout flow that way either and we're now scrambling and considering options like trying to back out of the cypress cloud contract we just signed so we can go try to roll our own poo poo on playwright, it's stupid as gently caress!

i only point this out to say... even the """good""" card processors are hosed up

(if you are curious about this you can google cypress and stripe; there's like a million workarounds to the iframe bust that fall apart depending on which scenarios you try to test and like seven open issues on the cypress github project around this, and cypress has repeatedly tried and failed to add a thing that will inject a stripe sdk monkey patch to avoid this problem)

abraham linksys fucked around with this message at 01:53 on Apr 30, 2024

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



imo use whatever the one is where the dude gets really mad on github

raminasi
Jan 25, 2005

a last drink with no ice
idk if it's still true but it used to be the case that venmo didn't have any kind of a test network so their engineers' transaction feeds would be full of them sending money back and forth to their coworkers with messages like "test" "trying again" "hope this works"

Private Speech posted:

lmao the UK bit of the company that I work for merged with an acquired US company and one of the questions was "is there going to be any pay alignment between UK and the US since our devs are now split half and half and work together"

the answer was, verbatim, "that ain't never gonna happen"

I mean fair enough but it's pretty funny, at least to me

tbh i find blunt corporate honesty far preferable to songs and dances that redirect blame back to the workers

Antigravitas
Dec 8, 2019

Die Rettung fuer die Landwirte:
Someone just reminded me of this post

simble
May 11, 2004

life… finds a way

CPColin
Sep 9, 2003

Big ol' smile.
awful programming opinion: you know, I think we went too far in the direction of making sure every magic value is declared as a constant

why does this SQL that's used by exactly one query method need to be declared as a constant way at the top of the file??

VikingofRock
Aug 24, 2008




CPColin posted:

awful programming opinion: you know, I think we went too far in the direction of making sure every magic value is declared as a constant

why does this SQL that's used by exactly one query method need to be declared as a constant way at the top of the file??

My tech lead will declare every log message as a function at the top of the file, so instead of having e.g.


code:

LOG(INFO) << "connecting to " << db_address << ", attempt number " << attempt_number;

We have

code:

LOG(INFO) << DatabaseConnectionMessage(db_address, attempt_number);

As far as I can tell, there's no benefit to this; it just adds an extra step when you want to figure out what line the logs are coming from, and makes it easier for the surrounding code and the log message to get out of sync

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

this king is going to localize your log messages

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

Antigravitas posted:

Someone just reminded me of this post



lmao i totally forgot about this

the onion wizard
Apr 14, 2004

necrotic posted:

my two questions if you did go with non-test e2e billing tests (with refunding) are 1) which cc are you testing with and 2) how’s that going to look to fraud departments?

use the boss's card

raminasi
Jan 25, 2005

a last drink with no ice

Subjunctive posted:

this king is going to localize your log messages

first thing i thought of too

ynohtna
Feb 16, 2007

backwoods compatible
Illegal Hen

Subjunctive posted:

this king is going to localize your log messages into klingon

:hmmyes:

Antigravitas
Dec 8, 2019

Die Rettung fuer die Landwirte:

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
sometimes it's the dom's fault ok

(lol)

toiletbrush
May 17, 2010

CPColin posted:

awful programming opinion: you know, I think we went too far in the direction of making sure every magic value is declared as a constant

why does this SQL that's used by exactly one query method need to be declared as a constant way at the top of the file??
this pattern is especially great when the constants are public and also referenced from tests, so if someone changes ImportantConstantThatMustNeverChange then no tests break and people have to just somehow spot it in PRs

LanceHunter
Nov 12, 2016

Beautiful People Club


We've got extremely strict style checkers at the new job. Just had a build fail with an error because I had used
code:
if (x != y) { foo() } else { bar() }
instead of
code:
if (x == y) { bar() } else { foo() }

The Fool
Oct 16, 2003


it's the right choice imo

The Fool
Oct 16, 2003


to be clear, if I was looking at a PR I wouldn't care

but if i'm setting up a linter, that's the right choice

necrotic
Aug 2, 2005
I owe my brother big time for this!

The Fool posted:

to be clear, if I was looking at a PR I wouldn't care

but if i'm setting up a linter, that's the right choice

this is also the right choice. dont nitpick changes that’s for the linter to do

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

yep, you’re at a good place OP

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
the actual names of x and y in the program are notX and notMissingY

FlapYoJacks
Feb 12, 2009

LanceHunter posted:

We've got extremely strict style checkers at the new job. Just had a build fail with an error because I had used
code:
if (x != y) { foo() } else { bar() }
instead of
code:
if (x == y) { bar() } else { foo() }

This is cool and good and correct.

gnatalie
Jul 1, 2003

blasting women into space
agreed, i've given the exact advice to younger devs at my job

Tunicate
May 15, 2012

Meanwhile the mario64 optimizer guy has figured out you can squeeze out a few more fractional microseconds of performance by defining TRUE as a register and avoiding any comparisons to it, at the tiny cost of having a philosophical meltdown when TRUE equals FALSE on 1 in every 16 compiles.

Tunicate fucked around with this message at 03:16 on May 15, 2024

my homie dhall
Dec 9, 2010

honey, oh please, it's just a machine
can’t != sometimes read more clearly? I feel like this is the case depending on the variables involved as well as the length of the body of the block that follows.

for example, if you are drawing attention to the exceptional case, whether it uses == or !=, it should be first.

Brain Candy
May 18, 2006

my homie dhall posted:

can’t != sometimes read more clearly? I feel like this is the case depending on the variables involved as well as the length of the body of the block that follows.

for example, if you are drawing attention to the exceptional case, whether it uses == or !=, it should be first.

if you're checking for an exceptional case you return or throw, you don't use an else

Mind_Taker
May 7, 2007



my homie dhall posted:

can’t != sometimes read more clearly? I feel like this is the case depending on the variables involved as well as the length of the body of the block that follows.

for example, if you are drawing attention to the exceptional case, whether it uses == or !=, it should be first.

yeah I'll typically favor != if it makes for a cleaner body

e.g I prefer this:

code:
if (x != y)
{
   return z;
}

// do stuff
over this:

code:
if (x == y)
{
   // do stuff
}
else
{
    return z;
}
though I'm sure linters can be set up to prefer the first scenario

I also don't know how much this situation comes up in practice, but I typically try my best to avoid elses

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
if the linter has an autofix command which will swap the blocks and invert the conditional then i have no problem with that linter rule despite disliking the rule. if you have to do it manually then it's dumb.

Bloody
Mar 3, 2013

I would simply not set up the linter to care about this

Elder Postsman
Aug 30, 2000


i used hot bot to search for "teens"

our linter automatically newlines at 80 characters and it makes me so mad

necrotic
Aug 2, 2005
I owe my brother big time for this!

Elder Postsman posted:

our linter automatically newlines at 80 characters and it makes me so mad

80 is aggressive as hell. we have ours set to 120 which, imo, is far more reasonable in the modern age. the 80 number comes from the days of old with awful resolutions.

Elder Postsman
Aug 30, 2000


i used hot bot to search for "teens"

i remember when we got an 80 column card for our apple //e

Bloody
Mar 3, 2013

we don’t enforce a line length. chop your lines however you want. who cares

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
:qq: i can't find the soft wrap setting :qq:

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Mind_Taker posted:

yeah I'll typically favor != if it makes for a cleaner body

e.g I prefer this:

code:
if (x != y)
{
   return z;
}

// do stuff
over this:

code:
if (x == y)
{
   // do stuff
}
else
{
    return z;
}
though I'm sure linters can be set up to prefer the first scenario

I also don't know how much this situation comes up in practice, but I typically try my best to avoid elses

yeah this

that linter rule is unhinged and smells of neckbeard

Soricidus
Oct 21, 2010
freedom-hating statist shill

Carthag Tuek posted:

yeah this

that linter rule is unhinged and smells of neckbeard

yeah that linter sucks. more rules != better.

configuring an arbitrary requirement just because the linter supports it is not going to lead to better code, it exists only to automate some rear end in a top hat’s craving for petty micromanagement.

redleader
Aug 18, 2005

Engage according to operational parameters

Bloody posted:

I would simply not set up the linter to care about this

my homie dhall
Dec 9, 2010

honey, oh please, it's just a machine
*you've been invited to a 4 hour meeting with the most annoying people in your org to decide which of the included preset linting rules you will be following*

Adbot
ADBOT LOVES YOU

betalarmannen
Jan 13, 2007

Pillbug

necrotic posted:

80 is aggressive as hell. we have ours set to 120 which, imo, is far more reasonable in the modern age. the 80 number comes from the days of old with awful resolutions.

even worse, it comes from punch-cards

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