code to joy

| No Comments | No TrackBacks

Andrew Smith's essay Code to Joy begins with his being commissioned "to write the first British magazine piece" on Bitcoin and its pseudonymous creator, Satoshi Nakamoto. Smith was entranced by what he learned about coding:

I was astonished to find other programmers approaching Satoshi's code like literary critics, drawing conclusions about his likely age, background, personality and motivation from his style and approach. Even his choice of programming language - C++ - generated intrigue. Though difficult to use, it is lean, fast and predictable. Programmers choose languages the way civilians choose where to live and some experts suspected Satoshi of not being "native" to C++. By the end of my investigation I felt that I knew this shadowy character and tingled with curiosity about the coder's art. For the very first time I began to suspect that coding really was an art, and would reward examination.

Noting the ubiquity--and importance--of "the code conjured by an invisible cadre of programmers," Smith points out that "our relationship with code has become symbiotic, governing nearly every aspect of our lives:"

The accelerator in your new car no longer has any physical connection to the throttle - the motion of your foot will be converted into binary numbers by some of the 100m lines of code that tell the vehicle what to do. Turn on your TV or radio, use a credit card, check in a bag at the airport, change the temperature in your fridge, get an X-ray at the dentist, text a family member, listen to music on anything other than vinyl or read this article online and each of your desires will be fulfilled by code. You may think you're wedded to your iPhone - what you really love is the bewitching code that lies within it.

Though code makes our lives easier and more efficient, it is becoming increasingly apparent how easily it can be turned to malign purposes. It's used by terrorists to spread viruses, car manufacturers to cheat emissions tests and hostile powers to hack elections.

This leads Smith to ask himself some questions:

Should I learn to code? Could I learn to code? With a trepidation I later came to recognise as deeply inadequate, I decided there was only one way to find out.

Smith narrows his focus to three languages (Python, JavaScript, and C++), investigates freeCodeCamp for HTML5 and JavaScript, and other resources for Python. "The app I want to write," he explains, "will rove Twitter feeds looking for keywords provided by a user." Then he gets to work:

I must learn how to connect with Twitter's API, or Application Programming Interface, which provides developers with access to the company's feed. I must also become familiar with Tweepy, a library of Python tools specially written to talk to Twitter. To this end I spend an entire exhausting day reading the copious online documentation about this software. Tolstoy must look like a quick skim to these people.

Smith eventually got stymied by "endless 'syntax error' messages that stop my code from doing anything at all:"

Hours later, at two in the morning, nerves stretched as if the entire staff of Facebook has thrown them out the window and shimmied down them to escape, I send an SOS to [British programmer Nicholas] Tollervey, grateful, for the first time in my life, for the eight-hour time-zone lag between San Francisco, where I live, and the UK. To my unbounded relief, he answers straight away and arranges a screen share to help solve my problem. He looks for a moment, then laughs.

"You probably don't feel like it right now," Tollervey says of Smith's code, "but you're so close." Here's the code in question:

20180519-code.jpg

A stray parenthesis had thrown the whole program into chaos. Tollervey removes it and the code works. I stare at the screen in disbelief. We're done. Too wired to sleep, I stay up talking to Tollervey about programming for another hour. My app is crude and unlikely to change the world or disrupt anything soon, but it feels amazing to have made it. More than anything, I'm astonished at how few lines it contains. With the Twitter API security keys redacted, it appears as above.

"After all the caffeine, sweat and tears," Smith asks, "were my efforts to learn to code worthwhile?"

A few hours on freeCodeCamp, familiarising myself with programming syntax and the basic concepts, cost nothing and brought me huge potential benefits. My beginner's foray has taught me more than I could have guessed, illuminating my own mind and introducing me to a new level of mental discipline, not to mention a world of humility. The collaborative spirit at code culture's heart turns out to be inspiring and exemplary. When not staring at my screen in anguish, I even had fun and now thrill to look at a piece of code and know - or at least have some idea - what's going on. I fully intend to persist with Python.

"More powerful than any of this," he concludes, "is a feeling of enfranchisement that comes through beginning to comprehend the fascinating but profoundly alien principles by which software works:"

By accident more than design, coders now comprise a Fifth Estate and as 21st-century citizens we need to be able to interrogate them as deeply as we interrogate politicians, marketers, the players of Wall Street and the media. Wittgenstein wrote that "the limits of my language mean the limits of my world." My world just got a little bigger.

No TrackBacks

TrackBack URL: http://www.cognitivedissident.org/mt/mt-tb.cgi/3800

Leave a comment

About this Entry

This page contains a single entry by cognitivedissident published on May 19, 2018 2:26 PM.

no remorse over torture was the previous entry in this blog.

public schools are preferable is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Monthly Archives

Pages

  • About
  • Contact
OpenID accepted here Learn more about OpenID
Powered by Movable Type 5.031