-
FizzBuzz Bugs
It is said that an overwhelming majority of applicants for some programming jobs fail the FizzBuzz test. As part of a simple warmup exercise, I asked my computer systems class (a required course for CS majors, usually taken in the 3rd year) to implement FizzBuzz in C. The problem statement was, I think, the standard…
-
Do Not Just Run a Few More Reps
It’s frustrating when an experiment reveals an almost, but not quite, statistically significant effect. When this happens, the overwhelming temptation is to run a few more repetitions in order to see if the result creeps into significance. Intuitively, more data should provide more reliable experimental results. This is not necessarily the case. Let’s look at…
-
C-Reduce 2.1
Over the weekend we released a new version of C-Reduce, a tool for turning a large C/C++ program into a small one that still meets some criterion such as triggering a compiler bug. There are two major improvements since the last release about a year ago: We are now able to run “interestingness tests” in…
-
Finding Undefined Behavior Bugs by Finding Dead Code
Here’s a draft of a very cool paper by Xi Wang and others at MIT; it is going to appear at the next SOSP. The idea is to look for code that becomes dead when a C/C++ compiler is smart about exploiting undefined behavior. The classic example of this class of error was found in…
-
Funniest Computer Book?
The other day Eric Eide noticed The UNIX Hater’s Handbook on my desk and remarked that there aren’t enough funny computer books. This is undeniably true. So now I’m trying to find the funniest computer book and I’d appreciate some help. Here are a few guidelines: Not really looking for a Dilbert collection. Let’s just…
-
MSCS
A masters of science degree in computer science can mean two very different things: The research MS where the student works closely with an advisor on a research project that culminates in a thesis and ideally a few papers. This kind of student is generally paid as a TA or RA and can be expected…
-
Computer Science Culture Clash
It’s not uncommon for an empirical CS researcher to get a review saying something like “Sure, these results look good, but we need to reject the paper since the authors never proved anything about the worst case.” Similarly, when I interviewed for faculty jobs ten years ago, a moderately famous professor spent a while grilling…
-
Procedural Decomposition
While teaching a CS class I spend quite a bit of time looking over the shoulders of students whose code doesn’t work. Sometimes they have a simple mistake and I’ll either point it out or ask a question that will lead them to the problem. However, other times the code is just generally not very…
-
Memory Safe C/C++: Time to Flip the Switch
For a number of years I’ve been asking: If the cost of memory safety bugs in C/C++ codes is significant, and if solutions are available, why aren’t we using them in production systems? Here’s a previous blog post on the subject and a quick summary of the possible answers to my question: The cost of…
-
Reading Code
Reading code is an important skill that doesn’t get enough emphasis in CS programs. There are three main aspects: the external view of the code: documentation, comments, APIs, white papers, information from developers, etc. the static view: reading the code like a book the dynamic view: reading the code as it executes, probably with help from…