Challenges

Getting Started With Computer Science

Keenan Ganz
bees
From Launchpad 2019

Hello, World!

This post is part of an ongoing series of CS challenges. Check back to keep learning!

So, you want to learn how to code. But, how do you get started? What language do you want to learn? What do you want to make? Fortunately, these questions are a lot easier than they seem. This guide will show you some quick and easy ways to get started on your first programs.

What Language?

Programming languages are like tools in a workshop; no language is inherently better than another. But, programming languages are designed with specific purposes in mind. For example, JavaScript is used almost exclusively in websites, whereas Python is a general purpose language (side note: Java is very different from JavaScript!).

It is important to note that generally the more specialized a language is, the more unconventional its design will be. So, it is usually best to pick a general purpose, easy to use language for your first jump into computer science. My personal favorite is Python, but if you're in high school and thinking of taking AP Computer Science, that course is taught in Java. For pretty much everyone, one of those two will be just fine.

Tools of the Trade

How do you go from a blank screen to typing code? If you don't have your own computer, there are plenty of online resources available to get a taste of CS.

Method 1: Online Classes

Using an online course is a great way to remotely learn CS for free from highly reputable universities and organizations. Just to name a few:

These are called Massive Open Online Courses, or MOOCs. Most of the time they are free to enroll, but your work won't be graded unless you pay. The course will have instructions on how to get your programming environment up and running. From there, you can work through the material at your own pace.

Method 2: Online IDEs

An Integrated Development Environment, or IDE, is a computer program that you use to write code. It's sort of like how you would use a program like Word to write an essay. They consist of a text editor, where you type your program, and a console where the output will be shown. Some websites offer IDEs that live in your web browser, so you don't have to worry about installing software or getting bogged down by technical settings. One of our favorite online IDEs is repl.it. As soon as you open the page, click on `new repl` in the top right corner. Don't worry about making an account for now, you can do so later if you want to save your work.

Then, select the language you want to learn. We will use Python for this example.

Once the repl is created, you should see a screen that looks like this:

Voila! You can now type code into the editor, click the run button at the top of the screen, and see the results in the console!

Method 3: Setting Up Your Own IDE

If you have some experience and want to have greater control over your programming environment, you can set up your development tools on your own computer so you can work without an Internet connection. Depending on what language you use, different IDEs may be easier to use. If you are setting up a development environment for a class, your school will probably tell you what to use and how to get it up and running. Otherwise, my personal favorite editor is Visual Studio Code. VSCode is totally free and has a variety of plugins for all sorts of tools. An excellent tutorial for setting up Python within VSCode is available here. There are other IDEs specially designed to work with Python. For example, you may prefer Spyder or PyCharm.

What to Code?

It can be very difficult to identify a project you want to make if this is your first time programming. You may have some lofty goals you want to work towards, but for now it is probably best to start with a class or tutorial and work your way up from there. In addition to the classes mentioned above, there are plenty of books available for free about Python and thousands of YouTube tutorials. Michele Pratusevich compiled an excellent set of beginner exercises (with solutions!) at practicepython.org.

Once you get some experience, there are many websites chock full of fun programming exercises. One of my favorites is The Code Abbey. Others designed for technical interview preparation include Hackerrank and Leetcode.

As you continue on your computer science journey, your ideas and projects will become more complex. It can get easy to become overwhelmed. We highly recommend making a github account to conveniently store (and backup!) your projects. Remember that there are a couple of ways to make a hard code problem easier:

1. Break large problems into smaller, manageable pieces. Can you combine several solutions into one?

2. If you're struggling to think of a solution that works all the time, can you make one that works for the easy cases? Do you see a pattern to make a general solution?

3. Most of the time, someone has had the same problem that you are having. Google is your friend; searching for error messages is a great way to see what went wrong and how to fix it.

If you have any questions, feel free to send me an email. My address is my last name + the first letter of my first name [at] rpi [dot] edu.

Happy coding!

© 2022 coding&&community
Navigation
ProgramsWork With UsTeamBlog