>> David: Fáilte is ainm dom agus tá sé seo David Malan CS50. Agus, ní gnách i scoil é seo do chúrsa ard eolaíocht ríomhaireachta. Tá an cúrsa seo a speisialta rud beag. Agus níl sé mar tá mé teagasc é. tá sé toisc go bhfuil sé seo ar cheann de, cosúil le linn bheith ag smaoineamh, na cúrsaí sin gann go squeezes iarbhír do inchinn an oiread sin agus do sceideal an oiread sin atá ar bun ag deireadh seimeastair's smarter bhraitheann tú i ndáiríre. Mar sin, go raibh an bealach mhothaigh mé nuair a thóg mé féin an cúrsa seo ar ais sa bhliain 1996. Bhí mé i mo mhór rialtas ag an am anseo ina gcónaí i Mather Teach. Agus, I. [Cheering] Mar tá an ceann eile, na cúig cinn eile ann. Mar sin, bhí mé i mo mhór rialtas ag an am. Agus bhí mé mór rialtas mar ba mhaith liom a stair i gcónaí. Thaitin sé liom dlí bunreachtúil i scoil ard. Agus mar sin, leag mé amach ar an bhliain seo á dhéanamh cosán freshmen cad is féidir liom is fearr, ag déanamh a fhios agam cad a thaitin liom. Agus ba mhaith bhí mé i gcónaí beagán de geek, B'fhearr liom babbled i gcónaí le ríomhairí. Ach, mé féin, b'fhéidir ironically in retrospect, ba mhaith Bhreathnaigh mé i gcónaí a bhí á gcur ar an guys eolaíocht ríomhaireachta i mo scoil ard, mo chairde mar an geeks fíor. Agus fós, níor ar deireadh, bliain sophomore Glacaim leis an cúrsa seo ar a dtugtar CS50 beag a bhí eagla orm go hiarbhír as baile mo bhliain freshman féin. Agus bhí mé i mo chúntóir úsáideora ag an am. Mar sin, bhí mé cinnte cheana cáilithe, ar a laghad, a bheith i measc sin, siúd geeks a rinne mé ag spraoi sa scoil ard. Ach, bhí eagla orm. Tá, go raibh sé an dea-cháil ag an am agus b'fhéidir go fóill sa chuid a bhí ann, bhí sé cúrsa scary. Bhí sé a lán oibre. Bhí sé deacair agus go fóill, tá sé ar cheann de na rudaí sin más rud é, mo Dhia, a bhí an coirt bhfad níos measa ná a bite. Fuair mé féin sophomore bliana, don chéad uair, go hiarbhír spraoi obair bhaile a fháil. Agus níl mé ag rá ach seo leis an gcúrsa seo páirc a thabhairt duit. Bhí sé seo i gcrích dáiríre dom. Anois, is dóigh liom, ag pointe amháin, rinne mé an líne tras chun geekdum fíor i gcás mé úsáid iarbhír a táim ag tnúth le oíche Dé hAoine toisc go raibh mé in ann tú chuachadh, ceirtín suas os comhair mo MacBook beag agus obair ar Leagann an fhadhb CS50's. Mar sin, ag an bpointe sin, Sílim go bhfuil mé trasna go soiléir go raibh an líne. Agus, níl ár sprioc sa chúrsa seo ar fad agat dul isteach an duine sin, ach, ach a rá go bhfuil rud éigin ar beag speisialta faoin chúrsa seo, eolaíochta rud beag speisialta faoi ríomhaire i gcoitinne, go háirithe na laethanta seo. Agus, is mó a fuair acclimated againn go léir i dteicneolaíochtaí, chun na bréagáin níos muid timpeall in ár bpócaí féin go bhfuil ríomhairí. Ciallaíonn mé, tá mo ríomhaire iPhone iarbhír níos airde ná mar a bhí mo ríomhaire glúine a chomhlíonadh sa choláiste. Is féidir leat é a lán rudaí néata leis na rudaí. Agus anois, an chuid is mó againn sa seomra seo, is dócha, bain úsáid as daoine eile bogearraí, daoine eile uirlisí, daoine eile a réiteach ar na fadhbanna mar téimid go iTunes, íoslódáil muid roinnt app as an stór app agus Walla féidir linn déanamh rud éigin i ndáiríre néata. Ach, ag an deireadh seimeastair seo, is féidir leat a bheith ag an duine sin a dhéanamh fhadhb a réiteach. Is féidir leat a bheith ag an duine a réiteach fadhb éigin, ag tógáil go app, go bhfuil píosa bogearraí, gur uirlis sin, ach an oiread, ach amháin amuses dom, amuses tú. mar shampla, a rialú, abair, do iTunes leabharlann le do árasán app go soiléir ina bhfuil ann cheana féin nó is féidir leat teacht ar sceidil tointeála níos éasca mar shampla. Mar sin, ar ndóigh, ar cheann de na rudaí an-an chéad raibh a fhios agam i ndiaidh a bhí ag cur CS50 arís, is dócha go raibh sé ag an bpointe seo, oíche Dé hAoine agus oíche Dé Sathairn, an deis seo a bhí ann ag an am nuair a bhí ag rith Harvard tointeála bus. Agus, go dtí an lá, tá siad fós ag an sceidil clóite. Ach, ní raibh ciallaíonn ndáiríre aon líne a fháil amach nuair a bhí an tointeála seo chugainn. Anois, ní raibh mé cúraim, mar gheall ar cé go raibh cónaí orm i Mather ní raibh mé i measc iad siúd a ghlac an tointeála gcoitinne. Ach, ní raibh mé a lán cairde i Pfoho mar shampla. Agus ceann acu iarr orm, i mo thuairimse, ag pointe amháin. [Cheering] Maith go leor Pfoho's níos fearr ná Mather réir dealraimh. Mar sin, fuair ceann de mo chairde de chineál ag smaoineamh mé b'fhéidir clár beag is féidir liom a scríobh chuig an cineál cabhrú le mo chairde a sheiceáil an sceidil tointeála. Agus mar sin a rugadh an buachaill tointeála awkwardly ainmnithe, an píosa Foclóir gur fhan timpeall do roinnt ar líon na bliana ar a laghad, i measc roinnt de na upperclassmen. Ag an am, ba é seo an clár seo ag teacht beag orduithe den chineál céanna i spiorad a DOS. Bhí sé ag rith i dtimpeallacht UNIX. Mar sin, ní raibh sé an-sexy ar chor ar bith. clóscríofa tú ach cúpla horduithe agus d'inis sé tú nuair a bhí an eiteáin. Bhuel, na laethanta seo tá sé beagán níos sofaisticiúla. Agus, tá sé ionadaíocht iarbhír de beacht ar na cineálacha tionscadal a mic léinn sa deireadh cúrsa a bhunú a dhéanamh le téarmaí a dheireadh. Mar sin, tá an leagan seo ceithre, thart ar 15 bliain níos déanaí, de Shuttleboy. Is cosúil go Google Maps á beagán mall ansin. Ach, dóibh siúd a bhfuil a fháil amach anseo tar éis an ranga agus téigh, abair, ó Halla Cuimhneacháin agus gur gá dul suas go dtí, abair, an Chearnóg. Bhuel, is féidir leat saoire ceachtar in dhá nóiméad, más rud seo, nach bhfuil i ndáiríre ag obair ar son tú díreach go fóill, nó an bhfuil tú mar roghanna go leor eile mar a bheadh agat. Agus, ag teacht go luath, is féidir linn a páirc seo ó CS50, beidh sé an cumas céanna trí SMS. Is féidir leat téacs Shuttleboy ar an bhfón. glaoch tú Shuttleboy. uimhir ghutháin CS50's na bliana seo, go maith, amazingly bhí ar fáil, 617-FABHT-CS50. Mar sin, déanfaidh an tús go luath. Mar sin, ní dhéanann sé ach glaoch fós mar tá mé i mo gotten reprimanded as, ar dheis anois é ar a bheith déanta chun ár gcóras teileafóin cill ceann eile múinteoireachta's. Mar sin, beidh tú é a fháil ach má tá ceisteanna agat maidir leis an sceideal tointeála anois. Ach, a chuirfear i bhfeidhm go luath. Mar sin, rudaí eile, i ndáiríre, go chaith muid féin an samhradh seo ar ndáiríre iad ag ullmhú don trian seo a bunch iomlán a bhí fadhbanna eile gur theastaigh uainn a réiteach. Mar shampla, níl a lán rudaí ar fad a bhíonn ar bun sa gcampas ar lá áirithe. Agus ar ndóigh, a chur ar bhealach eile, níl a lán rudaí ar fad ag an tráth seo ag dul ar an gcampas go brách mé cinnte buntáiste a bhaint as. Agus, cé Tá mé faoi léigear anois leis an gcaoi a lán rudaí atá ar siúl, ar an gcampas, is cosúil mé riamh fós le teacht ar an am. Ach, Walla, go fiú, léacht CS50's. Sin an áit a bhfuil tú, mar sin bhí sé seo, bhí an clár a scríobh dúinn a comhiomlán gach ceann de na himeachtaí ar an gcampas. Agus rud éigin go bhfuil sé sin go bhfuil mic léinn eile sa chúrsa seo céanna i ngleic ar a gcuid féin. Agus, tá muid ag obair le heintitis eile ar an gcampas a dhéanamh dtarlóidh sé sin i ndáiríre. Ach tá an pointe a CS50 an téarma seo go léir de na cláir is beag againn a bheith ag obair ar cibé acu an gceann seo nó cibé ceann do gach ceann de na nuachta aggregating Harvard's in aon áit amháin, gach Nuacht Google, tá gach ceann de na rudaí ag dul go bhfuil an méid Tugtar Comhéadain API's, cláir i bhfeidhm. Agus é sin ach sainiúla labhairt ar a son ar an gcumas atá ligin daoine eile, daoine sa seomra seo, ag déanamh rud éigin leis go bhfuil na sonraí céanna. Mar sin, le téarmaí na críche sin, má shocraíonn tú a chur chun feidhme an tionscadal deiridh a bhaineann leis an nuacht nó imeachtaí nó léarscáileanna, muid, ar a laghad mar chúrsa, beidh a dhéanamh níos éasca go léir i mbliana ar fáil duit le comhéadan; a sort feidhm, agus mar sin a labhairt, bogearraí gur féidir a úsáid i do thionscadail féin dul thuas agus níos faide i gcás mic léinn, b'fhéidir, go bhfuil siad imithe i am a chuaigh thart toisc nach bhfuil an gcreat seo curtha i bhfeidhm dóibh. Agus arís, thosaigh gach seo, as dom ar a laghad, thart ar 15 bliain ó shin Shuttleboy cur chun feidhme. ríomhphost mé as mo chara Ken i Pfoho. Dúirt mé hug cad a cheapann tú? An bhfuil seo úsáideach? phost sé amach ar an liosta Pfoho oscailte agus Walla, na blianta ina dhiaidh sin go léir atá cosúil mé fós crúite an tionscadal seo. Agus an rud is néata faoi, agus tá sé seo ina bhfuil ró-cúrsa mar seo san innealtóireacht agus eolaíocht ríomhaireachta, is dóigh liom, a speisialta beag, is é sin, oibríonn nuair a dhéanann tú do theach agus nuair a dhéanann tú do thionscadail sa chúrsa seo, agat Tá a fhios, cuid mhór acu, yes, beidh tú a chur ar leataobh agus gan a úsáid arís i ndáiríre. Ach, cuid de, beidh tú. Agus níl rud ar cumhachtach seo, ar a laghad dom, rud spreagúil seo, nuair a dhéanann tú rud éigin agus ag daoine eile i ndáiríre faoi chúram, nach bhfuil ach aoibh ar dhaoine eile agus Pat do chuid ar chúl agus ansin saghas dul faoina saol féin. Siad úsáid as i ndáiríre cad a rinne tú ina saol féin fiú má tá sé do rud éigin mar amaideach nó chomh simplí agus is cóir a aimsiú nuair is féidir leo a fháil amach anseo chun an tointeála eile ghabháil leis an Chearnóg. Mar sin, le téarmaí na críche sin, go bhfuil ceann de na spriocanna don chúrsa seo; chun cumhacht a thabhairt duit guys a aithint ach fadhb éigin cibé an bhfuil sé ar an gcampas, nó tá súil againn go maith thar an gcampas, agus ar ndóigh, bain úsáid as do scileanna féin, d'intinn féin agus a réiteach go bhfuil fadhb i roinnt chuid, teicneolaíochta. Mar sin, tá sé seo mar a rá freisin cúrsa atá againn sa siollabas agus an tuairisc oifigiúil cúrsaí go múineann tú conas a smaoineamh agus múineann sé duit conas chun fadhbanna a réiteach níos éifeachtaí. Bhuel, cad a chiallaíonn? Bhuel, nuair a tá tú 600 megahertz i do phóca nó trí gigahertz faoi do deasc sa bhaile, is féidir leat réiteach a lán de na fadhbanna go héifeachtach ach le bhfeidhm brute lomadh. Ach, níl a lán de na fadhbanna sa saol seo, cibé acu an bhfuil cuardach é, abair, líonra Facebook's nó ar an idirlíon via Google, nach cuma cé chomh tapa é do ríomhaire, go háirithe, níl aon bhealach in ifreann bhfuil tú ag dul a chuardach billiúin leathanaigh ghréasáin an cur chuige duit go tapa ach amháin má iarbhír an fhadhb seo intelligently. Ní gá duit cuardach díreach, mar shampla, tá liosta ollmhór de gach leathanach gréasáin ar an talamh ó bhun go barr lorg rud éigin a bhaineann le cibé téarmaí cuardaigh a bhfuil tú ag lorg Google Google agus is dócha, agus tá súil againn go Facebook agus aon cheann de na haonáin mór Bíonn a lán daoine cliste ag smaoineamh faoi conas is féidir leo níos mó sonraí a fháil go tapa, conas is féidir leo a phróiseálann faisnéis níos éifeachtaí, agus, conas is féidir leo filleadh go ginearálta ach torthaí níos tapa ionas gur féidir leat a dhéanamh go fóill, rudaí níos suimiúla leis na feistí. Agus mar sin, cad atá i gceist againn, áfach, leis an gcaoi, daoine a mhúineadh conas chun smaoineamh níos mó go cúramach, agus níos mó algorithmically. Bhuel, tá an chuma amhairc beag seo i gcónaí chun dul thar maith. Agus, is cosúil go sonrach. Agus bhí d'iarr mé ar fiú ach inné ag mac léinn iar, ó tá tú ag dul a dhéanamh ar an rud Eolaire arís. Agus mé i bhfad deas ar an láthair, chinn an ceart go leor cinnte go mbainfidh linn tógáil ar an rud Eolaire. Agus d'iarr sé orm nuair a Strac tú é i leath de cheart, ba mhaith liom go teicniúil, yeah well Strac muid é i leith ach nach bhfuil ar an gcaoi sin, sa tslí eolaíocht ríomhaireachta mbeidh mé in ann a cuimilt an ruda seo ina dhá leath. Agus mar sin, bhí anseo leis an bhfadhb atá i láthair againn le tamall anuas. Mar sin, anseo an Eolaire. Tá sé seo ar a laghad a fuair leathanaigh míle nó mar sin. Agus is é an sprioc simplí ar láimh saol an-dáiríre a fháil, a rá, maidir le duine i anseo. Mar sin, Mike Smith, ainm go deireanach le tosú le S. Mar sin, tá mé ar an duine tipiciúil, I phiocadh suas an leabhar seo fón. Agus duine ar bith amuigh ansin, cad ba mhaith leat, duine de ghnáth, a dhéanamh chun tús a aimsiú Mike Smith, is léir nach bhfuil a fhios agam cad leathanach roimh ré go bhfuil sé ar iarbhír. Ceart, ionas go dtéann tú garbh i lár, ar dheis. Agus ag an bpointe seo ar an scéal, tá mé is dócha sa N nó M's, tá a fhios agat, ar bhealach tuairim is leath de tríd an Eolaire. Casadh amach, an uair dheireanach a rinne mé sampla seo, chinn mé ar bhealach féin a chur in alt choimhdeacht. Mar sin, tá sé i ndáiríre ní cothrom go cothrom idir A trí M agus N trí Z. Ach, inniu, tá muid, ar ndóigh, i I'm an M's, ceart go leor mar sin, anois mé ag an M's. Ach cad mo takeaway anois díreach mar ghnáth-duine as an tsráid? Cá háit a dtéann mé amach romhainn maidir le Mike Smith. [Inaudible] Agus mar sin, ach is dócha ar an leath, ceart, mar gheall ar a thagann S tar éis M. Agus mar sin suite, anseo an dráma amhairc. Sin i ndáiríre ní An mbraitheann sé ina dhá leath, ar dheis. chineál I cheated síos an t-ionad. Ach, tá a fhios againn anois go bhfuil Mike nach bhfuil ar a laghad sa leath. Is féidir linn a chaitheamh literally leath an fhadhb a shiúl. Agus mé ag fhág leis an bhfadhb go bunúsach fós ar an rud céanna, Mike Smith a aimsiú sa leabhar mór i ndáiríre. Ach, is é an fhadhb a leath chomh mór anois. Más rud é go raibh sé míle leathanaigh roimh,'s fuair sé anois 500. Tá a fhios agat cad, is féidir liom a dhéanamh ar an rud céanna arís. Is féidir le cineál I a ghabhann le caith nó an rud céanna a dhéanamh arís agus arís eile. Anois, níl mé go maith ag S. Tá mé ag T. Agus mar sin, ó chuaigh mé i bhfad ró-beag. Ach, tá a fhios agam anois go bhfuil Mike gan an ceart, níl ag dul a bheith thart ar aicme someday i gcás nach féidir liom ach an rud deoir damba, geall liom. Ach anois, tá a fhios agam nach's sé leis an gceart. Mar sin, tá an fhadhb quartered anois. Mar sin, bhí mé ag dul ó míle go 500-250 leathanach. Agus arís, má leanann tú ar an loighic, leanúint leis an matamaitic, I'm Mionghearradh fhadhb seo i leith, a bheidh i leith, a bheidh i leath go dtí an deireadh, tá mé ceachtar ag dul go dtí Níor aimsíodh aon Smith ar chor ar bith, ní dócha, nó tá mé ag dul go dtí teacht ar an amháin Táim ag lorg. Ach, is é sin, ansin begs, an cheist seo ar bith níos fearr ná an cur chuige simplí de ach a rá, a fhios agat, A, nope, B, ní, ag tosú ó chlé go dheis linearly ag dul tríd an leabhar? Bhuel, tá instinctively. Tá sé ag dul a bheith i bhfad níos tapúla. Ach, cé mhéad níos lú? Bhuel, má tá mé míle leabhar gutháin nó a ligean ar an leathanach 1,024 rá dóibh siúd atá cosúil le cumhachtaí na n dhá, conas a d'fhéadfadh a lán am agam an fhadhb seo a roinnt ina dhá leath roimh chinneadh an tUasal Smith? >> Deich. >> David: So, deich, ar dheis. Má tá tú 1,024 leathanaigh agus scoilt tú iad i leith, a bheidh i leath, i leith, a bheidh i leath, is féidir liom a chasann deich n-uaire, rud a chiallaíonn mé ag dul ó 1,000 leathanaigh leis an duine Tá mé ag cuardach ar leathanaigh ach deich. Agus sin é an cineál néata, ach, tá a fhios agat, má cheapann tú faoi é a tá tú é seo a dhéanamh go léir de do shaol. Níl sé go drámatúil. Ach anois, nach bhfuil an Eolaire hamháin do Boston, tá sé do na Stáit Aontaithe ar fad nó an domhain ar fad, agus an rud go bhfuil na billiúin de na leathanaigh atá ann, a shamhlú mar sin Eolaire le 4000000000 leathanaigh. Conas tá go leor leathanach casadh mé ag dul a bheith ag fónamh a dhéanamh chun a fháil Mike Smith i Leabhar Teileafóin 4000000000 leathanach seo? >> Logáil bonn a dó. >> David: So yeah, má tá tú ag chineál ar an gcineál seo math log dhá bonn. Ach, má cheapann tú 4-2000000000 to one billiún, dá bhrí sin tá leath billiún. Ciallaíonn mé, a théann i ndáiríre whittles féin síos go leor darn go tapa. Go deimhin, le 32 halvings an Eolaire fiú ó cheithre billiúin, a bhfaighidh mé síos go dtí aon leathanach amháin. Agus é sin nuair a fhaigheann an stuif seo cumhachtach, sílim. Sin é nuair a fháil ar na smaointe maithe nuair is féidir leat a bhfuil fadhb 4000000000 leathanach agus i 32 céimeanna is féidir teacht ar an duine a bhfuil tú ag lorg agat. Agus mar sin, go cad is brí leis againn nuair a deirimid go mbainfidh tú ag foghlaim conas smaoineamh go cúramach níos mó, níos algorithmically, níos mó intelligently mar gheall ar fhadhbanna a réiteach. Agus tá an tuairisceáin ollmhór nuair is féidir leat é seo i ndáiríre, agus arís, chun an pointe seo ar an Googles an domhain an Facebooks a bhfuil an só ag thacair sonraí ollmhór. Tá sé agat le cur chuige na fadhbanna seo ar an mbealach seo tá sé ar shlí eile ach nach bhfuil ag dul ag obair. Bhuel, cad é a rinne an mac léinn cuimhne i ndáiríre? Liom, is maith linn rudaí a dhéanamh go bhfuil beagán amaideach uaireanta a shórtáil de thógáil an chiumhais amach cad é a mhalairt a lán ábhar nua. Agus mar sin, bhí sé i ndáiríre, chuir an mac léinn iar-dom an nasc seo a chuaigh mé amach romhainn, ach le haghaidh thosaíonn agus ansin aiféala é ag an deireadh, a tharraingt suas ar uTube anseo. Mar sin, shíl mé roinnt mhaith liom cad a chiallaíonn gur eolaí neamh-ríomhaire nuair a deora sé nó Eolaire ina dhá leath. ] Gáire [ ] Tost [ [] Inaudible >> Tá a fhios agat breis agus 200 leathanach, líne glan deas, cuimilt dlisteanach. ] Gáire [ >> David: amhlaidh, is dócha, oibríonn sé a bhealach freisin. Mar sin, is é a fuair mé amach an chúrsa seo na blianta ó shin yes, Shuttleboy, agus ansin tá céim san eolaíocht ríomhaireachta, agus ansin tá a PHD san eolaíocht ríomhaireachta. Agus ní go cad tá muid ag iarraidh dul ar mhic léinn is mó sa chúrsa seo isteach. nach bhfuil an chuid is mó de tú sa chúrsa seo ag dul chun dul ar móra san eolaíocht ríomhaireachta. D'fhéadfadh roinnt de tú saorga, ach le roinnt de tú go mbeidh sé seo ar chúrsa críochfoirt. Agus go breá breá toisc go bhfuil an cúrsa seo, go deimhin, a bheidh struchtúrtha ar bhealach ina fiú má íocann tú díreach tar éis do dleachtanna ar feadh cúpla mí agus tú ag díriú i ndáiríre agus tú a chur i ndáiríre mar atá leagtha amach i bhfad ón gcúrsa seo is féidir leat, beidh tú, i Go deimhin, a bheith feistithe go maith chun dul ar ais chuig do domhan de eacnamaíocht, bitheolaíocht, síceolaíocht, i bhfeidhm math, agus ar ndóigh, leas a bhaint as an méid atá ar deireadh thiar mar suimiúil ar chúrsa chomh tá súil againn go bunúsach an choincheapa de mar go bhfuil sé praiticiúil. Agus is é sin ró-rud a's b'fhéidir rud annamh a fháil. Shíl mé cúpla tuairimí a roinnt mac léinn ó titim le dáta a chur sa treoir seo leid bliain anuas nuair a iarradh orthu faoi Cad ba mhaith leat a insint do mhic léinn sa todhchaí. Bhuel, más rud é nach bhfuil tú ag amharc ar na barúlacha cheana féin, dúirt an dalta amháin a bheidh an cúrsa seo a ghlacadh mhéid chóir do am suas. Is é ach, má chuir tú do chuid oibre i saol iomlán nua, ina n-iomláine, má chuir tú ar an obair, má chuir tú ar an obair i, ceart go leor, agus mar sin aige seo ar ghramadach nach liom, mar sin má chuir tú, a chur san obair seo, tá Beidh saol iomlán nua a oscailt suas a thabhairt duit. Den scoth ar cé mhéid a d'fhoghlaim mé in ach 12 seachtain. Scríobh léinn eile, is féidir leat níos fearr a chur ar seo nó go bhfuil tú ag dul a aiféala air. Scríobh eile, beagán níos bluntly, beidh sé ciceáil do thóin agus fágann siad an mothúchán tú mór. Agus ansin ar deireadh, is é an ceann seo b'fhéidir rud is féidir liom a thaispeáint ach amháin i scríbhinn, ach, ag an dara ó íochtar anseo. [Gáire] Mar sin, níl mé cinnte má tá tú go leor cairde a ghlac an chúrsa seo ach chineál atá againn de raibh a lán damáiste do mhic léinn na bliana seo caite. Thugamar isteach, ag an tús, léachtaí éagsúla, tráthanna na gceist cúpla, cúpla leagann fadhbanna, ar an gcoincheap sin de lolcats. Ní féidir leat a fheiceáil cad is féidir liom a fheiceáil i láthair anseo ach feicfidh tú an fear óg darbh ainm cat áthas ar a bhfuil an ceannaire an lolcat mar a thugtar uirthi. Tá sé seo ar cheann de na tosaithe idirlín dúr go sílim frankly an dichotomy idir an dá uaisle anseo agus cad atá againn anois ar an scáileán, b'fhéidir. [Gáire] ceann amháin de na húsáidí is míchuí den amharclann seo go dtí seo. Agus, cén fáth nach a théimid ar beagán níos fíor beagán níos pearsanta ar an gcoincheap sin de iarbhír a réiteach ar fhadhb níos éifeachtaí. Tá fadhb simplí ar lá amháin d'aon scoil chun suí síos nó seasamh suas agus crom ar na mic léinn, glaoch rolla ceart de shaghas. Tá Bhuel, cur chuige an chuid is mó, ach mar sin féin naive, an-ceart go bhféadfaí múinteoir ceann amháin, dhá, trí, a ceathair, cúig, sé, seacht, agus ba mhaith linn a bheith anseo go leor ama a roinnt. Mar sin, cad feabhas beag ar seo, fiú go mb'fhéidir go ndearna sibh mar a kid? Conas a dhéanann tú count daoine níos tapúla? Agus ní, a dtosaíonn na léitheoireachta de mo treoracha féin? Cad a bheadh agat mar a rinneadh kid? mbeirteanna comhaireamh Start, ceart, mar sin tá mé maith go leor ag dhá, ceithre, sé, ocht, deich, 12. Mar sin, is ceart go mbeidh rud éigin spéisiúil. Mar sin, cé mhéad de a fheabhsú go bhfuil ann? Mar sin, tá sé cinnte gur fachtóir de dhá. Bíonn sé liom leath oiread ama. Ach, tá a fhios agat cad, nach bhfuil mar beidh muid ag teacht ar fud an trian seo, déileáil go mór, mar a bhrostú do rith am ag fachtóir amháin de dhá suimiúil ar fad gur mar gheall ar an aschur anseo ar an domhan go bhfuil mé ríomhaire a LAP Tá mé ríomhaire, go maith heck, más rud é go liom fanacht ach 12 mhí, 18 mí, agam go mbeidh an ríomhaire in ann a bheith díreach ag an nádúr, de réir líon na gigahertz tá mé i mo a bheith in ann daoine a chomhaireamh sa seomra seo níos tapúla. Mar sin, na cineálacha sin, na cineálacha sin speedups líneach cosúil le fachtóir de dhá fhachtóir de thrí, fiú fachtóir de deich, a cares? Ceart, is féidir linn caith crua-earraí ar an bhfadhb. Is féidir linn fanacht rudaí amach. Is féidir linn a fhorbairt innill níos tapúla. Ach, go hintleachtúil, yeah go raibh cineál cliste ach ní raibh sé i ndáiríre athrú bunúsach ar an bhfadhb. Tá mé ag dul go fóill ó chlé go deas, chun tosaigh ar ais. Tá sé i ndáiríre an algartam céanna. Ach, is mian liom gur féidir linn a dhéanamh níos fearr. Is féidir linn a dhéanamh níos cliste ná seo go bunúsach a chur chun feidhme agus a dhéanamh níos tapúla. Ach, a léiriú seo, ní mór duit a ghreann dúinn do láthair anois agus arís. Agus tá sé ag an bpointe seo i gcás ina mbainfidh sé ag caint liom a bheith níos lú agus ag caint leat níos mó. Ach is féidir liom is gá duit a rith céim amháin le chéile, a bhfuil más mian greann tú dúinn, le do thoil an fód a sheasamh. Na treoracha anseo ar an mbord, tá a fhios bhfuil tú, maith go leor, cúpla agat suí síos. Mar sin de tú i siar, tá muid, ceart go leor. Go raibh maith agat. Mar sin, tá an clár anseo sula gcuirfidh tú. Tá tú anois na ríomhairí forghníomhaitheach an gclár seo. Tá sé measartha féin míniúcháin ag an bpointe seo. Sea, ba chóir duit a bheith ar aon uimhir amháin. É a fháil? Ceart, tá cuid mhaith de seo is dócha tú ag smaoineamh ar aon nós cheana féin, an chéad bhliain freshman. Mar sin, dar leis féin, is tú an aon uimhir amháin. Mar sin, céim trí anseo, péire seasamh amach le duine, do dhá uimhreacha a chur le chéile agus an tsuim sin a ghlacadh mar a d'uimhir nua agus beidh muid ag déanamh a sheiceáil sanity. [Torann ó] slua bhfuil a fhios agat cé mhéad atá againn? >> [] Inaudible >> Uimh] [inaudible. >> Is gá dúinn go bhfuil eochair freagra. ] Tost [ >> Sea. [Torann ó] slua >> David: Ag an bpointe seo ba chóir don algartam a foirceannadh síos. [Torann ó] slua B'fhéidir gur chóir dúinn go bhfuil siad imithe le mo chur chuige tar éis an tsaoil. >> 43. >> 163. >> David: Ooh uimhríochtúil os comhair daoine móide 300. [Gáire] Cad é ár n-scóir deiridh ag dul a bheith? >> 180. ] Gáire [ >> 1,200. >> 386. >> David: 386, agus má tá tú an ceann deireanach seasamh? An bhfuil go bhfuil gach duine? An bhfuil aithne agat ar an freagra? >> Cad é? >> David: An bhfuil a fhios agat cad é an freagra? Ní raibh freagra a thabhairt eochair le linn sin a dhéanamh, 386 Is é i ndáiríre go beacht an freagra ceart don chéad uair. [Cheering] ] Bualadh bos [Sin ceart go leor. [Bualadh bos] Very, rinneadh an-nicely. Mar sin, cad a bhí an takeaway mar gheall ar gur bhraith sí an beagán níos moille ná mo cur chuige an-simplí ach ainneoin sin, is ceart go díreach dul onesies agus twosies agus rinneadh é a fháil díreach leis ó chlé go deas. Ach, cad a rinne sé go mór linn é sin go díreach ann? Bhuel, má bhí garbh, a ligean ar rá, 400 de tú ina sheasamh ag pointe amháin, agus ansin leath de tú, go han-tapa, ó cad a raibh mé in ann a insint, theastaigh chun suí síos. Mar sin, shuigh leath de tú síos, chuaigh muid 400-200 as sin go dtí 100 as sin go dtí 50 as sin go dtí 25. Mar sin arís, níl go bhfuil roinnt conquer smaoineamh céanna agus a bhí againn ar an Eolaire. Arís, le gach timthrialla leath linn méid na faidhbe, leath dúinn é, dhá leath againn uirthi. Sin, go teoiriciúil, ba chóir do algartam atá curtha i bhfad níos tapúla ná mo chur chuige líneach toisc go mbeadh an cur chuige atá glactha mo rá 400 céimeanna nó b'fhéidir go bhfuil mé beagán níos cliste 200 céimeanna a thógáil. Ach, ba mhaith leatsa a glacadh i bhfad níos lú tá, ceart 400-200, 100, 50, 25, 13, sé; níos lú ná mar a deich céimeanna sa deireadh, i gcomparáid le mo 200 nó 400. Agus níl an só de smaoineamh suimiúla. Agus tá, go matamaiticiúil cad a rinne tú díreach go raibh rud éigin's Logartamach beag sa nádúr ag dhá bhonn logáil isteach, roinnte i dhá agus muid beirt arís. Agus beidh muid athchuairt a thabhairt ar seo níos déanaí sa seimeastar seo. Ach arís luíonn inti a chur chun feidhme go brách. Agus, tá muid ag scríobadh ach an dromchla na iontach cliste ar an gcur chuige an-chliste éifeachtach chun fadhbanna a réiteach go mb'fhéidir go mbeadh muid ar deireadh thiar. Mar sin, cé hiad na daoine a rinne comhrá tú díreach leis más rud é go gairid? Tá imní coitianta i gcúrsa is mar seo go bhfuil gach duine ar an taobh clé de tú, agus gach duine an ceart agat ní mór duit fios go soiléir níos mó ná. Well, go fíor nach bhfuil an cás. Agus ar ndóigh, le blianta beaga anuas, tá an cúrsa seo rinne iarracht comhbheartaithe a bhaint amach dóibh siúd chomh compordach, mar sin a labhairt. Agus sin, ní chiallaíonn dúinn daoine atá i dteagmháil léi riamh ar ríomhaire roimhe sin mar gur deacair a fháil i ndáiríre thart anseo na laethanta seo, ach folks a úsáideann ríomhphost, a úsáid Facebook, b'fhéidir fiú anois ceart go leor ach ní gá go cinnte cad a dhéanamh nuair a Téann rud mícheart nó nuair a iarrtar orthu faoi rud ar bith teicneolaíochta, tá a fhios agat, téigh go dtí an lámha suas nó ar chineál siad na crua-earraí a bhrú chun cara a's b'fhéidir versed in ann níos mó ná siad. Bhuel, tá na roinnt staitisticí ó na bliana seo caite seimeastar. Mar sin, nuair a iarradh orthu, nuair a d'iarr muid ar ár 400 mac léinn sin an bhliain seo caite, tá a fhios agat, cad é do leibhéal chompord ag teacht isteach sa rang seo, scríobh maith le 34% dóibh féin síos mar a measc siúd chomh compordach. Mar sin, má tá tú ag teacht isteach sa seomra seo agus tá siad fós ag smaoineamh anois, go bhfuil, tá a fhios agat cad, an téarma seo níos lú compordach a ndéantar cur síos dom, tá a fhios go bhfuil tú i gcuideachta an-mhaith. Ach, a bhaint amach freisin go bhfuil, má tá tú ag teacht sa chúrsa seo le cúlra san eolaíocht ríomhaireachta agus go raibh tú i ndáiríre go geek sa mheánscoil agus ard scoil a bhí ag scríobh cód agus féin múineadh teangacha, maith go bhfuil's fíneáil chomh maith mar gheall ar's tá sí an nontrivial lucht féachana / éisteachta mheánmhéide leis an chúlra sin, chomh maith, faoi 13%, téarma seo caite. Agus ansin, níl gach duine ar bith eile, sort de dhuine cé a cheapfadh nach bhfuil siad níos lú compordach, a cheapann siad nach bhfuil cinnte go bhfuil siad níos compordaí ach tá siad díreach i gcúrsa rud éigin a fháil amach é. Mar sin, tuigimid nach leor an cúrsa seo a tharraingt ar raon iomlán na mac léinn. Agus, de seo a chur i dtéarmaí níos coincréit, 71% de mhic léinn, an bhliain seo caite, bhí cúrsaí náid taobh thiar díobh. Mar sin, má tá tú ag teacht isteach an chúrsa seo ag smaoineamh ó gach duine a ghlacann CS50 nach raibh a whiz eolaíocht ríomhaireachta sa scoil ard, tá sé an cás. Tá formhór na ndaoine is dócha ach suim acu ann. Agus go raibh glactha ag an cúpla, yes, tar éis fíor roinnt cúrsaí, cuid, nó duine amháin ar a laghad cúig bliana seo caite cúrsaí roimhe seo. Mar sin, tá muid cinnte roinnt outliers ach arís an feoil an chuair i luachanna sin níos ísle ar fad. Is é Agus staidreamh spéisiúil eile i bpáirt againn le cúpla bliain anuas an cóimheas idir an inscne. Mar sin, go stairiúil, ar a laghad san eolaíocht ríomhaireachta, tá beagán de SKEW fireann baineann. mé cúpla bliain ó shin go raibh sé i bhfad níos mó ná an bhliain seo caite tá sé marcáilte. Mar sin, táimid ag beagnach 40% anois ag an leibhéal. Agus más féidir liom é a chaitheamh síos gauntlet díreach ar mhaithe leis an bpíchairt tríú a bhfuil an bhliain seo chugainn, go fiú's níos cothroime. Ba mhaith liom pointe amach sin níl aon chúis go hiomlán ó thaobh cúrsaí nár cheart go fhir agus do mhná a chláróidh sa chineál seo ar ndóigh. I sách comhionann uimhreacha agus a bhaint amach go 38 faoin gcéad, 48 faoin gcéad, táimid i ndáiríre go leor sásta a fheiceáil go bhfuil muid ag beagnach, ar a laghad, go staitistiúil luach fiú amháin de 50%. Mar sin, má tá tú, ar ndóigh, baineann, a dhéanamh chinntiú freisin go bhfuil an chuid eile nach bhfuil sé seo, i bhfírinne, is mó atá rang fireann. Bhuel, a tharlaíonn sé seo amhlaidh ach a bhreithlá 20 CS50's. I, buíochas a ghabháil go maith leat. [Cheering] ] Bualadh bos [Sin an-deas agat mar gheall ar thug muid Císte don tú i ndáiríre. Agus mar sin, nuair a dhéanann tú amach anseo ina dhiaidh sin inniu, beidh tú i ndáiríre deis chun freastal ar go leor de na cúrsaí teagaisc a fuair scoláireacht beidh a bheidh lingering sa halla. Agus tá beidh sé a bheith ina sort deas slí incentivized chun freastal ar na comhaltaí teagaisc. Ach, a dhéanann muid turas suas go dtí bácála beag agus arís i gcomhréir leis an gcúrsa sin féin, cé go bhfuil nádúr playful ag súil le méid nontrivial oibre agus muid ag an spraoi. Ach tá, a dhéanann muid ar cheann de na cistí ar do shon. [Gáire] Mar sin, má tá tú ag gáire go hiarbhír maith mar go fiú má tá tú i measc na gceann de na lú compordach ar a laghad a bhfuil tú faoi deara é. d'fhéadfadh siúd atá tú ar an gcéad 14 Is fearr blas seo. [Gáire] Agus ansin, más rud é nach bhfuil a fhios agat cad é an ifreann ar siúl anois, ní mór dúinn freisin é seo don chuid eile den tú. [Cheering] ] Bualadh bos [Mar sin, tá siad sin á gearrtha suas i bpíosaí lasmuigh de réir mar a labhairt linn. Mar sin arís, a ligean ar rudaí den chéad scoth a chur suas agus ar a laghad cuid bhunúsach tionónta beidh orainn a chur ansin le haghaidh a deonaíodh i thabhairt isteach an chuid eile den trian seo. Mar sin, is dócha go bhfuil a fhios againn go léir ríomhairí a fhiuchadh deireadh síos ar bhealach a nialais, agus cinn, ar a dtugtar na rudaí giotán. Cad a chiallaíonn? Bhuel, is féidir leat smaoineamh ar é frankly mar bolgáin solais, tá beagán a bolgán solas a's ceachtar ar nó tá sé amach. It's a chur ar athrú, tá sé cibé ar nó tá sé amach. Anois, sílim eolaithe ríomhaire i gcoitinne as an uimhir nialas treallach agus an, agus ar an nóisean de ar mar aon ní amháin. Mar sin, má chaitheann tú a chur ar athrú solas ar an duine sin an cas sé amach go bhfuil's nialas. Nó, equivalently, cas ar an solas ar an luach cas's fíor sé amach go bhfuil ar an luach bréagach. Mar sin, tá na díreach comhchiallaigh. Ag deireadh an lae, yes, ríomh ar fad, go léir ar rudaí a théann faoi bhun an cochall i ndeireadh na dála ní ríomhaire a fhiuchadh síos go dtí nialais, agus cinn. Agus, nuair a stop leat smaoineamh é, tá sé deas damba suntasach déanta ar a bhfuil an domhan leis na bloic thógála bunúsach lena n-áirítear cuid de na feistí bhfuil tú i do lámh shealbhú. Bhuel, cad chuige a bhfuil nialais, agus cinn úsáideach? Mo Dhia, fiú amháin i fíorastaíochtaí a bheith againn ar a laghad deich dhigit, nialas trí naoi. Cén fáth teoranta mar sin de? Well i dtéarmaí crua-earraí tá sé an-éasca. Tá sé i bhfad níos éasca chun ionadaíocht a dhéanamh dá stát, ar dheis. Má tá ríomhairí plugáilte isteach an balla, de ghnáth, ní mór duit an bhfoinse éasca de chineál dénártha. Tá sé ar cheann ar nó as. Leictreachais é ag sileadh nó nach bhfuil sé. Mar sin, go bhfuil's chineál ar cheann de na cúiseanna tosaigh go ndeachaigh an domhan le díreach nialais agus cinn i ríomhairí. Ach, is féidir leat iad a úsáid mar bloic thógála. Mar sin, tá sé seo i ndáiríre ar an scáileán beag beag anseo ach is féidir linn count in binary nó is féidir linn aon rud a ba mhaith linn ionadaíocht a dhéanamh i dhénártha díreach mar is féidir linn, abair, deachúlacha, díreach mar is féidir linn, fiú i ndáiríre, le litreacha aibítre. Agus mar sin, anseo an córas mear. I am ach cúpla nóiméad anois beidh a fhios agat conas comhaireamh, conas a scríobh, conas a labhairt dénártha i bhfad mar do ríomhaire glúine féin. Bhuel, tá tú, ar fud an domhain de saghas dhénártha, díreach cosúil le colúin scoile nó ag na luachanna grád. Mar sin, i scoil ngrád foghlaim againn é seo na cinn seo, tá an colún colún deicheanna, an gcolún ar na céadta agus mar sin de. I bhfocail eile, cén fáth a bhfuil an uimhir a fhios againn mar 123 an uimhir 123? Bhuel, mhúin dom mo mhúinteoir é seo an colún cinn, go raibh sé seo na deicheanna, ba é seo an céadta. Bhuel, cad a rinne a chiallóidh? Bhuel, a figiúr amach cad é an luach iomlán ar cad é a mhalairt an teaghrán na digití, ach marcanna i dtaisce ar an mbord. Bhuel, tá ceann 100, ionas go mbeidh ar 1 amanna 100, agus ansin chomh maith le cad dhá 10 ionas go mbeidh ar na cinn 2 uair 10 móide trí, mar sin go 3 huaire 1, maith go leor, agus mar sin is cosúil agam go bhfuil gotten ais chuig an áit a thosaigh mé. Ach, tá an próiseas seo an-simplí díreach dhigit a iolrú ag luach an colún go díreach cad dhénártha de gach faoi. Ach, i dhénártha tú úsáid as cumhachtaí de dhá cumhachtaí de deich. Mar sin, seo sraith de ocht bolgáin solais. mhaith eolaithe Ríomhaire a luachanna a úsáid mar dhá bhliain agus ocht mbliana agus 16 agus 24 agus 32 mar tá siad ar fad le luachanna i gcoitinne áisiúla a úsáid. Mar sin, nuair a labhair muid thart ar ocht luachanna in ord mhaith é seo ar a dtugtar an bheart. Agus muid ag caint na laethanta seo, i mbearta, ach is annamh, labhair muid ghigibheart meigibheart agus teireabheart na laethanta seo. Ach tá sé ar deireadh thiar ar fad an rud céanna. Seo ocht giotán aka bheart amháin, ach béarlagair simplí. Mar sin, tá gach ceann de na bolgáin solais amach. Mar sin, tá an math iarbhír i ndáiríre go héasca. Mar sin, ní ar an gceart, cé go bhfuil sé beag a fheiceáil, is é an duine colún, an mbeirteanna, na ceithre boinn, an eights, an 16s, 32s, 64s, 128s. Ceart go leor, b'fhéidir go bhfuil sé deacair a le foghlaim ar dtús ach tá sé d'iolrú ach ag dhá ó dheas go clé. Mar sin, is féidir leat a athchruthú seo i gcónaí. Bhuel, tá siad ar fad amach ionas go mbeidh ar amanna placeholder 0, 0 amanna placeholder. Mar sin, is é seo an líon 0 ionadaíocht i dhénártha. I bhfocail eile, conas a dhéanann tú scríobh ar an líon a fhios againn mar 0 i dhénártha? Bhuel, amháin, a dó, a trí, a ceathair, cúig, sé, seacht, ocht, agus teicniúil díreach mar i deachúil, gach ceann de na nialais tosaigh, ní dhéanann siad aon rud a chur leis an bhfoirmle seo ach tá siad ann mar gheall ar a bheartaigh muid go treallach muid Ba mhaith ocht gcinn de na nithe seo a chéile, ar dheis. Má tá siad rudaí fisiciúla, tá ocht sin tá siad ar fad a fuair a bheith ar ceal. Mar sin, d'fhéadfadh againn ach gotten shiúl leis an ceann nialas. Bhuel, conas a dhéanann ionadaíocht tú an aon uimhir amháin? Bhuel, instinctively tá tú ag dul le caith ar cheann de na lasca. Tá tú ag dul chun casadh le bolgáin ar. Mar sin, tá an aon uimhir amháin mar gheall ar chur againn anois amháin, a bolgán solas ar, sa cheann seasamh. Cén chaoi a bhfuil muid ag dul chun ionadaíocht a dhá? Bhuel, tá muid ag dul i ndáiríre a chaitheamh anois ar a laghad dhá lasca versus an stáit seo, ní mór dúinn ina dhiaidh sin ar an gcolún ar dhá's cas na cinn colún agus anois tá an luach de cheann amháin sa cholún mbeirteanna. Mar sin, tá go mbeadh luach iomlán de dhá. Anois, a fheidhmiú mear mheabhrach; cad atá ar siúl le tarlú leis an ord seo chugainn? Conas is féidir liom an uimhir trí? Bhuel, ní mór dom amháin as an gcolún mbeirteanna, duine as an gcolún ar threes agus ha ha. Mar sin, anois tá mé breisithe go bhfuil ceann. Agus anois, Tarlaíonn seo patrún céanna. Cad é an uimhir ceithre? Well a ligean ar a fheiceáil, ní mór dom ach amháin sa cholún ceithre boinn agus ansin nialais i mbeirteanna agus cinn. Mar sin, ansin, leanann sé ar aghaidh go bhealach. Agus, tá sé ach an seicheamh seo na céimeanna a thógáil. Agus i ar an nóisean de dhénártha nach bhfuil i ndáiríre go léir go casta. Ag barr an againn ann ocht nialais. Thíos go bhfuil seacht nialais, agus ceann. Thíos go bhfuil sé nialais, a cheann, agus nialas agus gur's dhénártha. 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. ] Gáire [ >> 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. ] Ceol [ >> 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. ] Bualadh bos [ ==== Transcribed by Automatic Sync Technologies ====