OSU eCampus CS325 Analysis of Algorithms review & recap

This post is part of an ongoing series recapping my experience in Oregon State University’s eCampus (online) post-baccalaureate Computer Science degree program. You can learn more about the program here.

Six-word summary: brutally difficult, but it’s over now!

CS325 – it me

In CS325 you’ll study recurrences, asymptotic bounds, probably every major sorting algorithm plus some silly ones, dynamic programming, graph traversal, recursion, linear programs, and more.

CS325 Review

Well, the rumors are true – this class is hard. I’d place it in a tie with CS162 for overall difficulty. But where CS162 tries to kill you with a brutal workload, CS325 tries to kills you with instructional materials that don’t adequately prepare you for the homework or the exams.

The lectures are not sufficient preparation for the homework – you’ll rely on YouTube and Stack Overflow to get through each homework question. The weekly homework assignments are time-consuming and the documents you prepare are long. Mine were anywhere from 5-15 pages of graphs, pseudocode, and written explanations for my work.

If you can take CS325 by itself, you should.

There was a noticeable (and distressing) disconnect between what was on the homework and what was on the exams. I scored 100% on the homework assignments, but failed the midterm. It’s like the homework and exams were from different classes!

A week or so after the midterm was graded it was opened up so students could see which questions they got wrong and dispute wrong answers, if they could prove they had it right. I thought for sure I’d prove the TAs wrong on at least one or two of mine, so I reworked all of my incorrect answers – and reworked and reworked them – until I eventually figured out what subtle thing I missed while taking the test.

I definitely struggled in this class, and for the first time I wondered if I even belonged in this CS program.

Class structure

  • 10 weeks
  • 7 assignments total
  • Group work: weekly graded discussions on Canvas, a 3-person group project the last two weeks of the quarter
  • Proctored midterm (20% of final grade), proctored final (20% of final grade)
  • No homework assignment the week leading into the midterm
  • No homework assignment once the group project at the end begins
  • You can bring a 8.5″ x 11″ sheet of typed notes (size 6 font!) into the midterm and the final with you

Tips for CS325

Take every extra credit opportunity (they’re rarer than you think). There was an extra credit opportunity on the first homework, but there wasn’t another opportunity until the last homework!

Comment early, often, and be helpful in the Canvas discussions. There’s an opportunity for 1 point of extra credit in each of these weekly discussions. I was able to earn it most weeks by doing all of the following:

  • As soon as the discussion thread was available, I “structured” the discussion by creating a series of replies, one for each homework question. In each reply, I posted the contents of the homework question for easy reference. This gave each homework question its own thread for my group mates to use.
  • When I figured something out on the homework, I posted pseudocode or a “how I approached this problem” guide to the Canvas discussion to help others. I spent easily 1-4 hours on creating this type of “tutorial”, every single week.
  • I started the homework right away. On Sunday I did the lectures, on Monday I did question 1, Tuesday I did question 2, etc. By midweek, I had half the homework done and was able to assist with answering questions from group members just starting theirs.

This was a ton of extra work. I see why people blew off the Canvas discussions. But the discussions did two key things for me:

  1. It helped my understanding of the various topics to revisit them and “teach” them to others
  2. The extra credit helped me squeak by with a 92.58% in this class, which got rounded up to a 93% (the cutoff for an A). I needed every. single. point. I could get.

Study recursion – put it on your exam sheet! A lot of the class’s materials (lectures, book reading, and homework) will “gloss over” recursive solutions to problems. They’ll be like, “this is the slow way to do it with recursion, now here’s the better way to do it with <the technique of the week>”.

You might be tricked into thinking the exam will want you to know the fancy technique – you’d be wrong. The midterm will expect you to produce the recursive solutions, which you won’t code for the homework or even look at past the few minutes they get in each lecture. I thought this was unfair of the class, so that’s my tip to future CS325 students: study the recursive solutions. Put them on your “cheat sheet”. Know them inside and out!

The extra credit competition among the final project groups is a poorly-designed zero-sum game that you have almost no chance of winning. Here’s how it works: 60+ groups implement algorithm(s) to solve a given problem in as little time as possible, then post their best running times to a Canvas thread. The assignment won’t tell you what “good” times look like – you’ll figure that out by looking at results that trickle in from the other groups. The winner is whichever group (or groups) has the best performance times in the two different categories.

