Reviews In Depth

Top movie and book reviews that get beneath the surface

Why Everyone Should Learn to Program

by

PythonToday we will be reviewing a programming language.  Yes!  A programming language – Python to be precise.  But as per usual here on RID – we won’t be looking at things from the normal perspective.  If you head on over to the various places where hackers hang out on the internet, the sort of discussions you’ll find run something like the following:  What is the programming language at issue?  Weigh its pros and cons versus other languages.  How is it typed?  Is it object orientated?  Is it functional?  What in fact are the advantages of these features… etc…  What is much more uncommon is a discussion of the question – why should anyone learn to program?  And that’s the question I’m going to answer today.  In short, you should learn to program because it’s easy, it’s fun, it will increase your skill set, and… it will fundamentally change your perspective on the world.  It will blow your mind.  You’ll learn why it is that the hacker sensibility is becoming such a powerful cultural force.  What follows is the proof to my hyperbole – so read on…

About a year ago I told a friend of mine that I had started to learn the Python programming language.  He asked with a raised eyebrow why it was I wanted to do this at age 34.

“Take it from me as someone in the industry,’ he said disparingly.  ‘We only hire guys who know their stuff.  Python is fine, but you’ll need to know C, C++ among other things.  A couple of years of work and you’ll still only be a novice.  If you’re looking to change careers this aint the way.’

His advice is almost certainly correct from the point of view of trying to get a job as a programmer.  It highlights nicely the perception most people have of programming.  It’s a career path.  It’s something you do to earn a living.  It’s something you specialise in – or you don’t do it.

This perception is so widespread and ingrained in our culture that it defines just about all our institutionalised work place structures.  A company will either buy its software, or if it’s in need of specialised software to automate particular processes, then it will high a specialist to create that software.  None of the other employees will be expected to know how to program.  It is the cultural default that an employee is expected to passively receive the interfaces with which she must interact on a day to day basis.

But this is our cultural reality not just in our work lives, but in all facets of our lives.  We passively receive ALL the various interfaces that we deploy to manipulate our environment:  the stove top you use to cook your food, the knife you use to cut your meat, the piano on which you play your music, the steering wheel you use to drive your car.

Just think about that for a moment and let it sink in.  EVERY interface you employ on a day to day basis is likely created by someone else.  And since our own creativity is necessarily constrained by the various interfaces we employ then an absolutely crucial dimension of creativity is denied to us.

This fact of our existence enslaves us to reality in a way that most people are completely unaware of until they are shown how they can break free.  To show you this, I’ll describe a concrete example of what I mean.

I currently work as an administrator at the University of Sydney.  I was asked by one of our academics to provide a monthly report of all the publications by all the academics and post graduate students in the school.  In response to this request I surveyed my options for obtaining this data.  In a school with around 250 staff and students this was no small task.

  1. I could email all the staff and ask them to email me the data every month and compile it manually.
  2. Find some software that would allow me to do this relatively easily.
  3. Program a solution myself that is perfectly tailored to the process.

Option 1 was a non-starter.  It would result in my insanity as well as the wrath of every academic in the school at having to constantly email me their publications for the month.  So I proceeded quickly to option 2.  Things here weren’t much better.  A programmer in another faculty had in fact built some software which sucks down publication data from the PubMed database (where most of my academics are published).  But the problem was that it wouldn’t provide data on a monthly basis.  Why – you might ask – does it fail to provide something so simple?  Because it was built to serve a very specific purpose, namely, to aid in the reporting of publication information to the Australian government – a task that needs only to be completed yearly.  So the software only ensures that the previous year’s data is scraped.

The academic that requested the report suggested an online tool that emails you notifications based on various search parameters.  Besides having to manually input all the search data – I’d still have to manually collate the information into a readable excel report – with my emails getting all clogged up.

So option three.  Turns out that PubMed has a very easy to use API (application programming interface) which allows one to query their database with your own software – receiving data in a nicely structured way that remains consistent (so it doesn’t break your program).  Within a couple of hours I have working prototype that queries PubMed for all the publications (along with their associated data, like journal information, abstracts etc), exports it into an excel spreadsheet (using the awesome library openpyxl) that is emailed to my desired email address.  A cron job on one of my servers ensures the report will be generated on a monthly basis and sent to the academic who requested it.  The ENTIRE process is therefore automated – and I won’t have to think about it ever again.

I saved myself a mountain of work, that I otherwise would have had to trudge through every month.  I freed myself to do other more interesting things in my work.  The interfaces with which I have been provided with by my work environment were not able to free me in this way.  I needed to be able to code to do it.

Approaching my work in this way subverts an established paradigm of modern work - that we need to rely on others to free us from the tedious processes that constrain us. But we don’t.   It’s this possibility that should be blowing your mind right now – if programming is something new to you.  If you use a computer in your day to day work – it’s very likely that your processes have developed to a point where they could benefit from some degree of automation.  And the only person really qualified to provide that automation ultimately will be you and YOU alone – because you may well be the only person who knows the process.

