Why programming?

Every time I mention to someone that I believe all students should have some exposure to the fundamentals of programming, I keep getting the same question:  “Why would I need learn how to program?”  This is a sane response, but the conversation after that often highlights many of the misconceptions about programming and computer literacy topics.  I don’t find it cute when people, particularly woman, express their disinterest in developing computing literacy skills with pride. But that’s a post for another time.  

I’m not going to try and romanticize the idea of coding and programming as some glorious state of being everyone should experience, but I will say that it is a skill everyone should have exposure to.  We all learn how to change tires and open up the hood of our cars not because our parents and teachers think we should be car mechanics, but because a car is a tool we often use on a daily basis and should know a little something about.  Programming and computers are no different.

Before we get started, let’s make a note of what I have and have not said here.  I have not said that all students should learn to be programmers.  That would be annoying and impractical.  What I did say is that all students should have exposure to the fundamentals.   There is a huge difference between these two concepts.  Being a skilled professional programmer requires many years of experience and a lot of education.  Having experience with the basic framework allows you to see how programming tools may be of use.

Let’s look at an example to explore why even understanding the basics can significantly benefit someone.

The other day I was playing Pokémon, and an old man by the sea told me he had given me the power to read the text on some ancient underwater ruins. I am a dutiful servant to the NPCs, so off I went.  I typed up all the messages I found, but it turned out to all look like gibberish.  The old man lied!  Except not.  When I went back, he told me “Oh ya, they read right to left.”  Thanks, bro.

So there are a few reactions a player can have here, ranging from:

  •  “I can read all the things backwards!”
  •  “Okay, I’ll write up or type all the messages starting from the end.”
  •  “I know how to print text backwards in Python.”

Now, try to imagine this scenario happening not in a video game, but in a research lab.  Instead of trying to read backwards text from fictional ancient ruins, imagine that your data came in backwards or garbled in some formulaic way.  Oh, and you have approximately 100,000+ data points. How would you resolve this situation without the ability to program?  Sure, your department may have a go-to person for programming stuff, or you may have access to an army of research assistants who could manually go through the data and make the corrections.  But are those optimal solutions?

Exposure to programming concepts opens up access to that third reaction.  Instead of visualizing a room full of undergrads trying to manually fix the errors, you can say to yourself “I’ll google how to do that in (whatever language you may be familiar with).”

And this is the core of my argument.  We are no longer living in an era where you have to be a professional programmer to do basic programming tasks.  Without having the exposure to what is possible to do with computers, people will be limited in their options for solutions.  My hope for students of the humanities is to give them the ability to recognize when programmatic tools should be used, and the skills to find and implement whatever solutions they may need.

Many other bloggers out there have explored this topic, and I feel like the best general answer is “Why do you want to limit yourself?”  Particularly because the entry into basic understanding an be completed with <10 hours of exposure.

Python Confessions

Books that advertise teaching you anything in some short time frame can be misleading. There are very few things where it really only takes a few minutes and a few tries at to learn. Even learning how to change a flat tire on your bike takes practice. So when books about programming advertise that they can teach it to you in a day, I’m super skeptical. Learning any new language, human or computer, takes time and practice. Even those who are trying to encourage students to start learning and keep up with it will use these statements like “Python is so easy!”, “I picked it up in just a few hours.”, etc.

Let’s have a little confession time here:

  • It took about 20 hours of exposure to the Python syntax before I really felt like I wasn’t blindly throwing code into my document. This, however, does not mean that I had “learned” python.
  • I have cried over code.
  • I have spent hours working on stuff that ended up being three lines of code.
  • There is documentation that I still don’t understand.

Thus, I feel like the following things must be said:

  1. You don’t have to know or do any crazy math stuff to learn how to code.  Search out learning materials not centered around math if that isn’t your thing.  That being said, eventually you will have to deal with numbers.  But trust me, it’ll be fine.
  2. I like math better now after learning how to program.
  3. Just like learning any other language: learning the vocabulary will be easy, but learning how to write or speak in coherent statements takes practice.
  4. There is no universal learning tool. Try everything and figure out what works for you.
  5. There are people who really want you to succeed and will be happy to help. But the rule of the internet still stands: some people are jerks. Don’t be discouraged. Seek out a supportive community.
  6. Hours of fighting against code that doesn’t work can often be the best method of learning.
  7. It will be hard.
  8. It will get easier.

Any other words of wisdom?  I’ll keep this list updated as I learn and fail with my adventures in Python.