Everyone Can Code

I stopped at a gas station that I frequent today and one of the regular attendants greeted me (I live in Oregon, where they don’t trust us with gas). This time however, he studied me a little closer, looked my car over, and finally back at me to say…

“I gotta ask, how… what do you do?”

“I’m a Computer Engineer” I said.

“Oh, yeah… That makes sense” the attendant responded, as if that made everything clear.

He asked me a few more questions about how old I am, if I had to go to school for my job, if I enjoy my work. He had the impression that coding is difficult and made it sound like it was something he couldn’t do. I tried to encourage him that it’s a very approachable profession, but he didn’t take me very seriously.

This is not the first time that I’ve met someone who thought of computers as something too mysterious to understand. I find these scenarios disheartening for two reasons:

  1. Code is everywhere. If you drive a car, talk on a phone, watch TV, use a microwave, even walk through a door that automatically opens, you are a consumer of code.
  2. Code does not have to be hard. Even the most complex systems are collections of small, precise, units of logic put in place one at a time.

In fact, every mother knows how to code…

“I’m going to count down from 3 and if you don’t drop that ball and come inside, you’re grounded!”

Just for fun, let’s look at what the code of this threatening mother might look like in say… Ruby

while count > 0
    if not child.is_holding_ball and child.is_inside
        puts "Thank you. Now go clean up for dinner."
        count = count - 1
        say "#{count + 1}..."
        sleep 1

child.ground if count == 0

 Code is Everywhere!

It’s almost impossible to get through a day without using a device that runs code. As our interaction with these devices increases, it’s important that we understand what they do to a reasonable degree. I think Mitch Resnick describes the situation best by relating coding to reading and writing. He points out that we all learn to read and write in order to express ourselves and our ideas fluently, but we don’t all become professional writers. In the same way, we should all learn to code in order to be fluent in the use of our technology.

Resnick’s TED Talk is a worthwhile watch: Let’s teach kids to code

Code Does Not Have to be Hard

For as many devices that use code, there are probably just as many ways to learn how to code. You don’t have to look any further than your favorite web browser to find a plethora of information on any language as well as in-browser coding environments to try what you learn. Below is just a small list of sites that I have found useful in learning many different languages. Many of these references are entry-points to learning, meaning little to no experience is necessary to try it out!

Beginner Resources

If you are just getting interested in coding, here are some really great places to start.

⇒ Try Ruby – Fun and interactive way to learn Ruby.

Ruby is a high level scripting language that I’ve used in web design / database abstraction, desktop applications (even with GUIs), and even on a low-power embedded system.

⇒ MIT Scratch – Graphical coding engine

I first heard about this from a co-worker who’s kid (around 6-7 years old) was creating a game and he said I had to check it out. To be honest, I easily spent a few hours playing with this and eventually creating a simple variation of Breakout.

⇒ Code.org – Non-profit organization that brings coding and science to schools

I linked to their Studio where there are some pretty great introductions to coding. If you’ve never coded or are not even sure what it means to write code, this is a great starting point! They break down the concepts and relate them to games and movies that kids and adults can relate to.

Next Steps Resources

If you are familiar and looking to learn a new language or brush up on some syntax, these are the sites I frequent

⇒ W3 Schools – Everything you need to know about the key technologies behind web pages

I always have a tab open to W3 Schools when I’m working on a web site. I can quickly confirm HTML tags and CSS syntax, even look up some obscure JavaScript (though a part of me dies each time I have to deal with JavaScript…). The best part is their “Try it Yourself >> ” feature, where you can experiment and see the results quickly in your browser.

⇒ repl.it – In-browser code executor

Repl offers you a file-like place to type, a terminal, and a run button… The rest is up to you. If you’ve ever found yourself needing to write just a little code, but don’t have a coding environment setup (IDE, compiler, interpreter, etc), Repl offers a light-weight space to execute code. I actually found this site while writing this post and found it so useful that I bookmarked it, told a bunch of coworkers, and intend to return to it many times.

⇒ Cplusplus.com – The most complete reference (I’ve found) to C++

To this day, C++ is still my most used language. It’s what I used all through school and C/C++ is still the most used language for embedded systems. For as long as I’ve used the language, I routinely need to look up specific API’s, what version of the standard they were introduced, and what files I need to include.

 Go Forth and Code

Computers have never been more accessible than they are right now. You can buy a full computer for $25 and a lifetime’s worth of information is just a click away!

Posted in Uncategorized.