Blocking you from pursuing this course of action is your belief that learning to code is a massive investment of time that defeats the reward on investment.  This may have been true once.   When there were only lower level languages to use, there was a great deal of complex manual work that higher level languages have now automated.  What’s more, due to the wonders of open source – there is a practical infinity of libraries that further automate much of the grind work in programming.  Such are the virtues of Python and many other scripting languages.  In learning to program, your access to the varying kinds of interfaces out there increases beyond imagination, as well as giving you the power to craft your own.

In my own case, within three months of learning python part time I had enough knowledge to perform the sorts of tasks I described above.  I’m not an expert in the language.  I’m not an expert in programming – far from it.  But I don’t need to be for it to make a material difference in the quality of my existence.  I will likely never get a job as a programmer.  But that was never the aim.  It was never about being able to build interfaces for other people in a contractual fashion (i’ll be happy to do it in an open source context, however) – it was about building interfaces for ME.

Given the relative ease in learning the basics of programming in scripting languages like Python, the time has come to challenge the assumption that programming is a specialisation.  If you need an analogy:  is learning to read and write in a spoken language like English – a specialisation?  No, it’s a fundamental tool needed to navigate your contemporary existence.  It’s easy enough to learn that you devote some of your early years to the task – and then it stays with you for life.  You could go on to specialise in language use.  Maybe you’ll go on to become a writer.  But you don’t need to specialise for your language skills to provide you with an incredible level of life-improvement.  Well – so to with programming.

What’s more – I now feel cured of an affliction I never realised I had.  If I had to name this affliction, I’d call it – defaultism.  Always did I just default to the way of things as it was handed to me.  Now I look at every aspect of my life with a hacker’s eye.  How can I free myself of this task? – is the question now at the forefront of my mind at all times.  There is no need to throw out every interface with which we are presented.  If it fits our needs and desires then fine.  But how often do you subvert your own desires and needs because of the constraints imposed by the limitations of the interfaces with which you have been bequeathed?

I look at the world around me and feel almost disgusted by the entrenched defaultism that I see everywhere.  For instance, when the internet came along there was a sense of liberation from the passivity of watching television.  We learnt to talk back.  We learnt to create our own blogs and express ourselves as opposed to merely imbibing the thoughts of others in a mass daily dose of benign hypnosis.  Clay Shirky informed us about the great cognitive surplus that would result from being so freed. And yet here we all are – facebook members all – allowing one site to define the structure of our social relationships.  Yes we can comment.  Yes we can poke.  It’s more than television allowed.  But it’s the whole world still watching one tube, one interface – just as it was before.  As always we accept the tools on offer without ever questioning whether or not our desires and needs extend beyond it.

Many of you can’t imagine this because you’ve never had the experience of having your desires open out in the sort of way I mean.  The way the interfaces with which you interact constrain your awareness of those desires, because as far as you are concened – they exist outside the realm of imaginability.

My favourite example of this was when I showed one of my work mates a simple bit of javascript that could be used to extend the functionality of a particular google docs document that we were using.  Her reaction was along the lines of:

‘OMG  That’s AWESOME – I want to learn to code!”

And she felt this way because she had been given a glimpse of the way possibilities expand when freed from the constraints of the default interface.  Her immediate reaction was:  “I WANT THIS”.  Hence her desires opened outward in a way that was scarcely conceivable to her before.  In this way does learning to code literally change your life.  It frees you from the defaultism you likely never even knew you had.

Imagine applying this perspective to the interfaces like Facebook which currently define many of your social relationships.  Imagine having the desires to reshape these experiences in a variety of new dimensions.  Imagine meeting people with similar desires.  Imagine the creativity you could bring to bear in the development and progression of those relationships.  The default processes of ‘friendship’ would become positively depressing to you.  You’d see your former life as a barren, grey void of routine and habituation.

Learning to code is about the best antidote to the defaultism of our modern age I can imagine.  It’s time it became a fundamental pillar of our cultural lives.  For most of those in the hacker community – such sentiments I think will be old hat.  But the hacker community remains relatively insular.  It needs to learn to engage more outwardly.   The hacker sensibility needs to spread beyond its elite origins and mainstream.  Many won’t like that idea – because it will muddy the ease of self-identification that hackers currently enjoy.  But the value to the world at large will be immense – so it needs to happen.

Hopefully it will.

 

 

 

Be Sociable, Share!
Did you like reading this post? If so, please help me write more by linking to it, liking it on Facebook, tweeting, and +1-ing it on Google+ and all that stuff. Every little bit helps.

Post Metadata

Date
April 9th, 2011

Author

Category

Tags

