Programming can be tough. Real tough. Everybody knows this, even if they haven’t tried. So it can be extremely intimidating going into you’re fist few programming courses if you’ve never learned how to write code before. But don’t worry – I’m going to give you some tips to help relieve that anxiety, and help you become a great programmer by the end of the foundation building, CS 1101, Programming Fundamentals.
The Programming Fundamentals Survival Guide
You can think of this as a sort of “survival guide” to the course. However Programming Fundamentals is an important course to focus on, and rather than simply survive it and pass, you should try to flourish in it. For many students it’s your first time writing a line of code, and on your track to a degree in CS, you’ll write many thousands. So it’s important to understand the most basic principles introduced in this course, and develop good habits right away – before you find yourself overwhelmed by the much more challenging courses to come.
Throughout this course you will be stumped. You’ll get frustrated because something won’t work the way you think it should. It’s likely you will spend a lot more time on assignments than you thought you would, all because of a tiny little error in your program that you didn’t see until the 100th time reading each character. This is where the concept of “debugging” is going to be very important.
Debugging
Debugging is the process of finding, and correcting errors in a program. In the course you’ll learn all about it, and you’ll learn a few tricks to help make the process easier too. Pay close attention to these lessons, and make sure you know and understand them well. Debugging is what you’ll be doing for the rest of your career as a programmer. In fact you’ll be spending more time figuring out why something doesn’t work, than actually making things work!
One quick-tip for debugging, is to understand what the program is doing, rather than understand what it’s not doing. It’s this change in mindset that often leads to a “Erika!” moment, and you suddenly understand what needs to change. But when you are really stuck, and I mean really stuck, there is another approach to solving problems in your code.
This is where the “Read-Search-Ask” methodology becomes very important practice. This is used when there is something you’re not understanding about a particular section in your code (or someone else’s). Maybe you don’t understand what this line means:
print("Hello, World")
In fact, if you’re an absolute beginner, you definitely don’t know what that means! And that’s OK, you’ll learn in your fist day at Programming Fundamentals. However, maybe what you read in the text book doesn’t make sense. So you’ve done the first step, read, now it’s time to search.
Try using a search engine to find a better explanation for what ever it is you’re trying to understand. There are a ton of great resources on the internet such as videos, articles, tutorials, and even interactive tutorials that can really help for visual learners like myself. Really do your research, and if you can’t find the answer you’re looking for – ask.
This last step often leads to finding the answer on your own before you even finish asking your question, but where do you ask in the first place?
The answer to that question, is stackoverflow.com. Stop reading this article and go create an account there now – seriously. This website is going to be where you find the majority of answers to any questions you have, but if you really can’t find the answer you’re looking for, AND you completed the first two steps of the, Read-Search-Ask methodology, then this is where you’ll want to ask you’re question.
How to ask a good question
Asking good questions as a programmer is a very important skill. The better you can communicate your problem, the better other people can help you. But there is another benefit in the process as well. The more you take the time to articulate your problem in a way that other people will understand, the more likely you are to solve the problem yourself before ever asking the question in the first place.
This is another approach to debugging your code. Think about how you might ask someone else for help, and by articulating your thoughts in a coherent way, you will likely come up with a solution.
So how do you ask a good question, what is the process?
The first two steps are the same as the Read-Search-Ask methodology. You must understand the problem as best as you can. After that, once you start thinking about the question, you should think about what it is you expect your code to do, vs what it’s actually doing.
So something like, “I expect my program to do this… but it does this other thing instead”. It’s more complicated than that sentence of course – but that’s the basics.
What you’ll want to do, is describe your expected results in as much detail as possible while remaining concise and simple. Then follow up with a detailed explanation of what actually happens when you run your program. The last part of your question, should be a description of what you’ve tried – often including actual source code from your project.
The last part – describing what you’ve tried – is the most important part. It’s where you’re most likely going to discover what you did wrong. It’s also key in asking a good question that will be well received from the stack overflow community, in the case that you don’t solve your problem.
So with a bit of practice, and self-motivation, you’ll become an expert at solving any problem you come across in your program. And this is exactly what you’re going to be working on for the rest of your life – problem solving. The way you get good at solving problems is simply through practice. Which brings to my next set of tips – where and how to practice.
Practice
I heard once that a monk said, “I do not fear the man who can throw ten thousand punches, but I am deathly afraid of the man who has thrown one punch, ten thousand times.”
So in other words, it’s not very impressive if you know ten thousand things, but it’s really impressive if you know one thing, that you’ve practiced ten thousand times.
This will prove to be exceptionally true in programming. It’s going to be very easy to learn one thing, then move on to the next, and the next, and so forth. But in reality, if you move too fast, you’ll have forgotten most of what you learned in the beginning.
To remedy this condition, it’s very essential to work on the most primitive skills, and develop them constantly through practice. So, where and how do you get practice?
It’s as simple as challenging yourself to complete any task, simple or large. For a beginner it can be as simple as getting any program to actually run, and perhaps making the computer say something like “Hello, World”.
After the first time you execute a simple program, it seems easy, and it doesn’t seem like you’ll forget how to do it the next time. But believe me it happens. So everyday, pick a challenge for yourself and see how fast or efficiently you can complete the task. You don’t even have to invent your own challenges, there are a ton of ways to get practice on the internet these days.
One website that I have quickly fallen in love with is called codingame.com. It’s an amazing website that allows you to write code, in many different languages, including the language you will be using in Programming Fundamentals (which is called, Python). The website features challenges that range in difficulty from, easy, to expert.
As a complete beginner, even the first challenge will be hard, and you might have to wait until you are a week into the Programming Fundamentals course before you can take an honest stab at it. But even just reading the challenge, and trying to solve it everyday is going to help you become a better problem solver, and thus, a better programmer.
There are also what’s called “clashes” over at Codin Game, and they are nice short puzzles, which are timed, and you are competing against other coders live. It’s intimidating to first try it out, but you really have nothing to loose. This simple competition will get you familiar with the language you learn in the course (Python).
Another nice website for practice is called, coderbyte.com. The challenges here, are much, much easier – at least the early challenges are. So, this is where I suggest you start. Try everyday to spend at least 10-20 minutes solving a challenge or two. The constant practice is going to make you feel more confident in your abilities, and each week when you get a new programming assignment, you’ll find it easier and easier to complete them.
What you should focus on
Programming Fundamentals covers a lot of information, and so it can be difficult deciding what’s most important to retain, and what information is less valuable. The key, like any other course at UoPeople I’ve taken so far, is to keep the learning objectives handy at all times. Write them down, and hang ’em on the wall if you must – just make sure they are in your head at all times.
However, I’m going to give you more advice then that. In this course, the main thing you are going to be learning is a programming language called, Python. I suggest in preparation for the course, that you look into how to install python – here.
This is a simple procedure, but you might run into trouble during the process, and it could take longer than you anticipate. The last thing you want is to burn an hour or two of your first week, just getting the programming language to run on your computer. Once you have python installed, you can decide what to do next – either look up some beginner tutorials, or simply wait until the course begins.
Once the course starts, you’ll be asked to learn about a lot of different things. One is learning the commands of the Python language – this is known as syntax. This will be your first hurdle, but there will be another much more important challenge, which is understanding the semantics of the language. The semantics is the meaning of the code you are writing. Understanding the meaning of code, and what it’s doing is far more important than memorizing the syntax of the code (the way it looks in that particular language).
Make sure that you focus on understanding the meaning of the code you write, rather than just memorizing how it is written. Understanding semantics is a skill that’s going to transfer over to all other languages, such as Java, which you’ll learn in Programming 1.
Other than a list of resources I’d like to provide you, that pretty much covers any advice I’d like to give to future students of CS 1101. For those who are nervous about it, don’t be. The course can be challenging at times, but there is a great community of students here at UoPeople to reach out to. If you get stuck, don’t be afraid to ask for help.
Good luck, and here’s some links that might help you out!
Helpful Resources
Here are some resources that will come in handy while taking Programming Fundamentals.
Codecademy – This first one, will prove to be a useful resource for many courses at UoPeople, Programming Fundamentals included. Try out the Python course to help you understand what’s going on in the course. It’s also worth trying this course before you even begin your class:
https://www.codecademy.com/learn/python
How to Think Like a Computer Scientist – Next, I should probably include a link to the actual text book you’ll be using in class. Even more useful, is the fact that the text book has been made interactive! I’ll include links to both:
[PDF] – http://www.greenteapress.com/thinkpython/thinkCSpy.pdf
[Interactive] – http://interactivepython.org/runestone/static/thinkcspy/index.html
Stack Overflow – I mentioned this in the post above, but here’s the link again. (It’s that important!):
http://stackoverflow.com/
Master your search engine – If you want to master the read-search-ask methodology, you’re going to need to be proficient in at least one search engine. Here’s a ” 20 tips article” on how to use Google more effectively:
http://www.lifehack.org/articles/technology/20-tips-use-google-search-efficiently.html
Lightbot – This is a fun game that you can play, which teaches you how to think like a programmer.
http://lightbot.com/hour-of-code-2015-flash.html