News for hackers. Stuff that matters.
Re:Why is it so hard to see code from 5 minutes ago? by stephc_int13 on Thursday February 18, 2021 @09:09PM (#26188670)
I am very surprised by this. I seldom use the control-z shortcut and I've been writing code for several decades...
Re:Why is it so hard to see code from 5 minutes ago? by blunte on Thursday February 18, 2021 @09:11PM (#26188682)
Indeed. This sounds more like trial-and-error programming.
Re:Why is it so hard to see code from 5 minutes ago? by ggpp on Thursday February 18, 2021 @10:08PM (#26189147)
What's the alternative? What should I be doing instead of cmd-z?

> I'll Ctrl-A and Ctrl-V this into a new tab before it gets too messy

I did this about 400 times today

Re:Why is it so hard to see code from 5 minutes ago? by stephc_int13 on Thursday February 18, 2021 @09:14PM (#26188708)
Yes, and I've always believed that short-term memory is a very important mental training for a coder.
Re:Why is it so hard to see code from 5 minutes ago? by blunte on Thursday February 18, 2021 @09:26PM (#26188803)
My short term memory is much reduced compared to my younger self. Consequently, I work in ways which allow me to reduce cognitive load and still accomplish the task. FP is a godsend for me, even if I just adopt some of its principles.
Re:Why is it so hard to see code from 5 minutes ago? by kortex on Thursday February 18, 2021 @10:35PM (#26189347)
Likewise. I have ADHD and even with treatment, I feel more like a GPU than CPU. Small functions, lots of static typing, IDE for autocomplete, and lots of FP style patterns.

When I get thrown into an un-typed python codebase, my productivity grinds to a crawl, and I start having to do things like have a scratch pad with various versions to copy paste.