>> David: Benvenuti, il mio nome è David Malan e questo è CS50. E, questo non è il tipico corso di scuola computer ad alta scienza. Questo corso è un po 'qualcosa di speciale. E non è perché sto insegnamento. è perché questo è uno dei, ci piace pensare, quei corsi raro che stringe in realtà il cervello così tanto e il vostro programma, tanto che entro la fine del semestre ti senti veramente intelligente. Così, quello era il modo che ho provato quando ho preso questo corso nel 1996. Ero un grande governo, al momento qui vivono in Mather House. E, I. [Cheering] Come sono gli altri, gli altri cinque lì. Così, ero un grande governo a quel tempo. E io ero un grande governo, perché avevo sempre piaciuta la storia. Mi piaceva il diritto costituzionale al liceo. E così, partii per quest'anno percorso matricole fare quello che mi riesce meglio, facendo quello che sapevo che mi piaceva. E io avevo sempre stato un po 'geek, ho sempre balbettato con i computer. Ma, io stesso, forse ironicamente, a posteriori, mi ha sempre visto i ragazzi che stavano prendendo l'Informatica nella mia scuola, i miei amici come il vero geek. Eppure, alla fine ha fatto, secondo anno prendo questo piccolo corso CS50 chiamata che in realtà mi aveva spaventato via il mio anno da matricola proprio. E io ero assistente di utente in quel momento. Così, mi è stato certamente già qualificati, almeno, di essere tra quelli, quei geek che ho preso in giro al liceo. Ma avevo paura. Vi è, era questa reputazione, al momento, e forse ancora in parte che era una, era un corso di paura. E 'stato un sacco di lavoro. E 'stata dura e ancora, è una di quelle cose in cui, mio Dio, la corteccia è di gran lunga peggiore di mordente. Studente del secondo anno mi sono trovato l'anno, per la prima volta, in realtà trovare divertente fare i compiti. E non sto dicendo questo solo per questo corso passo a voi. questa è stata una realizzazione vera per me. Ora, credo, a un certo punto, ho fatto attraversare la linea di geekdum vera in cui ho effettivamente utilizzato per guardare al futuro Venerdì sera perché ho potuto rannicchiarsi davanti al mio MacBook poco e lavorare sul set di CS50 di problema. Così, a quel punto, penso di aver fatto chiarezza attraversare la linea. E, il nostro obiettivo di questo corso non è quello di trasformare tutti voi in quella persona, ma, solo per dire che c'è un piccolo qualcosa di speciale in questo corso, una scienza po 'di qualcosa di speciale computer in generale, soprattutto in questi giorni. E, più acclimatati tutti abbiamo nelle tecnologie, i giocattoli più che portiamo in giro nelle nostre tasche che si sono computer. Voglio dire, il mio iPhone è in realtà un computer più performante del mio portatile era al college. Puoi fare un sacco di cose carine con queste cose. E ora, la maggior parte di noi in questa stanza, probabilmente solo usare il software di altre persone, gli strumenti degli altri, le soluzioni degli altri problemi, perché si va a iTunes, abbiamo scaricare alcune app da App Store e walla possiamo fare qualcosa di veramente pulito. Ma, entro la fine di questo semestre, si può essere la persona che fa che la soluzione dei problemi. Puoi essere la persona soluzione di alcuni problemi, edificio che app, quel pezzo di software, quello strumento che, sia uno solo a me diverte, si diverte. per esempio, il controllo, per esempio, la libreria di iTunes dal vostro appartamento con chiarezza un app che esiste già o si possono trovare orari navetta più facilmente, per esempio. Quindi, in effetti, una delle primissime cose che ho fatto dopo aver preso CS50 è stata ancora una volta, fu probabilmente a questo punto notti Venerdì e Sabato notte, c'era questa opportunità al momento in cui stava correndo Harvard bus navetta. E, a tutt'oggi, hanno ancora stampato orari. Ma, ci è stato davvero significa non online di scoprire quando lo shuttle successivo è stato. Ora, non mi importava, perché anche se ho vissuto in Mather non ero tra quelli che in generale ha preso la navetta. Ma, ho avuto un sacco di amici in Pfoho per esempio. E uno di loro ha chiesto di me, penso che in in un punto. [Cheering] Okay Pfoho meglio di Mather a quanto pare. Quindi, uno dei miei amici del tipo mi ha fatto pensare che forse posso scrivere un piccolo programma per tipo di aiuto i miei amici controllare gli orari navetta. E così è nato il ragazzo navetta goffamente di nome, questo pezzo di lessico che ha dormito intorno per un certo numero di anni almeno tra alcuni dei upperclassmen. Al momento, questo è stato questo piccolo programma a riga di comando simile nello spirito a Dos. E 'stato eseguito in un ambiente UNIX. Quindi, non era molto sexy a tutti. Hai appena scritto un paio comandi e ti ha detto quando le navette erano. Ebbene, in questi giorni è un po 'più sofisticato. E, in realtà è rappresentato proprio questo il tipo di progetti che gli studenti in questa fine corso col fare da termini finali. Quindi, questa è la versione quattro, circa 15 anni più tardi, di Shuttleboy. Sembra che Google Maps è un po 'lento lì. Ma, per quelli di voi che hanno di uscire da qui classe dopo e andare, ad esempio, dal Memorial Hall e bisogno di andare fino a, diciamo, il Quad. Bene, puoi lasciare in due minuti se per questo in realtà non sta funzionando per voi appena ancora, o che hanno come molte altre opzioni come ti avrebbe fatto piacere. E, presto, siamo in grado di pece questo da CS50, sarà la stessa capacità tramite SMS. Potete testo Shuttleboy via telefono. Si chiama Shuttleboy. il numero di telefono CS50 quest'anno, beh, questo è stato sorprendentemente disponibile, 617-bug-CS50. Quindi, che debutterà presto. Quindi non lo chiamano ancora solo perché ho ottenuto rimproverato, adesso è di essere instradati verso cellulari testa il nostro sistema di insegnamento del compagno. Quindi, ti basta tirarlo se avete domande circa il programma shuttle ora. Ma, che sarà presto attuato. Quindi, le altre cose, in realtà, che noi stessi abbiamo speso quest'estate per davvero in preparazione per questo semestre è stato un sacco di altri problemi che abbiamo voluto risolvere. Per esempio, c'è un sacco di roba che succede in questo campus in un dato giorno. E infatti, in altre parole, c'è un sacco di roba in corso in questo campus che certo non ho mai sfruttare. E, anche se sono ormai sopraffatto con quante cose che sono in corso, nel campus, ho ancora nessuno sembra trovare il tempo. Ma, Walla, anche lì, la lezione CS50. Ecco dove si è, quindi questa era una, questo è stato un programma che abbiamo scritto per aggregare tutti gli eventi del campus. E questo è qualcosa che gli altri studenti in questo stesso corso hanno affrontato da soli. E abbiamo a lavorare con altri soggetti del campus per rendere realmente questo accada. Ma il punto di CS50 questo termine è che tutti questi piccoli programmi abbiamo lavorato sulla questione se questa o se uno per aggregare tutte le notizie di Harvard in un unico luogo, tutte le Google News, tutte queste cose stanno per avere ciò che sono chiamate API, le interfacce di programmazione delle applicazioni. E questo è solo fantasia parlare per la capacità di lasciare che altre persone, persone in questa stanza, in realtà fare qualcosa con gli stessi dati. Così, da termini fine, se si decide di implementare il progetto definitivo relativi a notizie o eventi o mappe, anche noi, almeno come un corso, che renderà ancora più facile quest'anno, fornendovi un'interfaccia, una sorta di funzione, per così dire, il software che è possibile utilizzare in propri progetti per andare di sopra e al di là di dove gli studenti, forse, sono andate in passato perché questo quadro non sia stato posto per loro. E ancora, questo tutto ha avuto inizio, almeno per me, circa 15 anni fa attuazione Shuttleboy. Allora ho inviato il mio amico Ken in Pfoho. Ho detto hey che cosa ne pensi? È utile? L'ha spedito fuori sulla lista Pfoho aperto e walla, dopo tutti questi anni io sono apparentemente ancora mungitura questo progetto. E la cosa pulita su di esso, ed è qui anche un corso come questo in ingegneria e informatica, credo, è un po 'speciale, è che, quando fate la vostra casa funziona e quando si fanno i vostri progetti in questo corso, so, molti di loro, sì, ti mettere da parte e non realmente utilizzare di nuovo. Ma, alcuni dei quali, si. E poi c'è questa cosa molto potente, almeno per me, questa cosa molto eccitante, quando fate qualcosa e altre persone realmente cura, gli altri non solo il tuo sorriso e pacca sulla schiena e poi sorta di andare circa la propria vita. Quello realmente utilizzato quello che hai fatto nella propria vita, anche se è per qualcosa di così stupido o semplice come solo trovare quando possono uscire di qui per prendere la navetta vicino al Quad. Così, i termini finali, questo è uno degli obiettivi di questo corso, per autorizzare voi ragazzi a individuare solo alcuni problema se è nel campus o spera, ben al di là del campus, ed effettivamente utilizzare le vostre abilità, la vostra mente e risolvere il problema in alcuni parte, tecnologicamente. Quindi, questo è anche un corso come si dice nel programma e il funzionario corsi descrizione che vi insegna a pensare e ti insegna come risolvere i problemi in modo più efficiente. Ebbene, che cosa significa? Beh, quando hai 600 megahertz in tasca o tre gigahertz sotto la scrivania a casa, si può risolvere un sacco di problemi in modo efficace solo dal taglio della forza bruta. Ma, c'è un sacco di problemi in questo mondo, se si sta cercando, ad esempio, la rete di Facebook o via internet attraverso Google, che non importa quanto velocemente il vostro computer particolare, non c'è modo in inferno che stai andando a cercare miliardi di pagine Web in modo rapido a meno che tu in realtà affrontare questo problema in modo intelligente. Non solo di ricerca, per esempio, una lista enorme di tutte le pagine web sulla terra da cima a fondo alla ricerca di qualcosa relativo ai termini di ricerca quello che stai cercando per la speranza di Google e presumibilmente Google e Facebook e qualsiasi di questi enti di grandi dimensioni hanno un sacco di persone intelligenti a pensare a come si possono trovare i dati più rapidamente, come possono elaborare le informazioni in modo più efficiente, e, come si può semplicemente generalmente risultati più rapidamente, in modo che si possono fare ancora cose più interessanti di questi dispositivi. E così, cosa si intende, però, da come, insegnando alla gente a pensare con più attenzione, più algoritmicamente. Bene, questo piccolo visivo sembra sempre di andare oltre bene. E, sembra di essere memorabile. E mi è stato persino chiesto proprio ieri da un ex studente, o avete intenzione di fare la cosa rubrica di nuovo. E io più o meno sul posto ha deciso bene sicuro che costruire una cosa rubrica. E lui mi ha chiesto quando lo fece a metà destra, ero come ben sì tecnicamente lo abbiamo strappato a metà, ma non nel modo, nel modo in cui l'informatica sarò in grado di strappare questa cosa a metà. E così, qui è stato il problema che abbiamo presentato per qualche tempo. Quindi, ecco la rubrica. E 'ottenuto almeno un migliaio di pagine. E il semplice obiettivo a portata di mano mondo reale è quello di trovare, per esempio, una persona qui dentro. Così, Mike Smith, il cognome che iniziano per S. Quindi, io sono un essere umano tipico, prendo questa rubrica. E qualcuno là fuori, che cosa, una persona media, non per cominciare a trovare Mike Smith, ovviamente, non sapendo in anticipo che cosa egli è in realtà la pagina via. A destra, così si va all'incirca nel mezzo, a destra. E a questo punto della storia, sono probabilmente nella N o M's, sapete, circa metà strada tra la rubrica. Risulta, l'ultima volta che ho fatto questo esempio ho in qualche modo mi sono trovato nella sezione di scorta. Quindi, in realtà non è equamente bilanciato tra A alla M e N a Z. Ma, oggi, siamo, infatti, in M's, bene così, ora sono al M's. Ma quello che è il mio asporto ora solo come un umano normale fuori della strada? Dove posso andare per il prossimo Mike Smith. [Non udibile] E così, probabilmente, proprio su questo mezzo, a destra, perché viene dopo di S M. E così, qui sta il dramma visivo. Questo non è veramente strappo a metà, a destra. I tipi di truffati giù il centro. Ma ora sappiamo che Mike è almeno non in quel mezzo. Siamo in grado di buttare letteralmente la metà del problema di distanza. E io rimango con il problema che è fondamentalmente sempre la stessa cosa, trovare Mike Smith in un libro davvero grande. Ma il problema ora è la metà di grandi dimensioni. Se fosse un migliaio di pagine prima, ora è preso 500. Sai cosa, io posso fare la stessa cosa di nuovo. Posso tipo di ricorsivo o più volte la stessa cosa. Ora io non sono abbastanza a S. Sono a T. E così, oh, sono andato un po 'troppo. Ma, ora so che Mike non è di destra, ci sara 'qualche classe un giorno in cui non riesco a strappare la diga cosa, scommetto. Ma ora, so che lui non è a destra. Così, ora il problema è stato squartato. Quindi, sono andato da un migliaio a 500-250 pagine. E ancora, se si continua la logica, la matematica continua, sto tagliere questo problema a metà, a metà, a metà e alla fine mi sto andando a trovare o non tutti Smith a tutti, improbabile, o io vado a trovare quello che cerco. Ma, che, allora, chiedersi, questo è migliore di un approccio semplice di dire semplicemente, si sa, A, no, B, no, a partire da sinistra verso destra andando linearmente attraverso il libro? Beh, istintivamente sì. Sta andando essere molto più veloce. Ma, quanto meno? Beh, se ho un migliaio di rubrica telefonica di pagina o diciamo 1.024 per quelli di voi che come potenze di due, quanto tempo avrei potuto dividere questo problema in due prima di trovare il signor Smith? >> Dieci. > David: Dunque, dieci, a destra. Se si dispone di 1.024 pagine e tu li hai diviso a metà, a metà, a metà, a metà, devo fare dieci volte il che significa che vanno da 1.000 pagine per la persona che sto cercando nelle pagine di soli dieci giri. E questo tipo di pulito, ma, sai, se ci pensi si sia fatto questo tutto della tua vita. Non è così drammatico. Ma ora, che la rubrica non è solo per Boston, è per tutti gli Stati Uniti o il mondo intero e questa cosa ha miliardi di pagine in essa, così immaginare una rubrica con quattro miliardi di pagine. Quante volta pagina vado a fare al massimo per trovare Mike Smith in una rubrica di quattro miliardi di pagina? >> Entra base due. >> David: Allora sì, se siete il tipo di tipo di matematica questo è logaritmo in base due. Ma, se si pensa da 4.000 a 2.000 milioni to un miliardo, per cui un mezzo miliardo. Voglio dire, che va giù in realtà whittles stesso dannatamente veloce. Infatti con 32 halvings della rubrica, anche da quattro miliardi, vado a prendere fino a una pagina. Ed è allora che questa roba si potente, credo. Fu allora che queste idee ottenere convincenti quando si può avere un problema di quattro miliardi di pagine e in 32 passi si può trovare la persona che stai cercando. E così, questo è ciò che intendiamo quando diciamo che si imparerà a pensare con più attenzione, più algoritmicamente, in modo più intelligente di risolvere i problemi. E i ritorni sono enormi quando si può effettivamente fare questo, e di nuovo, a questo punto della Googles del mondo il Facebooks che hanno il lusso di avere serie di dati enorme. Hai avuto modo di affrontare questi problemi in questo modo, altrimenti e 'semplicemente non andare a lavorare. Be ', che cosa ha fatto lo studente effettivamente richiamo? Io, che ci piace fare le cose che sono un po 'stupido a volte specie di prendere il bordo al largo di ciò che è altrimenti un sacco di nuovi materiali. E così, lui in realtà, questo ex studente mi ha inviato questo link, che sono andato avanti, solo per calci e poi pentito, alla fine, tirati su utube qui. Così, ho pensato di condividere ciò che uno scienziato non-computer intende quando le lacrime una rubrica a metà. [Risate] [Silenzio] [Incomprensibile] >> Tu sai più di 200 pagine, bella linea pulita, legittima lacrima. [Risate] >> David: così, immagino, il suo modo funziona anche. Allora, che cosa ho ottenuto da questo corso di tanti anni fa è sì, Shuttleboy, quindi sì una laurea in informatica, e quindi sì un dottorato in scienze del computer. E non è quello che stiamo cercando di trasformare la maggior parte degli studenti del corso in. La maggior parte di voi in questo corso non si ha intenzione di andare su un grande in informatica. Alcuni di voi potrebbero minore, ma per alcuni di voi questo sarà un corso di terminale. E questo è perfettamente bene perché questo corso è, infatti, strutturato in modo in cui anche se solo pagare le tasse per diversi mesi ed è davvero messa a fuoco e si ha realmente prendere come a gran parte di questo corso che puoi, si vuole, in Infatti, essere ben attrezzati per tornare al mondo di economia, biologia, psicologia, matematica applicata, ed effettivamente fare uso di ciò che è in ultima analisi, come un corso interessante come ci auguriamo di concettualmente come è fondamentalmente pratico. E anche questo è qualcosa che è forse un po 'rari da trovare. Ho pensato di condividere alcune osservazioni che gli studenti lo scorso autunno da mettere in questo breve spunto ultimi anni, quando ha chiesto su cosa vorreste dire agli studenti futuri. Beh, se non hai già guardato questi commenti, ha detto uno studente questo corso avrà una discreta quantità del vostro tempo su. ma, se mettete il vostro lavoro in un mondo completamente nuovo, nel suo complesso, se si inserisce il lavoro, se si inserisce il lavoro in, va bene, quindi questa è la sua grammatica non la mia, quindi se si mettono, inserire nel lavoro, un nuovo mondo si aprirà a voi. Incredibile quanto ho imparato in sole 12 settimane. Un altro studente ha scritto, è meglio prendere questo o si sta andando a pentirmene. Un altro ha scritto, un po 'più bruscamente, sarà a calci nel culo e lasciare ti senti grande. E poi, infine, questa è forse una cosa che è possibile visualizzare solo in forma scritta, ma, in secondo luogo dal basso qui. [Risate] Quindi, io non sono sicuro se hai molti amici che hanno preso questo corso ma abbiamo tipo di fatto un sacco di danni agli studenti dello scorso anno. Abbiamo introdotto, all'inizio, alcune conferenze, un quiz pochi, un paio di problemi insiemi, questa nozione di lolcats. Non è possibile vedere quello che posso vedere qui, ma in un attimo si vedrà un giovane di nome gatto felice, che è il leader della cosiddetta lolcat. Questo è uno degli attaccanti internet stupido che francamente credo che la dicotomia tra questi due signori qui e quello che abbiamo ora sullo schermo è forse. [Risate] Uno degli usi più inadeguato del teatro fino ad oggi. E, perchè non facciamo un po 'più vero un po' più personale in realtà questo concetto di soluzione di un problema più efficiente. Un problema semplice in un giorno di scuola è quello di sedersi o alzarsi e iniziare a contare gli studenti, giusta chiamata rotolo di sorta. Ebbene, l'approccio il più ingenuo, ma comunque, molto corretto che un insegnante potrebbe prendere è una, due, tre, quattro, cinque, sei, sette, e saremmo qui molto tempo. Allora, che cosa è un miglioramento marginale, anche su questo che si potrebbe avere fatto come un bambino? Come si contano le persone più velocemente? E, non iniziare a leggere il mio istruzioni propria? Che cosa avresti fatto da bambino? Inizia il conteggio a due, a destra, in questo modo sono abbastanza bravo a due, quattro, sei, otto, dieci, 12. Quindi, questo è qualcosa di giusto interessante. Quindi, quanto di un miglioramento è quello lì? Quindi, è ovviamente un fattore di due. E mi prende la metà di molto tempo. Ma, si sa che cosa, in quanto troveremo nel corso di questo semestre, un grosso problema, come accelerare il tuo tempo di marcia da solo un fattore di due non è poi così interessante, perché l'analogico qui nel mondo dei computer è che sono una CPU Sono un computer, beh diamine, se io solo aspettare 12 mesi, 18 mesi, ho il computer solo essere in grado per natura, per il numero di gigahertz ho in me per poter contare di persone in questa stanza più veloce. Così, questi tipi di, questi tipi di incrementi nella velocità lineare come fattore di due fattore tre, anche di dieci volte, a chi importa? Giusto, siamo in grado di buttare hardware al problema. Ci possiamo aspettare le cose. Siamo in grado di sviluppare macchine più veloci. Ma, intellettualmente, sì che era una sorta di intelligente, ma in realtà non modificherà radicalmente il problema. Sono ancora in corso da sinistra verso destra, anteriore a quella posteriore. E 'davvero lo stesso algoritmo. Ma, io offerta che possiamo fare di meglio. Possiamo fare di più intelligente di questo e fare fondamentalmente una implementazione più veloce. Ma, per dimostrare ciò, abbiamo bisogno di voi di umorismo noi per un momento. Ed è a questo punto dove mi verrà a parlare di meno e parli di più. Ma ho bisogno di eseguire passo uno insieme, che è se ci umorismo, vi preghiamo di stare in piedi. Le istruzioni qui sul bordo, si sa essere, va bene, un paio di voi hanno a sedere. Quelli di voi sul retro, ci andiamo, va bene. Grazie. Così, il programma è qui davanti a voi. Si è ora il computer di esecuzione questo programma. E 'abbastanza intuitivo a questo punto. Sì, si dovrebbe essere il numero uno. Capito? A destra, molti di voi sono probabilmente pensando questo già comunque, primo anno da matricola. Quindi, pensare a te stesso, tu sei la numero uno. Così, passo tre qui, coppia con qualcuno in piedi, aggiungere i tuoi due numeri e di adottare tale somma come il nuovo numero e faremo un controllo di sanità mentale. [Rumori] folla Sai quanti siamo? >> [Incomprensibile] >> No] [inudibile. >> Abbiamo bisogno di avere un tasto di risposta. [Silenzio] >> Già. [Rumori] folla >> David: A questo punto l'algoritmo dovrebbe essere esaurendo. [Rumori] folla Forse dovremmo andare con il mio approccio, dopo tutto. >> 43. >> 163. >> David: Ooh aritmetica di fronte a 300 persone in più. [Risate] Qual è il nostro conteggio finale sarà? >> 180. [Risate] >> 1.200. >> 386. >> David: 386, e tu sei l'ultimo in piedi? È che tutti? Sai la risposta? >> Cosa? >> David: Sai che cosa la risposta è? Non abbiamo proporre un tasto di risposta con noi così, 386 è infatti proprio la risposta giusta per la prima volta. [Cheering] [Applausi] Non ti preoccupare. [Applausi] Molto, molto ben fatto. Allora, qual è stato il takeaway perché sicuramente sentiva un po 'più lento il mio approccio molto semplice, ma comunque molto corretta solo andando onesies e twosies e ottenere giusto fatto con da sinistra a destra. Ma, che cosa abbiamo davvero solo fare lì? Beh, se ci fossero o meno, diciamo, 400 di voi in piedi in un punto, e quindi la metà di voi, molto rapidamente, da quello che potrei dire, voleva sedersi. Così, la metà di voi si sedette, siamo andati 4-200 poi a 100 poi a 50 poi a 25. Così ancora una volta, non c'è che dividono lo stesso e conquistare idea che abbiamo avuto con la rubrica. Ancora una volta, ad ogni iterazione abbiamo dimezzato le dimensioni del problema, abbiamo dimezzato, abbiamo dimezzato. Quindi, in teoria, il tuo algoritmo dovuto essere molto più veloce rispetto al mio approccio lineare perché il mio approccio sarebbe preso dire 400 gradini o forse se sono un po 'furbo 200 gradini. Ma la tua sarebbe preso molto meno, giusto 400-200, 100, 50, 25, 13, a sei, quindi meno di dieci passi, alla fine, contro la mia 200 o 400. E c'è il germe di un'idea davvero interessante. E sì, matematicamente quello che hai appena fatto è stato qualcosa che è un po logaritmica in natura dal registro base due, abbiamo diviso in due e due di nuovo. E ci rivisitare questo più avanti in questo semestre. Ma qui sta anche una implementazione molto intelligente. E ci sono solo grattare la superficie del molto intelligente le impostazioni molto intelligenti efficaci "ai problemi che possiamo risolvere in ultima analisi. Allora, chi sono le persone che hai appena chiacchierato con se per breve tempo? Una preoccupazione comune in un corso come questo è che tutti a sinistra di tutti voi e al diritto di voi deve chiaramente so più di voi. Beh, questo è assolutamente il caso. E infatti, negli ultimi anni, questo corso ha compiuto uno sforzo concertato per raggiungere le persone meno confortevole, per così dire. E per questo, non significa che la gente che non hanno mai toccato un computer, prima perché è veramente difficile da trovare in giro qui in questi giorni, ma persone che usano la posta elettronica, usare Facebook, forse anche adesso ma non sono necessariamente del tutto sicuri di cosa fare quando qualcosa va storto o quando gli si chiede di niente tecnologico, si sa, le mani salgono o che tipo di spingere l'hardware a un amico che forse più esperto in esso di loro. Ebbene, queste sono alcune statistiche provenienti semestre dello scorso anno. Così, quando richiesto, quando abbiamo chiesto ai nostri 400 studenti, anno scorso, si sa, qual è il tuo livello di comfort che entrano in questa classe, ben il 34% si scrisse che tra quelli meno confortevole. Quindi, se siete venuti in questa stanza e sono ancora a pensare ora, che, sai cosa, questo termine descrive meno confortevole di me, so che sei in ottima compagnia. Ma, rendersi conto anche che, se vieni in questo corso con un background in informatica e tu eri davvero così geek nella scuola media e scuola superiore che stava scrivendo il codice e voi stessi l'insegnamento delle lingue, beh va bene anche perché c'è sicuramente un non banale pubblico di dimensioni con quello sfondo pure, circa il 13%, termine ultimo. E poi, ci sono tutti gli altri, specie di chi non pensano di essere meno comoda, che sicuramente non pensano di essere più a suo agio, ma sono solo in un corso per ottenere qualcosa di fuori di esso. Così, realizzare questo corso ne trae tutto lo spettro degli studenti. E, di mettere questo in termini più concreti, il 71% degli studenti, l'anno scorso, era pari a zero corsi dietro di loro. Quindi, se stai pensando di entrare in questo corso oh chiunque prenda CS50 era un mago dell'informatica nelle scuole superiori, non è il caso. Maggior parte delle persone sono presumibilmente solo interessati. E pochi, sì, hanno preso assolutamente alcuni corsi, alcuni, o almeno una persona lo scorso anno aveva preso cinque corsi in precedenza. Quindi, abbiamo sicuramente alcuni valori anomali ma ancora una volta la carne della curva è in quei valori più bassi del tutto. E un altro dato statistico interessante che abbiamo condiviso negli ultimi due anni è il rapporto tra i sessi. Così, storicamente, almeno in informatica, c'è un po 'di skew maschio femmina. I paio di anni fa era molto più marcato rispetto all'anno scorso. Così, ci siamo quasi ora al 40% di livello. E se posso gettare il guanto di sfida solo per il gusto di avere un grafico a torta terzo anno prossimo, che è ancora più equa. Vorrei sottolineare che non c'è assolutamente alcuna ragione dal punto di vista i corsi che i maschi e le femmine non dovrebbero essere iscriversi a questo tipo di corso. In numeri relativamente uguale e realizzare al 38 per cento, 48 per cento, siamo in effetti molto lieto di vedere che ci siamo quasi a che, almeno, anche statisticamente valore del 50%. Quindi, se si sono, infatti, di sesso femminile, si riposa troppo assicuro che non è, di fatto, una classe maschile. Bene, questo da il caso di essere 20 ° compleanno del CS50. Io, bene grazie. [Cheering] [Applausi] È molto gentile da parte tua, perché abbiamo portato torta per voi realtà. E così, quando si esce da qui più tardi di oggi, sarà in realtà ha la possibilità di incontrare molti dei corsi di insegnamento borsisti che sarà persistente nel corridoio. E sì che sarà una sorta di piacevole modo incentivato della riunione dei compagni di insegnamento. Ma, facciamo fare un viaggio fino a un piccolo panificio e di nuovo in linea con il corso è la natura giocosa, mentre comunque si aspetta quantità non banali di lavoro mentre stiamo avendo così divertente. Ma, noi abbiamo uno di questi dolci per voi. [Risate] Quindi, se stai ridendo che è effettivamente un bene perché anche se sei fra una di quelle meno confortevole almeno sei a conoscenza. Quelli di voi che nel 14 per cento potrebbe preferire questo sapore. [Risate] E allora, se non sai cosa diavolo sta succedendo adesso, abbiamo anche questo per il resto di voi. [Cheering] [Applausi] Così, quelli vengono tritati fuori mentre parliamo. Così ancora una volta, prendiamo le cose un pochino e di almeno introdurre qualche inquilino di base che noi diamo per scontato poi nel rimanente di questo semestre. Quindi, noi tutti probabilmente sanno che i computer in ultima analisi, riducono in qualche modo a zero e uno, queste cose chiamato bit. Che cosa vuol dire? Beh si può pensare che francamente come una lampadina, un po 'è una lampadina che è accesa o è spenta. Si tratta di un interruttore, è sia su o è spento. Ora, gli informatici in generale penso di fuori come il numero zero e il arbitrariamente, e la nozione di in una cosa sola. Quindi, se si gettano su un interruttore della luce che è uno spegnerlo che è uno zero. O, equivalentemente, accendere la luce che è il valore della vera svolta fuori che il valore del falso. Quindi, questi sono solo sinonimi. Alla fine della giornata, sì, tutti i calcoli, tutta roba che va avanti sotto il cappuccio in un computer in ultima analisi, si riducono a zero e uno. E, quando ti fermi a pensarci, è abbastanza notevole diga ciò che il mondo ha fatto con questi blocchi di base, compresi alcuni dei dispositivi che tieni in mano. Be ', perché sono zero e uno utile? Mio Dio, anche nel mondo reale abbiamo almeno dieci cifre, da zero a nove. Perché così limitato? Beh, in termini di hardware è molto facile. È molto più semplice per rappresentare due stati, a destra. Se i computer sono collegati alla presa, di solito, hai questa fonte facile di natura binaria. E 'accesa o spenta. L'elettricità è fluente o non lo è. Quindi, questo genere di uno dei motivi iniziali che il mondo è andato con un solo zero e uno nei computer. Ma, si possono usare come "mattoni". Così, questa è in realtà un po 'piccola sullo schermo, ma qui possiamo contare in binario o siamo in grado di rappresentare tutto ciò che vogliamo in binario così come possiamo, ad esempio, decimale, così come possiamo, anche di fatto, con lettere alfabetiche. E così, ecco il sistema rapido. In solo un paio di minuti di tempo vi hanno appreso a contare, come scrivere, come parlare binario molto simile vostro computer portatile. Bene, avete, nel mondo del binario, proprio come sorta di colonne di scuola elementare o valori. Così, in grado di scuola impariamo questa è la colonna quelle questa è la colonna decine, la colonna di centinaia e così via. In altre parole, perché è il numero che conosciamo come 123 il numero 123? Beh, il mio maestro mi ha insegnato questa è la colonna di quelli, questo è stato le decine, questa era la centinaia. Bene, che cosa significa? Beh, per capire qual è il valore totale è di ciò che è altrimenti la stringa di cifre, proprio hash segni sul bordo. Bene, abbiamo una 100, in modo che il 1 volte 100 e poi, più che due 10 in modo che gli quelle 2 volte 10, più tre, quindi questo è 3 volte 1, va bene, così mi sembra di aver ottenuto di nuovo a dove ho iniziato. Ma, questo processo molto semplice, di soli moltiplicando le cifre per il valore della colonna è esattamente ciò che binario è tutto. Ma, nel sistema binario si utilizzano potenze di due non potenze di dieci. Quindi, ecco una serie di otto lampadine. Gli informatici come usare valori come due e otto e 16 e 24 e 32, perché sono tutti valori generalmente conveniente da usare. Così, quando si parla di otto valori in sequenza, questo è come detto il byte. E di questi tempi è raro che ci parla solo in byte, parliamo megabyte e gigabyte terabyte in questi giorni. Ma è tutto in definitiva la stessa cosa. Ecco otto bit AKA un byte, proprio gergo semplice. Così, tutte queste lampadine sono spenti. Così, la matematica è in realtà molto semplice. Quindi c'è sulla destra, anche se è piccolo di vedere, è la colonna uno, il due, il quattro, l'otto, il 16s, 32s, 64s, 128s. Va bene, forse è difficile da memorizzare in un primo momento, ma è solo moltiplicato per due, da destra a sinistra. Quindi, si può sempre ricreare questo. Beh, sono tutti fuori in modo che il segnaposto 0 volte, 0 segnaposto volte. Quindi, questo è il numero 0 rappresentato in binario. In altre parole, come si fa a scrivere il numero che conosciamo come 0 in binario? Beh, uno, due, tre, quattro, cinque, sei, sette, otto, e tecnicamente come in decimale, tutti questi zeri iniziali, non aggiunge nulla alla formula che stanno lì solo perché abbiamo deciso arbitrariamente vogliono otto di queste cose in fila, a destra. Se sono oggetti fisici, abbiamo otto così hanno avuto modo di essere tutto spento. Così, abbiamo potuto appena ottenuto via con uno zero. Beh come si fa a rappresentare il numero uno? Beh, istintivamente si sta andando a gettare uno degli interruttori. Stai andando a girare su una lampadina. Quindi, vi è il numero uno perché ora mettere un uno, una lampadina che è avanti, nella posizione del proprio. Come faremo a rappresentare due? Beh, stiamo effettivamente andando a buttare due switch ora almeno contro questo stato, dobbiamo accendere le due colonne di spegnere quelle della colonna e ora abbiamo il valore di una colonna in gruppi di due. Quindi, questo è il valore totale delle due. Ora, un resoconto esercizio mentale, che cosa succederà con la sequenza successiva? Come faccio a presentare il numero tre? Beh, ho bisogno di uno dalla colonna due, uno da tre e la colonna ha ah. Così, ora ho incrementato quello. Ed ora, questo ripete lo stesso schema di base. Qual è il numero quattro? Beh vediamo, ho solo bisogno di un uno nella colonna a quattro zampe e poi nei gruppi di due zeri e uno. Dunque, continua così. Ed è proprio questa sequenza di passaggi. E nella nozione di binario non è poi così complicato. In cima ci abbiamo otto zeri. Qui di seguito che abbiamo sette zeri e uno. Qui di seguito che abbiamo sei zeri, un uno, e un zero e che il binario. 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. [Risate] >> 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. [Musica] >> 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. [Applausi] ==== Transcribed by Automatic Sync Technologies ====