Hacker News new | ask | show | jobs
by collinc777 1062 days ago
Slight tangent:

I once worked with a programmer who, the vast majority of time, would only input text into a text editor via copy and paste.

Think anti-vim. His fingers were locked on mouse and crtl+c/v. It was incredible to watch and his programming speed was very impressive.

6 comments

Over the years I've come to realize the copy paste has probably been a net negative for me and I almost never do it anymore. If you are doing the copy-paste, then change a couple names to match a different pattern thing by hand, the subtle errors you can get by making a mistake can take forever to catch. In code review it always looks plausible unless the reviewer is _very_ careful. Furthermore, it means you are duplicating code - which is sometimes totally fine - but forcing yourself to not copy-paste makes you consider what the abstraction would be and if it would be worth it not.

In the case where you are copy-pasting out of code you don't really understand. Retyping it gives you time to understand and maybe catch existing bugs in the code you are copying.

Please tell me more. Where was he copying from? What about formatting and refactors? Was his quality as impressive as his speed?
Generally the repository he was working in, but really it was any application that he had open on his machine. He would remember where words, or portion of words that he needed were, go to them, and copy and paste what he needed.

Just in case you're thinking this: He was not copying large portions of code from stack overflow or anything like that. He was line by line writing code, a few copy and pastes at a time. Often he times would copy and paste single characters to maintain his flow.

Just code or would he avoid any typing this way?
You win Dailywtf
This is too good to be true
Start with a file like: abcde...ABCD..1234.{}()*.... and go from there.
Voice dictation, Shirley.
Don't call me Shirley!
Stack Overflow, surely
programmers he subcontracted to.

Also explains why he was so fast

OpenAI, surely.
Wait, I need you to please elaborate on this. Where was he sourcing all code he pasted? Did he have a "snippet file" like a painter with a palette or something?
Typically in the code repository with other files that shared a similar pattern context that he was working with.

Sometimes he would need a portion of a word and he would remember that it was in an email he had open, and he would alt+tab and grab the portion of the word from the email, then alt+tab back to the editor and paste the word portion in.

He would go to extreme lengths to not have to move his hands to the home row on the keyboard.

I am a bit dyslexic and even though I am an avid vim user, I do often rely on copy paste to avoid silly typos that cost so much time for me to fix. Because I cannot even see the typo, even in the compiler output!
I (used to) work with a colleague who was just the opposite; she did (and still does) ONLY do copy/paste with the mouse. It is excruciating to watch when pairing or on a video meeting.

I get people have different workflows, but not taking advantage of even the minimalist functionality of ones tools I think I will never understand.

Many years ago when I used windows, I had a virus once that killed my keyboard. It was pretty fun to work around that... I ended up using the symbol browser utility to copy individual letters and then right click to paste them places.
A tangent of a tangent:

My way of doing imperative coding for data science with Python is to write a price of code in Sublime Text, copy and paste to iTerm, run, and get back to the editor. But of course I mapped shift+Enter to do all of that for me. I much prefer this setting to Jupyter Notebooks.

I program with almost all of my script-ey languages, like python, in a similar way - I'm on linux, and I edit everything in Sublime, save it to a file and then run it in a separate terminal. It the command gets complex I'll create a little bash script file, make it execytable, and run that.

I just alt-tab from editer to terminal, check output, etc, and back. That way I have a bunch of unix text-processing tools (grep, sed, etc...) always available. I'm too reliant on print debuging things as I go along, but it's a deeply ingrained habit.

The tool "entr" (and similar like "cargo watch") are so useful there. Save the file and it runs the command. For extra credit I mapped shift-enter to save the current file in my editor.