I think this competition could be made better by awarding extra credit to any (and all) groups that can pass a certain benchmark, since that’s hard enough on its own. My group picked difficult-to-implement but highly performant algorithms and did our work in C++ and we still lost to multiple other groups by a little bit. Unless you’re super dying for that extra credit, I think the winning move here is not to play. Take the time you’d spend optimizing your final project towards an unknown goal and spend it studying for the final instead.

The book sucks. (This is the book.) Okay, maybe the book doesn’t suck, but it doesn’t map nicely to the class material and it won’t walk you through how to solve the kinds of problems you’ll face in the homework. I think the teacher requires this book just for the sake of requiring a book.

You’ll need the power of Google (and YouTube and Stack Overflow) to uncover how-to’s and guides for actually solving problems. I still did the readings every week, just in case something useful turned up, but the book is more like an introduction to the topic, not a guide. I relied almost 100% on external resources to actually learn this class’s material.

There are better videos and walk-throughs for every topic this class covers on YouTube and people’s blogs. Seek them out! There are people who recorded themselves going step by step through real problems pertaining to topics like recurrences and dynamic programming in ways the class-provided lecture videos do not. I owe my A in this class to the generous people of YouTube who took the time to demonstrate these difficult topics.

More than any other class before it, CS325 requires self-teaching and finding help on your own. Whether that experience is worth $1900 is left as an exercise to the reader – there is, of course, the argument that self-teaching is what you’ll do on the job so you might as well get used to it, but there’s also the argument that $1900 ought to buy you at least a little bit of hand-holding.

I’ll be in two classes next quarter: CS271 (Assembly and Architecture) and CS361 (Software Engineering I), so say hi if you’re in either of those with me!

OSU eCampus CS161 Intro to Computer Science review & recap

This post is part of an ongoing series recapping my experience in Oregon State University’s eCampus (online) post-baccalaureate Computer Science degree program. You can learn more about the program here.

With my successful completion of CS161, I am now 1/16th of the way to a Computer Science degree! Despite being labeled an “intro to CS” course, this class wasn’t a walk in the park – the two exams (worth 60% of the grade) were the tough part.

CS161 syllabus, topics

My CS161 was taught by Tim Alcon. He was remarkably responsive on the class forum (“Piazza”) and over email. There were something like 200+ students in the class, though, so assignment grading was done by a group of teacher assistants (TAs).

Syllabus: CS161 syllabus

Topics covered:

  • Introduction to C++ language
  • variables
  • methods
  • arrays
  • passing data into methods
  • data types
  • while loops, for loops
  • memory management (introduction)
  • pointers
  • object-oriented program structure
  • good coding style (comments, naming)

If you’re a prospective student reading this and these topics are all brand new to you, you should get familiar with them prior to the class. The class moves pretty quickly, especially past week 3.

These are all courses/video series I’ve worked through myself and recommend to anyone wanting to get started with programming:

CS161 class format

The course is 10 weeks long. Every Wednesday at midnight the next week’s homework and reading (called a “module”) becomes unlocked in the class portal (known as “Canvas”). You can do the reading/homework as fast or as slow as you want, as long as it’s turned in by the due date, typically the next Sunday or Wednesday (so you had either 5 or 7 days to get everything done before the next batch opened up). There weren’t any videos or supplementary materials beyond the book. Basically it’s read the chapter, do the homework, repeat. 

Early in the course, I found this drip-feed of content frustratingly slow. I wanted to work ahead and take advantage of free time when I had it. I usually had my assignments done within a day of their release. After about the halfway point, though, the class picked up the pace and I was turning in homework much closer to the Wednesday night deadline.

CS161 homework assignments

Every week had a reading assignment (usually 1-2 chapters from Starting out With C++: Early Objects) and a coding assignment. Some weeks also had a group assignment and/or a reflection assignment (1-2 pages written response). For the code assignments, you upload .cpp files to upload via “TEACH” (OSU’s interface for uploading homework).

The time commitment was reasonable, in my opinion. My daughter was born the same day class started so I had the advantage of being on maternity leave from work, but a newborn is demanding and I ended up squeezing homework and reading in anywhere I could, at odd hours of the day. In the early weeks of the class I spent about 4-5 hours a week on reading and homework combined. In the later weeks, I was spending 8-10 hours per week on the reading and homework combined. However, it’s worth adding that I’ve worked as a programmer (front end web developer) for the last 2 years, have already completed a web dev bootcamp, and have put myself through various online self-paced CS courses (this one just happens to be worth a college credit).

