Feed aggregator
Fossil Fuel Burning Poses Threat To Health of 1.6 Billion People, Data Shows
Read more of this story at Slashdot.
Cloudflare Launches Content Signals Policy To Fight AI Crawlers and Scrapers
Read more of this story at Slashdot.
Google Experiences Deja Vu As Second Monopoly Trial Begins In US
Read more of this story at Slashdot.
Microsoft Offers No-Cost Windows 10 Lifeline
Read more of this story at Slashdot.
Pocket Casts is Showing Ads To People Who Paid For an Ad-free App
Read more of this story at Slashdot.
Horror Film's Wedding Scene Digitally Altered for Chinese Audiences
Read more of this story at Slashdot.
Qualcomm CEO Says He's Seen Google's Android-ChromeOS Merger, Calls It 'Incredible'
Read more of this story at Slashdot.
Some Private Equity Firms Doomed To Fail as High-Flying Industry Loses Its Way
Read more of this story at Slashdot.
3 Billion Users Now Use Instagram Monthly
Read more of this story at Slashdot.
Movie Studio Lionsgate is Struggling To Make AI-Generated Films With Runway
Read more of this story at Slashdot.
Microsoft Will Let Copilot Take Control of Your Browser, Navigate Tabs and Complete Tasks As You Watch
Read more of this story at Slashdot.
OpenAI, Oracle, SoftBank Plan Five New AI Data Centers For $500 Billion Stargate Project
Read more of this story at Slashdot.
Jaguar Land Rover Hack 'Has Cost 30,000 Cars and Threatens Supply Chain'
Read more of this story at Slashdot.
NASA Plans Crewed Moon Mission For February
Read more of this story at Slashdot.
CodeSOD: Across the 4th Dimension
We're going to start with the code, and then talk about it. You've seen it before, you know the chorus: bad date handling:
C_DATE($1) C_STRING(7;$0) C_STRING(3;$currentMonth) C_STRING(2;$currentDay;$currentYear) C_INTEGER($month) $currentDay:=String(Day of($1)) $currentDay:=Change string("00";$currentDay;3-Length($currentDay)) $month:=Month of($1) Case of : ($month=1) $currentMonth:="JAN" : ($month=2) $currentMonth:="FEB" : ($month=3) $currentMonth:="MAR" : ($month=4) $currentMonth:="APR" : ($month=5) $currentMonth:="MAY" : ($month=6) $currentMonth:="JUN" : ($month=7) $currentMonth:="JUL" : ($month=8) $currentMonth:="AUG" : ($month=9) $currentMonth:="SEP" : ($month=10) $currentMonth:="OCT" : ($month=11) $currentMonth:="NOV" : ($month=12) $currentMonth:="DEC" End case $currentYear:=Substring(String(Year of($1));3;2) $0:=$currentDay+$currentMonth+$currentYearAt this point, most of you are asking "what the hell is that?" Well, that's Brewster's contribution to the site, and be ready to be shocked: the code you're looking at isn't the WTF in this story.
Let's rewind to 1984. Every public space was covered with a thin layer of tobacco tar. The Ground Round restaurant chain would sell children's meals based on the weight of the child and have magicians going from table to table during the meal. And nobody quite figured out exactly how relational databases were going to factor into the future, especially because in 1984, the future was on the desktop, not the big iron "server side".
Thus was born "Silver Surfer", which changed its name to "4th Dimension", or 4D. 4D was an RDBMS, an IDE, and a custom programming language. That language is what you see above. Originally, they developed on Apple hardware, and were almost published directly by Apple, but "other vendors" (like FileMaker) were concerned that Apple having a "brand" database would hurt their businesses, and pressured Apple- who at the time was very dependent on its software vendors to keep its ecosystem viable. In 1993, 4D added a server/client deployment. In 1995, it went cross platform and started working on Windows. By 1997 it supported building web applications.
All in all, 4D seems to always have been a step or two behind. It released a few years after FileMaker, which served a similar niche. It moved to Windows a few years after Access was released. It added web support a few years after tools like Cold Fusion (yes, I know) and PHP (I absolutely know) started to make building data-driven web apps more accessible. It started supporting Service Oriented Architectures in 2004, which is probably as close to "on time" as it ever got for shipping a feature based on market demands.
4D still sees infrequent releases. It supports SQL (as of 2008), and PHP (as of 2010). The company behind it still exists. It still ships, and people- like Brewster- still ship applications using it. Which brings us all the way back around to the terrible date handling code.
4D does have a "date display" function, which formats dates. But it only supports a handful of output formats, at least in the version Brewster is using. Which means if you want DD-MMM-YYYY (24-SEP-2025) you have to build it yourself.
Which is what we see above. The rare case where bad date handling isn't inherently the WTF; the absence of good date handling in the available tooling is.
[Advertisement] Utilize BuildMaster to release your software with confidence, at the pace your business demands. Download today!Why AI Chatbots Can't Process Persian Social Etiquette
Read more of this story at Slashdot.
Vietnam Shuts Down Millions of Bank Accounts Over Biometric Rules
Read more of this story at Slashdot.
Disney+, Hulu Are Hiking Prices Again Next Month
Read more of this story at Slashdot.
Microsoft Is Reportedly Building An AI Marketplace To Pay Publishers For Content
Read more of this story at Slashdot.
Why Volvo Is Replacing Every EX90's Central Computer
Read more of this story at Slashdot.