David J. Malan, Instructor
malan@harvard.edu
http://cs.harvard.edu/malan

Harvard College

Introduction to the intellectual enterprises of computer science and the art of programming. This course teaches students how to think algorithmically and solve problems efficiently. Topics include abstraction, encapsulation, data structures, databases, memory management, software development, virtualization, and websites. Languages include C, PHP, and JavaScript plus SQL, CSS, and XHTML. Problem sets inspired by real-world domains of biology, cryptography, finance, forensics, and gaming. Designed for concentrators and non-concentrators alike, with or without prior programming experience.

Loading...

These lectures were filmed in Sanders Theatre in Memorial Hall by Chris Thayer. Notes were taken by Andrew Sellergren '08. Music from lectures is available via iTunes on the CS50 Soundtrack 2010.

If you have questions or would like to discuss the material with others, you may want to join the Google Group at right.

Week 0 ▶ Wednesday ▶ Friday ▾ expand all
Week 1 ▶ Wednesday ▶ Friday ▾ expand all

C. Source code. Compilers. Object code. SSH. SFTP. GCC. Functions. Comments. Standard output. Arithmetic operators. Precedence. Associativity. Local variables. Types. Casting. Standard input. Libraries. Boolean expressions, continued. Conditions, continued. Loops, continued.

Week 2 ▶ Monday ▶ Wednesday ▾ expand all

Functions, continued. Global variables. Parameters. Return values. Stack. Frames. Scope. Arrays. Strings. Command-line arguments. Cryptography.

Week 3 ▶ Monday ▶ Wednesday ▾ expand all

Linear search. Binary search. Asymptotic notation. Recursion. Bubble sort. Selection sort. Insertion sort. Debugging.

Week 4 ▶ Monday ▶ Wednesday ▾ expand all
Week 5 ▶ Monday ▶ Wednesday ▾ expand all

CS50 Library. Stack and heap, continued. Pointers, continued. File I/O. Forensics. Linked lists.

Week 7 ▶ Monday ▶ Wednesday ▾ expand all

Stacks. Queues. Valgrind. Bitwise operators. Hash tables. Trees. Binary search trees. Tries.

Week 8 ▶ Monday ▶ Wednesday ▾ expand all
Week 9 ▶ Monday ▶ Wednesday ▾ expand all
Week 10 ▶ play ▾ expand all
Week 11 ▾ expand all
Week 12 ▶ Slideshows ▶ Slideshows ▶ Monday ▾ expand all

Sections (otherwise known as "recitations" or "precepts" at other universities) supplement lectures. Led by Matthew Chartier '12, these sections were filmed in Harvard Hall.

Because Computer Science 50 is offered through Harvard Extension School as "Computer Science E-52", you may sometimes hear Matt refer to the latter. The courses are one and the same.

Week 1 ▶ play ▾ expand all
Week 2 ▶ play ▾ expand all
Week 3 ▶ play
Week 4 ▶ play
Week 5 ▶ play
Week 6 ▶ play ▾ expand all
Week 7 ▶ play
Week 8 ▶ play
Week 9 ▶ play
Week 10 ▶ play

In order to accommodate students with different backgrounds, some problem sets are released in two editions: a standard edition intended for most students and a "Hacker Edition" intended for some students. Both editions essentially cover the same material. But the Hacker Edition typically presents that material from a more technical angle and poses more sophisticated questions. Most standard editions, though, are accompanied by code "walkthroughs" during which students receive direction on where to begin and how to approach the problem set. Led by Marta Bralic '12, these walkthroughs were filmed in Harvard Hall.

If you have questions or would like to discuss the material with others, you may want to join the Google Group at right.

These problem sets assume that you have access to cloud.cs50.net (a cluster of servers on which Harvard students have accounts), but not to worry! You can instead use the CS50 Appliance, a downloadable virtual machine (for Linux, Mac OS, and Windows).

Problem Set 0: Scratch ▾ expand all
Problem Set 1: C ▶ play ▾ expand all
Problem Set 2: Crypto ▶ play ▾ expand all
Problem Set 3: The Game of Fifteen ▶ play ▾ expand all
Problem Set 4: Sudoku ▶ play ▾ expand all
Problem Set 5: Forensics ▶ play ▾ expand all
Problem Set 6: Mispellings ▶ play ▾ expand all
Problem Set 7: C$50 Finance ▶ play ▾ expand all
Problem Set 8: CS50 Shuttle ▶ play ▾ expand all

Below are quizzes; other answers may be possible. Reviews were led by Josh Bolduc '11, Rose Cao '11, Matt Chartier '12, Scott Crouch '13, and Tian Feng '11.

If you have questions or would like to discuss the material with others, you may want to join the Google Group at right.

Quiz 0 ▾ expand all

Covers weeks 0 through 5.

Quiz 1 ▾ expand all

Covers weeks 0 through 10 with emphasis on 7 onward.

Seminars cover material beyond the scope of the course. Fall 2007's seminars and Fall 2008's seminars are also available.

Beyond Git: Forging SDLC

by Esmond Kane

