Feed aggregator
Former Windows Chief Explains Why macOS on iPad is Futile Quest
Read more of this story at Slashdot.
Flood of Fake Science Forces Multiple Journal Closures
Read more of this story at Slashdot.
Boeing May Face Criminal Prosecution Over 737 Max Crashes, US Says
Read more of this story at Slashdot.
Has Section 230 'Outlived Its Usefulness'?
Read more of this story at Slashdot.
Google Will Use Gemini To Detect Scams During Calls
Read more of this story at Slashdot.
Revolutionary Genetics Research Shows RNA May Rule Our Genome
Read more of this story at Slashdot.
CodeSOD: A Poorly Pruned Branch
Juliano had this very non-WTF bit of PHP code:
if (!$path) { //do stuff } else { //do other stuff }After another team member made a commit, however, the code turned into this:
if (1 == 2) { //do stuff } else { //do other stuff }Now, generally, when I see 1 == 2 type expressions, I just assume that this is a templated, generated bit of code. I usually (but not always) avoid using those as WTFs. But here, we have an actual case where the developer manually changed the code because they wanted to disable a branch. There is no comment, the commit message isn't helpful for understanding the change. You just have this awkwardly mysterious bit that now lives in the code, with no clear history and no clear purpose.
In an ideal world, you'd just delete the dead code and let version control history worry about previous versions. In a less than ideal world, you'd comment why you disabled the branch, in-line in the code (and also in the commit, and arguably a few other places). Instead of putting in a nonsense condition, perhaps you do a if (!path && false) { //disabling this branch because X instead.
But no, we did none of that. Now we just have a mystery, lingering in the code, waiting for future developers to stumble across it and ask, "WTF?"
[Advertisement] Otter - Provision your servers automatically without ever needing to log-in to a command prompt. Get started today!2023 Temperatures Were Warmest We've Seen For At Least 2,000 Years
Read more of this story at Slashdot.
Comcast To Launch Peacock, Netflix and Apple TV+ Bundle
Read more of this story at Slashdot.
Project Astra Is Google's 'Multimodal' Answer to the New ChatGPT
Read more of this story at Slashdot.
Google Targets Filmmakers With Veo, Its New Generative AI Video Model
Read more of this story at Slashdot.
1 In 4 US Teens Say They Play Games On a VR Headset
Read more of this story at Slashdot.
OpenAI's Chief Scientist and Co-Founder Is Leaving the Company
Read more of this story at Slashdot.
VMware Giving Away Workstation Pro, Fusion Pro Free For Personal Use
Read more of this story at Slashdot.
Feds Probe Waymo Driverless Cars Hitting Parked Cars, Drifting Into Traffic
Read more of this story at Slashdot.
Dublin To New York City Portal Temporarily Shut Down Due To Inappropriate Behavior
Read more of this story at Slashdot.
AI in Gmail Will Sift Through Emails, Provide Search Summaries, Send Emails
Read more of this story at Slashdot.
Unity's Marc Whitten Resigns Amid Runtime Fee Controversy
Read more of this story at Slashdot.
Google's Invisible AI Watermark Will Help Identify Generative Text and Video
Read more of this story at Slashdot.
The Walls Are Closing In On John Deere's Tractor Repair Monopoly
Read more of this story at Slashdot.