I am enrolled in an object oriented programming class at my local community college. The reason I’m here, at age 42, is because I want to learn more about how computers work given my history and interests with technology over the years.
The language we are learning is C++. I was doing OK while plodding through topics like loops, functions, arrays and classes. But when we covered recursion, pointers, vectors, static variables, operator overloading and dynamic memory allocation, fear sunk in. I have to make a constant (and conscious) choice to stay focused on learning the concepts, without being deterred by my lack of programming experience.
What keeps me going is the impact programming is having on my thought processes. My brain is working harder, and maybe just a little better, than before.
But why?
There are programming practices that make a lot of sense, to the point they could be applied outside the scope of the class. For example:
Readability: Formatting your code so that it’s readable by others (and yourself) means that you need to be detail oriented. Indenting consistently, assigning sensible names to variables, remembering to include all necessary syntax, and taking time to comment sections of your code that need explanation, all help to create a solid program. This means you need to be fully present while programming, paying attention to details that make the program work. Note: Being “fully present” and “paying attention to detail” are key characteristics in LIFE!
Reuse: The more code, the more chance for errors. If there is a process that needs to be executed ten contiguous, consecutive times, writing a loop is a better choice than rewriting the same code ten times. Being efficient, or finding the shortest and most direct path, can reduce the probability for error. How can I write in two lines of code instead of twenty lines of code? Note: Asking “how can I do it better” builds quality in LIFE!
Abstraction: Creating concepts from perceptions, data and ideas is a way of thinking. You take input, organize it, prioritize it, draw a conclusion about it, and put it into some sort of bucket or category so that you can understand it and move on. This is my personal definition of abstraction, but ironically, I never thought much about it. I just thought. I didn’t think about HOW I was thinking.
So for example, above, when I mention programming concepts that instill fear, I have two choices. I can let fear overpower me, or I can use abstraction. By using abstraction, I can refine my thinking and put those fears into a bucket, categorize them as a necessary evil in learning to program, and tag them with patience and confidence and hard work. I can look at them from afar, and take control. This mindset increases the likelihood of learning to move on and tackle the next problem. Note: Choosing to think is necessary to solving the social, economic, and environmental problems facing us in LIFE!
Making a choice to publish this post was not a simple one. It is an admission of being a novice in a world of experts. So while writing, I did basic research on “computational thinking” to substantiate my claims. A quote from Carnegie Mellon is worth pointing out, because it emphasizes the relationship with our educational systems:
“Computer science is not computer programming. Thinking like a computer scientist means more than being able to program a computer. It requires thinking at multiple levels of abstraction. …
Professors of computer science should teach a course called “Ways to Think Like a Computer Scientist” to college freshmen, making it available to non-majors, not just to computer science majors. We should expose pre-college students to computational methods and models. Rather than bemoan the decline of interest in computer science or the decline in funding for research in computer science, we should look to inspire the public’s interest in the intellectual adventure of the field. We’ll thus spread the joy, awe, and power of computer science, aiming to make computational thinking commonplace.” — Jeanette Wing | Computer Science Dept. | Carnegie Mellon
Continuing my search, I found that Google has a viewpoint on computational thinking as well:
“Exploring Computational Thinking: Google is committed to promoting computational thinking throughout the K-12 curriculum to support student learning and expose everyone to this 21st century skill.” — link here, which includes K12 curriculum and educator resources: https://www.google.com/edu/computational-thinking/.
Now it’s time for me to dive back into my programming book and wrestle with some computational thought. Until next time.
A great introduction to programming are two MOOCs on Coursera, Learn to Program: the Fundamentals, and Learn to Program: Crafting Quality Code. I work with the faculty members teaching that course, who are colleagues of mine here at the University of Toronto, and they are both fantastic! The courses use Python, which we think is a very good introductory computing language: relatively little linguistic bureaucracy, and generally very useful for both little and big programming projects. While I imagine these MOOCs go over some of the same ground as your C++ course, albeit using a different language, you will almost certainly find them helpful. And you’ll find Python more immediately relevant for writing for the web than C++, which is more typically used for writing operating systems (e.g. much of Microsoft Windows is written in C++, and also C, C#, and x86 assembler).
Thank you for weighing in on the topic, John DiMarco, and for the course tips on learning to program. The more material and perspectives, in some ways, the better for a beginner because it helps in “reviewing” certain topics. I find a lot of review helps the concepts sink in. –Lorraine