Given the forthcoming launch of the forge.gov SDLC portal, building on the already deployed forge.mil, collaborative development lifecycle portals are officially mainstream. The presenter will speak to the goals, quirks, maturation and future of a 6-year software development hosted portal for academia et al. in Harvard. The Harvard ABCD Forge is available at forge.abcd.harvard.edu.

BlackBerry Application Development

by Tian Feng '11

Learn the basics of the BlackBerry Application Interface and developing Java applications.

Crash Course in Java

by Matthew Chartier '12

Comprehensive introduction to the syntax, features, advantages, and limitations of the Java programming language, relating back to C. Introducing basic topics in object-oriented programming.

Creating Awesome Websites with Ruby on Rails

by Tommy MacWilliam '13

Ruby on Rails is a web application framework for the Ruby programming language. With Rails, interacting with complex database structures is a snap and site organization is literally done for you, allowing you to focus on creating an awesome website rather than worrying about petty low-level details. In this seminar, we'll take a look at the Ruby programming language, the MVC design pattern, and how to create and deploy a killer Rails website in minutes (that's right, minutes).

Data Visualization and Graphics with Processing

by Mike Teodorescu '11

Used in visualizing the human genome, social networks, word maps of presidential speeches, Processing provides a complete framework for interactive visual applications. The seminar is structured as a tutorial to enable you to get started quickly with the Java-based Processing and off to a final project! A survey of visual applications using Processing will be made to give you more implementation ideas for your project.

Developing Apps for iOS: iPhone, iPad, and iPod Touch

by Scott Crouch '13

In this seminar, students will learn the fundamentals of Objective-C, Xcode, the iPhone and iPad simulator, Interface Builder and Instruments. Topics in Objective-C include the model-view-controller paradigm, basic syntax, memory management, Core Data, and UI elements. Students will learn the basics of creating simple, table, tab bar and split view controller applications.

Educational Software Development

by Katie Vale

Interested in writing software to support teaching and learning? This session will discuss how to plan and execute an instructional project, including how to do requirements gathering, how to choose development platforms, and how to assess your project. The instructor has over 20 years experience in designing and producing educational software.

Linux Demystified

by Jeremy Cushman '12

Come learn about arguably the most successful collective action effort in the history of the world. Dive into the tool used by the pros and learn what it takes. Bring along your laptop so you can play along.

Modern Client-Side Web Programming

by Filip Zembowicz '11

Recent developments in the HTML5 and CSS specifications as well as powerful JavaScript libraries like jQuery have extended the realm of possibilities of what can be displayed in a browser. This seminar will be a high-level overview of the new possibilities, such as embedding video directly, using a canvas to draw arbitrary objects, dynamically storing data in the browser using localStorage, and animating and transforming your webpages to your heart's content.

Search Engine Optimization (SEO)

by Katie Fifer '08

Ever wondered how Google picks certain websites to show up before others in search results? Ever wondered how much traffic (and money) is at stake when it comes to being number 1 on Google? Come learn how to optimize your website to make it more search-engine-friendly and boost your search engine ranking. We'll cover everything from html tags, to URLs, links, keyword strategy, and overall content.

SMS 101: Mobile Applications for ALL Types of Phones

by Jeff Solnet '12 and Punit Shah '12

This seminar will cover the basics of developing SMS-based mobile applications. We will discuss and demonstrate how to use the Zeep Mobile and TextMarks Lite APIs, in conjunction with PHP scripts, to develop interactive SMS applications. SMS (i.e. text messages) is a nearly-universal technology on cell phones. It allows developers to create mobile applications that are cheap and compatible with all phones, whether you're using a smartphone (iPhone, Blackberry, G1) or your parents' old black-and-white Nokia. If you're thinking about changing the world, SMS has been a useful platform for the developing world where few serviced populations have access to advanced mobile devices. Farmers in many African countries are now able to get up-to-date pricing and other agricultural data thanks to SMS applications. In Kenya, mobile (SMS) banking is rapidly changing the way Kenyans create and conduct business. Whether you're interested in updating Shuttleboy or solving world peace, this seminar will be a good starting point.

Socialize Your Apps with Facebook Platform

by Keito Uchiyama '11

How to get started with Facebook's Platform product, including use of the Graph API and how to use the SDKs in PHP. An overview of the features in the API and examples of possible integrations.

Vim

by Gabrielle Ehrlich '13

Learn how to use Vim, a text editor. It's awesome.

Below are papers about CS50.

Grading Qualitatively with Tablet PCs in CS 50

Workshop on the Impact of Pen-Based Technology on Education. Blacksburg, Virginia. October 2009.

Moving CS50 into the Cloud

15th Annual Conference of the Northeast Region of the Consortium for Computing Sciences in Colleges. Hartford, Connecticut. April 2010.

Reinventing CS 50

41st Annual ACM Technical Symposium on Computer Science Education. Milwaukee, Wisconsin. March 2010.

Virtualizing Office Hours in CS 50

14th Annual ACM Conference on Innovation and Technology in Computer Science Education. Paris, France. July 2009.