News: 1645777868

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Your app deleted all my files. And my wallpaper too!

(2022/02/25)


On Call It's been a bit of a week hasn't it? Grab yourself a biscuit and settle down for another story from a brave Register reader who was only trying to help. Welcome to [1]On Call .

Today's tale is from a reader Regomised as "Paul" and concerns his days as a programmer at a manufacturing plant in England. This was in the time of Windows 7, and Paul was an apprentice coder, keen to wedge his foot in the door of application development.

"I was tasked with developing a simple application for the Sales department," he told us. "This application would simplify the act of moving folders full of customer manufacturing data from the salesperson's Windows desktop to one of two network drives and folder trees for each customer and job number."

[2]

The current process was manual, time-consuming, and prone to error. With Paul's whizzy new application, all the salesperson needed to do was to point the app at the folders on their desktop. Processing would happen and data would be available to the engineers to do engineer-type stuff as well as being purged from the salesperson's PC.

[3]

[4]

Simple enough – just a bit of file transfer. What could possibly go wrong?

Paul coded up the app, it was tested and then rolled out. Happy with the completion of his task, he was looking forward to his next project when the inevitable call came in.

[5]

"Your app took ages to run!" came the trilling from a member of the sales team. "And then deleted my desktop!"

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

"So I dutifully went to investigate," he told us.

[6]

"Low and behold their desktop is completely blank. This user was one of those users that used their desktop as a dump for all those important files. All neatly arranged around a low quality wallpaper image of a shirtless action actor rising out of a pool."

[7]File suffixes: Who needs them? Well, this guy did

[8]Real-time software? How about real-time patching?

[9]No, I've not read the screen. Your software must be rubbish

[10]Bouncing cheques or a bouncy landing? All in a day's work for the expert pilot

"I believe it was Jason Statham, but that's not overly relevant," he added.

What was relevant was that all of the user's files were indeed gone, as was the snap of a shirtless Statham. The desktop looked lovely and tidy, but the company's accounts would not be quite so handsome if the salesperson's files remained lost.

Paul asked around – nobody else had a problem. He peered into the recycle bin – no joy.

"On a whim, I checked the data they'd sent to the network drives, and was surprised to see it was considerably larger than the other folders on that drive..."

Aha. What had actually happened was that the user had misunderstood. Rather than direct the app to the folders on their desktop, they had actually directed the app to their desktop folder. The app had correctly transferred the contents to the network drive and then tidied up after itself.

The transporter had been transported to a server and off the desktop.

Thankfully the files were all intact so recovery was simply a case of copying the folder back to the salesperson's PC. Paul then made his excuses and left as the inevitable "but all my icons are in the wrong place" complaints began.

And the app? While it had worked exactly as designed, Paul swiftly added a patch "that made sure a user was unable to select their desktop folder."

"And named the function in honour of them."

Ever popped the name of a particularly annoying user into the source, only to come a bit unstuck at code review time? Or found yourself being whinged at when your app did exactly what it was supposed to do? Tell all with an email to [11]On Call . ®

Get our [12]Tech Resources



[1] https://www.theregister.com/Tag/on-call

[2] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/applications&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2Yhi228EkJS5PC5DvaVBOpwAAAA0&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0

[3] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/applications&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44Yhi228EkJS5PC5DvaVBOpwAAAA0&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[4] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/applications&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33Yhi228EkJS5PC5DvaVBOpwAAAA0&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0

[5] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/applications&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44Yhi228EkJS5PC5DvaVBOpwAAAA0&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[6] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/applications&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33Yhi228EkJS5PC5DvaVBOpwAAAA0&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0

[7] https://www.theregister.com/2022/02/18/on_call/

[8] https://www.theregister.com/2022/02/11/on_call/

[9] https://www.theregister.com/2022/02/04/on_call/

[10] https://www.theregister.com/2022/01/28/on_call/

[11] mailto:oncall@theregister.com

[12] https://whitepapers.theregister.com/



Did you get to use the ShockyStick(TM)?

ShadowSystems

I would have made myself feel better by using the ShockyStick(TM) on the twit until the batteries went dead or the user stopped twitching.

*Sighs*

And that's why I'm Not Allowed to use the ShockyStick(TM) any more...

*Comical pout*

Concepts are hard to understand

b0llchit

It is hard to understand for many users that you organize files (in directories). Their mind is simply not capable of that level of abstraction. Giving those users a computer where files can be deleted is most likely the equivalent of (usually without any backup):

# rm -rf /

Sad, but that is reality and will probably not change. Storage in the cloud makes it actually much harder for users to understand what is happening.

Best remedy: we need to eliminate the users. ;-)

Or if you have a user who "knows what they are doing"

Mishak

rm -rf .*

Re: Or if you have a user who "knows what they are doing"

b0llchit

File not found.

R)etry, A)bort, I)gnore, F)ail, K)illuser?

Re: Or if you have a user who "knows what they are doing"

Aladdin Sane

Surely K is just a really late term A?

