25: Wrapup and Review

Announcements

SRTI response rates: Carrot mode engaged. Get them above 75%!

What should I study?

Everything!

More seriously, if I were you, I’d look over the homeworks + solutions and the quizzes. That’s what I’ll be doing when formulating questions. Expect to see questions you’ve seen before (or more likely, slight variants of them).

What you want, when going over the old stuff, is not to memorize the answers but to understand them. One way to do this is staring at them and rubbing your chin, but it’s likely working with a study buddy will be more fruitful. Ask each other questions, and then make sure you can explain the answer to your pal(s). Your buddy can be a rubber duck if necessary, but a small focused group session might be helpful.

For questions that involve coding, think about what the given solutions does and why — like, what are the cases it deals with? Why are they all necessary? What happens if you omit one or more of them?

I expect you to be totally fluent in control flow and in use of the various data structures we’ve covered (arrays, sets, lists, maps).

Make sure you understand how to write and use generic methods and classes.

Know how to implement an interface, and how to extend a base class, and what the difference is.

For questions that involve, say, linked structures, make sure you can draw out the structures before and after an operation (like, a linked list that backs a stack) and understand why the code to push or pop looks the way it does. For array-based structures, understand how the index into the array helps create the abstraction (for example, how the top index in an array-backed stack works). It would be wise to know how to write these methods.

For things like graph and search, understand the basic terminology and operations.

Know how to do our discount asymptotic analysis: you should be able to judge whether a given method runs in linear, quadratic, or constant time in the size of something (usually its input).

Minimally you should know how to write a simple test case (a la the “smoke tests”), which is just a method with the @Test decorator that uses the assertEquals (or similar) method to check that another method behaves as it should.

Understand recursion enough to identify the base and recursive case in a recursive method, and whether a recursive method is correctly implemented (and thus will terminate) or not. Be able to write simple recursive methods as we did in class.

Yes, but what are you going to ask on the exam?

Do not ask me to post a sample exam with answers! Not gonna do it. The quizzes are the best guide to the style and content of the final.

Questions may ask you to do the following:

  • Determine what a mystery method does.
  • Find semantic error(s) in a method,.
  • Write a method that traverses a linear data structure and computes some property of that structure, similar to the questions from quizzes and various homeworks.
  • Write a generic method that modifies a simple data structure (like a list) in a particular way, similar to quizzes and various homeworks.
  • Extend an existing generic class with a generic method, similar to quizzes and various homeworks.
  • Determine the worst-case running time of Java API methods and a given arbitrary method, similar to quizzes and various homeworks..
  • Write a generic method that modifies a less simple data structure (like a multimap) in a particular way, similar to quizzes and various homeworks. I’m gonna stop typing that now.
  • Determine the result of arbitrary sequences of stack and queue operations.
  • Determine the order nodes are visited during an BFS.
  • Write methods to implement functionality in array- or linked-list-backed stacks and queues.
  • Write unit tests on arbitrary methods, given a description of the behavior of those methods and the desired test.
  • Identify the base and recursive case of recursive methods; determine if the method will terminate.
  • Write a recursive method.

What next?

Holy cats, look at that list there. Think about all the stuff we learned this semester, the data structures (and a little bit about how they’re implemented), the breadth of the projects, the amount of code you’ve written. That’s a lot!

Completing this class is kinda like getting your black belt or your driver’s license or the like, in that you know have the skills to do stuff. In terms of programming prowess, you’ve now got the fundamentals, and in terms of program design and data structures, you could handle most junior software engineering jobs. You might need to learn more about particular domains: HTML / CSS for web development, or HIPAA for medical records, or whatever, but you know how to write code that does stuff now.

And that’s kind of magical. You know have the insight and knowledge to know that you can tell a computer to do things and it will do them – and if it won’t, you know how to figure out why. Like any programmer, you need to decide what you want the computer to do, but (I hope) you now trust that, with some work and perserverance, you can do it. As you’ll probably see in the coming years, this is a superpower, and it’s one that will grow as you nurture it.

The worst vice is advice, but I’m going to indulge in it anyway now for a moment.

Don’t squander this power, and don’t misuse it. To paraphrase Burke, all that is necessary for the triumph of evil is that good people do nothing. The world needs your programming skills, it needs your many other skills and talents, it needs your idealism, and it needs your ethics. Whether this is your first CS course or your last one, you’re gonna have a choice as to what you when you get outta this place. And what the world almost certainly does not need is more precisely targeted advertising, more addictive Facebook newsfeeds, more dark patterns online, anonymous assassination markets, neural networks to synthesize fradulent video, “disruptive” technolgies that exist only to circumvent the rule of law, and so on.

It needs thoughtful, informed citizens, not consumers, who are considerate about their use and creation of technology. And make no mistake, you are a technology creator now. Use this power wisely.

A few final words

Soon we must say goodbye. Well, at least until the final exam in a few days. Many of you plan to go on to 187; many others are going to move on to various INFO courses, others have other plans.

Regardless, you’re always welcome to drop by and visit my in my office hours. Maybe because I’m your advisor. Maybe because you have questions for another class, like, say, 187 next semester. That’s fine, I’m happy to help, though I will probably ask if you’ve at least checked in with your TA or professor. Maybe just to chat, which is fine too.

In any event, it has been my pleasure and my privilege to run this class. Thank you so much for coming!