6.00x: Debugging, Assertions and Exceptions, and Quiz Week 4

This post is part of the 6.00x Intro to Computer Science and Programming series

Week 4 in the 6.00.1x course started with some general background on the history and process of “debugging.”

bug

A page from the Harvard Mark II log, featuring a dead moth that was removed from the device

Legend has it that Harvard’s old Mark II electromagnetic computer saw a series of malfunctions and glitches while in use that prompted operators to physically go into the server room (the year was 1946 and the computers were as large as you’d imagine) and discover a moth trapped inside, causing short circuiting.  A fun anecdote on the origin of the word, but not the actual first use of the term.

In any case, the Debugging lecture was a great summary of the importance of writing code with the mindset of making it easier for yourself and others to experiment with test cases representative of all (or most) possible scenarios.  Because let’s be honest, writing code without bugs here and there is impossible.  Key debugging concepts were explained, such as the idea of glass box testing (testing the internal paths through code to ensure correct functionality) vs. black box testing (the testing of the program’s external functionality without considering the back-end coding/processes).

Moving on to the next lecture on Assertions and Exceptions saw the introduction of using built-in functions “assert” and “except” in Python to set up an error control flow on the types of data and possible errors expected.  It is a way to program defensively and control a function’s outputs from causing the entire program to not run.

This was really more like week 4-5, as there was also the first and only Quiz released, marking the halfway point of the course and covering all the material up to the debugging lecture.  I thought the material was fair in the quiz, containing a mix of multiple choice and short open-ended programming questions.  There was one section that had some very suspect and confusing wording, and it took me a bit of time to eventually decipher them as strange word association type questions.

At the end of the quiz, there was a short mid-term survey to help judge how difficult the workload is.  At this stage of the course, I’ve felt comfortable with the balance of the volume of coursework and the challenge of the content.  Nothing has struck me as too difficult, and I’m looking forward to the second half.

Advertisements
This entry was posted in Education and tagged , , , , , , , , . Bookmark the permalink.

One Response to 6.00x: Debugging, Assertions and Exceptions, and Quiz Week 4

  1. Pingback: 6.00x: Weeks 5-8 and Final | The Internaut

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s