>> David: Hallo, mein Name ist David Malan und dies ist CS50. Und, dies ist nicht der typische High-School-Informatik-Kurs. Dieser Kurs ist ein bisschen etwas Besonderes. Und es ist nicht, weil ich dachte, es lehren. es ist, denn dies ist einer der, wie wir denken, jenen seltenen Kurse tatsächlich drückt Ihr Gehirn so viel und Ihren Zeitplan so sehr, dass durch Semesters Ende wirklich das Gefühl man schlauer. So, dass die Art und Weise fühlte ich mich, wenn ich mich diesem Kurs nahmen im Jahr 1996 war. Ich war eine Regierung der großen Zeit leben hier in Mather House. Und, I. [Jubel] Wie sind die anderen, die anderen fünf gibt. Also, ich war ein wichtiger Regierung an der Zeit. Und ich war eine große Regierung, weil ich immer gern würde der Geschichte. Ich mochte Verfassungsrecht in der High School. Und so machte ich mich auf diesem Weg Freshmen Jahres so, was ich am besten tun, das tun, was ich wusste, ich liebte. Und ich hatte immer ein bisschen wie ein Computerfreak gewesen, würde ich immer mit Computern lallte. Aber ich selbst, vielleicht ironisch im Rückblick, ich hatte immer die Jungs, die unter Computer Science wurden in meiner Schule gesehen, meine Freunde, wie die wirkliche Geeks. Und doch, schließlich tat, zweiten Jahr nehme ich diesen kleinen Kurs namens CS50, die eigentlich Angst vor mir hatte sich meine eigenen ersten Jahr. Und ich war ein Benutzer Assistent an der Zeit. Also, ich war sicher schon qualifiziert, zumindest unter denjenigen sein, die Freaks, die ich lustig gemacht in der High School. Aber, ich war erschrocken. Es gibt sie diesen Ruf an die Zeit und vielleicht noch zum Teil, dass es eine war, war es natürlich ein unheimlich. Es war eine Menge Arbeit. Es war schwer, und doch, es ist eines dieser Dinge, wo, mein Gott, war die Rinde weit schlimmer als sein Biß. Ich fand mich zweiten Jahres, zum ersten Mal, eigentlich finden Hausaufgaben Spaß. Und ich sage dies nicht nur, um diesen Kurs für Sie Tonhöhe. Das war eine echte Erkenntnis für mich. Nun, ich glaube, an einer Stelle habe ich über die Linie zu wahren geekdum, wo ich tatsächlich verwendet werden, um freuen uns auf Freitag Nacht, denn ich konnte curl up vor meinem kleinen MacBook und Arbeiten am CS50-Problem legt. Also, an diesem Punkt, denke ich, ich hatte eindeutig die Linie. Und ist es unser Ziel in diesem Kurs nicht für alle von Ihnen in dieser Person wieder, aber nur zu sagen, dass es ein wenig etwas Besonderes zu diesem Kurs, ein wenig etwas Besonderes Informatik im Allgemeinen vor allem in diesen Tagen. Und, desto mehr gewöhnt haben wir alle in Technologien wurde, desto mehr Spielzeug führen wir in unseren Taschen herum, die selbst Computer. Ich meine, ist mein iPhone eigentlich eine leistungsfähigere Computer als mein Laptop im College war. Sie können eine Menge tolle Sachen mit diesen Dingen zu tun. Und nun, die meisten von uns in diesem Raum, wahrscheinlich nur andere Leute die Software, anderer Leute Werkzeuge, anderer Leute Probleme zu lösen, weil wir über die iTunes-Download haben wir einige App aus dem App Store und Walla wir etwas wirklich sauber machen kann. Aber bis zum Ende dieses Semesters, können Sie die Person zu tun, dass der Problemlösung sein. Sie können die Person der Lösung einiger Problem sein, Gebäude, app, dass Stück Software, das Tool, das entweder, man nur amüsiert mich, Ihnen Spaß macht. z. B. Controlling, sagen wir, aus Ihrer iTunes Bibliothek mit Ihrem Wohnungen deutlich ein app, das bereits existiert, oder Sie können Zeitpläne Shuttle zum Beispiel leichter zu finden. Also in der Tat einer der ersten Dinge, die ich habe nach der Einnahme von CS50 wurde wieder war es wohl an dieser Stelle Freitagabend und Samstagabend, gab es diese Möglichkeit zum Zeitpunkt, wo der Harvard-Shuttle-Busse laufen war. Und bis heute, haben sie noch Fahrpläne gedruckt. Aber, es war wirklich keine Hilfe online, um herauszufinden, wann der nächste Shuttle war. Nun, ich habe nicht kümmern, denn obwohl ich in Mather Ich war nicht unter denen, die in der Regel dauerte das Shuttle wohnte. Aber, ich hatte eine Menge Freunde in Pfoho zum Beispiel. Und einer von ihnen fragte mich, denke ich an einem Punkt in. [Jubel] Okay Pfoho ist besser als Mather offenbar. So bekam einer meiner Freunde Art von mir zu denken vielleicht kann ich ein kleines Programm zur Art der Hilfe meiner Freunde überprüfen Sie die Shuttle-Fahrpläne zu schreiben. Und so war das ungeschickt benannt Shuttle Junge geboren, dieses Stück des Lexikons, um für eine gewisse Anzahl von Jahren hat zumindest bei einigen der upperclassmen übernachtet. Zu der Zeit war dies das kleine Kommandozeilen-Programm im Geiste gleich Dos. Es war in einer UNIX-Umgebung ausgeführt wird. So war es nicht sehr sexy überhaupt. Sie müssen nur ein paar Befehle eingegeben und es dir gesagt, wenn die Shuttles wurden. Nun, in diesen Tagen ist es ein wenig komplexer. Und, es ist eigentlich für genau die Art von Projekten, dass die Schüler in diesem Kurs am Ende durch Begriffe machen Ende vertreten. So ist diese Version vier, etwa 15 Jahre später, der Shuttleboy. Scheint Google Maps wird es ein bisschen langsam. Aber für diejenigen von Ihnen, die weg von hier nach dem Unterricht und gehen, zu sagen haben, von der Memorial Hall und bis zu gehen, sagen wir, die Quad benötigen. Nun können Sie entweder in zwei Minuten zu verlassen, wenn durch, das ist wirklich nicht für Sie arbeiten nur noch, oder haben Sie wie viele andere Optionen, wie Sie mögen. Und bald kommt, können wir dies aus CS50 Tonhöhe, wird es die gleiche Funktion per SMS werden. Sie können Text Shuttleboy per Telefon. Sie rufen Shuttleboy. CS50 die Telefonnummer in diesem Jahr, na ja, das war erstaunlich Verfügung, 617-BUG-CS50. So, das wird bald Debüt. So nennen es nicht nur noch, weil ich für einen Verweis bekommen haben, jetzt ist es Wesens, unser System den Kopf Teaching Fellow's Handy weitergeleitet. So, dann bekommst du nur ihn, wenn Sie Fragen zu den Shuttle-Fahrplan jetzt haben. Aber, dass in Kürze umgesetzt. Also, andere Dinge, eigentlich, dass wir uns in diesem Sommer verbrachte auf wirklich in Vorbereitung für dieses Semester wurde eine ganze Reihe anderer Probleme, die wir lösen wollte. Zum Beispiel gibt es eine ganze Menge Zeug, was in diesem Campus an einem bestimmten Tag. Und in der Tat, anders ausgedrückt, es gibt eine ganze Menge Geschehen auf diesem Campus, dass ich sicher nie nutzen. Und, obwohl ich jetzt bin, wie viele Dinge, die passiert sind, auf dem Campus, ich habe noch nie scheint die Zeit finden, überwältigt. Aber, Walla, selbst dort, CS50 Vortrag. Das ist, wo man ist, so war dies ein, war dies ein Programm, das wir zu aggregieren alle Ereignisse auf dem Campus schrieb. Und dies ist etwas, das andere Studenten in dieselbe natürlich auf eigene bekämpft haben. Und wir haben mit anderen Einrichtungen auf dem Campus arbeiten, um wirklich damit dies geschieht. Aber der Punkt zu CS50 dieser Begriff ist, dass alle diese kleinen Programme, die wir darüber, ob das eine oder ob man für die Aggregation aller Harvard's News an einem Ort, der alle Google News, all diese Dinge gehen zu müssen gearbeitet haben, was genannt werden API's, Application Programming Interfaces. Und dies ist nur Phantasie sprechen für die Leistungsfähigkeit, die anderen Menschen, Menschen in diesem Raum, tatsächlich etwas zu tun mit dem gleichen Daten. Also, mit Begriffen zu beenden, wenn Sie sich entscheiden das endgültige Projekt in Bezug auf Nachrichten oder Ereignisse oder Karten, auch wir, zumindest einen Kurs durchzuführen, wird das umso leichter in diesem Jahr, indem wir Ihnen mit einer Schnittstelle, eine Art Funktion, sozusagen, eine Software, die Sie in Ihren eigenen Projekten verwenden, um oben zu gehen und darüber hinaus, wo die Studenten, vielleicht in der Vergangenheit gegangen sind, weil dieses Rahmens hat nicht an ihrem Platz für sie gewesen. Und wieder, dieses alles begann, zumindest für mich, vor rund 15 Jahren zur Durchführung Shuttleboy. Ich habe dann per E-Mail mein Freund Ken in Pfoho. Ich sagte, hey, was denkst du? Ist das sinnvoll? Er schickte es auf der offenen Liste Pfoho und Walla, all diese Jahre später bin ich anscheinend immer noch Melken dieses Projekt. Und der nette Sache über sie, und hier ist auch ein Kurs wie dieser in den Ingenieurwissenschaften und der Informatik, glaube ich, ein wenig speziell ist, ist, dass, wenn Sie Ihr Haus nicht funktioniert und wenn Sie Ihre Projekte in diesem Kurs, Sie weiß, viele von ihnen, ja, Sie beiseite zu legen und nicht wirklich wieder verwenden. Aber einige wird es Ihnen. Und da ist dieser wirklich mächtig Ding, zumindest für mich, dieses wirklich spannende Sache, wenn man etwas und andere Menschen tatsächlich Betreuung zu machen, dass andere Leute nicht nur lächeln und pat Ihren auf der Rückseite und dann Art gehen über ihr eigenes Leben. Sie tatsächlich nutzen, was Sie in ihrem eigenen Leben gemacht, auch wenn sie für etwas so dumm ist oder einfach nur als Feststellung, wenn sie hier raus auf die nächste Shuttle zu den Quad zu fangen. Also, durch Begriffe Zweck, dass eines der Ziele dieses Kurses ist, um euch zu einfach zu identifizieren ein Problem, ob es auf dem Campus ist oder hoffentlich weit über dem Campus stärken, und tatsächlich verwenden Sie Ihre eigenen Fähigkeiten, Ihre eigene Meinung und lösen dieses Problem in einigen Teil technologisch. So ist dies auch ein Kurs, wie wir in den Lehrplan und sagen, dass die Kurse offizielle Beschreibung, die Sie lehrt, wie man denken und sie lehrt, wie man Probleme effizienter lösen. Nun, was soll das bedeuten? Nun, wenn du 600 Megahertz in Ihrer Tasche oder drei Gigahertz haben unter Ihrem Schreibtisch zu Hause, können Sie eine Menge Probleme effizient nur durch Scherung Brute-Force zu lösen. Aber, es gibt eine Menge Probleme in dieser Welt, ob es sich um Benutzer, sagen wir, Facebook-Netzwerk oder das Internet über Google, dass es keine Rolle, wie schnell Ihre speziellen Computer ist, es gibt keinen Weg in die Hölle wirst du zu suchen sind Milliarden von Webseiten schneller, wenn Sie tatsächlich Ansatz dieses Problem auf intelligente Weise. Sie müssen nicht nur die Suche, zum Beispiel, eine riesige Liste aller Web-Seiten auf der Erde von oben bis unten auf der Suche nach etwas, was im Zusammenhang mit Suchbegriffen Sie hoffentlich für Google und vermutlich Google und Facebook mit einem dieser großen Unternehmen suchen haben eine Menge kluger Leute darüber nachdenken, wie sie können Daten schneller zu finden, wie sie können Informationen effizienter zu verarbeiten, und, wie sie in der Regel nur Ergebnisse zurück, schneller, so dass Sie noch nicht, weitere interessante Dinge mit diesen Geräten. Und ja, was wir meinen, wenn durch nicht, wie, Menschen beizubringen, wie man genauer, mehr algorithmisch zu denken. Nun, dieses kleine visuelle scheint immer gut gehen über. Und, so scheint es unvergesslich. Und ich wurde einmal gefragt, gerade gestern von einem ehemaligen Schüler, oh bist du auf das Telefonbuch wieder tun werde. Und ich so ziemlich auf der Stelle beschlossen alright sicher, dass wir ein Telefonbuch Ding zu bauen. Und er fragte mich, wenn Sie es in halb rechts riss, wurde auch technisch Ich mag yeah wir rissen es in der Mitte, aber nicht in der Weise, in der Informatik so werde ich in der Lage sein, diese Sache in einer halben reißen. Und ja, hier war das Problem, dass wir seit einiger Zeit vorgestellt. So, hier ist das Telefonbuch. Es habe mindestens tausend Seiten oder so. Und die einfachen Ziel an Hand sehr realen Welt zu finden ist, dh wenn eine Person in hier. Also, Mike Smith, Nachnamen beginnend mit S. Also, ich bin ein typischer Mensch, nehme ich dieses Telefonbuch. Und jemand da draußen, was tun, um zu finden Mike Smith, offensichtlich nicht im Voraus wissen, auf welcher Seite er eigentlich würden Sie auf eine typische Person. Richtig, so gehen Sie etwa in der Mitte, rechts. Und an diesem Punkt in der Geschichte, bin ich wahrscheinlich in der N-oder M's, weißt du, etwa auf halbem Weg durch das Telefonbuch. Es stellte sich heraus, das letzte Mal habe ich dieses Beispiel habe ich irgendwie fand ich mich in der Eskorte Abschnitt. Also, es ist eigentlich nicht gleichmäßig zwischen A bis M und N durch ausgewogene Z. Aber heute sind wir in der Tat, in der M's, so gut, jetzt bin ich an der M's. Aber was ist mein Essen jetzt wie ein normaler Mensch weg von der Straße? Wohin gehe ich weiter für Mike Smith. [Unverständlich] Und ja, wahrscheinlich nur auf dieser Hälfte, rechts, weil S kommt nach M. Und so, hierin liegt die visuelle Dramatik. Das ist nicht wirklich reißen es in der Mitte, rechts. I Art betrogen in der Mitte. Aber wir wissen jetzt, dass Mike zumindest nicht in dieser Hälfte ist. Wir können buchstäblich werfen Hälfte des Problems entfernt. Und ich mit dem Problem, dass im Grunde immer noch dasselbe bin links, findet Mike Smith in ein wirklich großes Buch. Aber das Problem ist jetzt, wie groß die Hälfte. Wenn es tausend Seiten vor, jetzt sind es etwa 500 bekam. Weißt du was, ich kann dasselbe wieder tun. Ich kann von Art rekursiv wiederholt oder dasselbe tun. Jetzt bin ich nicht ganz auf S. Ich freue mich auf T. Und so, oh Ich ging ein wenig zu weit. Aber ich weiß jetzt, dass Mike nicht auf der rechten Seite ist, es geht um einige Klassen eines Tages, wo ich kann einfach nicht reißen den Damm Sache sein, ich wette. Aber jetzt weiß ich, er ist nicht auf der rechten Seite. So, nun das Problem wurde gevierteilt. So habe ich aus einem Tausend auf 500 bis 250 Seiten weg. Und wieder, wenn Sie weiterhin die Logik, die Mathematik weiter, ich hackte dieses Problem in der Hälfte, in der Hälfte, in der Hälfte bis schließlich bin ich entweder zu nicht finden jeden Smith's überhaupt unwahrscheinlich, oder ich gehe finden, den ich suche. Aber, dass dann, wirft die Frage auf, ist dies besser als der einfache Ansatz von nur sagen, du weißt, A, Nö, B, nein, beginnend von links nach rechts geht linear durch das Buch? Na, ja instinktiv. Es wird viel schneller sein. Aber, wie viel weniger? Nun, wenn ich tausend Seite Telefonbuch haben oder sagen wir 1024 für diejenigen unter Ihnen, die Potenzen von zwei, wie, wie oft hätte ich, um dieses Problem in zwei Hälften geteilt, bevor Mr. Smith zu finden sind? >> Zehn. >> David: Also, zehn, rechts. Wenn Sie 1.024 Seiten haben und Sie spalteten sich in zwei Hälften, in die Hälfte, in der Hälfte, in der Hälfte, dass ich zehn Mal, das ich von 1.000 Seiten gehen, die Person die ich suche in nur zehn Seiten mittels dreht. Und das ist irgendwie nett, aber, wissen Sie, wenn Sie es getan haben Sie denken, dies alles in Ihrem Leben. Es ist nicht so dramatische. Aber jetzt, dass das Telefonbuch nicht nur für Boston, ist es für die gesamte USA oder die ganze Welt und dieses Ding hat Milliarden von Seiten in ihm, so vorstellen, ein Telefonbuch mit vier Milliarden Seiten. Wie viele Umdrehungen Seite bin ich zu haben, um maximal zu tun, um Mike Smith in einem vier Milliarden Seitenaufrufen Telefonbuch zu finden? >> Melden Basis zwei. >> David: Also ja, wenn Sie die Art von Mathematik Art sind dies log base zwei. Aber, wenn Sie denken, 4-2000000000 to eine Milliarde, so dass eine halbe Milliarde. Ich meine, dass tatsächlich geht schnitzt sich nach verdammt schnell. In der Tat mit 32 Halbierungen des Telefonbuchs auch von vier Milliarden, ich werde auf einer Seite. Und das ist, wenn dieses Zeug mächtig wird, denke ich. Das ist, wenn diese Ideen überzeugend, wenn man eine vier Milliarden Seitenaufrufen Problem haben und in 32 Schritten können Sie die Person, die Sie suchen finden Sie bekommen. Und so ist das, was wir meinen, wenn wir sagen, dass Sie lernen, wie man sorgfältig darüber nachdenken, mehr algorithmisch, intelligenter über die Lösung von Problemen. Und die Renditen sind enorm, wenn man tatsächlich tun, und immer wieder an diesen Punkt der Googles der Welt die Facebooks, die den Luxus von großen Datenmengen haben. Du mußt, um diese Probleme in dieser Weise zu nähern, ansonsten ist es einfach nicht zur Arbeit gehen. Nun, was tat, was der Student's eigentlich nicht erinnern? Ich, wir möchten, dass die Dinge ein wenig albern manchmal der die Schärfe nehmen, was sonst eine Menge neues Material zu sortieren sind zu tun. Und ja, er eigentlich, dieser schickte ehemaliger Student mir diesen Link, den ich ging voran, nur zum Spaß und dann bereute es am Ende, zog am utube hier. So, dachte ich, ich würde teilen, was eine nicht-Informatiker meint, wenn er ein Telefonbuch Tränen in die Hälfte. [Lacht] [Silence] [Unverständlich] >> Sie wissen, über 200 Seiten, schöne saubere Linie, reißen legitim. [Lacht] >> David: Also, ich glaube, arbeitet er es auch. Also, was ich aus diesem Kurs habe vor all den Jahren ist ja, Shuttleboy, und dann ja einen Abschluss in Informatik, und dann ja einen Doktortitel in Informatik. Und das ist nicht das, was wir versuchen, die meisten Schüler in diesem Kurs in einzuschalten. Die meisten von Ihnen in diesem Kurs werden nicht auf einem Major in der Informatik gehen. Einige von euch könnten geringfügige, aber für einige von Ihnen ist dies natürlich ein Terminal werden. Und das ist völlig in Ordnung, weil dieses Kurses ist in der Tat, in einer Weise, wo auch wenn Sie nur zahlen Ihre Gebühren für mehrere Monate und Sie wirklich konzentrieren, und Sie sich wirklich strukturierten so viel von diesem Kurs, wie Sie können, werden Sie, in Tatsache, gut ausgestattet werden, um zurück zu Ihrer Welt der Ökonomie, Biologie, Psychologie, Angewandte Mathematik gehen, und tatsächlich Gebrauch machen von dem, was letztlich genauso interessant wie wir einen Kurs, um konzeptionell wie es grundlegend ist praktisch Hoffnung. Und auch das ist etwas, das vielleicht ein bißchen selten zu finden. Ich dachte, ich teile ein paar Bemerkungen, dass die Schüler vom letzten Herbst in diesem letzten Jahren Cue-guide gesetzt, wenn über das, was möchten Sie sagen zukünftige Studenten gebeten. Nun, wenn Sie nicht bereits bei diesen Kommentaren ausgesehen haben, sagte ein Schüler dieses Kurses wird eine angemessene Menge von Ihrer Zeit nehmen. Aber, wenn Sie Ihre Arbeit gesetzt in eine ganz neue Welt, eine ganze, wenn Sie die Arbeit legen, wenn Sie die Arbeit eingeführt wird, in Ordnung, so ist dies seine Grammatik nicht von mir, wenn Sie also, lege in die Arbeit ein ganz neue Welt öffnet sich für Sie. Erstaunlich, wie viel ich in nur 12 Wochen gelernt. Ein anderer Schüler schrieb, nehmen Sie besser das, oder du wirst es bereuen. Ein anderer schrieb, ein wenig mehr offen zu sagen, es wird Ihren Hintern zu treten und lassen Sie große Gefühle. Und schließlich ist dies eine vielleicht etwas, das ich nur schriftlich nachweisen kann, sondern, zweite von unten hier. [Lacht] Also, ich bin nicht sicher, ob du viele Freunde, die diesen Kurs aber wir nahmen Art haben eine Menge Schaden an der letztjährigen Schüler haben. Wir führten am Anfang, Vorträge mehrere, ein paar Tests, ein paar Probleme stellt, diese Vorstellung von lolcats. Sie können nicht sehen, was ich hier aber in einem Augenblick sehen Sie einen jungen Mann namens Happy Cat, wer der Anführer der sogenannten lolcat ist zu sehen. Dies ist einer der dumme Internet vorne, dass ich glaube ehrlich gesagt die Dichotomie zwischen diesen beiden Herren hier, und was haben wir jetzt auf dem Bildschirm ist vielleicht. [Lacht] Einer der unsachgemäße Nutzung des Theaters auf dem Laufenden. Und warum machen wir nicht ein wenig mehr real ein wenig mehr persönliche diesem Begriff tatsächlich ein Problem zu lösen effizienter. Ein einfaches Problem am ersten Tag jeder Schule ist, sich hinzusetzen oder aufzustehen und dem Zählen beginnen die Studierenden mit der rechten Appell der Arten. Nun, die meisten naive, aber dennoch sehr korrekte Vorgehensweise, dass ein Lehrer könnte sich mit einem, zwei, drei, vier, fünf, sechs, sieben, und wir würden hier einige Zeit. Also, was ist eine marginale Verbesserung auf diesem selbst, dass Sie als Kind vielleicht getan haben? How do you Menschen schneller rechnen? Und, nicht zu starten Ablesen meiner eigenen Anweisungen? Was würden Sie als Kind getan haben? Start Zählen zu zweit, rechts, so wie ich ziemlich gut zwei, vier, sechs, acht, zehn, 12 bin. Also, das ist etwas Interessantes Recht. Also, wie viel von einer Verbesserung ist, dass es? Also, es ist offensichtlich ein Faktor zwei. Es nimmt mich halb so viel Zeit. Aber, weißt du was, wie wir in diesem Semester große Sache finden, wie die Beschleunigung Ihrer Laufzeit von nur einem Faktor zwei ist gar nicht so interessant, weil hier die analogen in die Welt der Computer ist, dass ich ein CPU bin Ich bin ein Computer, auch Heck, wenn ich warten, nur 12 Monate, 18 Monate, ich den Computer wird nur von der Natur in der Lage sein, durch die Anzahl der Gigahertz Ich habe mich in der Lage sein, Menschen in diesem Raum schneller verlassen. Also, diese Art von, diese Art von linearen Speedup wie Faktor zwei Faktor drei, auch den Faktor zehn, who cares? Richtig, wir können das Problem auf Hardware werfen. Wir können warten Dinge aus. Wir entwickeln schnellere Maschinen. Aber, intellektuell, yeah, dass clevere Art, aber es nicht wirklich grundlegend verändern das Problem war. Ich bin immer noch von links nach rechts, von vorne nach hinten. Es ist wirklich der gleiche Algorithmus. Aber, biete ich, dass wir besser machen können. Wir können tun, als smarter und tun dies grundsätzlich eine schnellere Umsetzung. Aber, um dies zu belegen, benötigen wir von Ihnen Humor uns für einen Moment. Und es ist an dieser Stelle, wo es mir redete weniger und du wirst mehr reden. Aber ich brauche dich, um Schritt eins zusammen, die, wenn Sie Humor würde uns ausführen zu tun, bitte aufstehen. Die Richtungen, die hier auf dem Board, wissen Sie, okay, ein paar von euch haben, sich hinzusetzen. Diejenigen von euch im Rücken, da wir gehen, okay. Danke. Also, das Programm ist hier vor Ihnen. Sie befinden sich jetzt die Computer der Ausführung dieses Programms. Es ist ziemlich selbsterklärend an dieser Stelle. Ja, sollten Sie die Nummer eins werden. Holen Sie sich das? Richtig, viele von euch wahrscheinlich denken diese sowieso schon, erste Freshman Jahr. So, denke an dich, du bist die Nummer eins. Also, Schritt drei hier mit jemandem verkuppeln stehend, fügen Sie Ihre beiden Zahlen zusammen und beschließt, diesen Betrag als Ihre neue Nummer und wir werden eine Plausibilitätsprüfung zu tun. [Geräusche aus Menschenmenge] Weißt du, wie viele wir sind? >> [Unverständlich] >> Nein [unverständlich]. >> Wir müssen eine Antwort Schlüssel haben. [Silence] >> Ja. [Geräusche aus Menschenmenge] >> David: An dieser Stelle des Algorithmus werden Wicklung sollten. [Geräusche aus Menschenmenge] Vielleicht sollten wir mit meinem Ansatz, nachdem alle gegangen sind. >> 43. >> 163. >> David: Ooh Arithmetik vor 300 Leuten plus. [Lacht] Was ist unser Endergebnis sein wird? >> 180. [Lacht] >> 1.200. >> 386. >> David: 386, und du bist der letzte stand? Ist, dass jeder? Kennen Sie die Antwort? >> Was? >> David: Wissen Sie, was die Antwort ist? Wir wussten nicht bringen eine Antwort-Taste bei uns so, 386 ist in der Tat genau die richtige Antwort für die erste Zeit. [Jubel] [Beifall] Das ist okay. [Applaus] Sehr, sehr schön gemacht. Also, was war denn das Essen war definitiv ein wenig langsamer als meine sehr einfachen, aber dennoch der richtige Ansatz gerade gehen und onesies twosies und gerade erst mit von links nach rechts erfolgen. Aber, was haben wir eigentlich nur dort? Nun, wenn es etwa, sagen wir, 400 stehst du an einer Stelle, und dann die Hälfte von Ihnen, sehr schnell, was ich sagen könnte, wollte sich zu setzen. So, die Hälfte von euch setzte, gingen wir von 400 bis 200 dann auf 100 dann auf 50 dann auf 25. Also noch mal, es ist das gleiche Teile und Herrsche Idee hatten wir mit dem Telefonbuch. Wieder mit jeder Iteration wir die Größe des Problems halbiert, wir sie halbiert, halbiert wir es. Also, in der Theorie, Ihr Algorithmus hätte viel schneller als mein linearen Ansatz, weil mein Ansatz würde ich sagen, getroffen haben oder vielleicht 400 Schritte, wenn ich etwas clever 200 Stufen. Aber würde dir genommen hast viel weniger, rechts 400 bis 200, 100, 50, 25, 13, sechs, so dass weniger als zehn Schritte am Ende meiner versus 200 oder 400. Und da ist der Keim eine wirklich interessante Idee. Und ja war, mathematisch, was du gerade getan hast etwas, das ein wenig in logarithmischer Natur durch den log base zwei, teilten wir in zwei und zwei wieder. Und wir werden dies später in diesem Semester erneut. Aber darin liegt wieder eine sehr intelligente Umsetzung. Und, wir sind nur Kratzer auf der Oberfläche der sehr klug die sehr intelligent effiziente Ansätze, um Probleme zu lösen, dass wir letztlich könnte. Also, wer die Leute, die Sie nur mit gechattet werden, wenn kurz? Ein gemeinsames Anliegen in einem Kurs wie diesem ist, dass jeder an die von Ihnen und jedermann das Recht von Ihnen muss klar wissen mehr als Sie links. Nun, das ist absolut nicht der Fall. Und in der Tat, in den letzten Jahren hat dieser Kurs eine konzertierte Anstrengung zu erreichen, um diese weniger komfortabel, so zu sagen hat. Und damit meinen wir nicht Menschen, die noch nie einen Computer haben vor, denn das ist wirklich schwer zu finden, um hier in diesen Tagen berührte, sondern Leute, die E-Mail, nutzen Sie bitte Facebook, vielleicht sogar im Moment aber nicht unbedingt ganz sicher, was zu tun ist, wenn etwas schief geht oder wenn sie über etwas technologische werden gebeten, Sie wissen, gehen die Hände hoch, oder sie schieben die Art von Hardware an einen Freund, der vielleicht mehr vertraut, als sie es. Nun, dies sind einige Statistiken aus der letztjährigen Semester. Also, wenn Sie gefragt werden, wenn wir unsere 400 Schüler gefragt, so im letzten Jahr, weißt du, was ist Ihr Niveau an Komfort kommt in dieser Klasse, schrieb auch 34% nach unten, wie sich unter den weniger komfortabel. Also, wenn Sie in diesen Raum gekommen sind und immer noch denken jetzt, dass Sie wissen, was dieser Begriff beschreibt weniger komfortabel mich wissen, dass Sie in guter Gesellschaft sind. Aber, klar auch, dass, wenn Sie in diesem Kurs kommen sind mit einem Hintergrund in der Informatik und du wirklich, dass geek in Middle School und High School, die das Schreiben von Code und Lehre selbst Sprachen, gut war, dass das auch in Ordnung, weil es definitiv eine nichttriviale Größe Publikum mit diesem Hintergrund sowie etwa 13%, letzte Glied. Und dann gibt's alle anderen, irgendwie jemanden, der nicht so denkt sie weniger komfortabel, sie definitiv nicht denken, dass sie mehr Komfort, sondern sie sind einfach in einen Kurs, um etwas aus ihm heraus. So realisieren diesem Kurs nicht ganz das Spektrum der Studierenden zu ziehen. Und dies in konkreter, 71% der Studierenden gestellt, im vergangenen Jahr hatte Null-Kurse hinter ihnen. Also, wenn Sie die Eingabe dieses Kurses denkt jeder, oh CS50 erfolgt war ein Senkrechtstarter der Informatik in der Schule, es ist nicht der Fall. Die meisten Menschen sind vermutlich gerade an ihm interessiert. Und ein paar, ja, unbedingt einige Kurse, einige oder mindestens eine Person im vergangenen Jahr hatten fünf Kurse durchgeführt worden war. Also, wir haben definitiv einige Ausreißer aber wieder das Fleisch der Kurve ist in diesen niedrigere Werte überhaupt. Und noch eine interessante Statistik, die wir teilten in den letzten paar Jahren ist das Geschlechterverhältnis. So, historisch, zumindest in der Informatik gibt es ein bisschen männlich weiblich Skew. Ich paar Jahren war es viel stärker ausgeprägt als im letzten Jahr war. So, jetzt sind wir schon fast an der% 40 Ebene. Und wenn ich ein Fehdehandschuh hinwerfen, nur um der mit einem dritten Tortendiagramm im nächsten Jahr, das gibt's noch mehr gerecht. Ich möchte darauf hinweisen, dass es absolut keinen Grund, von den Kursen Perspektive, die Männer und Frauen sollten nicht in diese Art von Kurs einschreiben werden. In relativ gleicher Anzahl und zu 38 Prozent, 48 Prozent, wir sind eigentlich ganz froh, dass wir fast an klar, dass du zumindest statistisch sogar Wert von 50%. Also, wenn du in der Tat, weiblich, nicht ruhen zu versichern, dass dies nicht in der Tat einer von Männern dominierten Klasse. Nun, so geschieht dies nur so zu CS50 20. Geburtstag werden. Ich danke Ihnen auch. [Jubel] [Beifall] Das ist sehr nett von Ihnen, weil wir für Sie Kuchen brachte tatsächlich. Und so, wenn Sie später hier Ausfahrt heute, werden Sie tatsächlich eine Chance, viele der Kurse in Kerle, die im Flur sein werde Verweilen treffen. Und ja es wird eine schöne Art von Anreiz Weg zur Erfüllung der Lehr-Stipendiaten werden. Aber nehmen wir einen Ausflug auf eine kleine Bäckerei und wieder im Einklang mit dem Kurs zu tun ist spielerischen Charakter, während dennoch erwartet nichttriviale Menge der Arbeit, während wir, die Spaß haben. Aber, wir haben einen von diesen Kuchen für Sie. [Lacht] Also, wenn Sie lachen, dass du's wirklich gut, denn selbst wenn Sie unter einer dieser weniger komfortabel sind mindestens Kennen Sie es sind. Diejenigen von Ihnen, in der 14 Prozent vielleicht lieber dieses Aroma. [Lacht] Und dann, wenn Sie nicht wissen, was zur Hölle ist los jetzt, haben wir auch dies für den Rest von euch. [Jubel] [Beifall] So sind diese Wesen in Stücke gehackt außerhalb, wie wir sprechen. Also noch mal, nehmen wir die Dinge herauf eine Kerbe einführen und mindestens einige Grundüberzeugung, dass wir dann in den verbleibenden gewährt dieses Semester. Also, wir alle wissen wahrscheinlich, dass Computer letztendlich einkochen irgendwie Nullen und Einsen, nannte diese Dinge Bits. Was bedeutet das? Nun können Sie es ehrlich meinen, wie eine Glühbirne, ist ein bisschen eine Glühbirne, die entweder auf oder es ausgeschaltet ist. Es ist ein Schalter, ist es entweder auf oder es ist ausgeschaltet. Nun, Informatiker denken in der Regel ab, wie die Zahl Null und die willkürlich, und der Begriff als eine auf. Also, wenn Sie werfen ein Licht einschalten, das ist einer schalten Sie es aus, dass ein Null. Oder, was dasselbe ist, schalten Sie das Licht auf, dass die den Wert von true schalten Sie es aus, dass die den Wert false. Also, das sind nur Synonyme. Am Ende des Tages, ja, alle Berechnungen, alle Sachen, die auf geht unter der Haube in einem Computer lässt sich letztendlich auf Nullen und Einsen. Und wenn Sie darüber nachdenken zu stoppen, ist es ziemlich bemerkenswert, dam, was die Welt getan hat, mit diesen Grundbausteinen darunter einige der Geräte, die Sie in Ihrer Hand halten sind. Nun, warum Nullen und Einsen nützlich sind? Mein Gott, auch in der realen Welt haben wir mindestens zehn Ziffern, Null bis Neun. Warum so begrenzt? Nun die Hardware betrifft ist es sehr einfach. Es ist viel einfacher, zwei Staaten, Recht zu vertreten. Wenn Computer eingesteckt sind in die Wand, in der Regel haben Sie dieses einfache Quelle der binären Natur. Es ist entweder ein-oder ausschalten. Strom fließt oder ist es nicht. Also, diese Art von einer der ersten Gründe, die die Welt mit nur Nullen und Einsen in Computern ging's. Aber, können Sie sie als Bausteine verwenden. Also, dies ist eigentlich ein wenig klein auf dem Bildschirm, aber wir können im Binär-oder zählen wir können alles vertreten wir wollen in binären wie können wir sagen, decimal, so wie wir können, auch in der Tat, mit alphabetischen Buchstaben. Und so, hier ist die Quick-System. In nur ein paar Minuten Zeit, Sie wissen jetzt, wie dann zu zählen, wie zu schreiben, zu sprechen, wie viel, wie Sie Ihren eigenen Laptop binary. Na, hast du in der Welt der binären, irgendwie wie der Grundschule Spalten oder Werte. Also, in der Grundschule lernen wir, das ist die, die Spalte ist dies die Zehner-Spalte, die Hunderte Spalte und so weiter. In anderen Worten, warum die Zahl wir wissen, ist, wie 123 die Zahl 123? Nun, mein Lehrer lehrte mich ist dies die Spalte diejenigen, dies war der Zehner, war dies die Hunderte. Nun, was hat das zu bedeuten? Nun, um herauszufinden, was den Gesamtwert von dem, was sonst die Folge von Ziffern ist, nur Hash-Zeichen auf dem Brett. Nun, wir haben eine 100, so dass die 1 mal 100 und dann plus, was zwei 10's, so dass die 2 mal 10 plus drei Einsen, so dass die 3 mal 1, okay, so scheine ich zurück zu bekommen haben, wo ich angefangen habe. Aber dies ist sehr einfach verarbeiten nur die Multiplikation der Zahlen, die durch den Wert der Spalte genau das, was binären dreht sich alles um. Aber in binären Sie Potenzen von zwei nicht Zehnerpotenzen. So, hier ist eine Serie von acht Glühbirnen. Wissenschaftler wie Computer, um Werte wie zwei und acht und 16 sowie 24 und 32 zu benutzen, weil sie alle in der Regel günstiger Werte zu verwenden sind. Also, wenn wir etwa acht Werte sprechen in dieser Sequenz ist wie genannt Byte. Und wir in diesen Tagen nur selten in bytes reden, reden wir Megabyte Gigabyte Terabyte und in diesen Tagen. Aber es ist letztendlich alle das Gleiche. Hier ist acht Bit ein Byte AKA, nur einfache Jargon. So sind all diese Glühbirnen aus. So ist die Mathematik eigentlich wirklich einfach. So gibt es auf der rechten Seite, obwohl es klein ist, um zu sehen, ist das eine Kolumne, die zu zweit, die Vieren, der Achter, der 16s, 32s, 64s, 128s. Okay, vielleicht ist es zunächst schwer zu merken, aber es ist einfach mit zwei multipliziert von rechts nach links. So können Sie immer neu dieses. Nun sind sie alle weg, so dass die 0 mal Platzhalter, 0 mal Platzhalter. Also, das ist die Zahl 0 in binärer vertreten. Mit anderen Worten: Wie schreiben Sie die Zahl, wie wir wissen, 0 in Binär? Nun, eins, zwei, drei, vier, fünf, sechs, sieben, acht, und technisch wie in dezimal, all diese Nullen, tun sie nichts hinzufügen, um die Formel, dass sie nur da, weil wir willkürlich entschieden wir uns wollen acht von diesen Dingen in einer Reihe, rechts. Wenn sie physische Objekte sind, haben wir acht so sie haben alle abgeschaltet. So konnten wir einfach weg mit einer Null geworden. Nun, wie Sie repräsentieren die Nummer eins? Nun, instinktiv, wirst du einer der Schalter werfen. Du wirst eine Glühbirne einzuschalten. Also, es ist die Nummer eins gesetzt, weil wir jetzt eine, eine Glühbirne, die auf die, in der die eigene Position. Wie kommen wir zu zwei repräsentieren? Nun, wir sind eigentlich los, um zwei Schalter jetzt werfen zumindest im Vergleich zu diesem Zustand müssen wir wiederum auf die beiden Kolumne auszuschalten diejenigen Spalte und jetzt haben wir den Wert eines in der Zweier-Spalte. Also, das ist der Gesamtwert der beiden. Nun, eine schnelle geistige Übung, was los ist mit der nächsten Folge passieren? Wie präsentiere ich die Nummer drei? Nun, ich brauche eine aus der Spalte zu zweit, zu dritt eine aus der Spalte und ah ha. So, jetzt hab ich erhöht, daß man. Und nun, dasselbe Grundmuster wiederholt. Was ist die Nummer vier? Nun wollen wir mal sehen, ich brauche nur eine Spalte in den Vieren und dann Nullen in der Zweier-und Einsen. Also, weiter so. Und es ist gerade diese Abfolge von Schritten. Und in der Vorstellung von binären ist eigentlich gar nicht so kompliziert. An der Spitze stehen wir Ihnen acht Nullen. Darunter befinden sich sieben Nullen und eine haben. Darunter befinden sich sechs Nullen, eine Eins, und eine Null haben und das ist binär. Now, thankfully, we computer scientists, we programmers by terms end are not going to often be writing in binary, talking in binary, thinking in binary because we've built many layers of the traction on top of that. In fact, people rarely talk about bits except in a networking context they talk about bytes because one bit, not that useful, eight bits these days still not that useful, but at least eight bits, one byte is at least getting us toward more useful units of measure. But, when we start looking underneath the hood, when we do certain problems such as look at files and look perhaps at network traffic, it will become interesting to know how you're representing data because you're going to have to figure out how to display that same information. And, in fact, we, if we only have zeros and ones, how do we go about representing, say alphabetical letters? Well, we're going to have to have some mapping between binary and letters. But that's as of yet unclear. But to hammer this point home and to give me a break from speaking at, I thought I'd pause for a moment and see if we can't recruit eight volunteers, one byte eight people. Can I get eight people for whom it is not too awkward to come on up. good, good one, two, three, four, five, six, seven, eight very enthusiastic eight, come on down. So, you all, for just a moment here, oh and you have to be willing to not be on the internet because there is in fact a camera in the back of this room. So, turn back now if you don't want to be on the, hello mom, in perpetuity. So, let's see, you here will be the 128th column. And let me ask that you simply hold this before you. And actually, if you could scooch this way just a little bit, then I will get out of your way. You'll be the 64's column, you shall be the 32's column and the 16's. 32's, 16s, 8's, 4's, 2's and 1's. All right. So perfectly lined up with the place holders from before, but we need a little bit of mapping, so a quick set up. We just need an arbitrary way of mapping binary numbers, which really could be converted very easily to decimal numbers. So we need a way of converting numbers to letters if our computers are actually going to show us emails or type URL's or actually display non numeric information. And, in fact, there is a system for that, it's called ASCII, an acronym whose meaning is not so interesting, but whose utility is. This is just a mapping from letters to numbers and there's actually a lot more numbers on the screen, and you guys, don't worry, aren't going to have to test yourselves with this in just a moment. But there's a mapping between numbers and letters and I'm just going to get us started by pointing out a couple of these. The numbers of interest right now are going to be, whoops, are going to be this. Whoops. So in this column here, I can't seem to zoom in simultaneously, we have decimal. Dec for decimal. And then we have the character on the right hand side. So if I hop over into this column, thought it's a bit small on the screen, the number 65 represents what letter? Capital A. And the number 97? Lowercase A. All right. So those two alone, right, so do not go home and try to remember ASCII chart. Come quiz time, do not try memorizing an ASCII chart. Memorize two, 65 is capital A and 97 is lowercase A. And from there you can bootstrap yourself to all of the other alphabetical characters. But all this chart says, and I just downloaded this chart from ASCIItable.com, this is a standard that's been around for many, many, many years, but most computers still use it. What we now have is a means of encoding alphabetical information using what's ultimately numeric. So if these guys are just switches, light bulbs, computers, we can actually convey messages. So each of you has some hints on the back. We're going to have three rounds here where these guys are going to spell out in English, in ASCII, a very short message, a three letter word. It will involve them either raising their hand, thereby representing a one or just standing there awkwardly, thereby representing a zero. So why don't we proceed immediately with round one and you can either raise or not raise your hands. So the audience doesn't get off the hook. What number are they currently representing? 66. Right. Not hard because we have a one, a hand up in the 64s column, a hand up in the 2's column. 64 times one plus two times one is 66. They're representing the number 6, which means the first letter is B. So not too bad, right? Round two. First letter was a B. [Lacht] >> Seventy Nine. >> David: Can someone second that? Yes. All right. So 79, which means it's now an O. So B,O. There's a third letter. Actually that is kind of, yeah. Third round. Third and final round. What number is this? I heard an 87. Someone else agree? All right, yeah. This is in fact 87, which maps to, and this is a very clever set up at which point you all B, O, W, it's bow. Very good. So actually besides that little souvenir, that was not a very enthusiastic applause, so I'll take care of you. So we do have a little something for these guys here now that they just appeared on center stage doing perhaps the geekiest thing they could. So maybe if we could humor them if only because I'm feeling a little bit awkward now. A little round of applause for these guys here. [ Applause ] All yours. All right. Thank you very much. So, so, it turns out that we can take this one step further, but you are now entering a community of people who understand things like this. [ Silence ] It's slowly spreading, yes? [ Laughter ] It's not cool that you understand this now. So we've already done some damage here today, but yes, there is now such a thing as geek humor that you might just catch a little bit more on to. So what are we going to do throughout this semester? So there's 12 weeks, zero index, so 13 weeks in total. You'll find throughout the semester that computer scientists tend to count starting from zero for reasons that will soon become clear. But what we're going to do this week, starting this Friday, is introduce you to programming. Now you may already be coming at this course with a background in the same, and that's perfectly fine, but we'll also be able to introduce some more sophisticated topics than are typically covered, things like events and threading, so just to toss out a couple of buzz words for those unfamiliar. But what we're going to do is not dive into what the typically traditional language like Java or C++ or C sharp catch phrases that you might have heard in the past, but we're going to use a programming environment, a graphical programming environment that was actually developed by MIT's media lab. And this is an environment that allows you to program, quite literally, by dragging and dropping puzzle pieces that fit together logically that lets you implement these things called loops and conditions and Boolean expressions and you can actually, on day one, after this Friday, write a program that actually some of your friends might care about. So in yester year, say when you've taken a computer science course in high school, odds are one of your first programs was the equivalent of hello world, like wow mom, I just made the computer type some characters on the screen. It's a very underwhelming experience. Much more interesting is it to implement a little something like this, as one of last year's students did. So I give you the work of a former classmate. It's a love story, of sorts, about dancing cookies. [ Music ] So this was actually from a student who had never programmed before. And just to give you a teaser of this interface, and we're only going to use this for one week time, really to get the comfort levels up and to really get folks excited about what you can actually make these machines do, this is an environment where you'll be programming by, for at least a week, just dragging and dropping puzzle pieces that fit together, as we'll see, in a logical fashion. And it lets you do fun, silly things quickly. And for any of you who are a little bit familiar with things like Java and C++, it's usually a good semester or two or three before you finally get to start writing something that another person might actually enjoy watching. Well, in week one of the course, or the second week, zero index, where we dive into a little more traditional environment. In this course we'll spend much of our time on a language called C. This is one of the earliest languages that, unlike Java, actually gives us much greater access for better or for worse, to manipulating hardware and actual memory, and we can do a lot of damage with that. In fact, any time you read of web servers being exploited or computers being hacked into, very often to this day it's the result of people having run software in a language called C or C++ without sufficient care given to what are called buffer overruns or lengths of arrays, so some fairly technical concepts that are not that hard to understand, but there's been a lot of humans making a lot of mistakes for years and with this language we'll actually understand some of those security implications. But each week, typically, we'll introduce also an interesting domain that will inspire that week's problem set. So we'll also take a look this week at the field of cryptology, cryptanalysis, the notion that you can encipher information in such a way that people can't read your messages, but if clever enough perhaps you can, in fact, crack what are otherwise secret messages. In week three we'll then look at some basic fundamentals of computer science like searching and sorting and we'll actually look at this notion of recursion, how to debug things. In short, we'll take things up to the level of problem solving and not so much about mere syntax and implementing short little cookie cutter programs. In week four we'll introduce more sophisticated problems still. What does it mean to manage memory? What does it mean to run out of memory? What does it mean to actually segfault, if you've heard this expression, and odds are you haven't, but very bad things happen and frankly by terms end you'll understand terms like my code segfaulted which actually is generally not going to be a good thing. But then again, we'll introduce some domain specific stuff. So actually one of my internships during graduate school was to work for the local Middlesex County District Attorney's office doing forensic investigations in a digital sense. The local Mass state police would bring to our office hard drives and floppy disks and sometimes for no reason mice and keyboards. And we would be tasked with finding evidence. Now it turns out, maybe just an FYI, that the criminals in Cambridge, Massachusetts, at least, not necessarily that clever. Very often our forensic analysis boiled down to booting the computer up and double clicking on the My Documents folder, and therein laid the evidence. But what we'll do this week is give you a sense of what it actually means to store information on a hard drive, on a flash drive, and why can't otherwise private information be disclosed to third parties when you drop off a computer to be repaired or even when you discard it. Well someone might very well be sifting through those hard drives and it's really not that hard to find data if you know how to look for it. Well, in week five we'll look at more sophisticated data structures, tools and techniques that you can use ala phone books and ala searching huge data sets much more intelligently. And the week's problem set will task you competitively to see just how fast the code you can write is and how little memory you can use. Toward terms end though we'll take things up to a higher level in terms of programming languages and put C behind us and introduce a web programming language known as PHP, one of the popular languages these days. Much of Facebook is still written in PHP, at least outward facing, and it's just a very easy language to learn quickly once you already know another. So with PHP we'll be able to solve problems and implement websites that do interesting things. The news site I showed you, the events site, the shuttle boy site, all of those all happen to be written in PHP. But by no means is that prerequisite. What you'll also find throughout this course is that you're not going to exit this course knowing C. You're not going to exit this course knowing PHP. Those are not interesting skills to claim, but knowing how to program, knowing how to use data structures and algorithms in an interesting way, that's a compelling story. Even I, all these years later, throughout college and graduate school, the only time I ever learned a language was probably in CS50 where it was still taught in C and CS51, which is one of the successor courses. Everywhere along the way since has been go learn this language and then work on this problem set because computer science is not supposed to be about here's a language, let's spend seven weeks teaching you where the semi colons are. There are much more interesting ideas out there. Databases, for one. And in week two we'll introduce you to this query language called SQL that'll allow you to store information in databases and actually implement some fairly interesting final projects. The week after we'll look at what's called client side programming, doing interesting things on a user's computer, taking advantage of their CPU cycles, doing things ala Google maps and these websites that actually use JavaScript, which is actually a language we'll introduce to let you do client side things, make more interesting, more sophisticated user interfaces, but at the end of the day have to be really mindful when implemented of a lot of sticky issues like network speeds, network performance and security. So it's not about again just coding something up that's fun to use or pretty to look at, but actually thinking about the design that'll be the interesting process. And then, the end result aesthetically will often be a really neat toy to show yourself or a friend. And then we'll look at hardware. We're going to take for granted that there are these physical boxes throughout much of the semester that will do what we tell them to do. But how are they doing that. So we'll actually take a peak under the hood and talk about what a compiler really is, what a CPU really is and actually consider what's making all of this fanciness from stupid YouTube videos on down possible. So what are the expectations? Attending lectures and sessions, completing nine problem sets assigned roughly weekly, two quizzes, the final project and there is in fact no final exam. Grades, it's always a question, broken down as follows here. You can take the course pass-fail. But let me say it here, and I've said it many times. I personally care relatively little about grades. I think they are a wonderful, well, they are a useful pedagogical tool with which to motivate and unfortunately sometimes de-motivate, but you'll find in this course that at the end of the day it's more about seeing how far you can go from weeks zero to week 12, as we say in the syllabus than it is about absolutely ranking all students in this course. So if you're coming into this course among those less comfortable, though a large demographic do not assume that that's automatically putting you in the lower third of the so called distribution. At terms end do I sit down with the TF's and discuss each and every one of the students. We take into account where a student came from, what kind of trajectory they were actually on and so at the end of the day please focus more on, and I don't mean to sound too grand, the process of learning and less on the numeric's. And you'll actually see that we grade problem sets, in particular, very coarsely, whereby along three axis, you will get a score of 1, 2, 3, 4, or 5, where 3, is in fact good. 3 is not C. 3 is good, 4 is better, 5 is best. But more on that as the problem sets are released. So the course's website is where you will find, as in most cases, a whole lot of useful things, if not silly things, too. And we have the luxury, as computer scientists of implementing it ourselves. So over the course of the semester you will see various new features rolling out. You'll find out over the course of the semester that the bulletin board is a wonderful place, certainly in the course of this size, to turn when you have questions about the problem set, questions about some computer science concept. You'll be able to check your grades, download all handouts in advance of lecture typically will I post the slides, if you're the type who wants to scribble on notes. But as you've seen, usually I shy away from long lists of details and more like pictures of cats and other visual cues. So you'll find, too, that we will provide printouts of code when we actually think it particularly advantageous to write right on the paper. Software, videos will be available, usually around 1 to 2 to 3 days maximally after each lecture. So the courses are being filmed and every lecture will go online in various formats including QuickTime and MP3's for downloads to iPods and such. And also you will find a link to download what we call the virtual terminal room, which as you'll see is related to virtual office hours. Books are expensive and in the computer world also not that useful. They are on the shelves of the coop, although we're told that last year they ordered like 120 books for the course and 30 were actually purchased, but this perhaps speak to the fact that there are places like Amazon.com, so if you are the type who actually enjoys the sort of support structure that a book provides, if you like to read up more than say a course's typical materials offer, by all means, procure one or more of the books that we recommend here and discuss more in detail in the syllabus. But realize there are so many resources that this course provides in printed form and electronic form, and my God, there's the whole internet out there. Books are not something that are required for this particular course. Lectures, in general, will be Monday's and Wednesday's, except for this Friday and next Friday, simply because of shopping period and Labor Day. So we'll meet this Friday, next Wednesday, next Friday, but there after this is just a Monday, Wednesday course. So this little visual cue here is to remind me that yes, we do distribute videos in QuickTime formats, MP3's, fun ways that you can, if you're actually this type, maybe in the 14 percent, watch a computer science lecture on your iPod, but it reminded me that at terms end last year, the course culminates in final projects, in which students can design most anything they want, and we actually had some students tackle some iPhone applications. Some one of these at least is now in the Apple store. It's called Rover. It's been adopted essentially by Harvard agencies and it's the iPhone version of the unofficial guide to life at Harvard. They did a brilliant job. I bring this slide up too, just to point out what other technologies might very well be down the road. Some of you may have seen this before, but just to give you a teaser of apparently what's in the pipeline, I thought I would offer this brief distraction here. [Musik] >> With the MacBook wheel, Apple has replaced the keyboard with a sleek, touch sensitive click wheel. Apple CEO Steve Jobs introduced the product yesterday at the annual Mac Expo. Senior product innovator says the MacBook wheel will make typing a thing of the past. >> At Apple our philosophy is create products that are simple to use and nothing's more simple than a single giant button. >> Gilman showed me how the revolutionary new computer works. >> Gilman: Just open the intuit-type alphabet menu here, scroll to the letter you need and center click to select it and click again to capitalize and repeat this process for each new letter. It couldn't be simpler. You could also let the predictive sentence technology complete the sentence for you. >> Gilman says the MacBook wheel has also simplified organization of files, so searching your hard drive will be a snap. >> Gilman: Just press both sides of the wheel concurrently and center click and there, you have an alphabetical list of every file on your hard drive. Everything is just a few hundred clicks away. >> Apple is calling the MacBook wheel the most intuitive product every designed. >> Here at Apple we like to think that we're giving customers features they don't even know they want yet. >> While the MacBook wheel won't hit the shelves for another 3 to 15 months, many apple users already have it on their wish list. >> I'll buy almost anything [inaudible] and made by Apple. >> Alex [inaudible] was one of the lucky few to get to try out a MacWheel and spent 45 minutes typing an email to his friend. >> I never really realized how much I hated keyboards until I saw this thing. >> I like how it automatically says, sent with a MacBook Wheel, so people automatically know you have one. >> With a price tag of just under 2600 dollars for the lowest end MacBook Wheel, it is an investment. But the super thin laptop features numerous innovations, like the new ultra thin hummingbird battery, which can power the MacBook Wheel for a fill 19 minutes before needing to be recharged and the computer is virtually unbreakable unless dropped or hit. But Apple isn't resting on its laurels, Bryan Gilman says they're already hard at work on the next generation of the MacBook Wheel, which will be four ounces lighter due to its lack of streaming hard drive or wheel. For the Ugly news Network, I'm Jeff Tate. >> Thank you for that, Jeff. It remains to be seen if the wheel will catch on in the business world where people use computers for actual work and not just dicking around. Moving on, police warn. >> David: So I've seen that thing at least a half a dozen times now, including once at like two a.m. last night and I was scrolling down on YouTube and literally like an hour prior, some guy in all seriousness posted, just a wheel? That's the stupidest product I've ever seen. [ Laughter ] And then the rants ensued in the thread thereafter. So besides lectures there are also sections and it is your teaching fellow and the course's course assistants that you will get to know very well over the course of this semester. Sectioning won't begin for a week or so's time. More on that in the lectures to come. But know that the course will have several different tracks of sections, much like First Knight's has for music. Sections targeted more at those less comfortable, those more comfortable and those somewhere in between. And we also offer most Sunday nights before a problem set is due on the following Friday is what we call code walkthrough's where one of the course's teaching fellows will lead a session targeted specifically at the week's problem set and will help you answer the question where do I begin, how should I approach this? And that too will be filmed and made available online and always linked on the course's website. So this course has a huge staff. Our staff is larger than Harvard's average class size. We have over 50 people involved in the production of this course on a weekly basis. Some of them teaching fellows who hold sections, grade work, hold office hours and more. Course assistants who are former students, who are offering on a volunteer basis in fact multiple hours of office hours in the computer lab per week. System administrators, folks doing all of our AV and video production. Someone who will actually be taking notes for you. So it is actually my opinion that scribbling down almost every word that someone like me says is not a very good use of one's time. It's much more interesting I think to actually engage with what's on the screen, what's being presented. And so what we will do as a course is post PDF's online within a couple of days of lectures of scribe notes, which is essentially an authoritative version of course notes, unedited, but documenting what went on in lecture that day, thereby hopefully freeing your minds and pencils from jotting information down. We have some of our team here. Most of our team is actually shopping courses. But if a few of your guys would like to come on stage for a moment with our head teaching fellow and assistant head teaching fellow. Allow me to ask the latter to say a quick hello. And as these guys come up in absentia allow me to say that also on staff this year besides the folks you see here are Alex, Alice, Andrew, Batul, Charlotte, Chris, Dan, Dan, Daniel, David, David, David, Derek, Dev, Didi, Doug, Drew, Erica, Fil, Glen, Greg, Janice, Jason, Jean, Jeff, Jesse, John, John, Jonathan, Jordan, Josh, Karim, Kelly, Ken, Kent, Kyu Bok, Lee, Madhura, Marta, Matthew, Michael, Michelle, Mike, Mike, Nathan, Patrick, Peter, Peyton, Rose, Saba, Sanjay, Shannon, Stacey, Ted, Wellie, Yair and me. So our course is teaching fellows and course assistants, Cansu and Yuhki, would you like to say a quick hello? >> Hi. It's definitely a great honor to be back here for the third time. And if you're one of those who are like less comfortable. [ Laughter ] I think I can [inaudible]. Okay. [ Laughter ] If you're one of those [inaudible]. There's no need to be afraid. I walked in here two years ago with no experience what so ever, and I thought that I was like dumb and I was sure that I was going to fail the class. And I came back for the third time. I did not fail the class. This course is great because it has such a good community. As you can tell by the names listed by David. All the CA's and TF's are here to help you. So if you have any questions at all, just come up to us. Not taking this class because it's hard is not a good excuse. So, hi. >> [Inaudible]. >> Hi, so well both as a student and TF, I've really enjoyed being a part of this course. And even though it's a course that requires a lot of work from you, we've put a lot of work in to it for you as well to make it as enjoyable and as fun as possible. So, we really hope that all of you stay and take part in this very special experience. >> Thanks. >> David: So you will find, thank you, all of you, you will meet them in the hallway in just a few minutes as well. So you'll find that this course, perhaps more so than many is very much a shared experience. This is not a competitive course. This is not your premed course. This is a course which ultimately yes is about doing independent work, as you'll see each week by way of the problem sets. But you can't help but to get close to someone when you're fighting with some bug and banging your head against the computer screen proverbially to try to track down some bug. And I think you'll find that past students will concur that you exit this course with a lot of friends among students and also on staff. So where does that happen? Well, within office hours in the basement of the science center there's some large computer labs and we pretty much take them over five nights a week. These won't start for some time, and this, to be honest, is perhaps the most beautiful picture of the science center I've ever seen. [ Laughter ] It does not look like that on the inside. But it is a place where a good percentage of students do choose to spend time to get one on one assistance with each of the week's problem sets. Each week we will offer more than 100 hours of assistance one on one in the science center per the schedule that will eventually go online. And for those of you who live, say in the quad, or in Mather, or who just don't want to trek all the way to the science center to ask that quick question, we also offer what are called virtual office hours, much like remote technical support where you'll be able to log into a glorified chat room, in which yes, you can type back and forth with a TF or a CA, but you can also share your screen or share control of your mouse with them subject to your consent so that they can help you troubleshoot any problem or any question you have remotely. To give you a sense of what's involved in the course, these are statistics from last year. So you will, I think it's quite fair to say, work your ass off in this course. But per my promise from the start, this is one of those experiences that I don't think a typical student regrets. If you flip through, for instance, the Q Guide forms that are all on the course's website, you'll find that only by putting in the time to a course like this do you really exit having felt like you got something out of it and frankly might very well even have emerged even smarter. So what does it mean to actually write programs and implement problem sets? Well, the first problem set last year, a quick retrospective here, was to implement your very own programming scratch. And we spend just the first week there, and the goal is to implement your own game or animation or art or anything that appeals to you. In week one, then do you implement some basic C programs to get acclimated to some more traditional programming environments at the command line, at Linux so you get comfortable with some of these basics that will certainly serve you well in the long run. Last year's Problem Set 2 was about cryptography. We gave students the opportunity to implement some ciphers, some algorithms that let them encrypt information. And we also offered some students the opportunity to do the opposite. Each problem set, many problem sets, as you'll see are implemented in two editions. A standard edition that we expect almost everyone to do, say 90 percent of the class. And then a hacker edition, which presents the material from a more sophisticated angle, expects perhaps a bit more clever work for those more experienced, and for this one did those students get handed in the hacker edition pre existing user names and passwords in encrypted form and they had to figure out what those passwords for. We actually got into trouble for this a few years ago because all of the sudden FAS Computer Services saw like 50 people running a crack program on nice.fas.Harvard.edu, so they now have been given a heads up for programs like that. Last year students implemented the game of 15. Not all that much fun to play as a party favorite, moving the numbers up down, left, right, but a real stepping stone to implementing something interactive that involves a human and the hacker edition for this one had students implementing God mode, which actually solved this thing for the human, maybe cheat mode is the more apt term, in Sudoku, which was a step up toward that, where we provided the students, you, with a framework with a whole bunch of code that you needed to first understand before taking things the final mile and implementing some of the remaining functionality. And then we dabbled in forensics and this grew out of a real world experience between me and a friend. For this problem set last year, this buddy and I, who he being a particularly good photographer, strolled around campus and we shot photographs of unique, non obvious, but identifiable places on campus. And this was using his digital camera. All of these JPEGs got stored on a digital flash card or what not. And then I accidentally formatting the thing, or erased it. Well, it turns out formatting something or erasing something, usually means neither. It just means doing a little bit of work to make the human think their data has been erased, when in reality it hasn't. It's just been forgotten. And so we tasked last year's students with writing a program in C to actually recover these photos for my friend. We gave everyone a forensic image, so to speak, a big file representing that compact flash card, and they had to recover the several dozen photographs. And they also had to solve this little murder mystery. We provided folks with this image here. Those of you who've seen this before might be doing that squinting thing right now where you're trying to look through the picture, well you look pretty awkward, because this is not a magic eye puzzle. This is just random red noise that actually has behind it an actual message. And it turns out, I think it was Colonel, let's see, I've got my little solution here. Last year it was Colonel Mustard in the study with the candlestick. And this was the murder message recovered by students who wrote code to do so. And then in Problem Set 6 last year. We challenged students with implementing the fastest spell checker possible. What do we mean by that? Well, we handed the students a big text file containing 140 plus thousand English words, and we said write a program that loads all of these words into memory, but very quickly and very efficiently can tell us yea or nay, is this document perfectly spelled or are there errors? And what we provided was a testing framework, a harness, that students, if they wanted to compete, could run their code against some benchmarks, against some testing programs that we wrote. And then, ranked on the course's website from fastest to slowest were the running times, the amount of time it took for each student's code to actually execute, complete opt in. It's by no means required. And we took a bullet for the team and made sure that one of our own teaching fellows intentionally, I think, was at the very bottom of the list. So, there was definitely a lower bound. But the odd, the funny thing was we saw this in the cue guide evaluation, this problem set of all things, was apparently the one that people sunk the most time into. Not because it took any longer than all the other p sets, but they would come back from like dinner, look at the board, and realize dam my friend, my roommate just ever so slightly inch higher than me and so it incentivized people if only to one up their friends and roommates. In Problem Set 7, last year, we asked students to implement their own E*Trade like website, whereby you had to create a website using that language call PHP a database called mysql that actually lets people log in and then manage a portfolio of stocks, buy stocks quote unquote, sell stocks quote unquote, get stock quotes. And from where? Well, we have the students; we had the student patch into Yahoo Finance where they grabbed merely the Real time stock quotes to actually simulate the process of buying and trading stocks. Unfortunately some students, perhaps some economics majors or just folks with too much free time figured out last year how to gain the system. So, even though we gave everyone 10,000 virtual dollars, I think our winner turned teaching fellow this year actually, right don't push them away make them one of your own, for a billion dollars something like that ridiculous. Turns out we weren't really checking whether or not people were trading after hours. And it turns out that also, Yahoo stalk quotes are not in fact perfectly Real time which means if you just have a real E*Trade account you can see the future and see where the stocks are going. [ Laughter ] So, apparently you can exploit that if you put your mind to it. and then, in Problem Set 8, the course's final problem set last year, we had students implement a mash up where they take Google News and Google Maps and mash them together using JavaScript, PHP and SQL in such a way that they had a website that they could find all of the local news from whether it's zip code 02138 or 90210. And, you would actually pull the local current even articles by this thing called XML and integrate it into the view of a Google Map. And then, at very course's end was the true climax of the course. This course culminates in final projects, which ultimately will be your opportunity to design your very own piece of software, designed by you or two or three friends. And the course then climaxes with the new and improved, with the second annual computer science 50 fair which last year was an exhibition across the street in one of the engineering buildings with 300 laptops atop tables, popcorn was popping, music was playing, stress balls with CS50's logo were being thrown around. And this was an opportunity for our 300 plus students to exhibit their final projects not only to each other but also to some 900 attendees in total. And we also invited some recruiters as well. So, that is what you have to look forward in this course. You also have cake to look forward to in the hallway. This is CS50 and we'll see you on Friday. [Applaus] ==== Transcribed by Automatic Sync Technologies ====