Rice University logo
 
Top blue bar image Comp215: Introduction to Program Design
Dan Wallach and Zoran Budimlić, Fall 2017
 

Welcome, Fall 2018 Students!

 

Welcome to Comp215 for fall 2018. At this web site, you’ll find the course syllabus and schedule. Lecture slides and weekly assignments will appear on Piazza (you’ll be invited to our private Piazza when classes begin). Grades will appear on Canvas. Students who are not enrolled will not be able to do the assignments or participate in the Piazza discussions.

Meanwhile, we often get questions in advance of the class, often from students looking for how they can better prepare themselves.

Laptops

As you probably know, Comp215 will have you do all of your coding in Java, using the latest Java8 language features and the IntelliJ IDEA environment. If you’re using an older, slower laptop, or if you only have a Chromebook, you’re going to need a “real” laptop computer for Comp215. IntelliJ runs just fine on Mac, Windows, and Linux, so we don’t really care which one you use. The exact CPU doesn’t matter much either. IntelliJ works better with at least 4GB of RAM. We recommend 8GB of RAM and a 256GB SSD, giving you sufficient space, plenty of speed, and some robustness against you dropping your computer on the floor. Also, in the past few years several students experienced hardware failures at inopportune times. Make sure you’ve got good warranty coverage on your machine or you’re otherwise prepared to move quickly.

Also of note, our exams will be “open Internet”, which means that the world is your oyster. Make any query to Google, read any thread on StackOverflow, etc. However, we cannot guarantee a power outlet for every student in our exam rooms. You need to be confident that your laptop’s battery can survive three hours of continuous usage. Battery life generally gets worse over time, so make sure your laptop is up to the task.

So what should you buy? You don’t need a top-of-the-line gaming rig. Those are heavy and expensive. Instead, we recommend you get something from the “ultrabook” category. If you like Apple products, a MacBook Air or MacBook Pro will do everything you need; do pay attention to the rumors about when Apple might announce something new. If you prefer PCs, you’ve got tons of choices. Intel’s “8th generation” chips are trickling out over the summer, resulting in some good sales on “7th generation” machines, which still work just fine. Also, AMD processors are both fast and affordable. For example, Dell offers an AMD-based Inspiron 13 7000 2-in-1 for $729 or thereabouts.

If this represents a financial hardship for you, please email us as soon as possible so we can make appropriate arrangements.

If you learned Java in high school

You’re probably good to go. You may have learned to program with Eclipse or some other Java IDE. We’ll be using IntelliJ, because it has a variety of sophisticated features that aren’t available anywhere else. You might want to take some programs that you’ve already written and play around with IntelliJ to get comfortable with it. Or maybe just refresh your memory and follow the instructions below.

If you’ve never written a line of Java code in your life

Don’t panic! While you don’t need to do anything beyond passing the prerequisite Comp classes, a couple hours of advance work over the summer will make your life a lot easier in the fall, since we hit the ground running fast. Luckily, there are some excellent and free online resources to help you from Udacity, edX, Coursera, and more. We recommend CodeAcademy. CodeAcademy’s “Learn Java” tutorial is free, simple, and self-paced, and you don’t have to install any software. (You can optionally pay them money for additional projects. That’s not necessary.)

After you work through CodeAcademy, you might then install IntelliJ and go to the exercises below. If you want to try one of the other MOOCs, go for it, but CodeAcademy seems like the right level of detail.

While you’re at it, play with the Unix command line

We never explicitly teach this in Comp215, but it’s a fantastically useful thing to know. Inside every Mac is Unix, and when you run the Terminal app, you’re talking directly to an old-school Unix command-line shell. It’s also there from the start on every Linux machine. On Windows 10, you can install the Windows Subsystem for Linux or the minimalist MinGW, which is also part of Git for Windows. (We’ll have you install Git For Windows for Comp215.) But what is the command line? How do you learn it? Why should you bother?

Once again, CodeAcademy has a free tutorial. (You can skip the paid parts.) See also the “Learn Enough” Command Line TutorialLinuxCommand.org, or the UNIX Tutorial for Beginners.

Exercises

Feel like you’re ready for Comp215? Want something a little deeper to test yourself? Here you go: two straightforward exercises and a place to look for more:

  • Write a program that implements a Sieve of Eratosthenes and can print all the prime numbers less than some constant (https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes)
  • Write a program that opens a plain text file and counts the number of words within (similar to the Unix “wc” program)

Beyond that, it’s more important for you to work on your skills as a problem solver, regardless of the programming language. If you’ve got the time this summer, we recommend you try tackling the Advent of Code — 25 fun problems each year, some easy and some hard. (It’s something of a contest that doesn’t care about what programming language you use, keeping a leaderboard for who finishes fastest.)

If you already know Python and you’re starting from scratch with Java, you might try implementing solutions to those “advent” problems first in Python then rewriting them later in Java.