19 to “Why Everyone Should Learn to Program”


  1. 1. How can I learn to play the piano the easy way?

  2. Mike says:

    Brilliant!

  3. David Baker says:

    Great article. Thank-you. Can you share your path to learning Python? The resources I’ve found seem designed for the long-haul path to a programming career. Is there a better learning path for the tinkerer in us all?

    • Dan Haggard says:

      Thanks for your compliment David.

      I think I do have something to say about learning Python for the likes of us non-specialists. And yes – I understand your frustration at many of the resources that write as though they expect their reader is thinking four years ahead.

      They very rarely link a particular programming task back to something you might want to achieve in the real world. And of course that’s our chief motivation. Our brain rightly shuts down when it can’t see the connection between what we are learning and what we want to achieve.

      I think this topic would make a good post – and would require a full post for an adequate treatment. So let me get back to you.

      • David Baker says:

        You’ve got it exactly right. Our brain shuts down without the connection. I look forward to your post as I still want to learn but there has to be a better way. I’d be happy to contribute to the evolution of your post or would be a happy reader. Thanks again.

        • Dan Haggard says:

          Awesome – thanks David. I’m in the process of drafting the post now. It’s becoming quite the opus – so I’m very much appreciative of your comment. It has been a great motivator to get this written. Hopefully I’ll have it finished in another day or two.

  4. Mary Heintz says:

    I completely agree with you. I work as a sysadmin (not a programmer) at a university and over a few years, saw that as collaborations grew, websites were a better means of communication than email. This led me, at age 40, to start to learn Ruby on Rails. It took me just about two years to get to the point that I was comfortable using it, but I can’t tell you how helpful it’s been. Funny thing is, I use it most doing something that I hadn’t planned, basically for sign-up sheets. Retirement parties, conferences, meetings, etc. all need a way for people to sign up. The organizers love it when they can just point people to a site to gather their information. The secretaries liked getting a quick count of people coming and even made their own suggestions. One was, their job would be easier if they could download all the info to a spreadsheet to print out name cards, follow-up info, etc. Took a little more time and now we can do that as well.

    Will this lead me to try to get a job as a programmer? Heck, no. But it’s great having another tool in my toolbox. And once, you see what you can do for yourself, you suddenly see all sorts of places where you can make things easier for other people too. Plus, learning a new skill is always a great feeling. (Of course, this is probably a big reason why we both work in academic environments.)

    • Dan Haggard says:

      That’s exactly it – you start to see a zillion applications you couldn’t even have imagined before you learnt the skill. And of course, there is the added bonus – if you are an administrator – that given that few people around you have the skill, you become an integral part of your team. And it’s always nice to feel needed.

  5. Brian says:

    Well put. I’m always looking for specific examples of how programming can help you in your job, even if you aren’t and don’t desire to be a programmer. Thanks for providing the anecdotes from your life!

  6. Andre says:

    That’s so awesome. Thank you a lot.

  7. Wow!!! Dan this is almost exactly what I realized three days ago. I truly believe that EVERYONE should learn how to program. In fact, I was thinking of your analogy,

    “… is learning to read and write in a spoken language like English – a specialisation? No, it’s a fundamental tool needed to navigate your contemporary existence. It’s easy enough to learn that you devote some of your early years to the task – and then it stays with you for life.”

    and three days ago when I came to my own “epiphany” I realized that with the way our world was shaping EVERYONE should learn how to program just like we all learn how to read.
    I mean think about it computers are in practically everything we interact with in a modern day society: cars, laptops, cell phones, air conditioners, Televisions, microwaves, coffee makers, and etc.
    Computers and programming have the potential to become as common as signs on the side of the road or words on this screen. These words are written in plain English, so that anyone can read or interact with another human being, but if everyone knew how to program they could create ways to make computers help humans lives easier.
    For example, what if I could create a Facebook app that could randomly generate a unique happy birthday message to all my friends automatically, and I wouldn’t have to do a thing? It could help me on those days I get too busy to check Facebook and someone’s birthday comes and I have to deal with the awkward…”Happy belated birthday” message post on their wall.
    Something that simple could be useful…at least for me.
    In fact, ever since I had my epiphany three days ago I’ve started to really teach myself how to program. And I can proudly say that I successfully created my first program yesterday. I didn’t copy code from a book or just change a couple of words around like so many of those Barnes and Nobles books have you do. The program I wrote had a very simple goal and I created it on my own after being prodded with a couple of clues.
    I can’t tell you how liberating it felt to actually “create” my very own program. The exciting thing is that I’m learning Python as my first real language and then I plan on moving to Java or possibly C#. I’m reading about really cool stuff that’s happening in the programming world and Microsoft’s Kinect camera. It’s really amazing what some people are doing.

    Thanks for the awesome post.

    Jared

    P.S. Sorry for any typos or grammatical errors it’s hard to write and edit such a long post in a tiny comment box. :)

  8. Dan Haggard says:

    Thanks Jared – glad you liked :)

    It’s interesting what you say about automating tasks like birthday greetings and whatnot. I just finished a post the other day about how a drop in signalling costs between humans will allow for much larger cohesive group sizes to form beyond our natural, pre-set limit. I guess learning to program would be part of that – as each could then automate their signalling processes (like birthday greets) in a personalised way.

  9. Charis Wilson says:

    I agree. We use Lotus Notes at work and LN does not have the easy built in rules features of Outlook. So I was getting very frustrated with a default mailbox we had that everyone on our team was supposed to be regularly checking. It wasn’t getting done and we were missing deadlines. The folks in the main office didn’t have the time to program a solution for me, their suggestion was to do a better job of forcing people to check it, perhaps by setting up a calendar reminder.

    However, after a bit of research on the web, I found enough information that I could figure out how to essentially write a script that would act like a rule and send me a notification to my personal mailbox as soon a message came in. Voila, now I don’t have to worry about checking it anymore and I am now able to respond to those incoming messages right away, instead of in a day or two after we remembered to check the inbox.

    Then recently I started having trouble seeing the print in LN. There didn’t seem to be anyway to make it bigger, like there was in IE. A bit of Googling and voila, the instructions on how to change one character in the code file that tell LN how to display the content and I could increase the size of the font that displays. Hooray, I can see it again.

    Sadly though I will soon have to switch to a new computer and they are saying they are going to take my admin rights away, so I will not be allowed to program my own solutions anymore. Instead I will have to put in a help desk ticket and hope that the IT folks approve of my solution and will make the changes for me. I have a feeling they will be hearing from me a lot, because I regularly make changes to my program to make them work better for me….and I am not looking forward to losing that capability.

    • Dan Haggard says:

      That’s frustrating Charis.

      I started using Google Apps recently – precisely because no central IT guy can block me from using them. You can script up various automation solutions using a javascript based syntax which is very easy to learn (not as easy as python imo – but not too bad).

      People are starting to come to me at work to ask me to script up solutions for them – simply because I get it done faster (way faster) than going through the central IT folk.

      But the trend is to continue to centralise IT support rather than empowering staff to find their own solutions. Unfortunate.

  10. Mr. Smith says:

    This is a great article. I know just what “defaultism” is like. When you mentioned breaking free of that, I immediately thought about proprietary software. Many useful programs could be made a lot better if users were allowed to tinker with them. The Xbox 360 is a good example of defaultism, too. Many consoles have had hardware failures. What is Microsoft’s advice? “Send it back; we’ll fix it.” Devices like the Xbox and the iPhone are wonderful, but they are intentionally designed to be tamper-resistant. When a car breaks down, many drivers can figure out how to get it running again. When a cellphone or video game console malfunctions, the user can only turn to the manufacturers.

  11. thanks for telling us the utility of programming. useful information for those who are interested in programming.

    • Derek says:

      Naveen – you missed the point! The article is about encouraging those who are *not* interested in programming, but need to learn to get things done in a less manual and constrained manner.

  12. Derek says:

    Great article… I think you also need to post some links to the “Getting Started with Python” tutorials e.g. http://docs.activestate.com/activepython/2.5/easytut/index.html or http://learnpythonthehardway.org/book/ (the introduction alone is worth reading, as a follow-up to this article).

  13. Very beautiful! I love this article.
    Thank you so much.


