Feed aggregator
Vietnam Bans Unskippable Ads
Read more of this story at Slashdot.
Intel Is Making Its Own Handheld Gaming PC Chips At CES 2026
Read more of this story at Slashdot.
Study Casts Doubt on Potential For Life on Jupiter's Moon Europa
Read more of this story at Slashdot.
Nvidia's New G-Sync Pulsar Monitors Target Motion Blur at the Human Retina Level
Read more of this story at Slashdot.
Lego Unveils Smart Bricks, Its 'Most Significant Evolution' in 50 years
Read more of this story at Slashdot.
Elite Colleges Are Back at the Top of the List For Company Recruiters
Read more of this story at Slashdot.
HarperCollins Will Use AI To Translate Harlequin Romance Novels
Read more of this story at Slashdot.
Many Schools Don't Think Students Can Read Full Novels Anymore
Read more of this story at Slashdot.
UK Urged To Unplug From US Tech Giants as Digital Sovereignty Fears Grow
Read more of this story at Slashdot.
HP Pushes PC-in-a-Keyboard for Businesses With Hot Desks
Read more of this story at Slashdot.
'NY Orders Apps To Lie About Social Media Addiction, Will Lose In Court'
Read more of this story at Slashdot.
Razer Thinks You'd Rather Have AI Headphones Instead of Glasses
Read more of this story at Slashdot.
Microsoft Office Is Now 'Microsoft 365 Copilot App'
Read more of this story at Slashdot.
Stratechery Pushes Back on AI Capital Dystopia Predictions
Read more of this story at Slashdot.
VW Brings Back Physical Buttons
Read more of this story at Slashdot.
Dell Admits It Made a Huge Mistake When It Abandoned XPS
Read more of this story at Slashdot.
Hyundai and Boston Dynamics Unveil Humanoid Robot Atlas At CES
Read more of this story at Slashdot.
CodeSOD: No Yes
It's common to see code in the form of if (false == true). We get a fair bit of it in our inbox, and we generally don't post it often, because, well, it's usually just a sign that someone generated the code. There's a WTF in that, somewhere, but there's not much to say about the code, beyond, "Don't generate code, pass data from backend to frontend instead."
But Nicholas sends us one that shows a little more of interest in it.
if ('N' == 'Y') { document.getElementById("USERID").disabled=true; document.getElementById("PASSWORD").disabled=true; }Again, this is almost certainly being generated by the backend and sent to the frontend. I mean, it might be someone manually disabling a block of code by writing an if that'll never be true, but probably not in this case.
And what this tells us is that the backend is getting inputs, probaly from some sort of option field, and treating them as booleans. Y and N are clearly meant to be "yes" and "no", aka "true" and "false", but we're taking the stringly typed approach on the backend.
For future developers, I reiterate: send data to the frontend, so your 'if' looks more like: if(backendData.userSelectedOption=="Y"), or at the very least if you're going to evaluate the boolean expression, evaluate it on the backend, so the generated code is just if(false).
[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!The Nation's Strictest Privacy Law Goes Into Effect
Read more of this story at Slashdot.
'Godfather of SaaS' Says He Replaced Most of His Sales Team With AI Agents
Read more of this story at Slashdot.
