Computer
France To Trial Ban on Mobile Phones At School For Children Under 15
Read more of this story at Slashdot.
Experts Puzzled as Finland Pine Trees Die Off
Read more of this story at Slashdot.
The US Military's Latest Psyop? Advertising on Tinder
Read more of this story at Slashdot.
Gannett is Shuttering Site Accused of Publishing AI Product Reviews
Read more of this story at Slashdot.
Chinese Hackers Breach US Internet Firms via Startup, Lumen Says
Read more of this story at Slashdot.
Intel Board Member Quit After Differences Over Chipmaker's Revival Plan
Read more of this story at Slashdot.
'A Crisis Entirely of Humanity's Making': UN Chief Issues Climate SOS on Trip To Pacific
Read more of this story at Slashdot.
Klarna Aims To Halve Workforce With AI-Driven Gains
Read more of this story at Slashdot.
Ex-Googlers Discover That Startups Are Hard
Read more of this story at Slashdot.
Hobbyists Discover How To Insert Custom Fonts Into AI-Generated Images
Read more of this story at Slashdot.
Stem Cell Therapy Frees Woman From Diabetes
Read more of this story at Slashdot.
CodeSOD: Private Passwords
Lisa was working on a project she quite liked. The tech was cool, the problems being solved were interesting, and the team had a good working process. Company-wide, however, budgets were tight, and other projects were in much worse shape, so the project Lisa was on got put on pause, and her team was moved onto a different project.
Someone wanted to make sure that functions which had large side effects were only called in the right places. Now, most of us might use some mixture of public/private, clear documentation, and maybe some key flags and error checking to ensure this was the case.
This team had a… different approach.
// This is called so that Foo will unload all widgets before exiting. // It is currently only called from Form1.Closing(). A password is *required*. If not correct, this function immediately returns. public void UnloadAll(string pwd) { if (pwd == "FOO-> UNLOAD ALL") { ProcessRequest(RequestType.Unload, Environments.All); } }The caller must supply a password to this method, otherwise it does nothing. I want to stress, this isn't a password we expect the user to type in (having that hard-coded in the application code is a different WTF), but instead is a token that the calling code must supply if they want the function to execute.
This entire project exists in a single .NET Assembly, and the keyword private is never used once.
[Advertisement] Otter - Provision your servers automatically without ever needing to log-in to a command prompt. Get started today!Far-Right 'Terrorgram' Chatrooms Are Fueling a Wave of Power Grid Attacks
Read more of this story at Slashdot.
Zuckerberg Says He Regrets Not Being More Outspoken About 'Government Pressure'
Read more of this story at Slashdot.
Samsung TVs Will Get 7 Years of Free Tizen OS Upgrades
Read more of this story at Slashdot.
Telegram CEO Pavel Durov's Arrest Upends Kremlin Military Communications
Read more of this story at Slashdot.
Wolfram Thinks We Need Philosophers Working on Big Questions Around AI
Read more of this story at Slashdot.
Microsoft Backtracks on Deprecating the 39-Year-Old Windows Control Panel
Read more of this story at Slashdot.
FBI Is Sloppy On Secure Data Storage and Destruction, Warns Watchdog
Read more of this story at Slashdot.
Canada To Impose 100% Tariff On Chinese-Made EVs
Read more of this story at Slashdot.