14 Trackbacks/Pingbacks

  1. Programming as an essential skill « The essence of mathematics is its freedom 11 06 11
  2. Reviews In Depth | How to Learn to Learn Python 16 06 11
  3. Why Everyone Should Learn to Program | Stephan Segraves 07 05 12
  4. SitePoint Podcast #162: Taking Google For A Drive - SitePoint 11 05 12
  5. Judge For Google vs. Oracle Case Is Also A Programmer 17 05 12
  6. Fashionistas (and bureaucrats and journalists): Please learn to code | Dan Nguyen's blog 21 05 12
  7. Learn to scratch your own itch | Khürt.com/blog 23 07 12
  8. ¿Qué lenguaje de programación aprender primero? Noticias 13 09 12
  9. Dormeo Ergo Sum | Learn to code (or script) 01 04 13
  10. Ten websites that teach coding and a bunch of other things | PandoDaily 05 04 13
  11. Ten websites that teach coding and a bunch of other things – via @caleweissman | The IT Melting Pot! 08 04 13
  12. Ten websites that teach coding | Learn.GeraldGuido.com 16 04 13
  13. Wanna be progammer?Go to these websites,I insist | Baireni,बैरेनी 01 07 13
  14. There are Many Reasons to Learn to Program | Educational Alchemy 09 07 13

Leave a Reply