Re: Concepts are hard to understand

Joe W

So they put directories on their desktop, and organise their files there. I guess that's a win for you?

As a user I simply cannot be arsed to go through the weird hierarchy of directories that Windows tries to impose on me. There's the issue with my "main" user directory being on a remote computer, so I cannot access files if the network craps out _again_, there is a "local" user directory on the laptop (c:\Users\$UserName), there's the weird number of stupid directories under those two personal directories, that Windows insists on saving the documents into (seemingly at random either the local one or the one on the network drive), instead of making it easy to have a single directory tree for the projects - because Windows has (and loves) its "own word documents", "own excel files", "own presentations", etc. - which is stupid, because people need folders sorted by customer, departent and project (or a similar structure). Yes, I have all of that, living most of my life under the command line helps getting you organised, also faceplanting because you "lost" (= filed away in a stupid spot) some documentation is a good learning experience.

Re: Concepts are hard to understand

TonyJ

The first issue re the network crapping out is down to poor IT - offline files and folders of some form or another has been a thing for a long time now. There are modern versions of it designed to work with OneDrive etc as well so it really shouldn't happen. Although I'm not a huge fan of files on demand because of this very thing but it's swings and roundabouts there in terms of less space taken up etc.

For the second part - again, for a few years now, Office will default to your documents folder and if you choose something under it - project etc - it will remember what you last used. What's more they don't care - if you want to save everything to your root folder, desktop folder, whatever - as long as you have permissions it'll do it.

One gotcha that still catches people out of course is opening an attachment because it'll save a temporary copy. If you forget that, edit and don't save it to a new location then you can expect to lose the changes and that is crap to be honest.

Yup other folders under there can appear a random mess for sure but I don't think it's quite as bad as you make out.

Pascal Monett

I so agree with you. Especially when it comes to laptops, which are often delivered with a single partition for OS and data. So, when the inevitable Windows crash happens and you have to reinstall Windows, it wipes the disk and your data with it.

Once upon a time I insisted on having two HDDs, one for the OS, one for the data (and swap file). Nowadays, with SSDs and their size, a single disk is enough, but I still insist on a data partition and I install all my programs and put all my files there.

That way, when Borkzilla borks again, at least I can reinstall Windows without losing any actually important stuff.

Icon because Borkzilla still hasn't understood this.

TonyJ

Or you could back things up or use a cloud provider such as OneDrive - or my own personal choice Seafile as it never leaves my control. Which you should be doing anyway because drives do fail.

Even then, if Windows is borked you can usually still get into the partition during the setup phase or a new installation to move files and folders. Bit of a faff but can be done.

Re: Concepts are hard to understand

b0llchit

The "windows" way is not the "right" way. On one hand you have some abstract concepts of storage and then you have an implementation (mapping of concepts).

The translation from abstract to practical is most often done by people who understand the concepts at a deeper level (the computer level), often the programmers, and those are the worst translators for "ordinary" people. That is why folders and the recycle bin were intoduced, to make is more clear in familiar layman's terms.

However, hiding complexity in familiar terminology is a very bad strategy. You have to deal with complexity. That is why we have specialists in interaction design.

Re: Concepts are hard to understand

big_D

It is actually in our company IT policy, that we are not allowed to store business relevant data on the local drive, all data has to be stored on the network, where it will be automatically backed up.

Working in home office, I sometimes make a working copy locally, if it is a big file, but generally, I just work off the network drives.

If we break the policy and the PC is stolen or the drive is corrupted and we lose business critical files, it is a minimum of a written warning for breach of company policy.

Re: Concepts are hard to understand

John Robson

I've said this before, but I've done that on a production system...

I blame my manager - we were short on hardware and so I ended up doing chroot development on the production build server.

I meant to clean up the chroot jail, but accidentally typed rm -rf /bin /usr /etc instead of the same without the / in front of each...

Re: Concepts are hard to understand

Tom 7

In early Unix setup at work a user did that - the system manager had not got the hang of users and groups by then, but he did alias the command so it checked it was in the /user (IIRC) tree before going ahead.

Guilty.

Joe W

This user was one of those users that used their desktop as a dump for all those important files.

Oh, $(deity)! If I had a penny every time this causes problems I'd have about enough for a beer... maybe.

Seriously, I guess we have all been there. It is not so much "the important files" as more of "the stuff you still need to work on and then sort away" - at least that is the case for me. It also makes it easier to drag and drop to *shudder* Sharepoint - which I have to use because I did something Very Bad And Frowned Upon in a past incarnation, I guess. To be fair: the desktop was created for that, as a space to organise stuff, to place files and documents. It is called the Desktop after all! And just like some people have a clean desk you could eat from, others have a desk you literally could prepare a four course meal from because there's enough stuff on it, soil has begun to form, civilisations sprouting up, etc.

