Shopping
Nov. 12th, 2025 02:32 pm( Read more... )
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 Function
Given 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.
Successfully compromising with a cat is honestly pretty impressive. They're not big on that.
- MEREOW (very next page)
- Concerns about Voltaire observing them
"Mist just said that you two can communicate with animals. You clearly asked the cat what forms were available."
I think angled panels can be fun at times, but they actually made me feel a little disoriented while inking parts of this page. I'd go so far as to describe it as a mild dizziness.
--