Desktop removal app works as expected • The Register



on duty It’s been a bit of a week, hasn’t it? Grab a cookie and settle in for another tale of a brave Register reader who was only trying to help. Welcome to Call.

Today’s story comes from renowned reader “Paul” and is about his days as a programmer at a manufacturing plant in England. It was the Windows 7 era, and Paul was an apprentice coder, eager to get his foot in the door of app development.

“I was tasked with developing a simple application for the sales department,” he explained to us. “This application would simplify moving folders full of customer manufacturing data from the vendor’s Windows desktop to one of two network drives and folder trees for each customer and job number.”

The current process was manual, time-consuming and error-prone. With Paul’s awesome new app, all the salesperson had to do was point the app to his desktop folders. The processing would take place and the data would be made available to engineers to perform engineer-like tasks while being purged from the vendor’s PC.

Pretty simple – just a bit of file transfer. What could go wrong?

Paul coded the application, it was tested and then deployed. Happy with the completion of his task, he was eagerly awaiting his next project when the inevitable call came.

“Your app took a while to work!” came the trill from a member of the sales team. “And then deleted my office!”

Unexpected data deletion? Of course, this can happen with Microsoft. But that was in the glory days of Windows 7. Paul was sure his code was OK – it should have only taken a few seconds to run and certainly not trash the desktop.

“So I dutifully went to investigate,” he told us.

“Low behold, their desktop is completely empty. This user was one of those users who used their desktop as a dump for all those important files. ‘a shirtless action actor emerging from a swimming pool.’

“I believe it was Jason Statham, but that’s not too relevant,” he added.

What was relevant was that all of the user’s files were effectively gone, as was the shot of a shirtless Statham. The office looked nice and tidy, but the company accounts wouldn’t look so nice if the vendor’s files remained lost.

Paul asked around – no one else had a problem. He looked in the trash can – no joy.

“On a whim, I checked the data they had sent to the network drives and was surprised to see that it was considerably larger than the other folders on that drive…”

Ah. What really happened was that the user misunderstood. Rather than pointing the app to their desktop folders, they had actually pointed the app to their desktop folder. The app had successfully transferred the content to the network drive and then stowed away after itself.

The transporter had been transported to a server and out of the office.

Luckily the files were all intact, so recovery was just a matter of copying the folder to the seller’s PC. Paul then apologized and left as the inevitable “but all my icons are in the wrong place” complaints began.

And the app? Although it worked exactly as expected, Paul quickly added a fix “which ensured that a user could not select their desktop folder”.

“And named the function in their honor.”

Have you ever had a particularly annoying user’s name appear in the source, to stand out a bit when it comes to code review? Or did you complain when your app did exactly what it was supposed to do? Say it all with an email to On Call. ®

Source link


Comments are closed.