Error Message (2)

Error Message (1)

How do you make a cheese sandwich?

– Find two slices of bread.

– Place a slice or two of cheese on one of the slices of bread.

– Make sure the cheese is sliced and not string cheese.

– Put the two slices of bread together.

Congratulations! You’re officially a programmer… well, sort of. But before you rejoice, let me backtrack before I lead to any further confusion.

This past Tuesday, HT editor-in-chief, Anna Mendelson ’13, and I attended our second General Assembly workshop, titled “Programming for Non-Programmers: Fundamentals.”

After walking into the GA building for the second time in one week, the first thing we asked the lady at the check-in desk was, “Do you know if there’s a dinner break?” It was, after all, a workshop from 6pm – 10pm. When we heard the dismal “No,” Anna and I glanced at each other, disheartened. We proceeded to ask, “It’s just four straight hours?” “Yes.” At that point we weren’t sure what we had gotten ourselves into, but after running out to get food during a five minute break and successfully returning within the time constraints (Mr. Nauman, I hope you’ll forgive us for eating and computing simultaneously; there was no other choice), we were eager to find out.

According to our instructor, Chris Castiglione, web developer and WordPress expert extraordinaire, programming is defined as “a set of instructions used to solve a problem.” The new ClassObjects were to be able to think like developers, to understand different tools in the realm of computer programming, and to understand our constraints. The big question we were targeting was, how do I communicate an idea from my head to a computer?

Programming makes the transformation of a human idea to a computer–friendly command possible. Here’s another example to add to the definition. As we were given an introduction to programming, Chris asked us to explain to him (a robot in this scenario) how he could make his way to a nearby Barnes and Noble. Tom, a fellow PFNP attendee, said:

1. Stand up.
2. Shift your body 35 degrees.
3. Walk 15 yards to the door.
4. Walk through the door.
5. Shift body 90 degrees.
6. Walk 30 yards to the foyer of the lobby.
7. Shift body 90 degrees.
8. Walk to the lift. (Tom is Australian)
9. Press the button “G”.

As you can C(++), this is a pretty clear set of instructions. But with programming, you can’t assume the computer knows what “walk” or “shift” means; you have to define it. Computers aren’t so smart after all, huh? Someone a little more experienced might give a different rendition. Here’s Anna’s version, similar to mine:

1 walk() {
2    while not there{
3        step();
4        if the distance b/t you and Barnes & Noble > 0, you’re not there
5        if the distance b/t you and Barnes & Noble = 0, you’re there
6    }
7 }
8 step() {
9    for each leg {
10      extend at knee
11       while foot is above ground {
12           lower at hip
13        }
14    }
15}

Programming is not simply a set of instructions, though. What really matters is how those instructions are writtenthe grammar, if you will. Just like it would be harder for you to read this without any grammatical structure, a computer can’t take in any information that’s not “grammatically correct.” On the web, it’s about fitting together nouns (HTML), adjectives (CSS), and verbs (JavaScript). 

We learned more vocabulary to expand our technical lexicon, had two mini, collaborative pop quizzes, and started coding in terms of front-end development, to ultimately improve our int elligence. Nearly 200 slides and four and a half hours later (the workshop was originally supposed to be four hours long, but it was extended 30 minutes due to various syntactical conversations and questions [and was extended an additional 30 minutes {at minimum} due to a late-night Eataly gelato {and espresso… and Love Panel food |yes, now I’m making up my own syntax to compensate for my seemingly unnecessary digressions| } run] ), the night was finished and I was left to reflect on what I had sat through that night, while listening, twirling my pen, thinking, refreshing, debugging, coding, tapping my leg, and munching. And the beauty of the workshop is that it wasn’t solely for web developers, and definitely not just for fledgling high school programmers like us. It was designed for people with ideas in the works or in their heads — dreamers, and also people who want to “speak tech” with their developers.

I hope now that you can digest a little more easily what computer programming is, and that you can’t wait to begin your new life as a programmer. If I haven’t convinced you, maybe Chris can:

Now, you may be asking, why does all of this matter? This why is exactly what has been running through my mind since the General Assembly workshop.

As technology becomes increasingly ingrained in our lives, we can choose either to be a part of IT and to understand it, or to be consumers, consumed by technology. To program or not to program; that is the question… I think that’s how it goes, right? The skill of programming, or at least the skill of being able to understand what it is, gives you an abstract understanding of how things work.

Being able to write your own code provides you with much more freedom to create and to imagine–what restricts you is you, not the computer. Takeaways from coding aren’t just being able to write code. You obtain skills of thinking creatively, learning systematically, and working collaboratively. It gives you the means to take microscopic ideas and transform them into complex programs, and to take complex programs and transform them into microscopic parts.

I think the reason why a lot of people don’t venture into computer programming is what it can seem like from an outside perspective. Before I knew anything about programming, I never thought I’d like it. Most people, as I did, have the perception that all programming is like this:

Code from my index.html page.
Code from my index.html page

And yes, it can look like that (and can get much more foreign-looking, I promise). But it doesn’t have to! Being a programmer can mean making a big puzzle fit together, like with MIT’s Scratch software.

Also, learning to program makes you realize (spoiler alert:) computers aren’t as smart as we think. They depend on us! These machines are really just extraordinarily fast dummies that aimlessly execute a set of orders written by people–real, fallible human beings! That should make you feel better.

Finally, and maybe most importantly, code literacy and the process of learning it forces you to be persistent and persevere. There will be failures. There will be crashes and unexpected tokens and compilation errors. But whose fault is it? Here’s permission to blame technology. Will you blame the computer? Will you call it names? Yes. Will you sometimes want to destroy the computer? Yes. “How could you do this to me?” you will ask it in vain (try to remember that computers are inanimate). But the feeling of successfully making a program, free of bugs, is like no other.

When you see The Hewitt Times, you may not think much of what’s behind it. But seeing the back-end of the site–sifting through a seemingly endless CSS code-filled style sheet (for my own fascination, yes) to find how our theme is constructed, for example, lets you appreciate the various hows of the site. After monotonously typing the HTML code for many, many hearts on either side of “[insert name here] & The Love Panel,” reformatting 114 blockquotes, and restoring the Ed-Vice column multiple times within an hour, begging your math teacher to let you have some time to do so (well worth the 2 minutes; thanks, Ms. Kornblatt), it is all truly worth it when you open the Google Analytics dashboard on your iPhone and see a 344% increase in the number of page views. That verifies your hard work. Technology can do that.

2 Replies to “Learning to Code, Coding to Learn”

  1. This is such a wonderful post I forgive you for eating while computing. I even learned something new–the analogy of CSS, HTML, and JavaScript to adjectives, nouns, and verbs is a nice one.

Leave a Reply