>> David: Byenveni, non mwen se David Malan ak sa se CS50. Epi, sa se pa òdinè ou a nan lekòl segondè kou syans òdinatè. Kou sa a se yon yon bagay espesyal ti kras. Epi li pa paske mwen moutre li. li a paske se youn nan, nou renmen panse, sa yo ki aktyèlman ra kou sèr sèvo ou tèlman ak orè ou pou anpil ke nan fen semès la ou reyèlman santi entèlijan. Se konsa, sa yo ki te nan chemen mwen te santi tèt mwen lè m te pran kou sa-a tounen nan lane 1996. Mwen te yon gwo gouvènman an nan moman an isit la ap viv nan Mather kay. Epi, I. [Bat bwavo] menm jan ak lòt lan, senk lòt yo genyen. Se konsa, mwen te yon gwo gouvènman an nan moman an. E mwen se te yon gwo gouvènman paske mwen ta toujou renmen istwa. Mwen renmen konstitisyonèl lwa nan lekòl segondè. Se konsa, mwen mete la sou ane sa a premye ane chemen ap fè sa m fè pi byen, fè sa mwen te konnen mwen renmen. Mwen ta toujou yon ti jan nan yon jik, mwen ta toujou babbled ak konpitè. Men, mwen mwen menm, petèt iwonilman nan retrospective, mwen ta toujou wè mesye yo ki te pran konpitè syans nan lekòl segondè mwen an, zanmi m 'tankou jik yo reyèl. E ankò, finalman te fè, sophomore ane sa a mwen pran kou ti rele CS50 ki aktyèlman te pè m 'ane pwòp frchman mwen. E mwen te yon asistan User nan moman an. Se konsa, mwen te sètènman deja kalifye, omwen, yo dwe pami moun yo, sa yo ki jik ki mwen te fè plezi a nan lekòl segondè. Men, mwen te pè. Gen, li te gen repitasyon sa a nan moman an e petèt toujou nan pati sa li te yon, li te yon kou pè. Se te yon bann travay. Li te di e ankò, li nan youn nan bagay sa yo ki kote, Bondye mwen an, po la te lwen pi mal pase mòde li yo. Mwen jwenn mwen sophomore ane a, pou premye fwa, aktyèlman jwenn plezi devwa. Epi mwen pa di sa-a jis anplasman sa a kou ou. sa a se te yon realizasyon otantik pou mwen. Koulye a, mwen panse ke, nan yon pwen, mwen te fè travèse liy la geekdum vre kote mwen aktyèlman itilize gade pou pi devan pou Vandredi swa paske mwen ta ka pli moute devan makbouk ti kras mwen ak travay sou pwoblèm ansanm CS50 la. Se konsa, nan pwen sa, mwen panse mwen te byen klè travèse liy la. Epi, objektif nou yo nan kou sa a se pa tounen nou tout nan moun sa yo, men, jis di ke gen yon ti kras yon bagay espesyal sou kou sa a, yon ti syans yon bagay espesyal sou òdinatè an jeneral espesyalman jou sa yo. Epi, plis adapte a nou tout ale nan teknoloji, jwèt yo pi plis nou pote alantou nan pòch nou yo ke yo se tèt yo konpitè. Mwen vle di, ifon mwen an se aktyèlman yon òdinatè fè pi wo pase Laptop mwen te nan kolèj. Ou kapab fè yon bann bagay pwòp ak bagay sa yo. E kounye a, anpil nan nou nan chanm sa, pwobableman jis itilize lojisyèl lòt moun, zouti lòt moun nan, solisyon lòt moun nan pwoblèm paske nou ale nan itun, nou Download kèk app soti nan magazen an app ak Walla nou kapab fè yon bagay ki reyèlman pwòp. Men, nan fen semès sa a, ou ka moun lan ap fè pou rezoud pwoblèm. Ou ka moun nan pou rezoud kèk pwoblèm, bilding ki app, ke pyès nan lojisyèl, ki zouti ki, swa, ki se yon jis amuz m ', amuz ou. pou egzanp, kontwole, di, nan bibliyotèk itun ou ak nan apatman ou an klèman app genyen ki deja egziste oubyen ou kapab jwenn orè navèt pi fasil pou egzanp. Se konsa, an reyalite, youn nan bagay ke mwen te fè apre li te pran CS50 ankò, li te pwobableman nan nwit sa a pwen Vandredi ak Samdi premye nwit anpil, te gen opòtinite sa a nan moman kote Harvard te kouri bis navèt. Epi, jou sa a yo, yo toujou gen enprime orè. Men, te gen vrèman pa vle di sou entènèt la jwenn li lè navèt nan pwochen te. Koulye a, mwen pa t pran swen, paske menm si mwen te viv nan Mather mwen pa te pami moun yo ki jeneralman pran navèt la. Men, mwen te gen anpil zanmi nan Pfoho pou egzanp. E youn nan yo te mande m ', mwen panse ke nan nan yon pwen. [Bat bwavo] Okay Pfoho a pi bon pase Mather aparamman. Se konsa, youn nan kalite zanmi mwen an te resevwa m 'panse petèt mwen ka ekri yon pwogram ti kalite ede zanmi mwen an tcheke orè yo navèt. Se konsa te fèt ti gason an navèt gochman nonmen non li, pyès sa a leksik a ki te rete nan pou kèk kantite ane nan pi piti pami kèk nan upperclassmen yo. Nan moman an, sa-a te bay lòd sa a ti liy pwogram similè nan lespri Dos. Li te kouri nan yon anviwònman uni. Se konsa, li pa te trè seksi nan tout. Ou jis tape yon lòd koup e li te di ou lè navèt yo te. Oke, jou sa yo li a yon ti jan plis sofistike. Epi, li la aktyèlman reprezante nan pwesizeman ki tip de pwojè sa a ke elèv ki nan fen kou yo pa fè mo fen. Se konsa, sa a se vèsyon kat, kèk nan 15 ane apre, nan Shuttleboy. Sanble Google Maps se te yon ti jan ralanti la. Men, pou moun nan nou ki gen jwenn soti nan isit la apre klas yo ale, yo di, ki soti nan Memorial Hall ak bezwen ale jiska, di, kad la. Oke, ou ka swa kite nan de minit si pa, sa a pa reyèlman ap travay pou ou jis ankò, oubyen ou gen kòm anpil lòt chwa ke ou ta ka renmen. Epi, vini pi bonè, nou ka anplasman sa a soti nan CS50, li pral kapasite la menm pa SMS. Ou kapab tèks Shuttleboy atravè telefòn. Ou rele Shuttleboy. nimewo telefòn CS50 la ane sa a, byen, etonaman sa a te disponib, 617-Bug-CS50. Se konsa, ki pral primié byento. Se konsa, pa rele li jis ankò paske mwen résévwa pou reprimande, kounye a li a ke yo te degout telefòn selilè sistèm nou an parèy moutre tèt la. Se konsa, ou senpleman jwenn li si w gen kesyon sou orè a navèt kounye a. Men, ki pwal byento pwal aplike. Se konsa, lòt bagay yo, aktyèlman, ke nou te pase tèt nou ete sa a vrèman nan preparasyon pou semès sa a se te yon pakèt tout lòt pwoblèm ke nou te vle rezoud. Pou egzanp, gen yon anpil tout bagay ki pase nan kanpous sa a nan yon jou yo bay yo. Ak nan vre, yo mete yon lòt fason, genyen yon anpil tout bagay yo ale sou sa-a nan kanpous ke mwen sètènman pa janm pran avantaj de. Epi, menm si mwen kounye a submerged ak kouman anpil bagay ki pwal sou, sou kanpous, mwen toujou sanble pa janm jwenn tan an. Men, Walla, menm la, konférans CS50 la. Sa se kote ou ye, se konsa sa te yon, sa a se te yon pwogram nou te ekri globally tout evènman yo nan kam an. Lè sa a te gen yon bagay ki lòt elèv nan kou sa a menm gen aborder sou kont yo. Epi, nou te travay ak lòt antite sou kanpous reyèlman fè sa rive. Men, nan pwen sa a CS50 tèm nan tout nan pwogram sa yo ti Nou te ap travay sou kesyon sa a youn oswa si yonn pou konsantrasyon tout nouvèl Harvard la nan yon sèl kote, tout Google News a, nan tout bagay sa yo yo pral fè sa ki yo rele entèrfas api a, pwogram aplikasyon an. Lè sa a se jis pale pou imajine kapasite a pou kite lòt moun, moun nan sal sa a, aktyèlman ap fè yon bagay ak done ki menm. Se konsa, pa mo fen, si w deside aplike pwojè an final ki an relasyon ak nouvèl oswa evènman oswa kat, ki byen nou, omwen kòm yon kou, yo pral fè plis ke tout fasil la ane sa a pa bay ou yon koòdone; yon sòt de fonksyon, pou pale, lojisyèl ke ou ka itilize nan pwojè pwòp ou a ale pi lwen pase anwo ak ki kote elèv yo, petèt, te ale nan tan lontan paske fondasyon sa a pa te nan plas pou yo. Epi ankò, tout sa a te kòmanse, pou m 'omwen, kèk nan 15 zan de sa aplike Shuttleboy. Lè sa a, mwen kouriyèl Ken zanmi m 'ki nan Pfoho. Mwen te di ke hey ki sa fè ou panse? Èske sa se itil? Li te voye li soti sou lis Pfoho la ouvè epi ak Walla, tout sa yo ane pita mwen aparamman toujou trèt pwojè sa a. Ak bagay nan pwòp sou li, e sa se kote tou yon kou renmen sa a nan teknik ak syans konpitè, mwen panse ke, se yon ti espesyal, se sa, lè ou fè lakay ou ap travay epi lè ou fè pwojè sa-a nan kou ou, ou konnen, anpil nan yo, repons lan se wi, ou pral mete sou kote e li pa vrèman itilize ankò. Men, kèk nan yo li, w ap. E genyen nan bagay sa vrèman pwisan, omwen pou mwen, bagay sa vrèman enteresan, lè ou fè yon bagay ak lòt moun aktyèlman swen, lòt moun pa sèlman souri ak pat sòt ou sou do a epi nan ale sou pwòp lavi yo. Yo aktyèlman sèvi ak sa ou te fè nan lavi pwòp yo menm si li la pou yon bagay tankou bèt oswa kòm senp kòm jis jwenn yo lè yo kapab jwenn soti nan isit la trape navèt nan kad pwochen an. Se konsa, pa mo fen, sa se youn nan objektif ki pou sa a kou; otorize ou nèg a sèlman idantifye kèk pwoblèm si li a sou kanpous oubyen èspere ke byen lwen pase kanpous, ak aktyèlman sèvi ak ladrès pou pwòp ou a, sonje pwòp ou yo epi rezoud pwoblèm ki pwoblèm nan kèk pati, teknolojik. Se konsa, tou sa se yon kou kòm nou di nan pwogram yo ak deskripsyon an ofisyèl kou ki anseye w kouman panse ke li ap anseye ak kouman ou rezoud pwoblèm plis efikasite. Oke, sa fè ki vle di? Byen, lè ou te gen 600 megaèrts nan pòch ou oswa jigaèrts twa anba biwo ou a lakay ou, ou kapab rezoud yon pwoblèm anpil efikasite jis pa fòs sizayman sovaj. Men, gen yon bann pwoblèm nan mond sa a, si l ap chèche, di, rezo Facebook a oswa entènèt la atravè Google, ke li pa kesyon konbyen vit òdinatè patikilye ou an, gen nan okenn fason nan lanfè, ou pwal nan rechèch dè milya de paj wèb vit sof si ou aktyèlman apwòch pwoblèm sa a intélijant. Ou pa jis rechèch, pou egzanp, yon lis gwo nan tout paj yo wèb sou latè soti nan tèt anba ap chèche pou yon bagay ki an relasyon ak tou sa tèm rechèch w ap chèche pou èspere ke Google ak prezimableman Google ak Facebook epi nenpòt sa yo antite gwo gen anpil moun entelijan reflechi sou ki jan yo kapab jwenn enfòmasyon pi vit, kouman yo ka pwosesis plis enfòmasyon avèk efikasite, epi, kouman yo ka jis jeneralman retounen plis rezilta rapid pou ke ou ka fè ankò, plis enteresan bagay sa yo ak aparèy. Se konsa, sa ki fè nou vle di, menm si, pa ki jan, moutre ki jan moun panse pi plis ak anpil atansyon, plis algorithmically. Oke, sa a vizyèl ti toujou sanble yo ale sou byen. Epi, li sanble ap memorab. E mwen te menm mande jis yè pa yon ansyen elèv, oh ou pwal fè bagay la repèrtwar ankò. E mwen vrèman anpil sou tèren an deside byen si ke nou pral bati yon bagay repèrtwar. Apre sa, li mande m 'lè ou chire li nan mwatye dwat, mwen te tankou byen wi teknikman nou pawòl li yo nan mwatye men se pa nan tout wout la, nan fason nan syans òdinatè mwen pral kapab tir bagay sa nan mwatye. Se konsa, isit la se te pwoblèm nan ke nou prezante pou kèk tan. Se konsa, isit la nan repèrtwar la. Li te resevwa omwen yon paj mil oswa sa. Ak objektif a senp nan men anpil nan mond reyèl la jwenn, di, yon moun nan isit la. Se konsa, Mike Smith, dènye non kòmanse avèk Ameriken Se konsa, mwen se yon moun òdinè, mwen ranmase liv sa a telefòn. Lè nenpòt moun deyò, sa ki ta nou, yon moun òdinè, fè kòmanse jwenn Mike Smith, evidamman pa konnen davans sa ki nan paj li aktyèlman sou. Dwat, pou w ale britalman nan mitan an, dwa. Ak nan pwen sa a nan istwa a, m ap pwobableman nan N a oswa M a, ou konnen, apeprè mwatye nan fason repèrtwar la. Vin soti, dènye fwa mwen te fè egzanp sa a mwen te jwenn yon jan kanmenm tèt mwen nan seksyon an eskòt. Se konsa, li la aktyèlman pa egalman balanse ant A jiska M N a ak Z. Men, jodi a, nou, nan reyalite, nan M a, byen sa, koulye a mwen nan M la. Men, sa ki nan anportè mwen kounye a jis kòm yon nòmal nan moun nan lari a? Ki kote pou mwen ale pou pwochen Mike Smith. [Inodibl] Se konsa, jis pwobableman sou sa a mwatye, dwa, paske S vini apre M. Se konsa, isit manti dram la vizyèl. Sa a pa reyèlman déchirure li nan mwatye, dwa. Mwen kalite Cheated desann sant lan. Men, koulye a nou konnen ke Mike se omwen ki pa nan mwatye. Nou kapab literalman jete mwatye nan pwoblèm nan touswit. Lè mwen kite ak pwoblèm nan ki nan fondamantal toujou menm bagay la, jwenn Mike Smith nan yon liv reyèlman gwo. Men, pwoblèm nan kounye a mwatye kòm laj. Si li te gen yon paj mil anvan, kounye a li a te 500. Ou konnen ki sa, mwen ka fè menm bagay la ankò. Mwen kapab kalite recursive oswa plizyè repriz fè menm bagay la. Koulye a mwen pa konplètman nan Etazini mwen an T. Se konsa, o mwen te ale yon ti kras twò lwen. Men, mwen konnen kounye an ke Mike se pa dwa a, te gen pwal kèk klas jour kote mwen senpleman pa ka tir bagay la Dam, Mwen parye. Men koulye a, mwen konnen li pa gen dwa la. Se konsa, konnye a gen yon pwoblèm nan te kartye. Se konsa, mwen te ale nan yon mil 500 a 250 paj. Epi ankò, si ou kontinye lojik la, kontinye matematik yo, mwen découper pwoblèm sa a nan mwatye, nan mwatye, mwatye nan jiskaske finalman mwen swa pwal pa jwenn okenn Smith la nan tout, fasil, oubyen mwen pral jwenn youn nan m ap chache. Men, ki, lè sa a, supli kesyon an, se sa a nenpòt ki pi bon pase apwòch a senp nan di, ou konnen, A, nop, B, non, kòmanse nan men gòch a dwat pwal linear nan liv la? Oke, enstenktivman repons lan se wi. Li pral yon anpil pi vit. Men, konbyen mwens? Byen, si m gen yon paj mil liv telefòn oswa kite la yo di ke 1.024 pou moun nan nou ki renmen pouvwa nan de, konbyen tan yo ka mwen gen pwoblèm sa a divize an mwatye anvan jwenn Msye Smith? >> Ten. >> David: Se konsa, dis, dwa. Si ou gen 1.024 paj, epi ou divize yo nan mwatye, mwatye nan, nan mwatye, mwatye an, mwen fè sa ki vle di dis fwa mwen ale nan paj 1,000 moun nan m ap chache nan paj ki jis vin gen dis. E se te kalite pwòp, men, ou konnen, si ou panse sou sa ou te ap fè sa nan tout lavi ou. Se pa ke dramatik. Men kounye a, ki repèrtwar a se pa sèlman pou "Boston, li la pou tout Ameriken an oswa mond la ak tout bagay sa a gen dè milya de paj nan li, pou imajine yon repèrtwar ak kat paj milya dola. Konbyen vin paj mwen pral fè fè omaksimòm jwenn Mike Smith nan yon kat bilyon repèrtwar paj? >> Log baz de. >> David: Se konsa wi, si w ap kalite tip nan matematik sa a se Log baz de. Men, si w panse ke kat milya dola de milya dola nan youn milya dola, kidonk yon mwatye yon bilyon dola. Mwen vle di, ki aktyèlman ale whittles tèt li desann reprize trè vit. Anfèt avèk 32 halvings nan repèrtwar a menm ki sòti nan kat milya de dola, m ap pran desann nan yon sèl paj. E se te lè sa a bagay vin gen anpil pouvwa, mwen panse. Sa se lè sa yo jwenn ide irezistib lè ou ka gen yon kat bilyon paj pwoblèm ak nan 32 etap ou ka jwenn moun nan w ap chache. Se konsa, se sa ki nou vle di lè nou di ke ou pral aprann ki jan panse plis avèk anpil atansyon, plis algorithmically, plis intélijant sou rezoud pwoblèm. Epi retounen yo lè gwo aktyèlman ou ka fè sa, epi ankò, nan pwen sa a nan Googles yo nan lemonn lan Facebooks yo ki gen liksye a gen dataze gwo. Ou te gen apwòch pwoblèm sa yo nan fason sa otreman li tou senpleman pa ale nan travay. Oke, sa la sa ki te fè elèv la aktyèlman rantre? Mwen, nou renmen fè bagay ki yon ti jan komik pafwa sòt de pran kwen an nan sa ki se yon lòt jan anpil nan materyèl nouvo. Se konsa, li aktyèlman, ansyen elèv sa a voye m 'lyen sa a kote mwen te ale devan, jis pou anvwaye epi regrete li nan fen a, te rale moute sou uTube isit la. Se konsa, mwen te panse mwen ta ka pataje sa ki yon syantis ki pa-òdinatè vle di lè li te dlo yon repèrtwar nan mwatye. [Rir] [Silence] [] Inodibl >> Ou konnen sou 200 paj, bèl liy pwòp, lejitim lans. [Rir] >> David: konsa, mwen konpwann, fason li travay tou. Se konsa, sa m 'te soti nan kou sa a tout ane sa yo se de sa repons lan se wi, Shuttleboy, epi repons lan se wi yon degre nan syans konpitè, Lè sa a, repons lan se wi ak yon doktora nan syans òdinatè. E ke a pa sa nou ap eseye tounen pifò elèv nan kou sa a nan yo. Pifò nan nou nan kou sa a pa pwal ale sou yon pi gwo nan syans òdinatè. Gen kèk nan nou ta ka minè, men pou kèk nan ou sa a pral yon kou tèminal. E se te parfètman bon paske sa a kou a, an reyalite, estriktiye nan yon fason kote menm si ou jis peye PTA dwe peye frè ou yo pou plizyè mwa epi ou reyèlman konsantre nan epi ou reyèlman pran kòm soti anpil nan kou ou kapab, ou pral, nan Kidonk, yo byen ekipe pou retounen nan mond ou nan ekonomi, byoloji, psikoloji, aplike matematik, ak fè aktyèlman sèvi ak sa ki se alafen tankou yon kou enteresan jan nou espere concept kòm li fondamantal pwatik. E ke tou se yon bagay ki petèt yon ti jan ra jwenn. Mwen te panse m ta pataje yon kòmantè kèk elèv ki soti nan tonbe dènye mete nan gid sa a pase ane replik lè yo te mande sou sa ou ta renmen di elèv yo nan lavni. Byen, si ou pa gen deja gade sa yo kòmantè, yon elèv te di kou sa a pral pran yon kantite lajan ki jis nan tan ou yo. Men, si ou mete travay ou nan yon mond antye nouvo, yon antye, si ou mete travay la, si ou mete travay lan nan, byen, kidonk sa se gramè li pa min, konsa si ou mete, mete nan travay la, yon nouvo lemonn antye ap ouvè jiska ou. Etonan konbyen mwen aprann nan sèlman 12 semèn. Yon lòt elèv ekri, ou pi byen pran sa a oswa ou pwal regrèt li. Yon lòt te ekri, yon ti jan plis kareman, li pral kout pye bourik ou a epi kite ou santi gwo. Epi finalman, sa a se petèt youn yon bagay mwen kapab montre sèlman nan ekri, men, dezyèm nan anba la isit la. [Rir] Se konsa, mwen pa sèten si w gen zanmi ki te pran anpil kou sa-a men nou te fè yon kalite anpil domaj nan elèv dènye ane yo. Nou prezante, nan kòmansman an, plizyè Lèkti, yon tèst kèk, pwoblèm yon koup kouche, nosyon sa a nan lolcats. Ou pa ka wè sa mwen ka wè isit la men nan yon moman ou pral wè yon jenn gason yo rele kè kontan chat ki se lidè nan lolcat nan sa yo rele. Sa a se youn nan avan yo entènèt estipid ke mwen panse ke franchman dikotomi a ant de sa yo mesyeu isit la ak ki sa nou gen koulye a sou ekran an se petèt. [Rir] Youn nan sèvi avèk yo nan teyat sa-a dat ki pi apwopriye. Epi, poukisa nou pa fè yon ti kras pi reyèl yon ti jan plis pèsonèl nosyon sa a aktyèlman an pou rezoud yon pwoblèm plis efikasite. Yon pwoblèm senp sou yon jou nan nenpòt lekòl ki chita oswa kanpe e kòmanse konte elèv yo, dwa rele woule nan kalite. Oke, apwòch ki pi nayif nan men Sepandan, anpil korije sa yon pwofesè ka pran se youn, de, twa, kat, senk, sis, sèt, epi nou ta dwe isit la byen kèk tan. Se konsa, sa ki nan yon amelyorasyon marginal sou sa menm ke ou ka fè tankou yon timoun? Kouman ou konsidere moun ki pi vit? Epi, pa kòmanse nan enstriksyon lekti pwòp mwen an? Ki sa ou ta fè kòm yon timoun? Kòmanse konte twos, dwa, tankou sa mwen trè bon nan de, kat, sis, uit, dis, 12. Se konsa, sa se yon bagay dwa enteresan. Se konsa, konbyen nan yon amelyorasyon se ke gen? Se konsa, li la evidamman yon faktè de. Li pran m 'mwatye tan kòm anpil. Men, ou konnen sa, jan nou ap jwenn nan tout semès sa a, gwo kontra, tankou atout vitès moute kouri tan ou pa jis yon faktè de se pa tout sa ki enteresan paske analòg la isit la nan mond nan konpitè se ke mwen se yon proseseur mwen se yon òdinatè, èk byen, si mwen jis rete tann 12 mwa, 18 mwa, mwen òdinatè a ap sèlman kapab pa nati, pa kantite jigaèrts mwen gen nan mwen pou kapab konte moun nan sal sa a pi vit. Se konsa, sa yo kalite, sa yo kalite speedups lineyè nan de faktè tankou faktè twa, menm faktè nan dis, moun ki swen? Dwa, nou ka jete kenkayri nan pwoblèm nan. Nou ka tann bagay sa yo deyò. Nou ka devlope pi vit machin. Men, entelèktuèl, wi ki te kalite entelijan men li pa t 'chanje vrèman fondamantal pwoblèm nan. Mwen toujou pase nan kite devan dwa, nan do. Li reyèlman algoritm la menm. Men, mwen ofri nou pou nou ka fè pi byen. Nou ka entelijan pase sa a epi fè fondamantal yon aplikasyon pi vit. Men, demontre sa a, nou bezwen ou imè nou sèlman pou yon moman. E li la nan pwen sa a kote li pral m 'ap pale mwens epi ou pale plis. Men, mwen fè bezwen ou siyen yon sèl etap ansanm, ki se si ou ta imè nou, tanpri, kanpe. direksyon ki isit la sou tablo a, ou konnen yo, Okay, yon koup la ou gen chita. Moun sa yo ki nan nou an tounen, gen nou ale, byen. Mèsi poutèt ou. Se konsa, pwogram nan se isit la anvan ou. Ou se kounye a konpitè yo ègzékusion pwogram sa a. Li nan jistis tèt eksplikasyon nan pwen sa. Wi, ou ta dwe gen yon nimewo. Jwenn li? Dwa, anpil nan nou ap pwobableman panse de tout fason sa a deja, premye ane frchman. Se konsa, panse ou menm, ou se youn nan nimewo. Se konsa, twa etap isit la, la pè ak yon moun kanpe, ajoute nonb de ou ansanm ak adopte ki sòm kòm nouvo nimewo ou ak nou pwal fè yon chèk saniti. [Brwi nan] foul èske ou konnen konbyen nou genyen? >> [Inodibl] >> Pa gen [] inodibl. >> Nou bezwen gen yon kle repons. [Silence] >> Yeah. [Brwi nan] foul >> David: Nan pwen sa a algoritm a ta dwe likidasyon desann. [Brwi nan] foul Petèt nou ta dwe ale ak apwòch mwen apre tout. >> 43. >> 163. >> David: oo aritmetik devan 300 moun plis. [Rir] Ki sa ki nan Tally dènye nou pral nan ka? >> 180. [Rir] >> 1,200. >> 386. >> David: 386, epi ou pase yon kanpe la? Se sa tout moun? Èske w konnen repons lan? >> Ki sa? >> David: èske w konnen ki repons la? Nou pa t 'pote yon repons kle avèk nou sa, 386 se an rezon pwesizeman repons lan dwa pou premye fwa. [Bat bwavo] [Aplodisman] Sa a oke. [Aplodisman] trè, trè joliman fè. Se konsa, sa ki te anportè a paske definitivman ki te santi yon ti dousman pase apwòch trè senp men Alòske anpil kòrèk mwen an jis pwal onesies ak twosies ak jis ap resevwa li fèt ak de gòch a dwat. Men, nou sa nou te reyèlman jis fè la? Oke, si te gen apeprè, kite la di, nan 400 ou kanpe nan yon pwen, ak Lè sa a, mwatye nan nou, trè byen vit, ki soti nan sa mwen te kapab di, te vle chita. Se konsa, mwatye nan nou te chita, nou te soti nan 400 a 200 Lè sa a, lè sa a 100 a 50 Lè sa a, 25. Se konsa, ankò, genyen la ki divize ak konkeri menm lide nou te gen ak repèrtwar la. Ankò, ak chak iteration nou gwosè mwatye a nan pwoblèm la, nou li mwatye, mwatye nou li. Se konsa, nan teyori, ta dwe algoritm ou te ap pi vit pase kantite apwòch lineyè paske mwen ta apwòch mwen te pran yo di ke 400 etap oswa petèt si mwen yon ti kras entelijan 200 etap. Men, ou te pran ta lwen mwens, dwa de 400 a 200, 100, 50, 25, 13, sis; pou mwens pase dis etap nan fen a kont mwen 200 oswa 400. E gen jèm nan nan yon lide reyèlman enteresan. Ak repons lan se wi, Mathematics sa ou te fè se te jis yon bagay ki a yon ti logaritmik nan lanati pa Log de baz, nou divize nan de ak de ankò. E nou pral rvwar sa a pita nan sa a semès. Men, ladan manti ankò yon aplikasyon trè entèlijan. Epi, Nou jis Gratian sifas la trè entelijan anpil entèlijan apwòch yo ki efikas ak pwoblèm ke nou ta ka finalman rezoud. Se konsa, ki moun ki ou jis klavarde ak si ti tan? Yon enkyetid komen nan yon kou tankou sa a se tout moun ki a gòch nan ou menm ak tout moun gen dwa a ou dwe klè konnen plis pase ou. Oke, ki la absoliman pa ka la. Ak nan reyalite, nan dènye ane yo, sa gen kou yo te fè yon efò concerté yo rive jwenn sa yo ki soti mwens alèz, pou pale ak. E pa sa, nou vle di pa moun ki pa janm manyen yon òdinatè anvan paske ki an reyèlman difisil jwenn alantou isit la jou sa yo, men jan moun ki sèvi ak imel, itilize Facebook, petèt menm kounye a, men yo pa nesesèman byen si sa yo dwe fè lè yon bagay pase mal oswa lè yo mande sou bagay teknoloji, ou konnen, men yo monte oubyen yo kalite pouse kenkayri a yon zanmi ki nan petèt plis vèrse an li pase yo. Oke, sa yo se kèk estatistik nan semès ane pase yo. Se konsa, lè yo te mande yo, lè nou te mande 400 elèv nou yo pou ane pase a, ou konnen, ki sa ki nivo ou nan ankourajman vini nan klas sa a, men 34% te ekri tèt yo desann kòm pami moun yo mwens konfòtab. Se konsa, si ou gen antre nan chanm sa yo e yo toujou panse kounye a, sa, ou konnen sa, sa-a tèm mwens alèz dekri m ', konnen ou nan konpayi bon nèt. Men, wè tou sa, si ou vini nan kou ak yon background nan syans òdinatè epi ou te reyèlman ki jik nan lekòl mwayen ak lekòl segondè ki te ekri kòd ak ansèyman nou menm lang, byen ke nan amann tou paske yo gen la definitivman yon nontrivial odyans ki gwosè ak background kòm byen,% sou 13, dènye tèm. Se lè sa a, tout moun gen nan lòt moun, sòt de yon moun ki pa panse yo ap mwens alèz yo, yo definitivman pa panse ke yo te plis konfòtab men yo ap sèlman nan yon kou jwenn yon bagay soti nan li. Se konsa, reyalize sa a kou trase afè espèk a elèv yo. Epi, mete sa-a nan plis tèm konkrè, 71% nan elèv yo, ane pase a, te gen zewo dèyè kou yo. Se konsa, si w ap rantre nan kou sa a panse Oh tout moun ki pran CS50 te yon sifleman syans òdinatè nan lekòl segondè pa, li la ka an. Pifò moun yo prezimableman jis enterese nan li. Ak kèk, repons lan se wi, absoliman yo te pran kèk kou, kèk, oswa omwen youn nan moun ane pase a te pran senk kou deja. Se konsa, nou definitivman gen kèk Abernant men ankò vyann lan nan koub la se nan sa yo ki pi ba valè tout ansanm. Ak yon lòt estatistik entèresan nou pataje sou koup pase yo nan ane a nan rapò seksyèl. Se konsa, istorikman, omwen nan syans konpitè, gen yon ti jan nan yon krochi gason fi yo. Mwen koup de ane de sa li te plis make ke ane pase. Se konsa, nou te prèske kounye a nan 40% nan nivo. Epi si mwen kapab jete desann yon gantle jis poutèt a gen yon tablo tat twazyèm ane pwochen an, ki an menm plis ekitab. Mwen ta remake ke gen la absoliman okenn rezon nan pèspektiv nan kou gason ak fanm ki pa ta dwe enskri nan jan de kou. Nan relativman egal nimewo ak reyalize 38 pousan, 48 pousan, nou te byen kontan aktyèlman wè ke nou ap prèske a ki, omwen, estatistik menm valè a 50%. Se konsa, si w se, an reyalite, fanm, rès asire tou ke sa a se pa, an reyalite, yon gason klas domine. Oke, sa a sèlman pou k ap pase yo dwe 20yèm anivèsè nesans CS50 la. Mwen, byen mèsi. [Bat bwavo] [Aplodisman] Sa a trè bon pou nou paske nou te pote gato pou ou aktyèlman. Se konsa, lè ou sòti isit la pita jodi a, w ap resevwa aktyèlman yon chans rankontre anpil nan kou yo moutre Bousie ki ap relache nan korido la. Ak repons lan se wi si se pwal yon sòt bèl nan jan incentivized nan reyinyon Bousie yo moutre nou. Men, nou fè yon vwayaj pran jiska yon ti boulanje epi ankò ki annakò avèk kou a se nati ludik pandan Menm si se espere nontrivial kantite lajan pou travay pandan ke nou gen ki amizan. Men, nou fè gen youn nan sa yo pen pou ou. [Rir] Se konsa, si w ap ri sa a aktyèlman bon paske menm si ou nan mitan youn nan sa yo alèz mwens omwen ou okouran de li. Moun sa yo ki nan nou an a 14 pousan ta pito sa a gou. [Rir] ak lè sa a, si ou pa konnen ki sa lanfè a se yo ale sou li kounye a, nou menm tou nou gen sa a pou tout rès ou. [Bat bwavo] ] Aplodisman [Se konsa, moun yo te koupe yo an moso deyò jan nou pale. Se konsa, ankò, an n pran sou bagay yo yon Notch epi omwen prezante kèk lokatè debaz ke nou ap pran Lè sa a, pou yo akòde nan rete nan sa a semès la. Se konsa, nou tout konnen ke pwobableman konpitè alafen bouyi desann jan kanmenm zewo ak fanmi yo, bagay sa yo te rele Bits. Ki sa sa vle di? Byen ou ka panse a li franchman kòm yon anpoul limyè, yon ti jan se yon anpoul limyè ki nan swa sou li a oswa anile. Li se yon chanjman, li la swa sou li a oswa anile. Koulye a, syantis konpitè jeneralman panse de li kòm nimewo a zewo arbitrerman a, epi, ak nosyon la nan kòm youn. Se konsa, si ou jete yon limyè sou sa chanje nan yon vire li an ki nan yon zewo. Oswa, équivalant, vire limyè a sou ki valè a an vire vre li an ki an valè nan fo. Se konsa, sa yo, se jis sinonim. Nan fen jounen an, repons lan se wi, kalkil tout moun, tout bagay ki pase sou anba Hood a nan yon òdinatè fè finalman bouyi desann nan zewo ak fanmi yo. Epi, lè ou sispann reflechi sou li, li la trè remakab Dam sa ki te mond lan ki fèt ak blòk sa yo bati debaz tankou kèk nan aparèy sa yo w ap kenbe nan men ou. Byen, poukisa yo se zewo ak sa itil? Bondye mwen an, menm nan mond lan reyèl nou omwen gen chif dis, zewo jiska nèf. Poukisa pou limite? Byen nan kenkayri tèm li a pi fasil. Li pi fasil reprezante de eta, dwa. Si òdinatè yo ta ploge nan miray la, anjeneral, ou gen sa a sous fasil nan nati binè. Li nan swa sou oswa anile. Elektrisite se koule tankou dlo oswa li pa. Se konsa, sa se kalite youn nan rezon ki fè ke premye mond lan ale avèk jis zewo ak fanmi yo nan òdinatè. Men, ou ka itilize yo kòm bati blòk. Se konsa, sa a aktyèlman se yon ti piti sou ekran an isit la, men nou ka konte nan binè oswa nou kapab reprezante bagay nou vle nan binè menm jan nou kapab, di, desimal, menm jan nou kapab, menm nan fè, avèk lèt alfabè a. Se konsa, isit la nan sistèm lan rapid. Nan jis tan yon minit koup kounye a ou pral konnen ki jan konte, kouman ekri, kijan pale binè anpil tankou Laptop pwòp ou yo. Oke, ou genyen, nan mond lan an sòt binè, de sèlman tankou kolòn lekòl klas oswa valè. Se konsa, nan lekòl klas nou aprann sa se yo menm kolòn sa se dè dizèn kolòn lan, nan kolòn ak dè santèn konsa pwoklame. Nan lòt mo, poukisa se nimewo a nou konnen kòm nimewo 123 a 123? Oke, pwofesè m 'moutre mwen sa se yo menm kolòn, sa te dè dizèn yo, sa te dè santèn yo. Byen sa ki te fè sa vle di? Oke, figi konnen ki valè total la se sa ki otreman fisèl an chif, jis achaj mak sou tablo an. Oke, nou gen yon sèl 100, pou ke nan 1 fwa 100 ak Lè sa a, plis ki sa de 10 an pou ke nan 2 fwa 10 plis twa moun, pou ke la 3 fwa 1, Okay, pou mwen yo sanble yo te vinn tounen kote mwen te kòmanse. Men, pwosesis sa a trè senp de sèlman miltipliye chif sa yo pa valè nan kolòn la se egzakteman sa binè se tout sou. Men, nan binè ou itilize pouvwa nan de pouvwa pa nan dis. Se konsa, isit la nan yon seri de uit anpoul limyè. syantis konpitè renmen itilize valè tankou de ak uit ak 16 ak 24 ak 32 paske yo se tout valè pratik jeneralman itilize. Se konsa, lè nou pale de uit valè nan sekans sa a se tankou rele bit la. Lè jou sa yo nou raman pale nan bytes jis, nou pale megaokte jigokte ak teraokte jou sa yo. Men, li la tout alafen menm bagay la. Isit la nan uit Bits aka yon bit, jis jagon ki senp. Se konsa, nan tout sa yo anpoul limyè ap anile. Se konsa, matematik la aktyèlman reyèlman fasil. Se konsa, gen sou bò dwat la, byenke li nan ti wè, se yon kolòn nan, twos yo, four yo, eights yo, 16 an, 32s, 64s, 128s. Byen, petèt li an difisil Memorize an premye men li la senpleman miltipliye pa de nan men dwat a gòch. Se konsa, ou kapab toujou rkree sa. Byen yo, yo tout ap fèmen pou ke la fwa plasolde 0, 0 fwa plasolde. Se konsa, sa a se nimewo a 0 reprezante nan binè. Nan lòt mo, kouman ou ekri nimewo a nou konnen kòm 0 nan binè? Oke, yonn, de, twa, kat, senk, sis, sèt, uit, e teknikman jis tankou nan desimal, nan tout sa yo zewo dirijan yo, yo pa ajoute anyen nan lèt yo te jis paske nou gen arbitrerman deside nou vle uit nan bagay sa yo nan yon ranje, dwa. Si yo ap objè fizik, nou gen uit konsa, yo te gen nan tout ka anile. Se konsa, nou te ka te aktyèlman lwen ak yon zewo. Byen kouman ou reprezante youn nan nimewo? Oke, enstenktivman ou pwal jete youn nan kèk chanjman yo. Ou pral tounen yon anpoul sou. Se konsa, gen youn nan nimewo kounye a paske nou mete yon lòt, yon anpoul limyè ki an sou li, nan pozisyon youn nan. Kouman yo nou pral reprezante de? Oke, nou ap aktyèlman pral jete de kèk chanjman kounye a nan omwen kont eta sa, nou te vire sou kolòn nan de a fèmen yo menm kolòn e kounye a nou gen valè nan youn nan kolòn nan twos. Se konsa, sa se valè total de. Koulye a, ki se yon egzèsis mantal rapid; sa ki pwal pase ak sekans nan apre? Kouman pou mwen prezante kantite twa? Oke, mwen bezwen youn nan kolòn nan twos, youn nan kolòn nan threes ak HA ah. Se konsa, koulye a mwen te enkremante sa. Koulye a, sa-a menm either modèl debaz. Ki sa ki nan nimewo kat la? Ann wè byen, mwen jis bezwen yon youn nan kolòn nan four epi zewo nan twos yo ak fanmi yo. Se konsa, lè sa a, li kontinye fason sa. Epi, li jis sa a sekans etap. Ak nan nosyon an binè se pa tout sa ki reyèlman konplike. Nan tèt la nou te gen wit zewo. Anba a ke nou te sèt zewo ak yon yon sèl. Anba a ke nou te sis zewo, yon sèl, ak yon zewo ak ki an binè. 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. [Rir] >> 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. [Mizik] >> 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. [Aplodisman] ==== Transcribed by Automatic Sync Technologies ====