Computer
Valve Enters the Console Wars
Read more of this story at Slashdot.
Microsoft Is Offering Rewards Points for Using Edge Instead of Google Chrome
Read more of this story at Slashdot.
US Ends Penny-Making Run After More Than 230 Years
Read more of this story at Slashdot.
UC San Diego Reports 'Steep Decline' in Student Academic Preparation
Read more of this story at Slashdot.
Apple Study Finds Mandated Fee Reductions Never Reached European Consumers
Read more of this story at Slashdot.
Synopsys Plans 10% Job Cuts After Ansys Deal Closure
Read more of this story at Slashdot.
Amazon Steps Up Attempts To Block Illegal Sports Streaming Via Fire TV Sticks
Read more of this story at Slashdot.
Google Relaunches Cameyo To Entice Businesses From Windows To ChromeOS
Read more of this story at Slashdot.
Airbnb Rival Sonder Abruptly Shuts Down, Orders Guests To Leave
Read more of this story at Slashdot.
AI Bubble Is Ignoring Michael Burry's Fears
Read more of this story at Slashdot.
Researchers Surprised That With AI, Toxicity is Harder To Fake Than Intelligence
Read more of this story at Slashdot.
Ryanair Tries Forcing App Downloads By Eliminating Paper Boarding Passes
Read more of this story at Slashdot.
Meta Chief AI Scientist Yann LeCun Plans To Exit To Launch Startup
Read more of this story at Slashdot.
Sun Unleashes Strongest Solar Flare of 2025
Read more of this story at Slashdot.
CodeSOD: Historical Dates
Handling non-existent values always presents special challenges. We've (mostly) agreed that NULL is, in some fashion, the right way to do it, though it's still common to see some sort of sentinel value that exists outside of the expected range- like a function returning a negative value when an error occurred, and a zero (or positive) value when the operation completes.
Javier found this function, which has a… very French(?) way of handling invalid dates.
Private Function CheckOraDate(ByVal sDate As String) As String Dim OraOValDate As New DAL.PostGre.DataQuery() Dim tdate As Date If IsDate(sDate) Then Return IIf(OraOValDate.IsOracle, CustomOracleDate(Convert.ToDateTime(sDate).ToString("MM-dd-yyyy")), "'" & sDate & "'") Else '~~~ No Date Flag of Bastille Day Return CustomOracleDate(Convert.ToDateTime("07/14/1789").ToString("MM-dd-yyyy")) End If End FunctionGiven a date string, we check if it is a valid date string using IsDate. If it is, we check if our data access layer thinks the IsOracle flag is set, and if it is, we do some sort of conversion to a `CustomOracleDate", otherwise we just return the input wrapped in quotes.
All that is sketchy- any function that takes dates as a string input and then returns the date in a new format as a string always gets my hackles up. It implies loads of stringly typed operations.
But the WTF is how we handle a bad input date: we return Bastille Day.
In practice, this meant that their database system was reporting customers' birthdays as Bastille Day. And let me tell you, those customers don't look a day over 200, let alone 236.
For an extra bonus WTF, while the "happy path" checks if we should use the custom oracle formatting, the Bastille Day path does not, and just does whatever the Oracle step is every time.
.comment { border: none; } [Advertisement] Keep the plebs out of prod. Restrict NuGet feed privileges with ProGet. Learn more.China's EV Market Is Imploding
Read more of this story at Slashdot.
Google Is Introducing Its Own Version of Apple's Private AI Cloud Compute
Read more of this story at Slashdot.
YouTube TV Blackout Is Costing Disney an Estimated $4.3 Million Per Day In Lost Revenue
Read more of this story at Slashdot.
ClickFix May Be the Biggest Security Threat Your Family Has Never Heard Of
Read more of this story at Slashdot.
Visual Studio 2026 Released
Read more of this story at Slashdot.