I thought the assignments were clear in their requirements and it was easy to understand what I needed to do.

The course materials suggest that you need a Windows machine and Visual Studio for CS161, but that’s not necessary – I did a lot of my homework on my Macbook and I never opened Visual Studio on my Windows machine. On my Windows computer, I used MinGW as my C++ compiler and wrote my code in Sublime Text. With this setup, I didn’t have to worry about Visual Studio adding anything extra to my files and my homework always compiled on Flip, the school’s Linux environment that you can log into and upload your project files to for testing. (This is the same environment the TA’s use to check if your work compiles.)

Some weeks had group assignments, which were coordinated over the Discussion groups in Canvas. The two major group assignments were basically “everyone upload last week’s homework, then decide amongst yourselves which one is best and write a page explaining why you picked it”. I found my classmates responsive and eager to complete the assignment; this wasn’t the group assignment horror-show you might remember from high school, at least not here in CS161 where it wasn’t about producing a completed project together.

Assignments were usually graded about a week or so after turning them in. Feedback was a line, at most, usually “Looks good!” or “You didn’t give this method the right name, -2 points”.

screenshot-2016-12-25-14-46-44

CS161 exams

The most important thing to understand about OSU CS eCampus exams is that they are “proctored”, which is academia-speak for “supervised”. This was my first experience with proctored exams. (And this will be the case of all exams for the online CS degree program, not just CS161.)

There are two proctoring options:

  • Take it in person at a local university/college/community college/test center (this is what I did)
  • Take it at your own computer with a live webcam stream of your face running the whole time with a service like ProctorU

I thought the ProctorU option was creepy as hell, plus I couldn’t guarantee the people I live with would actually be quiet while I took the exam. They require a 360 view of the room you’re in before you start, and any interruption is grounds for your test to be disqualified. Getting up to yell at someone / deal with a fire / etc is enough to make the person supervising you over ProctorU disqualify your test. Reading others’ first-hand experiences with ProctorU also put me off the service pretty quickly, but I never actually tried it myself.

Taking the exams at my local community college’s test center was easy once I confirmed with them that they were approved for OSU tests. I scheduled a time (they even had Saturday hours), showed up, sat down at a computer, logged into my OSU Canvas account, and started the test. The test is timed, and the test center provides paper and pencil (which they keep after the exam). The test runs in your web browser. My local test center charged $35 per test.

As for the exams themselves, I found them rather tricky. Each of the exams (there are 2) are 20 multiple choice questions with 4-5 answers to pick from. You have to hand-trace through the code (which is often iterative) and spot any errors that might be included in the code. (The paper and pencil help a lot here.)

In real life, you get the help of a compiler and unit tests (that I’m sure you wrote because you’re a good programmer) to help you understand (or debug) a bit of code, so the tests felt unnecessarily difficult and unlike my professional coding experience.

Here’s an example. One exam question had something like this (embedded in a much larger block of code):

if (x = 3) {
   ...stuff here...
}

I caught the single = sign, but I didn’t know it would actually do something in this case. In C++ (and other languages), this evaluates to true and sets x to 3. I’m just citing this as an example of how you have to know the fiddly bits of C++ to really excel at the exams. (I managed an 80% and an 85% on the exams.)

The test is graded as soon as you submit it, but you won’t know which ones you got wrong until they unlock the tests a few weeks after they’re done. Furthermore, while they’ll eventually tell you which questions you got wrong, they won’t tell you what the correct answer was.

screenshot-2016-12-25-14-43-32

So, don’t expect the exams to be much of a learning experience until the course has ended and you can work through the questions with an IDE and compiler.

Overall impression: OSU CS161

OSU’s eCampus Computer Science program looks solid from here, and I thought CS161 was a good value. The materials were well put together, the pacing was reasonably challenging, and the course’s time demands seem manageable for someone with a full-time job and family (I was on maternity leave while I took the course). I came into the class with more prior experience than the class is really meant for, but I still felt satisfied and challenged by the material. The OSU eCampus Reddit forum is a helpful resource for information on individual classes, admission process, instructor reviews, etc.

Onwards to CS162!