Looking for CS50x? Register at
edX.org .
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, algorithms, encapsulation, data structures, databases, memory management, security, software development, virtualization, and websites. Languages include C, PHP, and JavaScript plus SQL, CSS, and HTML. 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.
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 2011 .
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 ▾ expand all Introduction. Bits. Binary. ASCII. Programming. Algorithms. Scratch. Statements. Boolean expressions. Conditions. Loops. Variables. Threads. Events.
Demos Music Notes Slides Source Code Subtitles Transcripts Videos Week 1 ▾ expand all C. Source code. Compilers. Object code. GCC. Functions. Comments. Standard output. Arithmetic operators. Precedence. Local variables. Types. Casting. Standard input. Libraries. Boolean expressions, continued. Conditions, continued. Loops, continued.
Demos Music Notes Slides Source Code Subtitles Transcripts Videos Week 2 ▾ expand all Functions, continued. Global variables. Parameters. Return values. Stack. Frames. Scope. Arrays. Strings. Command-line arguments. Cryptography.
Demos Music Notes Slides Source Code Subtitles Transcripts Videos Week 3 ▾ expand all Linear search. Binary search. Asymptotic notation. Recursion. Bubble sort. Selection sort. Debugging.
Demos Music Notes Slides Source Code Subtitles Transcripts Videos Week 4 ▾ expand all Merge sort. Structures. Dynamic memory allocation. Pointers. Debugging, continued.
Demos Music Notes Slides Source Code Subtitles Transcripts Videos Week 5 ▾ expand all CS50 Library. Heap. Pointers, continued. Forensics.
Demos Music Notes Slides Source Code Subtitles Transcripts Videos Week 7 ▾ expand all File I/O. Linked lists. Stacks. Queues. Valgrind. Hash tables. Trees. Binary search trees. Tries.
Demos Music Notes Slides Source Code Subtitles Transcripts Videos Week 8 ▾ expand all HTTP. HTML. CSS. PHP.
Cheatsheets Demos Music Notes Slides Source Code Subtitles Transcripts Videos Week 9 ▾ expand all PHP, Continued. SQL.
Cheatsheets Music Notes Slides Source Code Subtitles Transcripts Videos Week 10 ▾ expand all JavaScript. Ajax. APIs.
Demos Music Notes Slides Source Code Subtitles Transcripts Videos Week 11 ▾ expand all Life after 50.
Slides Teasers Subtitles Transcripts Videos Week 12 ▾ expand all Exciting conclusion.
Promos Scratch Awards Slideshows Subtitles Transcripts Videos
Sections (otherwise known as "recitations" or "precepts" at other universities) supplement lectures . Led by Jason Hirshhorn '14, these sections were filmed in Sever Hall .
Week 1 ▾ expand all CS50 Appliance. make and gcc. Variables. printf. Conditions. Loops. Commenting.
Week 2 ▾ expand all Functions. main. Arrays. Strings. Caesar cipher. Vigenère cipher. Magic numbers.
Week 3 ▾ expand all gdb. Arrays. Linear search. Binary search. Running time, asymptotic notation. Bubble sort. Selection sort.
Week 4 ▾ expand all Merge sort. Pointers. Stack versus heap. malloc, free.
Week 5 Pointers. Stack, heap. Quiz 0 Q&A.
Week 6 ▾ expand all Hexadecimal. Enumerated types. Structs. File I/O.
Week 7 ▾ expand all Valgrind. Stacks. Queues. Linked lists. Hash tables. Binary search trees. Tries.
Week 8 ▾ expand all Week 9 ▾ expand all Week 10 ▾ expand all
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 Tommy MacWilliam '13, these walkthroughs were filmed in Northwest Science .
If you have questions or would like to discuss the material with others, you may want to join the Google Group at right.
Most of these problem sets require the CS50 Appliance , a virtual machine (for Linux, Mac OS, and Windows) that anyone can download for free.
Problem Set 0: Scratch ▾ expand all Galleries standard edition Hacker Edition Problem Set 1: C ▾ expand all standard edition Hacker Edition Problem Set 2: Crypto ▾ expand all standard edition Hacker Edition Problem Set 3: The Game of Fifteen ▾ expand all standard editionDistribution Code Walkthrough Hacker Edition Problem Set 4: Sudoku ▾ expand all standard editionDistribution Code Walkthrough Hacker Edition Problem Set 5: Forensics ▾ expand all standard editionDistribution Code Walkthrough Hacker Edition Problem Set 6: Mispellings ▾ expand all standard editionDictionaries Distribution Code Texts Walkthrough Problem Set 7: C$50 Finance ▾ expand all standard editionDistribution Code Walkthrough Problem Set 8: CS50 Shuttle ▾ expand all standard editionDistribution Code Walkthrough
Below are quizzes; other answers may be possible. Reviews were led by Tommy MacWilliam '13, Joseph Ong '13, and Lexis Ross '13.
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 , Fall 2008's seminars , Fall 2009's seminars , and Fall 2010's seminars are also available.
Accelerating Science with the Open Science Grid
by Ian Stokes-Rees
In the mid-1990s, the high-energy physics community (think FermiLab and CERN ) started planning for the Large Hadron Collider . Managing the petabytes of data that would be generated by the facility and sharing it with the globally distributed community of over 10,000 researchers would be a major infrastructure and technology problem. This same community that brought us the web has now developed standards, software, and infrastructure for grid computing . In this seminar I'll present some of the exciting science that is being done on the Open Science Grid , the US national cyberinfrastructure linking 60 institutions (Harvard included) into a massive distributed computing and data processing system .
Acing Your Technical Interviews
by Tony Ho '14
Most coding interviews are like another coding competition. I would like to start by talking about resources like Project Euler , Poj, USACO , Codeforces , Topcoder . Then I will move into the broad topics that everyone needs to know to answer simple questions. Finally, I will end with a hands-on period where we will try some problems and go over some problems that I have personally seen and find very interesting.
Android Application Development
by Jordan Jozwiak '14
Learn the basics of the Android Application Interface and developing Java applications using Eclipse .
appLab.Phone(Mango) Session One
by Edwin Guarin of Microsoft
You will learn how to get started on that next great app for the Windows Phone. Session One will attempt to cover: Introduction to Windows Phone 7.5 for Developers; Building Windows Phone 7.5 Apps with Visual Studio and Silverlight; Getting Started with Sample Code and other resource; Publishing and Monetizing your App in the Marketplace at no cost. For this seminar, install the Windows Phone 7.5 SDK from http://create.msdn.com/en-us/home/getting_started. And create a free Dreamspark and AppHub account using the instructions from http://bit.ly/r2dqFr. This will give you the ability to publish your phone apps and monetize for free.
Beyond Google Maps: Spatial is Special
by Kirk Goldsberry
There's an ongoing geospatial revolution happening right now. Unfortunately, despite the rapid rise of geospatial technologies, here at Harvard there are few if any courses that focus on Geographic Information Science . I propose to lead a brief seminar that introduces the basics of GIScience and hopes to inspire students to generate exciting new spatially aware mobile applications that pick up where popular location-based services such as Google Maps and Yelp leave off. Since a large percentage of "apps" have a spatial component, this topic should be of interest to students looking to design new mobile computing software.
Building Applications in C# CSS for a Beautiful Website
by Charles Bandes
Proper use of CSS allows a tremendous degree of control over both the layout and visual design of a web page. Careful application of style sheets can be the difference between a basic page and a really polished site.
Develop for the BlackBerry... Like a Boss
by Jason Hirschorn '14 and Marta Bralic '12
Learn how to develop applications for BlackBerry smartphone. Imagine integrating the BBM platform into your application or coding the next Brick Breaker . The possibilities are endless!
Educational Software
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.
Emacs
by Matthew Chartier '12
Emacs is an alternative to gedit which empowers you to write code more efficiently. Extensible and highly customizable, Emacs allows users to streamline their editing process by modifying the editor itself to suit their needs. Topics covered will include keyboard shortcuts to navigate text files quickly, using buffers to more effectively work with code spanning multiple files, and automating repetitive and tedious editing tasks on the fly.
From Innovation to Production: Making It Work is Just the Beginning
by Dennis Ravenelle
Thomas Edison is credited with saying that invention is 1 percent inspiration and 99 percent perspiration. Getting an innovative solution from the lab (or the garage) into a real production environment can be an arduous process. But until something delivers real value in a real-world environment, it's just a novelty. Here are some things to consider.
Getting a Job in the Tech Industry
by Matthew Chartier '12 and Melissa Niu '13
A seminar to discuss opportunities available to Harvard students in the tech industry and details about the interview process. The seminar will consist of a presentation and Q&A session with a panel of students with prior experience interviewing for and working in positions in the tech industry.
Getting Started with Node.js Git Magic: Versioning Files Like a Boss
by Tommy MacWilliam '13
Tired of sudoku_why_is_it_3_am.c and sudoku_OMG_FINALLY_WORKS.c? Learn how software is developed in the real world with git , a distributed revision control system. Track down bugs faster, manage file histories, and deploy code with efficiency and confidence.
iOS
by Larry Ehrhardt
Quick tour of iOS and how to build a tab-based app with a view, table, and web view.
jQuery: How to Make Your Website Shiny
by Alex Hugon '11
Stolen from jQuery's site: "jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript ."
Ruby on Rails
by Lexi Ross '13
Ruby on Rails is an exciting new web development framework that lets you build awesome, dynamic websites in a short amount of time. Ever used Twitter or Groupon ? Then you've used a Rails application. The Rails framework utilizes the Ruby programming language , so we'll be learning basic Ruby syntax as well as the tools you need to get started building a Rails app. Bonus: Ruby is insanely fun to code in!
Search and Browse Superpowers: an Introduction to Solr
by Ben Gaucherin
Search and browse capabilities are core to most applications these days. This seminar will review basic concepts behind search, including the more recent development known as faceted search . We will then use Solr , one of the most popular open-source faceted search engines , to see how one can incorporate advanced search and browse capabilities into an application.
User Experience (UX) Design
by Julia Mitelman '13
Ever stumbled upon a product that frustrated you because you couldn't figure out how to use it? Learn how to create products that are intuitive and convenient—no user manual necessary! A sneak peek of CS179, this seminar teaches you what you need to keep in mind when making products so you can create a great best user experience—because it's always the designer's fault!
Web Security
by Carl Jackson '13
You know how to build websites, but do you know how to make them secure? We'll teach you about some of the most common Web Security vulnerabilities and how to fix them.
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.
This is CS50 OpenCourseware .
Computer Science 50 (otherwise known as CS50) is Harvard College 's introductory course for majors and non-majors alike, a one-semester amalgam of courses generally known as CS1 and CS2 taught mostly in C.
Even if you are not a student at Harvard, you are welcome to "take" this course via cs50.tv by following along via the Internet. (The course's own website is at www.cs50.net .) Available at left are videos of lectures , sections (aka "recitations" or "precepts"), and seminars along with PDFs of all handouts. Also available at left are the course's problem sets and quizzes . If you have questions or would like to discuss the material with others, do join the course's Google Group .
If you're a teacher, you are welcome to adopt or adapt these materials for your own course, per the license .
If you'd like to take this course for real (on Harvard's campus or via the Internet) in order to receive feedback on work, grades, and a transcript, the course will next be offered through Harvard Extension School (as "Computer Science E-52") in Fall 2013. You can register online starting in August 2013.
Special thanks to Chris Thayer and Media & Technology Services for the course's videos and to Matt Chartier '12 and Rob Bowden '13, Fall 2011's heads.
djm
Copyright © 2011 – 2013,
David J. Malan
This course's content is licensed by
David J. Malan under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License , which means that you are not only welcome to watch, listen to, download, and/or read this content,
you are free
to Share — to copy, distribute, and transmit this content
to Remix — to adapt this content
under the following conditions
Attribution — You must attribute this content to
David J. Malan of Harvard University .
Noncommercial — You may not use this content for commercial purposes.
Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
with the understanding that
Waiver — Any of the above conditions can be waived if you get permission from
David J. Malan .
Other Rights — In no way are any of the following rights affected by the license:
Your fair dealing or fair use rights;
Apart from the remix rights granted under this license, the author's moral rights;
Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights.
Notice — For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page .
Below are adaptations of CS50. If using CS50's material in your own course, let us know!
CC50 . CC50 é a adaptação gratuita desse curso, no Brasil.