Computer
Experts Testify US Is Running Secret UAP Programs
Read more of this story at Slashdot.
CodeSOD: Secondary Waits
ArSo works at a small company. It's the kind of place that has one software developer, and ArSo isn't it. But ArSo is curious about programming, and has enough of a technical background that small tasks should be achievable. After some conversations with management, an arrangement was made: Kurt, their developer, would identify a few tasks that were suitable for a beginner, and would then take some time to mentor ArSo through completing them.
It sounded great, especially because Kurt was going to provide sample code which would give ArSo a head start on getting things done. What better way to learn than by watching a professional at work?
DateTime datTmp; File.Copy(strFileOld, strFileNew); // 2 seconds delay datTmp = DateTime.Now; while (datTmp.Second == DateTime.Now.Second); datTmp = DateTime.Now; while (datTmp.Second == DateTime.Now.Second); File.Delete(strFileOld);This code copies a file from an old path to a new path, and then deletes the old path after a two second delay. Why is there a delay? I don't know. Why is the delay written like this? I can't possibly explain that.
Check the time at the start of the loop. When the second part of that time stops matching the second part of the current time, we assume one second has passed. This is, of course, inaccurate- if I check the time at 0:00:00.9999 a lot less than a second will pass. This delay is at most one second.
In any case, ArSo has some serious questions about Kurt's mentorship, and writes:
Now I don't know if I should ask for more coding tasks.
Honestly, I think you should ask for more. Like, I think you should just take Kurt's job. You may be a beginner, but honestly, you're likely going to do a better job than this.
[Advertisement] Plan Your .NET 9 Migration with ConfidenceYour journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. Download Free Guide Now!
IBM Boosts the Amount of Computation You Can Get Done On Quantum Hardware
Read more of this story at Slashdot.
Wi-Fi 8 Trades Speed For a More Reliable Experience
Read more of this story at Slashdot.
FBI Seizes Polymarket CEO's Phone, Electronics After Betting Platform Predicts Trump Win
Read more of this story at Slashdot.
Bluesky Crosses the 15 Million User Mark
Read more of this story at Slashdot.
GOG's Preservation Program Is the DRM-Free Store Refocusing On the Classics
Read more of this story at Slashdot.
Amazon Shuts Down Secret Project To Develop Fertility Tracker
Read more of this story at Slashdot.
Meta To Introduce Ads On Threads In Early 2025
Read more of this story at Slashdot.
OpenAI Nears Launch of AI Agent Tool To Automate Tasks For Users
Read more of this story at Slashdot.
Microsoft Gaming Handheld Device 'Few Years' Away, Says Xbox Chief
Read more of this story at Slashdot.
How Italy Became an Unexpected Spyware Hub
Read more of this story at Slashdot.
AI Systems Solve Just 2% of Advanced Maths Problems in New Benchmark Test
Read more of this story at Slashdot.
Dutch Publisher's AI Translation Plan Sparks Industry Backlash
Read more of this story at Slashdot.
Clues To Windows Intelligence Found in Windows 11 Builds
Read more of this story at Slashdot.
Cheap Fix Floated For Plane Vapor's Climate Damage
Read more of this story at Slashdot.
The Ultimate in Debugging
Read more of this story at Slashdot.
Secret Service Says You Agreed To Be Tracked With Location Data
Read more of this story at Slashdot.
Will We Care About Frameworks in the Future?
Read more of this story at Slashdot.
Apple Defends Mac Mini Power Button Relocation
Read more of this story at Slashdot.