DEV Community

Robin Kretzschmar
Robin Kretzschmar

Posted on

How often do you save per minute?

I got reminded of my time as a trainee today. My dad and I were writing something and because I "can write faster on the computer" I was doing the texting and he just told me what to write.
After a while he asked me if I'm afraid of a power outage or something because he noticed that I pressed CTRL+Safter almost every word I typed.

Started to think of it and came to the conclusion that I do this since I was tasked to write a recursive algorithm to create a maze during my trainee time and lost 6 hours of work because I forgot to safe the file 🤦‍♂️

So when you think of your daily routine, how many times per minute do you save whatever file you have currently open?

Fun fact: sometimes it's like a reflex and I press it in chrome accidentally and get angry because the "save website as..." dialog pops up!

Top comments (14)

Collapse
 
ahferroin7 profile image
Austin S. Hemmelgarn

Right after creating a new file, right after finishing a logical block of changes or additions, right before leaving the editor, and that's about it.

I use vim to the exclusion of pretty much everything else (even for things like formal documents, I do them in Markdown in vim first, then manually copy the result into LibreOffice to do the final formatting and save), and the way I have it configured means that as long as the disk doesn't die (at which point I'm screwed anyway), the editor exiting without me explicitly closing it won't lose much (if any), it'll just prompt me about recovery when I open the file again.

Collapse
 
daniel13rady profile image
Daniel Brady • Edited

When I'm writing, I pause often to think about/re-read what I've just written. These pauses tend to come at the end of writing some sort of meaningful string of text, such as everything between a period and a comma in English, or after a } in JavaScript.

And the last thing I type before I pause is the "SAVE" shortcut (CMD + s on my machine).

This habit is born of getting burned too many times from text editor programs that don't auto-save frequently enough, or at all.

Even after I configured my editor to auto-save if I haven't typed a character in a certain amount of milliseconds (it's not paranoia if the editor is really out to lose your data 😑), I still have this habit 😄

sometimes it's like a reflex and I press it in chrome accidentally and get angry because the "save website as..." dialog pops up!

This happens to me at least once every time I write a comment on DEV 😂 but I think implementing a "comment drafting" system triggered by the "SAVE" shortcut (the first thought I have every time this happens) is overkill lol

Collapse
 
beggars profile image
Dwayne Charrington • Edited

I press ctrl+s as a habit right after I finish typing. So much so, that I accidentally do it from time-to-time when leaving comments on sites like Dev.to or writing blog posts. Which makes me laugh when I trigger the Chrome save dialogue. Even if autosave is enabled, I still press ctrl+s out of habit.

When you lock your car, how many times do you press the lock button? I always press it three times. Or when I close the fuel cap on my car after refilling, I make sure it clicks three times. Do I have a problem?

Collapse
 
darksmile92 profile image
Robin Kretzschmar • Edited

No I think you're totally fine. I also did this with the car before I got keyless go. Nowadays I slide my hand over the handle of the house door to "lock it" only to notice how stupid I am a few seconds later 😂 #keylessgo

Collapse
 
ackzell profile image
Axel Martínez

It me...

Fun fact: sometimes it's like a reflex and I press it in chrome accidentally and get angry because the "save website as..." dialog pops up!

I don't remember at this point what is it that I lost but the shiver on my spine is triggered just to think about it. So I Ctrl+s / Cmd+s a few dozen times a minute I'm pretty sure. 😅

Collapse
 
darksmile92 profile image
Robin Kretzschmar

Glad to hear someone else does it the same way 😁

Collapse
 
ben profile image
Ben Halpern

pressed CTRL+Safter almost every word I typed

I'm probably a bit less than you, but still a lot. I also press the s at least three or four times most of the time. Same with when I copy.

Even though I am constantly saving I have a hard time feeling comfortable adopting one of those "autosave" plugins which just constantly saves your doc.

Word processors like Google docs have essentially done away with the save button. I know we typically want more precise control over our files, but it's still interesting that this isn't as popular in our space.

Collapse
 
darksmile92 profile image
Robin Kretzschmar

Good point, I also can't really trust those autosave plug-ins...

And Google removing the save button feels a little like I loose control. My inner monk wants to have to visual confirmation that I just saved the document 😁

One argument that this is not more popular in our space can be that we sometimes don't want our documents to get automatically saved before we're not done.
A recent example is if you are running an app with hot reloading enabled and have a code formatter / prettier set up to format the source on saving, it can really mess up things when you stop typing for a moment to think about something and are in the middle of creating something and then the auto save kicks in, half baked code gets formatted horribly (missing brackets or something) and the hot reload crashes.

I can see that such cases are the reason we want to have the full control of when the document gets saved.

On the other hand: what are version control systems for then? 😬

Collapse
 
weeb profile image
Patrik Kiss • Edited

sometimes it's like a reflex and I press it in chrome accidentally and get angry because the "save website as..." dialog pops up!

I can relate to this a lot. Like everytime I write an article, many times I would press CTRL+S to save, and we know what happens then..

On topic: when actively coding, I probably save around 5-6 times per minute, maybe even more. But TBH, it's like breathing at this point. I do it unconsciously, it's only natural to keep saving regularly.

Collapse
 
darksmile92 profile image
Robin Kretzschmar

Yes I totally know what you mean when you write an article... 😂

I agree that it's like an uncontrolled reflex and a good one.
Some colleagues manage to save only at certain times and then they do it conscious and by choice. I always wonder how they can not save during periods of up to an hour.

Collapse
 
twenty profile image
Chris

I generally only save when I've run through the code in my head to make sure it makes sense. So maybe, 2-3 times a minute?

Otherwise, if I'm refactoring I'll generally save every time I shift code (assuming no errors).

Collapse
 
darksmile92 profile image
Robin Kretzschmar

That amount sounds natural to me.

Collapse
 
pavelloz profile image
Paweł Kowalski • Edited

A: Dont know. I have save on focus lost, so i probably save not very often.

But when writing with tests in watch mode, then probably ~5 times a minute to get constant feedback.

Collapse
 
fultonbrowne profile image
Fulton Browne

I use auto save on intellij so... all the time (I learned the hard way)