The Real Reason To ‘Learn To Code’? Automating Your Life

On the joys of writing scripts that do scut work

Clive Thompson
Debugger
Published in
9 min readMar 31, 2022

--

“Robotic arm” by Dan Ruscoe

Last night I automated the tip of my index finger.

I was getting super annoyed by an infinite-scrolling site. I generally hate those: I’m a journalist, and every so often I’m a) doing research that b) requires me to go back several weeks, months or years on c) an infinite-scrolling site. So I have to sit there hitting “page down” or “end” over and over again.

Last night I had to do that at a couple of sites, and after a few minutes I got bored and decided: Screw it, I’m gonna automate this.

So I wrote a quick, tiny script using the programming language Python. The script does one simple thing: It hits the “end” button on my keyboard, waits two seconds, then hits it again. Here’s what it looks like …

Utterly simple! But it did the job. I started it running, flipped over to the site I was reading, and let the script hit “end” over and over, paging downwards and downwards, while I, like, mixed myself a…

--

--

Clive Thompson
Debugger

I write 2X a week on tech, science, culture — and how those collide. Writer at NYT mag/Wired; author, “Coders”. @clive@saturation.social clive@clivethompson.net