Yeah, I clean up my desktop (both the Windows and the hardware one) more or less regularly-ish. And yes, there are folders in the "official, since this is stuff we bother to take a backup of" directories to which all of the really important stuff gets filed away (though the desktop-folder is actually backed up as well, as far as I can tell from the documentation, since it resides under your "Users/$(UserName)" personal folder - I'm just a user in this case, so... yeah... it'll work out, I guess).

Re: Guilty.

Anonymous Coward

The company I joined from uni, a well-known engineering company, had a clear desk policy. "Clear desk" in that there should be nothing on your desk outwith working hours; all paperwork had to be stored in secure cabinets. If security found anything unsecured it would be removed and you had to explain your actions to management to get it back. I should add that this was back in the 70's so no desktop computers, etc - we had access to the mainframe via a local TTY terminal. My first manager there also went a step further in that you only needed two filing trays on your desk: one for him (or others) to put incoming work, and one as a temporary store for filing.

A key idea was no "pending" (or WIP) tray. Everything was either in your in-tray, you were working on it, or it was filed. A desk diary was an essential element - if you passed a query or task onto somebody else, your paperwork was filed and you put a note in your diary to remind you to follow up (as necessary).

It's a way of working that has stayed with me (even in "retirement") - both with my physical desktop, that nowadays is occupied with my laptop and associated peripherals, and my computer desktop. The latter is usually clear except for temporary files; it's my default location for file transfers (that aren't just being dragged between folders) and first saves of newly created files (e.g. pdf or exports) - few things stay there for more than an hour.

Anonymous because I'm a grumpy, private old git :o)

Re: Guilty.

Anonymous Coward

My e-mail In-box is the same. I treat that as my "In Tray" in that I am either working on it or have still to work on it. Once it is dealt with, it's filed away in a personal folder (yeah, I know, but I'm willing to take the risk) stored locally (yeah, I know, etc.) or deleted.

The major benefit is that when I open my e-mail, I've got a couple or at the most a few e-mails sitting there and I don't suffer e-mail overload like my colleagues do.

Re: Guilty.

keithpeter

I use the Noguchi Yukio filing system, both physically and on the computer. Kind of works for me.

Re: Clearly someone who understands ...

Flocke Kroes

Whether they admit it or not, most people use the "Now or Never" filing system to organise their projects. The system is workable - as long as you do not convince your self that you are using some more complicated priority based system.

["Just do it" themed clothing is popular at my gym. One young lady has an excellent hoodie with "Just do it later".]

Even Worse

GlenP

This user was one of those users that used their desktop as a dump for all those important files.

We genuinely had a user who deliberately stored important files in the recycle bin ! She reckoned pressing delete was easier than moving them to a desktop folder.

As this was back in the days of relatively small HDs on PCs she was most upset when we had to run a disk clean-up and defrag to recover some space and all her files disappeared. Fortunately there were copies of the most critical ones on the server drives (where they should all have been) as I had to explain that no, there was no way we could recover them.

Re: Even Worse

TonyJ

Used to see that in Outlook. Important emails in the deleted items folder!

Re: Even Worse

Anonymous Coward

Presumably having remembered to untick the option to 'empty the deleted items folder' when exiting...

Re: Even Worse

TonyJ

Indeed. But what an accident waiting to happen!

Re: Even Worse

Mr Humbug

That option was (and still is) off by default. And keeping all the messages that you've dealt with but might want to refer to later in your recycle bin folder was common at this place a few years ago. I stopped it by creating folder policies to delete recycle bin items more than 30 days old.

I even told them about the change before I made it (I'm far too soft on them).

Re: Even Worse

Pascal Monett

And it's with that pain that she learned not to trash her files.

Pain is a good thing. It's the only thing some users understand.

Skill and experience

My-Handle

In software development, skill is being able to produce a program that does exactly what it was designed to do, with as few resources as possible. Experience is anticipating how it might be mis-used and taking steps to prevent it.

Sounds like Paul here just learned the value of experience :)

A little knowledge is a dangerous thing

ColinPa

Someone told me that if his software detected a problem, it would package up the relevant files (FFDCs logs etc,configuration files) so they could be sent to support, and so be sure of getting all the files.

This worked great. One day they had a very large file containing lots of hidden files. When they saw the titles of these hidden files, and looked at the content of one of the files, they could understand why the files were hidden! The originator was smart enough to hide files, and thought that burying them deep in a "operating system" directory tree would mean they were invisible to every one else.

The support team hatched a plot.

They sent an email to all the users saying a bug had been detected, and affected users would be sent a fix. They sent the "fix" to the user, and someone went round to help him run it. The fix just deleted all of the naughty files. The "fix description" was along the lines of "remove files which should not be on the computer"

They also put in a sneaky fix which checked the number of files in the directory and reported "illegal files found" to the end user and support if there were unexpected files found. They were surprised how many alerts they had.

Always...

Skiron

...a salesman. Them people with a computer are a PITA.

If the presence of electricity can be made visible in any part of a circuit, I
see no reason why intelligence may not be transmitted instantaneously by
electricity. -- Samuel F. B. Morse