>> David: Vitajte, moje meno je David Malan a to je CS50. A to nie je váš typický strednú školu výpočtovej techniky a kurz. Tento kurz je niečo zvláštneho. A nie je to preto, že som vyučovanie. je to preto, že je to jeden z, Radi by sme si myslieť, tie vzácne predmety, ktoré skutočne zhromažďuje svoj mozog toľko a svoj rozvrh tak, že do polroka ku koncu budete cítiť skutočne múdrejší. Tak, to bolo tak, ako som cítil, keď som sám sa týmto smerom vydali v roku 1996. Bol som vládnej hlavné v čase, keď tu žijúci v Mather House. A, I. [Fandenia] Ako je iný, päť ďalších tam. Takže som bola vláda veľké v tej dobe. A bol som hlavným vláda, pretože som vždy mal rád históriu. Páčilo sa mi ústavného práva na vysokej škole. A tak som vyrazil na tohtoročnej ceste prvaci robiť to, čo viem najlepšie, robiť to, čo som vedel, že som rád. A ja som vždy bol tak trochu geek, já bych vždycky blábolil s počítačmi. Ale ja sám, snáď ironicky pri spätnom pohľade, vždy som si prezeral chlapci, ktorí boli pri počítačovej vedy na mojej strednej škole, moji priatelia ako skutočný Geeks. A napriek tomu nakoniec urobil, druhak rok som sa tento malý kurz s názvom CS50, ktorý vlastne mal strach mi moju vlastnú nováčik roka. A já bol používateľ asistent v tej dobe. Takže som bola iste už majú kvalifikáciu, aspoň, byť medzi tými, ktorí tie mágov som si robil žarty z vysokej školy. Ale ja sa bál. Tam je, že bola táto povesť v tej dobe a možno ešte čiastočne, že to bolo, to bolo hrozné kurzu. Bolo to veľa práce. Bolo to ťažké, a napriek tomu je to jedna z tých vecí, kde, môj Bože, že kôra bola oveľa horšia než jeho kousnuti. Pristihla som sa druhého ročníka, prvýkrát, vlastne hľadanie domáce práce zábavu. A ja nehovorím to len preto, aby rozteč tento kurz pre vás. To bolo skutočné realizácie pre mňa. A teraz, myslím, na jednom mieste, urobil som cez čiaru na true geekdum, kde vlastne som sa tešiť na piatkový večer, pretože som mohol stočiť do prednej časti môjho malého MacBook a práca na stanovuje problém CS50 je. Takže v tomto bode, myslím, že som mal jasne prekročilo demarkačnú líniu. A je naším cieľom v tomto predmete nie je zase vás všetkých do tejto osoby, ale len povedať, že tam je niečo osobitného o tom samozrejme trochu niečo zvláštneho počítačovej vedy všeobecne, zvlášť v týchto dňoch. A čím viac aklimatizovaný sme všetci dostali do technológie, tým viac hračiek si nosíme v našich vreciek, ktoré sú samy počítača. Chcem povedať, že môj iPhone je v skutočnosti vyšší, vykonáva počítač, ako môj notebook bol na vysokej škole. Môžete urobiť veľa vecí, elegantné s týmito vecami. A teraz, väčšina z nás v tejto miestnosti, zrejme stačí použiť softvér iných ľudí, nástroje iných ľudí, solutions iných ľudí, aby problémy, pretože sme sa ísť do iTunes, sme sa stiahnuť niektoré app z App Store a Walla, čo môžeme urobiť niečo skutočne užitočného. Ale tým, že do konca tohto polroka, môžete byť osoba, robiť, že riešenie problémov. Môžete byť osoba, riešenie niektorých problémov, budova app, že kus softvér, ktorý nástroj, či už po jednej tesne Baví ma, baví vás. Napríklad, controlling, povedzme vašej knižnice iTunes z vášho byty s jasne app, ktorý už existuje, alebo si môžete nájsť shuttle rozvrhy ľahšie napríklad. Takže v skutočnosti, jeden z prvých vecí, ktoré som urobil po nástupe CS50 opäť, to bolo pravdepodobne v tomto bode noci piatok a sobotu, bola to príležitosť v čase, keď Harvard bol spustený kyvadlové autobusy. A dodnes, majú stále tlačené cestovné poriadky. Ale tam bolo naozaj v žiadnom prípade on-line, ako zistiť, kedy ďalšie raketoplán. Teraz som to nevadí, pretože aj keď som žila v Mather som nebol medzi tými, ktorí všeobecne sa raketoplán. Ale, mal som veľa priateľov v Pfoho napríklad. A jeden z nich opýtal sa ma, myslím, že v jednej chvíli. [Fandenia] Dobrá Pfoho to lepšie ako Mather zdanlivo. Takže jeden z mojich priateľov druhu ma premýšľať možná dokážem napísať malý program na druh pomoci mojich priateľov kontrola raketoplánu plány. A tak sa zrodil rozpačito volal raketoplán chlapca, tento kus slovník, ktorý zostal zhruba na určitý počet rokov, aspoň u niektorých z upperclassmen. V tej dobe to bol tento malý program príkazového riadku, svojim duchom podobať Dos. Bol spustený v prostredí UNIX. Takže to nebolo moc sexy vôbec. Práve ste zadali pár príkazov a to vám povedal, keď raketoplány boli. No, v týchto dňoch je to trochu zložitejšie. A je to vlastne predstavoval presne typy projektov, ktoré študenti v tomto predmete skončiť procesy výrazy konca. Takže, toto je verzia štyri, asi 15 rokov neskôr, v Shuttleboy. Zdá sa, že Google Maps je trochu pomalý tam. Ale pre tých z vás, ktorí sa odtiaľto dostať po triede a ísť, teda od Memorial Hall a treba ísť do, povedzme, Quad. No, môžete buď ponechať za dve minúty, keď je to naozaj nefunguje pre vás len ešte, alebo ste ako mnoho iných možností, ako si možno rád. A čoskoro, môžeme ihrisku to od CS50, bude to rovnaké schopnosti pomocou SMS. Môžete text Shuttleboy cez telefón. Môžete volať Shuttleboy. CS50 telefónne číslo v tomto roku, dobre, kupodivu to bolo k dispozícii, 617-BUG-CS50. Takže, bude to debut čoskoro. Takže sa nemusíte hovoriť len zatiaľ, pretože som dostal pokarhanie za, teraz je to byť smerované do nášho systému hlave výučby kolegami na mobilný telefón. Takže, budete len sa ho, či máte otázky týkajúce sa raketoplán harmonogram teraz. Ale to, že čoskoro bude vykonávaná. Takže, iné veci, vlastne, že sme sami strávili tento rok v lete na naozaj v rámci prípravy na tento semester bolo veľa iných problémov, ktoré by sme chceli riešiť. Napríklad, tam je veľa vecí, čo sa v tomto kampusov v daný deň. A v skutočnosti, inak povedané, je tu celý rad vecí deje na tejto pôde, že som určite nikdy využiť. A aj keď mám teraz ohromený tým, ako veľa vecí, ktoré idú ďalej, na akademickej pôde, som ešte nikdy zdá nájsť čas. Ale, Walla, dokonca aj tam, CS50 je prednáška. To, kde ste ich, tak to bolo, to bolo program sme písali na celkovej všetkých udalostí na akademickej pôde. A to bolo niečo, čo ostatní študenti v tomto rovnakom kurze majú riešiť na vlastnú päsť. A sme spoluprácu s ďalšími subjektmi na akademickej pôde skutočne dosiahnutie tohto cieľa. Ale namiesto aby CS50 tento termín je, že všetky z týchto nepatrných programov sme pracovali na tom, či je tento, alebo či jedna pre agregáciu všetky novinky z Harvardu na jednom mieste všetky Google News, všetky tieto veci bude mať to, čo sú tzv API, rozhranie pre programovanie aplikácií. A to je len fantázia hovoriť za schopnosť nechať ostatní ľudia, ľudia v tejto miestnosti, v skutočnosti robiť niečo s tým rovnaké údaje. Áno, pokiaľ ide konca, ak sa rozhodnete urobiť konečný projekt týkajúci sa novinky, akcie alebo mapy, dobre sme sa, aspoň ako kurz, bude, že všetky väčšie jednoduché tento rok tým, že budete s rozhraním, druh funkcia, tak povediac, softvér, ktorý môžete použiť do svojich projektov, ísť nad rámec, kde sa študenti, možno, už v dobách minulých, pretože tento rámec nebol na mieste pre ne. A opäť, to všetko začalo, pre mňa aspoň, asi 15 rokmi sa vykonáva Shuttleboy. Potom som e-mailom priateľovi Ken v Pfoho. Povedal som hej, čo si myslíte? Je to užitočné? On poslal ju na Pfoho otvorený zoznam a Walla, všetky tie roky neskôr som zrejme ešte dojení tohto projektu. A pekné vec, o tom, a to je oblasť, kde tiež kurz ako je tento v strojárenstve a informatiku, myslím, že je trochu zvláštne, je to, že keď budeš robiť doma funguje, a keď sa vám vaše projekty v tomto kurze, si viem, veľa z nich áno, budete odložil, a nie v skutočnosti používať znovu. Ale niektorí, bude vám. A tam je to naozaj mocná vec, aspoň pre mňa, to naozaj vzrušujúce vec, keď urobíte niečo aj iní ľudia skutočne starostlivosť, ostatní ľudia nie sú len úsmev a pat svoj na chrbát a potom sa trochu ísť o ich vlastné životy. Oni vlastne použiť to, čo ste vykonali vo svojom vlastnom živote, aj keď je to pre niečo tak hlúpy, alebo tak jednoduché, ako len konštatovanie, keď oni môžu dostať odtiaľto chytiť ďalší raketoplán na Quad. Áno, pokiaľ ide konca, to je jeden z cieľov pre tento kurz, na posilnenie vás na niečo zistiť nejaký problém, či je to na akademickej pôde, alebo snáď aj mimo campus, a skutočne užívajú svoje vlastné schopnosti, svoje vlastné mysli, a tento problém rieši v niektorých časť, technologicky. Takže, toto je tiež samozrejme, ako hovoríme v učebných osnovách a kurzy oficiálnu opis, ktorý vás naučí, ako myslieť a ono vás naučí, ako riešiť problémy efektívnejšie. No, čo to znamená? No, keď máš 600 MHz vo vrecku alebo tri gigahertz pod vašim stolom doma, môžete riešiť mnoho problémov účinne len šmykom hrubou silou. Ale je tu veľa problémov v tomto svete, či už je to hľadanie, povedzme, Facebook sieť alebo internet cez Google, že nezáleží na tom, ako rýchlo sa vaše konkrétny počítač, neexistuje spôsob, ako v pekle, budete hľadať miliardy webových stránok rýchlo, ak ste skutočne pristupujú k tomuto problému inteligentne. Nemusíte len hľadať, napríklad obrovský zoznam všetkých stránok na svete od zhora nadol hľadal niečo, čo v súvislosti s vyhľadávacie termíny hľadáte dúfajme, že Google a pravdepodobne Google a Facebook, a niektorý z týchto veľkých subjektov majú veľa šikovných ľudí, ktorí premýšľajú o tom, ako oni môžu nájsť dáta rýchlejšie, ako môžu spracovávať informácie oveľa efektívnejšie, a ako môžu len všeobecne vracať výsledky rýchlejšie tak, že môžete urobiť ešte viac zaujímavých vecí s týmito zariadeniami. A tak, čo máme na mysli, keď, podľa toho, ako, výučba ľuďom, ako myslieť viac opatrne, viac algoritmov. No, tento malý vizuálne vždy zdá, že ísť cez dobre. A to sa zdá byť zapamätateľné. A ja som bol dokonca požiadaný práve včera bývalý študent, oh budete robiť telefónny zoznam vec znova. A ja som skoro na mieste rozhodol v poriadku, či budeme budovať telefónny zoznam vec. A on sa ma spýtal, keď si roztrhol ju napoly pravdu, bol som rád aj jo technicky sme roztrhal ho na polovicu, ale nie na ceste, na ceste informatike budem môcť odtrhnúť túto vec na polovicu. A tak tu bol problém, ktorý sme predstavili na nejakú dobu. Takže, tu je telefónny zoznam. Je to už najmenej tisíc alebo tak stránky. A jednoduchý cieľ na dosah ruky veľmi reálny svet je nájsť, povedzme, že osoba tu. Takže, Mike Smith, priezvisko začínajúce na S. Takže som typický človek, som vyzdvihnúť tento telefónny zoznam. A niekto tam vonku, čo by ste, typického človeka, urobiť pre to, začať hľadať Mike Smith, samozrejme nevedel vopred, čo strana je vlastne ďalej. Správne, takže si ísť zhruba uprostred, vpravo. A v tomto bode v príbehu, som asi v N alebo M je, viete, zhruba v polovici cesty cez telefónny zoznam. Ukázalo sa, v poslednej dobe som si tento príklad som nejako ocitol v sprievode Mgr. Takže je to vlastne nie je rovnomerne vyvážené, cez M a N prostredníctvom Z. Ale dnes sme v skutočnosti, v M, v poriadku tak, teraz som na M. Ale čo to má stánok s jedlom teraz rovnako ako normálny človek z ulice,? Kam mám ísť budúci Mike Smith. [Nehlučné] A tak len asi na tomto polovicu, právo, pretože S prichádza potom, čo M. A tak sa tu nachádza vizuálne dráma. To nie je naozaj roztrhnutiu vejpůl, vpravo. I druh podvádzala dole do centra. Ale dnes už vieme, že Mike je aspoň nie v to, že polovica. Môžeme doslova vyhodiť polovicu problému preč. A ja som opustil s problémom, že je zásadne stále to isté, nájsť Mike Smith v naozaj veľkú knihu. Ale problém je teraz z polovice tak veľké. Keby tisíc strán predtým, teraz je to tu 500. Vieš čo, môžem robiť to isté znova. Môžem druh rekurzívne alebo opakovane to isté. Teraz som sa docela v S. Som na T. A tak, oh som išiel trochu príliš ďaleko. Ale teraz viem, že Mike nie je správne, že to bude nejaké triedy, kde jedného dňa som jednoducho nemôže odtrhnúť priehrady vec, vsadím. Ale teraz, viem, že to nie je to pravé. Tak, teraz bol problém štvrtiny. Takže som odišla z tisíc na 500 až 250 stránok. A opäť, ak budete pokračovať v logike, matematike aj naďalej, som sekanie tento problém na polovicu, na polovicu, na polovicu až konečne som buď bude nájsť žiadne Smith je vôbec pravdepodobné, alebo budem nájsť miesto hľadám. Ale to, že, potom vyvoláva otázku, je to lepšie ako jednoduchý prístup len hovoril, vieš,, Nie, B, nie, od ľava do prava bude lineárne cez knihu? No, inštinktívne áno. Je to bude oveľa rýchlejší. Ale koľko menej? No, ak mám tisíc stránky telefónneho zoznamu, alebo povedzme 1.024 pre tých z vás, ktorí radi právomoci dvoch, koľko času by som musel rozdeliť tento problém na polovicu, ako nájde pán Smith? >> Ten. >> David: Tak, desať, že jo. Ak máte 1.024 stránok a môžete ich rozdeliť na dve polovice, na dve polovice, na dve polovice, na dve polovice, urobím desaťkrát, čo znamená, idem od 1.000 stránok na osobu, hľadám len desať stránok otáčok. A to je druh čisté, ale, viete, jestli si myslíte o tom, že ste tohle robia celý život. Nie je to tak dramatické. Ale teraz, že telefónny zoznam nie je len pre Boston, je to pre celé USA, alebo celý svet, a to, čo má miliardy stránok, takže si predstaviť telefónny zoznam s štyri miliardy stránok. Koľko stránku otočí budem musieť urobiť maximálne nájsť Mike Smith vo štyri miliardy stránky telefónneho zoznamu? >> Prihlásiť základne dve. >> David: Tak jo, ak ste typ matematický typu je to log základne dve. Ale ak si myslíte, že 4 miliardy až 2 miliardy to jednej miliardy, takže pol miliardy. Myslím, že v skutočnosti ide whittles sama stanoví zatraceně rýchlo. V skutočnosti s 32 halvings z telefónneho zoznamu dokonca zo štyroch miliárd, tak som si na jednu stránku. A to je, keď tohle dostane silný, myslím. To je, keď tieto myšlienky získať presvedčivé, keď môžete mať štyri miliardy stránku problému a v 32 krokov, ktoré môžete nájsť osobu, ktorú hľadáte. A tak, že to, čo máme na mysli, keď hovoríme, že sa naučíte myslieť viac opatrne, viac algoritmov, inteligentnejšie o riešení problémov. A výnosy sú obrovské, keď môžete skutočne to, a znova, aby tento bod na Googles sveta Facebooks, ktorí majú luxus mať obrovské súbory dát. Musíš k týmto problémom týmto spôsobom inak to jednoducho nebude fungovať. No, čo je to, čo robil študent vlastne Spomínaš si? Aj sme chceli robiť veci, ktoré sú trochu hlúpe niekedy až trochu vziať okraji off, čo je inak veľa nového materiálu. A tak, on vlastne, tento bývalý študent poslal mi tento odkaz, ktorý som šiel dopredu, len tak pre srandu, a potom ľutoval, že na konci roka, vytiahol na utube tu. Tak som si myslel bych zdieľať, čo non-počítačový vedec znamená, keď sa slzami telefónny zoznam na dve polovice. [Smiech] [Silence] [Nehlučné] >> Viete, cez 200 strán, pekné čisté línie, legitímne slza. [Smiech] >> David: Tak, ja predpokladám, jeho spôsob práce príliš. Takže, čo som z tohto predmetu pred všetkými tými rokmi áno, Shuttleboy, a potom áno titul v odbore počítačových vied, a potom áno PHD v oblasti počítačovej vedy. A to nie je to, čo sme sa snaží obrátiť väčšina študentov v tomto kurze do. Väčšina z vás v tomto kurze nebudete ísť na odbor počítačová veda. Niektorí z vás si možno menšie, ale pre niektoré z vás to bude terminál kurzu. A to je úplne v poriadku, pretože to samozrejme je, v skutočnosti, štruktúrované tak, aby v prípade, aj keď ste práve platiť poplatky za niekoľko mesiacov a naozaj sústrediť sa a naozaj brať ako veľa z tohto kurzu, ako môžete, budete v skutočnosť, byť dobre vybavená vrátiť do svojho sveta ekonómie, biológie, psychológie, aplikovanej matematiky, a skutočne využiť toho, čo je nakoniec ako zaujímavý kurz, ako dúfame, že sa koncepčne, ako je to v podstate praktický. A to tiež nie je niečo, čo možno trochu zriedkavé nájsť. Myslela som, že podiel na niekoľko pripomienok, že študenti z vlani na jeseň dal v tejto minulých rokoch cue sprievodca, keď pýtal sa, čo by ste chceli povedať budúcich študentov. No, ak ste tak už neurobili pozrel na tieto pripomienky, jeden študent povedal, tento kurz bude trvať slušné množstvo času hore. ale ak vložíte svoju prácu do úplne nového sveta, v celku, pokiaľ si dal prácu, ak si dal prácu do, v poriadku, takže toto je jeho gramatika nie je moja, takže ak ste dal, dal v práci, celý nový svet bude otvorená až do vás. Amazing koľko som sa naučil za púhych 12 týždňov. Iný študent napísal, radšej tento, alebo budeš ľutovať. Ďalším napísal, trochu grobiansky, bude to nakopu prdel a nechá vás cítiť skvele. A potom konečne, toto je snáď niečo, čo možno zobraziť iba v písomnej forme, ale druhý z dna tu. [Smiech] Tak, já nejsem istý, či máte veľa priateľov, ktorí sa tohto kurzu, ale sme trochu robil veľké škody na minuloročnú študentov. Sme uviedli na začiatku, niekoľko prednášok, niekoľko kvízov, pár problémov sady, tento pojem lolcats. Vy nemôžete vidieť to, čo vidím tu, ale za chvíľu uvidíte mladý muž menom šťastná mačka, ktorá je vodca tzv lolcat. To je jeden z hlúpy internet dopredu, že si myslím úprimne dichotómiu medzi týmito dvoma pánmi tu a čo máme teraz na obrazovke je možná. [Smiech] Jedným z najviac nevhodné použitie tohto divadla k dnešnému dňu. A prečo by sme urobiť trochu reálnejší trochu viac osobné tento pojem skutočne riešiť problém efektívnejšie. Jednoduchý problém, prvý deň každého školy je sadnúť si a vstať a začať počítať študentov, právo apel druhov. No, ty naivný, ale napriek tomu veľmi správny prístup, že učiteľ by mohol mať jeden, dva, tri, štyri, päť, šesť, sedem, a my by sme sa tu docela dlho. Takže, čo je nepatrné zlepšenie o to dokonca, že by ste urobili ako chlapec? Ako sa vám počítať ľudia rýchlejšie? A ak nie sú začať čítanie z mojej vlastnej návody? Čo by ste urobil ako dieťa? Štart počítanie dvojky, právo, rovnako ako tak som dosť dobrý na dva, štyri, šesť, osem, desať, 12. Tak, to je niečo zaujímavé v poriadku. Takže, koľko úsilia o zlepšenie je to tam? Takže, je to samozrejme dvojnásobne. Trvá mi polovicu času. Ale, viete čo, ako sa nájdeme v tomto semestri, veľký problém, ako je urýchlenie svojej prevádzková doba len o faktor dvoch nie je všetko, zaujímavé, pretože analóg tu v počítačovom svete je, že som CPU Ja som počítač, tak sakra, keď som čakať 12 mesiacov, 18 mesiacov, som počítač bude len môcť od prírody, podľa počtu gigahertz som sa vo mne, aby sa mohli spoľahnúť ľudia v tejto miestnosti rýchlejšie. Takže, tieto druhy sú tieto druhy lineárnych speedups ako faktor dvoch trojnásobný, dokonca desaťkrát, koho to zaujíma? Dobre, môžeme hodiť hardware na problém. Môžeme čakať ako to vyzerá. Môžeme rozvíjať rýchlejšie stroje. Ale, intelektuálne, jo, že bol taký šikovný, ale ani naozaj zásadne zmeniť problému. Som stále prebiehajú zľava doprava, spredu dozadu. Je to naozaj rovnaký algoritmus. Ale ja ponuku, že môžeme robiť lepšie. Môžeme to urobiť múdrejší, než je toto, a to zásadne rýchlejšiu implementáciu. Ale, to dokazuje, potrebujeme, aby ste humor nám len na chvíľu. A je to v tomto okamihu, kedy to bude mi hovoriť menej a budete hovoriť viac. Ale ja si potrebujem spustiť krok spoločne, čo je, ak by ste humor nám, prosím, vstať. V návode tu na palube, viete, sú v poriadku, pár z vás si sadnúť. Tí z vás, späť, tam ideme, v poriadku. Děkuju. Takže program je tu pred vami. Tie sú dnes počítače vykonávajúce tento program. Je to docela samozrejmý v tomto bode. Áno, mali by ste byť číslo jedna. Získať? Právo, mnohí z vás pravdepodobne myslel to už tak ako tak, prvý nováčik roka. Takže, myslím na seba, ty si číslo jedna. Takže, krok tri tu, pár off sa niekto stojí, pridajte dve čísla dohromady a prijať, že suma, ktorú si vaše nové číslo a urobíme zdravý rozum kontrolovať. [Hluku z davu] Vieš, koľko máme? >> [Nehlučné] >> No [nepočuteľný]. >> Potrebujeme mať odpovede na kľúčové. [Silence] >> Jo. [Hluku z davu] >> David: V túto chvíľu algoritmus by mal byť postupne slabne. [Hluku z davu] Možno by sme mali ísť s mojím prístupom po všetkom. >> 43. >> 163. >> David: Ooh aritmetický pred 300 plus ľudí. [Smiech] Čo je to náš posledný záznam bude? >> 180. [Smiech] >> 1.200. >> 386. >> David: 386, a máte poslednú stojace? Je, že všetci? Poznáte odpoveď? >> Čo? >> David: Viete, čo je odpoveď? Nevzali sme so sebou odpovede na kľúčové s nami tak, 386 je v skutočnosti presne tou správnou odpoveďou prvýkrát. [Fandenia] [Potlesk] To je v poriadku. [Potlesk] Veľmi, veľmi pekne urobil. Takže, čo bol stánok s jedlom, pretože to rozhodne cítil trochu pomalší, ako môj veľmi jednoduchá, ale napriek tomu veľmi korektný prístup len tak onesies a twosies a len na to, to robí s zľava doprava. Ale to, čo sme naozaj len to tam? No, keby tam bolo približne, povedzme, 400 z vás, stojaci na jednom mieste, a potom ešte polovicu z vás, veľmi rýchlo, od toho, čo som mohol povedať, chcel, aby sa posadil. Takže, polovica z vás sadol, šli sme 400 do 200 potom na 100 potom na 50 potom na 25. Takže znova, tam je to rovnaké rozdeľuj a panuj nápad sme mali s telefónneho zoznamu. Opäť platí, že sa každé iterácii máme polovicu veľkosti problému, sme sa znížil na polovicu, tak sme to o polovicu. Takže, teoreticky, mal by váš algoritmus som bol oveľa rýchlejší ako moje lineárny prístup, pretože môj prístup by si vziať povedať, 400 krokov, alebo možno, keď som trochu múdra 200 krokov. Ale Vy by ste brať oveľa menej, právo 400 do 200, 100, 50, 25, 13, šesť, takže menej než desať krokov na konci versus mojej 200 alebo 400 mm. A tam je zárodok naozaj zaujímavý nápad. A áno, matematicky to, čo ste práve urobila, bolo niečo, čo je trochu logaritmickej v prírode tým, log základné dva, sme rozdelili na dve a dve znova. A budeme znovu neskôr v tomto semestri. Ale v tom tkvie opäť veľmi inteligentné prevedenie. A my sme len poškriabaniu povrchu veľmi chytrý veľmi inteligentný efektívne prístupy k problémom, ktoré by sme mohli nakoniec vyriešiť. Takže, kto sú ľudia, ktoré ste práve klábosil s keď krátko? Spoločného záujmu v rámci, ako je to, že každý na ľavej strane ty a všetci ostatní právo, musíte jasne vedieť viac ako vy. No, to je absolútne nie je pravda. A v skutočnosti, v posledných rokoch, tento kurz vyvinula koordinované úsilie osloviť tých menej pohodlné, aby som tak povedal. A tým, že sme sa rozumie nie ľudí, ktorí nikdy nedotkol počítača skôr, pretože to je naozaj ťažké nájsť tú v týchto dňoch, ale ľudia, ktorí používajú e-mail, použite Facebook, možno aj práve teraz, ale nie sú nevyhnutne istý, čo mám robiť, keď sa niečo pokazí, alebo ak sú požiadaní o nič technického, viete, ruky hore, alebo sa druh tlačiť hardware na priateľa, ktorý je možno viac zběhlý v nej, ako oni. No, to sú niektoré štatistické údaje z minulého semestra. Takže, keď spýtal sa, keď sme sa spýtali našich 400 študentov, takže v minulom roku, viete, aká je vaša úroveň pohodlia prichádza do tejto triedy, a 34% napísal sám stanovuje, ako medzi tie menej pohodlné. Takže, ak ste prišli do tejto miestnosti a sú stále myslia teraz, že, viete, čo tento pojem menej pohodlné opisuje mi, viem, že ste vo veľmi dobrej spoločnosti. Ale uvedomiť aj to, že ak ste prichádza v tomto kurze sa skúsenosťami v oblasti počítačovej vedy a boli ste naozaj, že geek na strednej škole a vysokej školy, ktorí sa písania kódu a výučby sami jazyky, dobre, že je taky v pohode, pretože tam je určite netriviálny veľké publikum, ktoré na pozadí rovnako, asi 13%, posledný termín. A potom, je tu každý iný druh niekoho, kto nemá pocit, že sú menej pohodlné, ale rozhodne si nemyslím, že sú pohodlnejšie, ale to len v priebehu dostať niečo z toho. Takže realizovať tento kurz nemá čerpať docela spektrum študentov. A aby to v konkrétne činy, 71% študentov, v minulom roku, mal nulovú kurzy za sebou. Takže, ak ste sa do tohto kurzu myslenia oh Každý, kto sa CS50 bola počítačová veda svišťať na strednej škole, to nie je tento prípad. Väčšina ľudí je pravdepodobne len záujem. A málo, áno, absolútne vzali nejaké kurzy, niektoré, alebo aspoň jedna osoba v minulom roku trvalo päť predmetov skôr. Takže sme určite nejaké odľahlé, ale zase mäso krivky je v tých nižších hodnôt úplne. A ďalší zaujímavú štatistiku sme zdieľali za posledných pár rokov je pomer pohlaví. Takže, historicky, aspoň v odbore počítačových vied, tam je trochu muž žena prekrútiť. Aj pred pár rokmi to bolo oveľa výraznejšie ako v minulom roku. Takže sme skoro hned na% 40 úrovní. A ak môžem zhodiť rukavice len kvôli mať tretie koláčové graf budúci rok, to je ešte spravodlivejší. Chcel by som zdôrazniť, že neexistuje absolútne žiadny dôvod, prečo z hľadiska predmetov, ktoré muži a ženy by nemali byť zápis v tomto druhu kurzu. V relatívne rovnakom počte a realizovať až 38 percent, 48 percent, my sme vlastne celkom rád, že sme skoro na to, že aspoň štatisticky aj hodnota 50%. Takže, ak ste v skutočnosti žena, do zvyšku zaistiť tiež, že toto nie je, v skutočnosti, prevládajú muži triedy. No, to len tak náhodou CS50 je 20. narodeniny. Ja, rovnako ďakujem. [Fandenia] [Potlesk] To je od teba moc pěkné, pretože sme priniesli tortu pre vás skutočne. A tak, keď opustíte dnešok, budete skutočne dostať šancu k splneniu mnohých kurzov výučby chlapíci, ktorí si budú prodlévání na chodbe. A áno, že to bude pekný druh motivovaní spôsob rokovania výučby chlapíci. Ale my sa na výlet do malej pekárne a opäť v súlade s priebehom je hravou povahu, zatiaľ čo však očakáva netriviálne množstvo práce, zatiaľ čo my sme s, že legrace. Ale máme jedného z týchto tort pre vás. [Smiech] Takže, ak ste sa smiechom, že to vlastne dobré, pretože aj keď ste medzi jeden z tých menej pohodlné aspoň ste si toho vedomí. Tí z vás, 14 percent by radšej túto variantu. [Smiech] A potom, keď neviete, čo sa to sakra deje práve teraz, máme aj to pre vás ostatní. [Fandenia] [Potlesk] Tak, sú tie, ktoré sú jemne rozomleté na kúsky vonku, ako hovoríme. Takže znova, poďme sa vziať veci do drážky a aspoň predstaviť niektoré základné nájomcu, že budeme potom považujeme za samozrejmosť vo zvyšných tohto semestra. Tak sme všetci asi vieme, že počítače nakoniec redukuje nejako núl a jedničiek, tieto veci zvanej bity. Čo to znamená? No môžete si to úprimne ako žiarovka, trochu je žiarovka, ktorá je buď, alebo je to preč. Je to prepínač, je to buď na alebo je to preč. Teraz, počítačoví odborníci všeobecne myslieť off ako číslo nula svojvoľne a, a pojem "na ako jeden. Takže, ak si hodiť svetla zapnúť, že je jeden vypnite ho, že je nula. Alebo ekvivalentom, zase s ohľadom na to je hodnota skutočnej vypnúť, že je hodnota false. Takže, to sú len synonymá. Na konci dňa, áno, všetky výpočty, všetky veci, ktoré sa deje pod kapotou v počítači sa nakoniec redukuje na núl a jednotiek. A keď prestanete premýšľať o tom, je to docela priehrady pozoruhodné, čo svet už s týmito základnými stavebnými kameňmi, vrátane niektorých zariadení držíte v ruke. No, prečo sú núl a jedničiek užitočné? Bože môj, dokonca aj v reálnom svete sme aspoň desať číslic, nula až deväť. Prečo tak málo? No v hardware hľadiska je to veľmi jednoduché. Je to oveľa jednoduchšie reprezentovať dva štáty, v poriadku. Ak sú počítače zapojené do steny, obvykle, máte to jednoduché zdroj binárne charakteru. Je to buď zapnúť alebo vypnúť. Elektrina prúdi, alebo to nie je. Tak, to je druh jedna z prvých dôvodov, že svet išiel len s núl a jednotiek v počítači. Ale môžete ich použiť ako základné stavebné kamene. Takže to vlastne je trochu malý na obrazovke tu ale môžeme počítať v binárnej alebo môžeme reprezentovať, čo chceme v binárnej rovnako ako môžeme povedať, jedno desatinné miesto, rovnako ako my môžeme, a to aj v skutočnosti, s abecednom listy. A tak, tu je rýchly systém. Za pouhých pár minút času budete teraz vedieť, ako spočítať, ako písať, ako hovoriť binárne podobne ako svoj vlastný laptop. No, máte, vo svete binárne, trochu podobne ako základnú školu stĺpcov alebo hodnoty. Takže na základnej škole sa dozvedáme, je to tých, stĺpec sa jedná o desiatky stĺpci, stovky stĺpec a tak ďalej. Inými slovami, prečo je počet poznáme ako číslo 123 123? No, môj učiteľ ma naučila, to je ty stĺpce, to bolo niekoľko desiatok, išlo o stovky. No, čo to znamená? No, prísť na to, čo je celková hodnota je to, čo je inak reťazec číslic, iba hash značiek na palube. No, máme jednu 100, takže to je 1 krát 100 a potom plus, čo dvaja 10 je tak to je 2 krát 10 plus tri z nich, tak to je 3 krát 1, v poriadku, tak som sa zrejme dostal späť tam, kde som začal. Ale tento veľmi jednoduchý proces len vynásobením číslic hodnotou stĺpca je presne to, čo binárny je všetko okolo. Ale v binárnej použiť právomoci dvoch nie právomocí z desiatich. Takže, tu je séria ôsmich žiaroviek. Počítačoví experti chceli použiť hodnoty ako dva až osem a 16 a 24 a 32, pretože sú všetky vo všeobecnosti vhodné hodnoty na použitie. Takže, keď hovoríme o osem hodnôt v poradí je to ako tzv byte. A v týchto dňoch sme sa len zriedka hovorí len v bytoch, hovoríme MB GB a TB v týchto dňoch. Ale je to všetko v konečnom dôsledku to isté. Tu je osem bitov AKA jeden bajt, len jednoduché žargónu. Takže všetky tieto žiarovky sú preč. Takže matematika je v skutočnosti naozaj jednoduché. Tak tam na pravej, aj keď je to malý vidieť, je niečí stĺpec, dvojky, štvorky, osmičky, 16s, 32s, 64s, 128s. Dobre, možno je to ťažké zapamätať na prvý, ale je to len násobí dvoma sprava doľava. Takže vždy môžete občerstviť sa to. No, všetci sú preč, takže je 0 krát symbol, 0 krát zástupný symbol. Tak, to je číslo 0 zastúpené v binárnej. Inými slovami, ako si zapísať číslo poznáme ako 0 v binárnej? No, jedna, dva, tri, štyri, päť, šesť, sedem, osem, a technicky rovnako ako v desiatkovej sústave, všetkých týchto núl, ale nepridávajte nič vzorce sú len tam, pretože sme sa svojvoľne rozhodli sme sa Chcete osem z týchto vecí za sebou, vpravo. Ak sú to fyzické predmety, máme osem, takže musím byť všetci preč. Takže by sme práve dostali preč s jednou nulou. No ako si predstavujú číslo jedna? No, inštinktívne budete hádzať jeden z prepínačov. Budeš zase žiarovka na. Takže tam je číslo jedna, pretože sme teraz dať jeden, žiarovka, ktorá je na v jednej pozícii. Ako budeme reprezentovať dva? No, my sme vlastne bude hádzať dva prepínače teraz aspoň versus tohto stavu, musíme sa obrátiť na dvoch stĺp vypnúť tie kolóny a teraz máme hodnotu jedného z dvojky stĺpci. Tak, to je celková hodnota dvoch. Teraz, rýchly duševný výkon, čo sa bude diať s ďalšie poradie? Ako môžem prezentovať číslo tri? No, já potrebovať jeden z dvojky stĺpce, jeden z trojky stĺpci ah ha. Tak, teraz som sa zvyšuje, že jeden. A teraz, rovnaký základný vzorec sa opakuje. Aké je číslo štyri? No uvidíme, som spravodlivý potrebovať jeden v štyroch stĺpci a potom nuly do dvojky a regiónov. Takže to pokračuje týmto spôsobom. A je to práve táto postupnosť krokov. A pojem binárny naozaj nie je všetko tak zložité. V hornej časti máme osem núl. Nižšie, že máme sedem núl a jeden. Nižšie, že máme šesť núl, jeden, a nula a to je binárny. 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. [Smiech] >> 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. [Hudba] >> 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. [ Applause ] ==== Transcribed by Automatic Sync Technologies ====