>> David: Benvingut, el meu nom és David Malan i això és CS50. I, això no és el típic equip de secundària curs de ciències. Aquest curs és una mica una cosa especial. I no és perquè ho estic ensenyant. és perquè aquest és un, ens agrada pensar, els cursos que en realitat rara esprem el seu cervell tant i el seu horari tant que per al final del semestre que realment se sent més intel ligent. Llavors, això va ser el que jo sentia quan em va prendre aquest curs l'any 1996. Que era un gran govern en el moment en que aquí viuen a la Casa Mather. I, I. [Victorejant] Com són els altres, els altres cinc no. Per tant, que era un gran govern en aquell moment. I jo era un gran govern, perquè sempre em va agradar la història. M'agradava el dret constitucional a l'escola secundària. I per això, em vaig posar en camí en camí aquest any estudiants de primer any fent el que millor saben fer, fent el que sabia que m'agradava. I jo sempre havia estat una mica geek, em va balbucejar sempre amb els ordinadors. Però, jo mateix, potser irònicament, en retrospectiva, m'agradaria veure sempre els nois que estaven prenent ciències de la computació en la meva escola, els meus amics geeks com el real. I, però, finalment ho va fer, el segon any que prenc aquest curs poc CS50 crida que en realitat m'havia espantat al meu primer any pròpia. I jo era un assistent d'usuari en el moment. Per tant, jo estava sens dubte ja està classificat, almenys, estar entre aquests, els frikis que jo em burlava de l'escola secundària. Però, jo estava espantat. Hi ha, hi havia aquesta reputació en el moment i potser encara, en part, que era un, era un supòsit por. Va ser molta feina. Era difícil i, però, és una d'aquelles coses que, Déu meu, l'escorça era molt pitjor que la seva mossegada. Em vaig trobar segon any, per primera vegada, trobar realment divertit tasca. I no estic dient que això acaba de llançar aquest curs per a vostè. es tractava d'una realització autèntica per a mi. Ara, crec que, en un moment, em va fer creuar la línia per geekdum veritable realitat on solia esperar el divendres a la nit perquè podria ris al front del meu MacBook poc i treballar en els butlletins de problemes de CS50. Així, en aquest punt, crec que clarament havia creuat la línia. I, el nostre objectiu en aquest curs no és convertir a tots vostès en aquesta persona, però, només per dir que hi ha una mica d'alguna cosa especial sobre aquest curs, una ciència poc alguna cosa especial sobre un ordinador en general, especialment en aquests dies. I, més aclimatats tots tenim en l'àmbit tecnològic, les joguines més que portem en els nostres butxaques que són ells mateixos els ordinadors. Vull dir, el meu iPhone és realment un equip de més rendiment del meu portàtil estava a la universitat. Vostè pot fer un munt de coses interessants amb aquestes coses. I ara, la majoria de nosaltres en aquesta sala, probablement només ha d'utilitzar programari d'altres persones, les eines d'altres persones, les solucions d'altres persones als problemes perquè anem a iTunes, de descarregar alguns aplicació des de la App Store i Walla podem fer alguna cosa realment fantàstic. Però, al final d'aquest semestre, pot ser la persona que fa que la resolució de problemes. Vostè pot ser la persona la solució d'algun problema, la construcció d'aquesta aplicació, aquesta peça de programari, aquesta eina que sigui, un només em diverteix, et diverteix. per exemple, controlant, per exemple, la biblioteca d'iTunes des dels seus apartaments amb claredat una aplicació que ja existeix o es pot trobar els horaris de transport amb més facilitat, per exemple. Així que, de fet, una de les primeres coses que vaig fer després de prendre CS50 va ser de nou, probablement en aquest moment nits de divendres i dissabtes a la nit, no hi havia aquesta oportunitat en el moment en què Harvard estava corrent autobusos llançadora. I, per al dia d'avui, encara tenen impresa horaris. Però, no hi havia realment cap manera d'esbrinar en línia quan el transbordador estava pròxima. Ara, no m'importava, perquè encara que he viscut a Mather jo no estava entre els que generalment es la llançadora. Però, jo tenia un munt d'amics que Pfoho per exemple. I un d'ells em va preguntar, crec que en un punt. [Victorejant] Bé Pfoho millor que pel que sembla Mather. Així, un dels meus amics de classe em va fer pensar que potser pot escriure un petit programa per ajudar a la meva classe d'amics consulteu els horaris de la llançadora. I així va néixer el nen amb malaptesa el nom de trasllats, aquesta peça del lèxic que s'ha mantingut al voltant d'un cert nombre d'anys com a mínim entre alguns dels cursos superiors. En aquest moment, es tractava d'aquest programa de línia de comandaments poc similar en esperit a Dos. S'executa en un entorn UNIX. Per tant, no era molt sexy en absolut. Vostè acaba d'escriure un parell de comandaments i li va dir que quan els transbordadors van anar. Bé, en aquests dies és una mica més sofisticat. I, en realitat és representada, precisament, els tipus de projectes que els estudiants en aquest curs fins a finals decisions pels termes finals. Per tant, aquesta és la versió de quatre, uns 15 anys més tard, de Shuttleboy. Sembla que Google Maps està sent una mica lent allà. Però, per a aquells de vostès que han de sortir d'aquí després de classe i van, per exemple, del Memorial Hall i necessitat d'anar fins a, diguem, el Quad. Bé, pot sortir en dos minuts si per, això realment no funciona per a vostè encara, o si té tantes opcions com altres et poden agradar. I, en breu, es pot llançar des d'aquesta CS50, serà la mateixa capacitat per SMS. Pot Shuttleboy text a través del telèfon. Vostè crida a Shuttleboy. CS50 número de telèfon d'aquest any, bé, sorprenentment tenien a la seva disposició, 617-BUG-CS50. Per tant, que s'estrenarà aviat. Així que no ho digui encara, perquè he rebut una reprimenda a favor, en aquest moment és que s'està encaminament al telèfon mòbil del cap del nostre sistema companys de la docència. Per tant, vas a aconseguir-ho si té alguna pregunta sobre l'horari de trasllat ara. Però, que aviat es duran a terme. Per tant, altres coses, en realitat, que ens va passar aquest estiu en realitat en la preparació per a aquest semestre va ser un munt d'altres problemes que hem volgut resoldre. Per exemple, hi ha un munt de coses que passa en aquest campus en un dia determinat. I de fet, dit d'una altra manera, hi ha un munt de coses succeint en aquest campus que mai dubte aprofitar. I, encara que ara estic aclaparat amb la quantitat de coses que estan succeint, al campus, encara sembla que mai troba el temps. Però, Walla, fins i tot allà, la conferència de CS50. Aquí és on és vostè, així que això era una, es tracta d'un programa que va escriure per afegir tots els esdeveniments al campus. I això ha estat una mica que altres estudiants en aquest mateix curs s'ha abordat pel seu compte. I, hem de treballar amb altres entitats en el campus per realment fer que això passi. Però el punt a CS50 aquest terme és que tots aquests petits programes que hem estat treballant sobre si aquesta un o si es per l'agregació de totes les notícies de Harvard en un sol lloc, totes les notícies de Google, totes aquestes coses van a tenir el que s'anomenen API's, interfícies de programació d'aplicacions. I això és només fantasia parlar per la capacitat de deixar que altres persones, persones en aquesta sala, en realitat fer alguna cosa amb aquestes mateixes dades. Així, els termes finals, si vostè decideix posar en pràctica el projecte final relacionat a les notícies o esdeveniments o mapes, així que, almenys en un curs, farà que tots els més fàcils aquest any pel que li proporciona una interfície, una mena de funció, per dir-ho, un programari que pots utilitzar els teus propis projectes per anar més enllà d'on els estudiants, potser, han anat en el passat perquè aquest marc no s'hagi al lloc per a ells. I de nou, tot això va començar, per a mi com a mínim, uns 15 anys enrere, l'aplicació de Shuttleboy. Llavors per correu electrònic el meu amic Ken a Pfoho. Dic hey, què et sembla? És això útil? Ell ho va enviar per correu a la llista del Pfoho obert i Walla, de tots aquests anys després estic pel que sembla encara munyiment aquest projecte. I el fantàstic d'això, i aquí és on també un curs com aquest en enginyeria i ciències de la computació, crec, és una mica especials, és que, quan facis la teva casa treballa i quan ho facis els teus projectes en aquest curs, vostè saben, molts d'ells, sí, vaig a posar a un costat i en realitat no tornar a utilitzar. Però, alguns d'ells, ho faràs. I no és això una cosa molt poderós, almenys per mi, la cosa realment emocionant, quan vostè fa alguna cosa i altres persones realment es preocupen, els altres no només el somriure i la copet a l'esquena i després la sort d'anar sobre les seves pròpies vides. En realitat el que va fer ús de la seva pròpia vida encara que sigui per una cosa tan ximple o tan simple com trobar quan poden sortir d'aquí per agafar l'autobús al costat del Quad. Així, els termes finals, que és un dels objectius d'aquest curs, per donar poder a vostès per identificar alguns problemes ja sigui en el campus o esperar molt més enllà de l'escola, i utilitzen realment les seves pròpies habilitats, la seva pròpia ment i resoldre aquest problema en alguns banda, tecnològicament. Per tant, això també és un curs, com diem en el programa i la descripció oficial de cursos que li ensenya a pensar i t'ensenya a resoldre problemes més eficientment. Bé, què vol dir això? Bé, quan tens a 600 megahertzs a la butxaca o GHz tres a sota de l'escriptori a casa seva, vostè pot solucionar molts problemes de manera eficient només per la força bruta de tall. Però, hi ha un munt de problemes en aquest món, si es tracta de la recerca, per exemple, la xarxa de Facebook o Internet a través de Google, que no importa el ràpid que l'equip especial, no hi ha manera a l'infern et vas a la cerca milers de milions de pàgines web de manera ràpida a menys que realment abordar aquest problema de manera intel ligent. No és només una recerca, per exemple, una llista enorme de totes les pàgines web a la terra de dalt a baix a la recerca d'alguna cosa relacionada amb els termes de cerca que vostè està buscant espero Google i, presumiblement, Google i Facebook i qualsevol d'aquestes grans entitats té un munt de gent intel ligent pensant en com poden trobar dades més ràpidament, com es pot processar la informació de manera més eficient, i, com només pot retornar els resultats en general, més ràpidament de manera que vostè pot fer, però, les coses més interessants amb aquests dispositius. I així, què volem dir, però, per la forma, ensenyant a la gent com pensar amb més cura, més algorítmicament. Bé, aquest petit visuals sempre sembla anar més bé. I, segons sembla per ser memorable. I em van demanar fins i tot ahir mateix per un ex alumne, oh què vas a fer el del directori telefònic nou. I si que va decidir sobre el terreny està ben segur que construirem una cosa del directori telefònic. I ell em va preguntar quan el va trencar en la meitat dreta, jo estava com així tècnicament sí que ho va esquinçar per la meitat, però no en el camí, en la forma en ciències de la computació podré trencar aquesta cosa per la meitat. I així, aquí hi havia el problema que hem presentat fa algun temps. Per tant, aquí és l'agenda. Té com a mínim un miler de pàgines. I el simple objectiu a la mà el món real és trobar, per exemple, una persona d'aquí. Així, Mike Smith, el cognom a partir de S. Per tant, sóc un ésser humà normal, recull aquesta guia telefònica. I algú per aquí, què vols, una persona típica, fer per començar a trobar Mike Smith, òbviament, no sabent per endavant quina pàgina actualment es troba engegat. Dret, de manera que van aproximadament en el medi, a la dreta. I en aquest punt en la història, probablement sóc al N o el de M, vostè sap, més o menys a meitat de camí a través del directori telefònic. Resulta que l'última vegada que vaig fer aquest exemple d'alguna manera em vaig trobar a la secció d'escorta. Així que, en realitat no té el mateix equilibri entre l'A a la M i N a la Z. Però, avui, estem, de fet, a la M, està bé així, ara estic a la M's. Però quin és el meu menjar per emportar ara mateixa manera que un humà normal fora del carrer? On puc anar ara a Mike Smith. [Inaudible] I així, tan sols, probablement en aquesta meitat, a la dreta, perquè es produeix després de S M. I així, aquí hi ha el drama visual. Això no és realment el esquinçat per la meitat, a la dreta. Em tipus de trampa en el centre. Però, ara sabem que Mike és com a mínim no en aquest mitjà. Literalment, pot tirar la meitat del problema de distància. I jo em quedo amb el problema que és fonamentalment la mateixa cosa, Mike Smith trobar en un llibre molt gran. Però, el problema ara és la meitat de gran. Si hi hagués un miler de pàgines abans, ara té 500. Saps què, no puc fer el mateix una altra vegada. Puc tipus de forma recursiva o diversos cops fer el mateix. Ara no estic molt a S. Estic en T. I per això, oh vaig anar una mica massa lluny. Però, ara sé que Mike no a la dreta, hi serà algun dia una classe on jo simplement no pot trencar el dic cosa, segur. Però ara, jo sé que no està a la dreta. Així doncs, ara el problema ha estat aquarterats. Llavors, he passat de mil a 500-250 pàgines. I de nou, si continua la lògica, les matemàtiques segueixen, estic tallant aquest problema a la meitat, la meitat, la meitat, fins que finalment estic bé, no trobarà cap Smith en absolut, poc probable, o em vaig a trobar la que jo estic buscant. Però, això, llavors, planteja la pregunta, és millor que l'enfocament simple de dir simplement, ja saps, A, no, B, no, començant d'esquerra a dreta en forma lineal a través del llibre? Bé, si per instint. Serà molt més ràpid. Però, quant menys? Bé, si tinc una pàgina del llibre mil telèfon o diguem 1.024 per als de vostè que com potències de dos, quant de temps podria jo haver de dividir aquest problema en un mitjà abans de trobar el senyor Smith? >> Deu. >> David: Així que, deu, a la dreta. Si vostè té 1.024 pàgines i que es divideixin per la meitat, la meitat, la meitat, la meitat, ho faig deu vegades el que significa que van de 1.000 pàgines a la persona que estic buscant en les pàgines de només deu voltes. I això és molt bé, però, ja saps, si ho penses que has estat fent això tota la teva vida. No és tan dramàtic. Però ara, que l'agenda no és només per Boston, que és per a tot el dels EUA o el món sencer i el que aquest té milers de milions de pàgines en ella, així que imaginin una agenda amb quatre mil milions de pàgines. Quantes voltes de pàgina hauré de fer al màxim per trobar Mike Smith en un directori telefònic quatre mil milions de pàgina? >> Registre de dues bases. >> David: Així que sí, si és el tipus de classe de matemàtiques es tracta de registre de dues bases. Però, si vostè pensa que 4-2000000000 to de mil milions, de manera que una mitjana de mil milions. Vull dir, que realment va avall disminueix les mateixa força maleït ràpid. De fet, amb 32 halvings de l'agenda fins i tot de quatre mil milions, vaig a baixar a una pàgina. I aquí és quan aquestes coses es poderosos, crec. Va ser llavors quan aquestes idees es completa quan es pot tenir un problema de quatre mil milions de pàgines i en 32 passos que vostè pot trobar a la persona que estàs buscant. I així, això és el que volem dir quan diem que anem a aprendre a pensar amb més cura, més algorítmicament, més intel ligent sobre la solució de problemes. I els beneficis són enormes quan en realitat es pot fer això, i una altra vegada, a aquest punt dels Google del món la Facebooks que tenen el luxe de tenir enormes conjunts de dades. Cal abordar aquests problemes d'aquesta manera en cas contrari, simplement no funcionarà. Bé, què és el que va fer l'estudiant en realitat recordar? I, que ens agrada fer coses que són una mica ridícul de vegades a una mena d'arribar al límit del que és el contrari una gran quantitat de material nou. I així, en realitat, aquest ex alumne em va enviar aquest enllaç que vaig anar per davant, només per diversió i després es va penedir al final, es va aturar a utube aquí. Per tant, vaig pensar que anava a compartir el que un científic no-ordinador vol dir quan les llàgrimes d'un directori telefònic per la meitat. [Rialles] [Silenci] [Inaudible] >> Saps més de 200 pàgines, línia molt neta, legítima llàgrima. [Rialles] >> David: Així que, suposo, la seva forma de treballar també. Per tant, el que vaig obtenir d'aquest curs fa tants anys és afirmativa, Shuttleboy, i llavors sí un títol en ciències de la computació, i llavors sí un doctorat en ciències de la computació. I això no és el que estem tractant de convertir la majoria dels estudiants en aquest curs en. La majoria de vostès en aquest curs no anem a anar en un important en la informàtica. Alguns de vosaltres potser menors, però per a alguns de vosaltres aquest serà un curs terminal. I això és perfectament correcte, perquè aquest curs és, de fet, estructurat de manera que fins i tot si vostè acaba de pagar les seves quotes durant alguns mesos i que realment es centren en i ara està donant realment tan fora d'aquest curs que pugui, vol, en De fet, estar ben preparats per tornar al seu món de l'economia, biologia, psicologia, matemàtiques aplicades, i de fet fan ús del que és en última instància tan interessant com un curs esperem conceptualment, ja que és fonamentalment pràctic. I això també és una cosa que és potser una mica rara de trobar. Vaig pensar que seria bona idea compartir algunes observacions que els estudiants de posar la tardor passada en aquesta guia de referència any passat quan li van preguntar sobre què li agradaria dir als futurs estudiants. Bé, si encara no ho ha considerat aquests comentaris, un estudiant va dir que aquest curs tindrà una bona quantitat del seu temps per dalt. però, si vostè posa el seu treball en un món totalment nou, en conjunt, si es posa l'obra, si es posa l'obra en, molt bé, així que aquesta és la seva gramàtica no el meu, així que si vostè posa, posar en el treball, un nou món s'obrirà per a vostè. Era sorprenent el molt que vaig aprendre en només 12 setmanes. Un altre estudiant va escriure, és millor que et això o et lamentar. Un altre va escriure, una mica més clarament, que s'iniciarà el cul i que et sentis genial. I finalment, aquesta és potser una cosa que només podem mostrar per escrit, però, d'altra banda des del fons aquí. [Rialles] Per tant, no estic segur si té molts amics que van prendre aquest curs, però ens van fer un tipus de molt mal als estudiants de l'any passat. Hem introduït, a la sortida, diverses conferències, una concursos pocs, un parell problemes conjunts, aquesta noció de lolcats. No podeu veure el que puc veure aquí, sinó en un moment en què es veu un home jove anomenat gat feliç, que és el líder de la lolcat dita. Aquest és un dels davanters Internet estúpid que em sembla francament la dicotomia entre aquests dos cavallers aquí i el que tenim ara a la pantalla és potser. [Rialles] Un dels usos més inadequat d'aquest teatre fins ara. I, per què no fem una mica més real una mica més personal aquesta noció de realitat la solució d'un problema de manera més eficient. Un problema senzill d'un dia de qualsevol escola és seure o posar-se dret i començar a comptar els estudiants, nominals dret de les classes. Bé, el plantejament de la més ingènua però no obstant això, molt cert que un professor pot donar és una, dues, tres, quatre, cinc, sis, set, i ens agradaria ser aquí molt de temps. Llavors, què és una millora marginal en això fins i tot que podria haver fet quan era petit? Com es pot comptar a les persones més ràpid? I, no començar a llegir les instruccions de la meva pròpia? Què hauria fet vostè quan era nen? Inici comptant dos en dos, a la dreta, com així que estic força bé als dos, quatre, sis, vuit, deu, 12. Llavors, això és una cosa ben interessant. Així que, quant d'una millora és que hi ha? Per tant, és òbviament un factor de dos. Em porta la meitat del temps. Però, saps què, ja que trobarem al llarg d'aquest semestre, és gran cosa, com l'acceleració del seu temps de funcionament per només un factor de dos no és tan interessant perquè l'analògica aquí al món de la informàtica és que sóc una CPU Sóc un ordinador, bé, si només ha d'esperar 12 mesos, 18 mesos, l'equip només serà capaç per naturalesa, pel nombre de gigahertzs que hi ha a la Per tenir a les persones en aquesta sala amb més rapidesa. Per tant, aquest tipus de, aquest tipus d'acceleracions lineals com a factor de dues factor de tres, fins i tot factor de deu, a qui li importa? Sí, podem llançar maquinari en el problema. Podem esperar coses. Podem desenvolupar màquines més ràpides. Però, intel.lectualment, sí que era una mena de intel ligent, però en realitat no canvia fonamentalment el problema. Segueixo anant d'esquerra a dreta davantera, cap enrere. És realment el mateix algorisme. Però, t'ofereixo el que podem fer millor. Podem fer més intel ligents que això i, fonamentalment, una execució més ràpida. Però, per demostrar això, necessitem que vostè ens humor per un moment. I és en aquest punt on serà jo qui parlava menys i parlar més. Però jo et necessito per executar el pas un, el que és si ens humor, si us plau posar-se dret. Les adreces aquí al tauler, que ho ets, bé, un parell de vostè ha de seure. Aquells de vosaltres a l'esquena, aquí anem, bé. Gràcies. Així, el programa que aquí està davant vostès. Ara els equips de l'execució d'aquest programa. És bastant explica per si mateix en aquest moment. Sí, ha de ser el número u. Ho entens? Dreta, molts de vostès estan pensant probablement això de totes maneres ja, primer any en primer lloc. Així que pensa a si mateix, que ets el número u. Per tant, el tercer pas aquí, i sortir junts a algú de peu, afegir els seus dos números junts i adoptar aquesta suma com el seu nou número i que farem una comprovació de validesa. [Els sorolls de] gent Saps quants tenim? >> [Inaudible] >> No [inaudible]. >> Hem de tenir una clau de respostes. [Silenci] >> Sí [Els sorolls de] gent >> David: En aquest punt l'algoritme ha de que decau. [Els sorolls de] gent Potser hauria d'haver anat amb el meu enfocament, després de tot. >> 43. >> 163. >> David: aritmètica Ooh davant de 300 persones més. [Rialles] Quin és el nostre resultat final serà? >> 180. [Rialles] >> 1200. >> 386. >> David: 386, i vostè és l'última en peu? És que tot el món? Saps la resposta? >> Què? >> David: Saps quina és la resposta? No hem portat una clau de respostes amb nosaltres perquè, de fet, 386 és precisament la resposta correcta, per primera vegada. [Victorejant] [Aplaudiments] No hi ha problema. [Aplaudiments] Molt, molt ben feta. Aleshores, quina va ser el menjar per emportar, ja que sens dubte es va sentir una mica més lent que el meu enfocament molt senzilla però molt correcta d'anar just onesies i twosies i només aconseguir que es faci amb, d'esquerra a dreta. Però, què va fer realment només fer allà? Bé, si hi havia més o menys, diguem, 400 d'estar aturat en un punt, i després la meitat de vosaltres, molt ràpidament, de manera que vaig poder dir, volia que s'assegués. Així, la meitat de vostès es va asseure, ens vam anar des de 400-200 després a 100 després a 50 després 25. Així que de nou, cal dividir i conquerir mateixa idea que vam tenir amb l'agenda. Una vegada més, amb cada iteració es redueix a la meitat la mida del problema, que el va reduir a la meitat, el va reduir a la meitat. Així, en teoria, el seu algorisme hauria d'haver estat molt més ràpid que el meu enfocament lineal perquè el meu enfocament he pres a dir 400 passos o potser si estic una mica intel.ligent 200 passos. Però, la seva s'ha pres molt menys, a la dreta 400-200, 100, 50, 25, 13, sis, de manera que menys de deu passos a la final davant els meus 200 o 400. I aquí hi ha el germen d'una idea realment interessant. I sí, matemàticament el que has fet una cosa que és una mica logarítmica en la naturalesa per la base de registre de dos, ens dividim en dos i dos de nou. I anem a tornar a això més endavant en aquest semestre. Però aquí està una altra vegada una aplicació molt intel ligent. I, només estem esgarrapant la superfície de la molt intel ligent mètodes eficaços en la molt intel ligent als problemes que en última instància podria resoldre. Llavors, qui són les persones que acaba de xerrar amb encara que sigui breument? Una preocupació comú en un curs com aquest és tothom a l'esquerra d'vostè i tots a la dreta del que clarament ha de saber més que tu. Bé, això definitivament no és el cas. I de fet, en els darrers anys, aquest curs ha fet un esforç concertat per assolir als menys còmodes, per dir-ho. I per això, no vol dir que la gent que mai he tocat un ordinador abans perquè això és realment difícil de trobar per aquí aquests dies, però persones que utilitzen el correu electrònic, l'ús de Facebook, potser fins ara, però no són necessàriament molt segur de què fer quan alguna cosa va malament o quan se'ls pregunta sobre qualsevol cosa tecnològica, ja saps, les mans cap amunt o quin tipus d'empènyer el maquinari a un amic que potser és més versat en el que ells. Bé, aquestes són algunes de les estadístiques semestre de l'any passat. Així que, quan se li va preguntar, quan preguntem als nostres 400 estudiants de l'últim any per, ja saps, quin és el seu nivell de comoditat que entrin en aquesta classe, així el 34% es va anotar com un dels menys còmode. Així que, si han entrat en aquesta sala i encara estan pensant ara, que, saps què, aquest terme descriu menys còmode mi, saber que estàs en molt bona companyia. Però, es donen compte també que, si vas a venir en aquest curs amb una formació en ciències de la computació i estava realment tan geek a l'escola intermèdia i escola secundària que va ser l'escriptura de codi i idiomes mateixos l'ensenyament, així que està molt bé també, perquè definitivament hi ha un trivial audiència amb la mida de fons, així, al voltant del 13%, la temporada passada. I després, hi ha tots els altres, una mena d'algú que no pensen que són menys còmodes, definitivament no crec que se sent més còmode, però en un curs per obtenir una mica d'ell. Així, es donen compte aquest curs treu bastant l'espectre dels estudiants. I, per posar això en termes més concrets, el 71% dels estudiants, l'any passat, havia zero cursos darrere d'ells. Així doncs, si vostè entra en aquest curs pensant oh totes les persones que CS50 va ser un geni de la informàtica a l'escola secundària, no és el cas. La majoria de persones són presumiblement només està interessat en ell. I uns pocs, sí, és clar han pres alguns cursos, alguns, o almenys una persona l'any passat havia pres cinc cursos abans. Així que, definitivament tenim alguns exemplars aïllats, però de nou la carn de la corba es troba en els valors més baixos en conjunt. I una altra dada interessant que hem compartit durant l'últim parell d'anys és la relació entre els sexes. Així que, històricament, almenys en informàtica, hi ha una mica d'un biaix masculí femení. Jo fa uns anys era molt més marcada que l'any passat. Per tant, estem ara en gairebé el 40% de nivell. I si puc passar un guant només pel fet de tenir un gràfic circular tercera l'any que ve, que és fins i tot més equitativa. Vull assenyalar que no hi ha absolutament cap raó des de la perspectiva cursos que els mascles i les femelles no s'han d'inscriure en aquest tipus de curs. En relativament igual nombre, compta amb el 38 per cent, 48 per cent, estem realment satisfets de veure que estem gairebé en que, almenys, estadísticament encara valor de 50%. Per tant, si vostè és, de fet, una dona no estar segur també que això no és, de fet, una classe dominada per homes. Bé, això només passa a ser 20 aniversari de CS50. Jo, bé, gràcies. [Victorejant] [Aplaudiments] És molt amable de la teva part, perquè vam portar pastís per a vostè en realitat. I així, en sortir d'aquí més tard avui, en realitat es tindrà l'oportunitat de conèixer a molts dels cursos de l'ensenyament dels becaris que estaran que roman al passadís. I sí que serà una espècie d'agradable manera d'incentivar la reunió dels becaris d'ensenyament. Però, ens prenem un viatge fins a una petita fleca i una altra d'acord amb el curs és la naturalesa lúdica, però, està esperant quantitat no trivial de treball, mentre que estem tenint diversió. Però, tenim un d'aquests pastissos per a vostè. [Rialles] Per tant, si estàs rient que és realment bo perquè fins i tot si vostè es troba entre una de les menys còmodes si més no estàs conscient. Aquells de vosaltres en el 14 per cent podrien preferir aquest sabor. [Rialles] I després, si vostè no sap què dimonis està passant en aquest moment, també tenim això per a la resta de vostès. [Victorejant] [Aplaudiments] Per tant, aquestes són de ser tallades en trossos fora en aquests moments. Així que de nou, anem a prendre les coses a un altre nivell i si més no introduir algun principi bàsic que llavors et dóna per fet en el que resta d'aquest semestre. Així, tots probablement saben que els ordinadors en última instància es redueixen d'alguna manera a zeros i uns, aquestes coses anomenades bits. Què significa això? Bé, pots pensar-hi amb franquesa com una bombeta, una mica és una bombeta que està encesa o no ho està. És un interruptor, és encesa o està apagat. Ara, científics de la computació en general, pensar en off com el número zero de forma arbitrària i, i la noció de en un de sol. Així doncs, si vostè llança un interruptor de llum en que és un apagar això és un zero. O, equivalentment, encendre la llum que és el valor de veritat al seu torn que fora d'això és el valor de false. Per tant, aquests són només sinònims. Al final del dia, sí, el còmput de tot, totes les coses que van de sota de la campana en un ordinador es redueixen per tal de zeros i uns. I, quan et pares a pensar-ho, és força notable presa del que el món ha fet amb aquests blocs de construcció bàsics, entre ells alguns dels perifèrics que té a la mà. Bé, per què són zeros i uns útil? El meu Déu, fins i tot en el món real com a mínim tenim deu dígits, del zero al nou. Per què tan limitat? Bé, en termes de maquinari és molt fàcil. És molt més fàcil de representar dos estats, a la dreta. Si els equips estan connectats a la paret, en general, vostè té aquesta font fàcil de naturalesa binària. És activat o desactivat. L'electricitat flueix o no ho és. Per tant, que és classe d'una de les raons inicials que el món se'n va anar amb només zeros i uns en els ordinadors. Però, vostè pot utilitzar-los com blocs de construcció. Per tant, això realment és una mica més petit a la pantalla, però aquí podem comptar en binari o podem representar qualsevol cosa que vulguem en el sistema binari com podem, per exemple, decimal, com podem, fins i tot, de fet, amb lletres de l'alfabet. I així, aquí hi ha el sistema ràpid. En només un parell de minuts el temps d'ara saben comptar, a escriure, a parlar binari molt similar al seu propi ordinador portàtil. Bé, vostè té, en el món del tipus binari, igual que les columnes de l'escola primària o els valors. Així, a l'escola primària que es tracta d'aprendre les columna d'aquest és la columna de les desenes, la columna de centenars i així successivament. En altres paraules, per què és el nombre que coneixem com el nombre 123.123? Bé, el meu mestre em va ensenyar aquesta és la columna de les unitats, es tractava de les desenes, es tractava dels centenars. Bé, què vol dir això? Bé, per esbrinar quin és el valor total és del que és el contrari, la cadena de dígits, només les marques de hash al tauler. Bé, tenim un 100, així que això és una 100 vegades i, a continuació, més el que dues de 10, de manera que els altres 2 vegades 10 més tres, i això és 3 vegades 1, està bé, així que semblen haver arribat de nou a on vaig començar. Però, aquest procés molt simple de només multiplicant els dígits pel valor de la columna és exactament el que té a veure amb binaris. Però, en el sistema binari s'utilitza potències de dos, no potències de deu. Per tant, vet aquí una sèrie de vuit focus de llum. Els científics en computació com per utilitzar valors com la 2:08 i 16 i 24 i 32 perquè són tots els valors en general, còmode d'utilitzar. Per tant, quan parlem de vuit valors en la seqüència és com s'anomena el byte. I aquests dies no solen parlar en octets just, parlem megabytes gigabytes i terabytes en aquests dies. Però tot és en última instància, la mateixa cosa. Aquí hi ha vuit bits AKA un byte, només argot simple. Així, tots aquests focus estan apagats. Així, la matemàtica és bastant fàcil. Així que a la dreta, encara que és petit per veure, és la columna de les unitats, tots dos, el quatre, els vuit, el 16, 32s, 64s, 128s. Bé, potser és difícil de memoritzar en un primer moment però és multiplicat només per dos de dreta a esquerra. Per tant, sempre pot tornar a crear aquest. Bé, tots estan fora de manera que els temps de marcador de posició 0, 0 vegades de marcador de posició. Per tant, aquest és el nombre 0 representats en binari. En altres paraules, com s'escriu el nombre que coneixem com 0 en binari? Bé, un, dos, tres, quatre, cinc, sis, set, vuit, i tècnicament igual que en decimal, tots aquests zeros a l'esquerra, no afegeix res a la fórmula que hi són perquè ens hem decidit arbitràriament vull vuit d'aquestes coses en una fila, dreta. Si són objectes físics, tenim vuit per el que he d'estar tot pelat. Així que podria haver sortit amb només un zero. Bé, com representar el número u? Bé, instintivament es va a llançar un dels interruptors. Vas a encendre una bombeta. Per tant, no és el número u perquè ara posar un un, un focus de llum que està en, en la posició d'un. Com anem a representar dos? Bé, en realitat estem va llançar dos interruptors ara si més no enfront d'aquest estat, hem de convertir a la columna dues de apagar la columna de les unitats i ara tenim el valor d'un a la columna de dos en dos. Per tant, aquest és el valor total de dos. Ara, un exercici mental ràpida, què passarà amb la seqüència següent? Com es presenta el número tres? Bé, necessito una de la columna de dos en dos, una a la columna tres i ha ah. Així que, ara que he incrementat un. I ara, això es repeteix mateix patró bàsic. Quin és el número quatre? Bé anem a veure, només necessito un un a la columna de quatre potes i després dos en dos zeros al i uns. Llavors, segueix així. I, és només aquesta seqüència d'etapes. I en la noció de binaris en realitat no és per res complicat. A la part superior no tenim vuit zeros. A sota d'això tenim set zeros i un un. A sota d'això tenim sis zeros, un u i un zero i això és binari. 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. [Rialles] >> 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. [] Música >> 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. [Aplaudiments] ==== Transcribed by Automatic Sync Technologies ====