My middle-class mother beat me, my siblings and even my father to within an inch of our lives... she once walloped me with a walking stick, but despite everything I still love her
Kanye West and naked Bianca Censori 'kicked out' of Grammy Awards 2025 after turning up uninvited
Jennifer Lopez looks delighted at Grammys 2025... 2 years after that viral rift with Ben Affleck
Jaden Smith ROASTED for wearing a castle on his head at Grammy Awards 2025: 'Haunted Minecraft building'
Can you guess how old this country icon is? Singer looks nearly unrecognizable as she arrives at Grammys 2025
Bianca Censori sparks outrage as she goes NAKED on Grammys 2025 red carpet with covered-up Kanye West
Sabrina Carpenter, Shakira and Charli XCX lead Grammy Awards 2025 with raunchy performances of their hits
Singer Joy Villa defends Trump's controversial immigration policies on the red carpet at Grammy Awards 2025
Braless Chrissy Teigen dares to bare in Christian Siriano gown at the 67th Grammy Awards
Taylor Swift and Cynthia Erivo recreate viral 'holding space' moment from Wicked at Grammys 2025
Privacy Commissioner warns the ‘John Smiths’ of the world can acquire ‘digital doppelgangers’
Australia’s privacy commissioner has found that government agencies down under didn’t make enough of an effort to protect data describing “digital doppelgangers” – people who share a name and date of birth and whose government records sometimes contain data describing other people.…
CodeSOD: No Limits on Repetition
Just because you get fired doesn't mean that your pull requests are automatically closed. Dallin was in the middle of reviewing a PR by Steve when the email came out announcing that Steve no longer worked at the company.
Let's take a look at that PR, and maybe we can see why.
$originalUndrawn = DecimalHelper::toDecimal($party->limit)->sub(DecimalHelper::toDecimal($party->drawn));This is the original code, which represents operations on investments. An investment is represented by a note, and belongs to one or more partys. The amount that can be drawn is set by a limit, which can belong to either the party or the note.
What our developer was tasked with doing was allow a note to have no limit. This means changing all the places where the note's limit is checked. So this is what they submitted:
if ($note->limit == null) { $originalUndrawn = DecimalHelper::toDecimal($party->limit)->sub(DecimalHelper::toDecimal($party->drawn)); } else { $originalUndrawn = DecimalHelper::toDecimal($party->limit)->sub(DecimalHelper::toDecimal($party->drawn)); }You'll note here that the note limit isn't part of calculating the party limits, so both branches do the same thing. And then there's the deeper question of "is a null really the best way to represent this?" especially given that elsewhere in the code they have an "unlimited" flag that disables limit checking.
Now, Steve wasn't let go only for their code- they were just a miserable co-worker who liked to pick fights in pull request comments. So the real highlight of Steve's dismissal was that Dallin got to have a meaningful discussion about the best way to make this change with the rest of the team, and Steve didn't have a chance to disrupt it.
Will Cryptomining Facilities Change Into AI Data Centers?
Read more of this story at Slashdot.