6 ms·
Reading the comments, I'm stunned and disillusioned. Are most modern developers struggling to write code without this? If so, there is a fundamental problem t
by blunte 6y ago
Reading the comments, I'm stunned and disillusioned.
Are most modern developers struggling to write code without this? If so, there is a fundamental problem that has nothing to do with levels of undo.
- bsf_ 6y agoIndeed, I find this to be terrifying.
- perryizgr8 6y agoWhat's the problem? I do this often.
- comeonseriously 6y agoI'm so confused as to why anyone would do this.
- ggpp 6y agoI write a lot of frontend JS with hot reloading make change => see result => cmd-z 1 time to fix result OR commit and keep coding oops, it wasn't really fixed. cmd-z 3 times and see if that works I know it's wrong, but what's right?
- strictnein 6y ago> I know it's wrong, but what's right? Nah, it's not wrong. You're testing your code changes live.
- ggpp 6y agono it's webpack HMR (I know you're joking)
- strictnein 6y agoHmm... I actually wasn't. By "live" I mean in the developer's own browser.
- ggpp 6y agoOhhh, I thought it was a riff on "I don't always test my code, but when I do, I do it in production."
- fingerlocks 6y agoLikewise. This whole thread is totally bizarre. The closest imaginable thing I might do is wrapping some block of code in an if(false) {..} or #ifdef it out, when I'm refactoring and feeling unsure about my changes. But is that even the same thing that we're talking about here?
- johnfn 6y agoHello from the bizarro universe of people who do this all the time and can't imagine the opposite. Do you never rewrite some code only to realize it didn't precisely capture all the edge cases of the thing you rewrote? In those cases I use the git gutter in VSCode to view what the old code looked like and compare and contrast to the new version to see what I missed. It seems to me that that's the same as what these engineers are doing, just with a bit more primitive tooling. Can't imagine how anyone doesn't do this - unless there's just a race of God-programmers I've never encountered that write everything perfect the first go. But I don't think so. :-)
- jussij 6y agoI suspect that is exactly the method most developers would uses in that situation. All versions controls have a way to compare, merge and revert historical changes in and out of the current working copy.
- fingerlocks 6y agoYeah, sure it happens. Then I type “git diff”. But never have I unraveled the entire undo buffer stack only to peek at it and re-push the entire contents. That’s super weird to me.
- wingerlang 6y agoWhat’s weird about it? For some - to do git diff might take more keystrokes than hitting undo 5 times. I do all of these. I’d use undo/redo when I want to look at something I /just/ did, meaning while in the process of writing something. The git gutter when I stumble upon some change I want to see what was there before. Or Sourcetree for a full diff.
- jussij 6y agoI too am struggling to understand this use of undo. If I'm reading this correctly it means applying a large number of undos to get to a previous editor state, followed by an equally large number of redos to then get back to where you started. I can't recall every doing something like this. The only time I seem to use undo is when I genuinely make some sort of editing mistake. One reason I know I don't subconsciously do this is because I never struggle to execute an undo action. However, on the rare occasions I need to do a redo I tend to struggle with the short cut key and usually go to the menu instead. That tells me I use undo much more than redo.
- abc_lisper 6y agoAgreed. I never do this. Why do people do this?
- trevor-e 6y agoI am more stunned by the tone your response. Why are you implying there's a "struggle" or "fundamental problem"? Sorry but your language is very condescending. Sometimes it's easiest to hit Cmd+Z a few times to check out how something looked at an earlier stage of a change. And then it's easy to Redo everything back to the current state. Rewinding changes back can even jog your memory as to why you did something. It's fast, simple, and effective. What's so bad about that?
- jmull 6y ago> I'm stunned and disillusioned. I think you simply don't understand the workflow... when and why people do this. Generally, the idea of referring to an older version of code while working on a later version is good and useful, is it not? This is just one way of doing this.