>> David: Olá, meu nome é David Malan e este é o CS50. E, este não é o seu típico liceu curso de ciência da computação. Este curso é um pouco algo especial. E não é porque eu estou ensinando. é porque este é um dos, gostaríamos de pensar, os cursos raras que realmente aperta o seu cérebro tanto e sua programação tanto que até o final do semestre é realmente sentir mais inteligente. Então, essa foi a maneira que eu senti quando me fizeram o curso em 1996. Eu era um grande governo no momento morando aqui em Mather House. E, I. [Torcida] Como são os outros, os outros cinco não. Então, eu era um grande governo na época. E eu era um grande governo, porque eu sempre gostei de história. Eu gostava de direito constitucional na escola. E assim, eu jogo fora em este ano calouros caminho fazendo o que eu faço melhor, fazendo o que eu sabia que eu gostava. E eu sempre fui um pouco nerd, eu sempre balbuciou com computadores. Mas, eu, talvez ironicamente, em retrospecto, eu sempre tinha visto os caras que estavam tomando ciência da computação na minha escola, meus amigos geeks como o real. E ainda, finalmente, no segundo ano eu fazer este curso pouco CS50 chamada que realmente tinha me assustou o meu ano de calouro mesmo. E eu era assistente do usuário no momento. Então, eu estava, certamente, já qualificado, pelo menos, estar entre aqueles, os geeks que eu fiz de diversão na escola. Mas, eu estava com medo. Há, tinha essa reputação na época e talvez ainda na parte que era um, era um curso assustador. Era um monte de trabalho. Foi duro e ainda assim, é uma daquelas coisas onde, meu Deus, a casca foi bem pior do que sua mordida. Eu encontrei-me sophomore ano, pela primeira vez, realmente divertido encontrar casa. E eu não estou dizendo isso apenas para lançar este curso para você. Esta foi uma realização verdadeira para mim. Agora, penso eu, em algum momento, eu cruzar a linha de geekdum verdade quando eu realmente usado para olhar para a frente a sexta-feira porque eu poderia enrolar na frente do meu MacBook pouco e trabalham em conjuntos CS50 é problema. Então, nesse ponto, eu acho que tinha claramente cruzar a linha. E, nosso objetivo neste curso não é transformar todos vocês nessa pessoa, mas, só para dizer que há alguma coisa de especial sobre este curso, uma ciência pouco algo especial sobre informática em geral, especialmente nestes dias. E, o mais aclimatados todos temos em tecnologias, os brinquedos mais que nós carregamos em nossos bolsos que são eles próprios computadores. Quero dizer, meu iPhone é realmente um maior desempenho do que o meu computador portátil estava na faculdade. Você pode fazer um monte de coisas legais com essas coisas. E agora, a maioria de nós nesta sala, provavelmente só usar o software de outras pessoas, ferramentas de outras pessoas, as soluções de outras pessoas para os problemas, porque nós vamos para o iTunes, vamos baixar alguns app na App Store e walla podemos fazer algo realmente puro. Mas, até o final deste semestre, pode ser a pessoa que faz que a resolução de problemas. Você pode ser a pessoa resolver algum problema, edifício que app, aquele pedaço de software, essa ferramenta que, tampouco, uma só me diverte, diverte. por exemplo, controlando, por exemplo, a biblioteca do iTunes a partir de seu apartamento claramente um app que já existe ou você pode encontrar horários shuttle mais facilmente, por exemplo. Então, na verdade, uma das primeiras coisas que fiz depois de tomar CS50 foi mais uma vez, foi provavelmente neste ponto noites de sexta e sábado à noite, houve a oportunidade no momento em que Harvard estava rodando os ônibus. E, neste dia, eles ainda têm horários impressos. Mas, não havia realmente nenhuma maneira online de descobrir quando o ônibus estava próximo. Agora, eu não me importei, porque mesmo que eu vivi em Mather eu não estava entre aqueles que geralmente tomou o ônibus. Mas, eu tinha um monte de amigos em Pfoho por exemplo. E um deles me perguntou, acho que dentro em um ponto. [Torcida] Ok Pfoho é melhor do que aparentemente Mather. Assim, um dos meus amigos do tipo me peguei pensando que talvez eu possa escrever um pequeno programa para o tipo de ajudar meus amigos verificar os horários canela. E assim nasceu o menino chamado shuttle desajeitadamente, esta parte do léxico que tenha ficado em torno de um determinado número de anos, pelo menos entre alguns dos upperclassmen. Na época, foi o programa linha pouco o comando similar em espírito para o DOS. Foi executado em um ambiente UNIX. Então, não era muito sexy em tudo. Você acabou de digitar comandos de um casal e ela disse que quando os ônibus eram. Bem, nestes dias é um pouco mais sofisticado. E, na verdade é representado, precisamente os tipos de projetos que os alunos neste curso até final decisão por termos finais. Então, essa é a versão quatro, cerca de 15 anos mais tarde, de Shuttleboy. Google Maps é parece ser um pouco lento lá. Mas, para aqueles de vocês que têm de sair daqui depois da aula e ir, por exemplo, a partir de Memorial Hall e necessidade de ir até, digamos, o Quad. Bem, você pode deixar em dois minutos se por, isso realmente não está funcionando para você ainda, ou você tem tantas outras opções que você pode gostar. E, em breve, podemos pitch isto CS50, será a mesma capacidade por SMS. Você pode Shuttleboy texto via telefone. Você chama Shuttleboy. CS50 número de telefone este ano, bem, isso foi surpreendente disponíveis, 617-Erro-CS50. Então, que vai estrear em breve. Portanto, não chamá-lo apenas porque ainda que eu tenha chegado repreendido por, agora está sendo encaminhado para o telefone do nosso sistema de ensino companheiro cabeça celular. Assim, você só vai levá-lo se você tiver dúvidas sobre o calendário de shuttle agora. Mas, que em breve serão implementadas. Assim, outras coisas, na verdade, que nós mesmos passaram este verão em muito na preparação para este semestre foi um monte de outros problemas que queremos resolver. Por exemplo, há um monte de coisas que acontece neste campus em um determinado dia. E, de fato, dito de outro modo, há um monte de coisas acontecendo neste campus que eu certamente nunca aproveitar. E, apesar de agora estou sobrecarregado com tantas coisas que estão acontecendo, no campus, eu ainda parece nunca encontrar o tempo. Mas, walla, mesmo aí, palestra do CS50. É aí que você é, de modo que este foi um, este foi um programa que escreveu para agregar todos os eventos do campus. E isto tem sido algo que os outros alunos deste curso mesmos enfrentados por conta própria. E, nós a trabalhar com outras entidades no campus para realmente fazer isso acontecer. Mas o ponto CS50 para este termo é que todos esses pequenos programas que temos vindo a trabalhar sobre se este ou se um para agregar todas as notícias de Harvard em um único local, todas as notícias do Google, todas estas coisas vão ter que são chamadas de API's, interfaces de programação de aplicativo. E isso é apenas fantasia falar para a capacidade de deixar de outras pessoas, pessoas nesta sala, fazendo realmente algo com que os mesmos dados. Assim, por termos finais, se você decidir implementar o projeto final relacionado a notícias ou eventos ou mapas, bem que, pelo menos como um curso, vai fazer tudo mais fácil este ano, fornecendo-lhe com uma interface, uma espécie de função, por assim dizer, o software que você pode usar em seus próprios projetos para ir acima e além, onde os estudantes, talvez, ter ido em tempos passados, porque esse quadro não tem sido lugar para eles. E, novamente, tudo isto começou, para mim pelo menos, uns 15 anos atrás execução Shuttleboy. Eu, então, enviado o meu amigo Ken em Pfoho. Eu disse hey O que você acha? Isso é útil? Ele enviou-o para fora da Pfoho lista aberta e walla, todos estes anos mais tarde, eu estou aparentemente ainda ordenha este projeto. E a coisa interessante sobre ele, e este é o lugar onde também um curso como este em engenharia e ciência da computação, penso eu, é um pouco especial, é que, quando você faz sua casa funciona e quando você faz seus projetos neste curso, você sabe, muitos deles, sim, você vai colocar de lado e realmente não usar novamente. Mas, algumas delas, você vai. E há esta coisa realmente poderosa, pelo menos para mim, essa coisa realmente emocionante, quando você faz alguma coisa e outras pessoas realmente se importam, outras pessoas não apenas seu sorriso e tapinha nas costas e, em seguida, tipo de ir sobre suas próprias vidas. Eles realmente usar o que você fez em sua própria vida mesmo que seja por algo tão bobo e tão simples como apenas encontrar quando eles podem sair daqui para pegar o ônibus ao lado do Quad. Assim, por termos finais, que é um dos objetivos deste curso, para capacitar vocês apenas para identificar algum problema seja no campus ou espero muito além do campus, e realmente usar suas próprias habilidades, sua mente e resolver esse problema em alguns parte, tecnologicamente. Então, este é também um curso como dizemos no currículo e na descrição oficial cursos que ensina a pensar e lhe ensina como resolver problemas de forma mais eficiente. Bem, o que isso significa? Bem, quando você tem 600 megahertz em seu bolso ou três gigahertz sob sua mesa em casa, você pode resolver um monte de problemas de forma eficiente apenas pela força bruta de cisalhamento. Mas, há muitos problemas neste mundo, se está buscando, por exemplo, a rede Facebook ou a internet através do Google, que não importa o quão rápido o seu computador particular é, não há nenhuma maneira no inferno que você está indo para pesquisa bilhões de páginas web rapidamente a menos que você realmente abordar este problema de forma inteligente. Você não busca apenas, por exemplo, uma lista enorme de todas as páginas web sobre a terra de cima para baixo procurando alguma coisa relacionada com os termos de pesquisa que você está procurando para o Google, esperamos Google e Facebook e, presumivelmente, e qualquer uma dessas grandes entidades tem um monte de pessoas inteligentes a pensar em como eles podem encontrar os dados mais rapidamente, como eles podem processar a informação de forma mais eficiente e, como geralmente só podem retornar resultados mais rapidamente, de modo que você pode fazer ainda, coisas mais interessantes com esses dispositivos. E assim, o que significa, no entanto, pela forma como, ensinar as pessoas a pensar com mais cuidado, mais algoritmicamente. Bem, este visual pouco parece sempre ir mais além. E, parece ser memorável. E eu estava mesmo pediu ontem por um ex-aluno, oh, você está indo para fazer a coisa agenda novamente. E eu muito bem no local decidiu bem certo de que vai construir uma coisa na agenda. E ele me perguntou quando rasgou na metade direita, como eu estava bem tecnicamente sim que rasgou ao meio, mas não na forma, na maneira de ciência da computação, eu serei capaz de rasgar esta coisa no meio. E então, aqui era o problema que apresentamos há algum tempo. Então, aqui está a agenda. Tem pelo menos um milhar de páginas. E o simples objetivo de mão do mundo real é encontrar, por exemplo, uma pessoa aqui. Então, Mike Smith, o último nome começando com S. Assim, eu sou um ser humano normal, eu pego o livro de telefone. E alguém lá fora, o que você, uma pessoa comum, não para começar encontrar Mike Smith, obviamente, não sabendo de antemão que a página é realmente sobre. Certo, então você vai mais ou menos no meio, à direita. E neste ponto da história, eu sou provavelmente no N ou M's, você sabe, mais ou menos a meio da lista telefônica. Acontece que, a última vez que fiz este exemplo de alguma maneira eu me encontrei na seção de escolta. Assim, é na verdade também não equilibrada entre A a M e N a Z. Mas, hoje, estamos, na verdade, no M's, bem assim, agora eu estou na M's. Mas qual é o meu takeaway agora apenas como um humano normal fora da rua? Onde devo ir para o próximo Mike Smith. [Inaudível] E assim, provavelmente, apenas neste semestre, né, porque S vem depois de M. E assim, aqui reside o drama visual. Isso não é realmente arrancando-o ao meio, à direita. Eu tipo de batota no centro. Mas, nós sabemos agora que Mike é, pelo menos não no meio. Podemos literalmente jogar metade do problema de distância. E eu estou à esquerda com o problema que ainda é fundamentalmente a mesma coisa, encontrar Mike Smith em um livro muito grande. Mas, o problema é agora metade do tamanho. Se tivesse mil páginas antes, agora tem 500. Você sabe o que eu posso fazer a mesma coisa outra vez. Eu tipo pode de forma recursiva ou várias vezes fazer a mesma coisa. Agora eu não estou completamente em S. estou em T. E assim, oh, fui um pouco longe demais. Mas, agora eu sei que Mike não é para a direita, lá vai ser um dia alguma classe onde eu só não pode rasgar a coisa barragem, eu aposto. Mas agora, eu sei que ele não é para a direita. Então, agora o problema foi esquartejado. Então, eu fui a mil e 500 a 250 páginas. E, novamente, se continuar a lógica, continuar a matemática, eu estou cortando o problema pela metade, pela metade, na metade, até que finalmente eu sou ou não vai encontrar nenhuma Smith's de todo, improvável, ou eu vou encontrar o que estou procurando. Mas, que, então, levanta a questão, isto é melhor do que a abordagem simples de apenas dizer, você sabe, nope A, B, não houve, a partir da esquerda para a direita indo linearmente ao longo do livro? Bem, instintivamente, sim. Vai ser muito mais rápido. Mas, quanto menos? Bem, se eu tiver um livro de mil páginas ou telefone digamos 1.024 para aqueles de vocês que gostam de potências de dois, quanto tempo eu poderia ter que dividir esse problema em meia antes de encontrar o Sr. Smith? > Dez>. >> David: Então, dez, certo. Se você tem 1024 páginas e dividi-las pela metade, pela metade, pela metade, na metade, eu faço isso dez vezes, o que significa que eu vá de 1.000 páginas para a pessoa que eu estou procurando nas páginas de apenas dez voltas. E isso é o tipo de puro, mas, você sabe, se você pensar sobre isso que você está fazendo isso toda a sua vida. Não é que dramática. Mas agora, que a agenda não seja apenas para Boston, é para os E.U. inteiro ou todo o mundo e isso tem bilhões de páginas, então imagine uma agenda com quatro bilhões de páginas. Quantas voltas página que eu vou ter que fazer ao máximo para encontrar Mike Smith em uma lista telefônica quatro bilião página? >> Entrar base dois. >> David: Então, sim, se você é o tipo do tipo de matemática esse é log base dois. Mas, se você acha que 4-2000000000 to um bilhão, portanto um meio bilhão. Quer dizer, isso realmente vai whittles-se para baixo muito rápido danado. Na verdade, com 32 halvings da agenda, mesmo a partir de quatro bilhões de pessoas, vou descer para uma página. E isso é quando essas coisas se poderoso, eu acho. Isso é quando essas idéias são interessantes quando você pode ter um problema de quatro bilião de páginas e em 32 etapas que você pode encontrar a pessoa que você está procurando. E assim, isso é o que queremos dizer quando dizemos que você vai aprender a pensar com mais cuidado, mais algoritmicamente, de forma mais inteligente de resolver problemas. E o retorno é enorme quando você pode realmente fazer isso, e novamente, neste ponto do Googles do mundo, o Facebooks que têm o luxo de ter grandes conjuntos de dados. Você tem que abordar estes problemas, desta forma caso contrário, simplesmente não vai funcionar. Bem, o que é que o aluno realmente se lembra? Eu, que gosto de fazer coisas que são um pouco bobo às vezes a sorte de tomar a borda fora do que é se não um monte de material novo. E assim, na verdade, este ex-aluno me mandou este link que eu fui em frente, apenas por diversão e, em seguida, lamentou que, no final, puxou para cima a uTube aqui. Então, eu pensei que eu iria compartilhar o que um cientista de computador não significa que quando rasga uma lista telefônica ao meio. [] Riso [Silêncio] [Inaudível] >> Você sabe que mais de 200 páginas, a linha clean legal, legítimo lágrima. [] Riso >> David: Então, eu suponho, a sua forma de funcionamento também. Então, o que eu saí do curso todos os anos é sim, Shuttleboy, e depois sim um grau em ciência da computação, e depois sim um PHD em informática. E não é isso que nós estamos tentando transformar a maioria dos estudantes deste curso em. A maioria de vocês neste curso não estão a ir em um em ciência da computação. Algum de você pôde menor, mas para alguns que este será um curso de terminal. E isso é perfeitamente normal, porque este curso é, de fato, estruturado de forma que mesmo que você acabou de pagar suas dívidas por vários meses e você realmente focar e você realmente ter tanto quanto fora deste curso, como você pode, você terá, em fato, estar bem preparado para voltar ao seu mundo da economia, biologia, psicologia, matemática aplicada, e realmente fazer uso do que é basicamente um curso tão interessante como nós esperamos conceitualmente como é fundamentalmente prático. E isso também é algo que talvez seja um pouco raro de encontrar. Eu pensei que eu iria partilhar alguns comentários que os alunos do último outono colocar neste guia últimos anos de sinalização, quando questionado sobre o que você gostaria de dizer aos futuros alunos. Bem, se você ainda não olhou para esses comentários, um aluno disse que este curso terá uma quantidade justa de seu tempo para cima. mas, se você colocar a sua obra em um novo mundo, um todo, se você colocar o trabalho, se você colocar os trabalhos em, bem, então essa é a sua gramática não é meu, então se você colocar, colocar no trabalho, uma novo mundo se abrirá para você. Incrível o quanto eu aprendi em apenas 12 semanas. Outro aluno escreveu, é melhor você tomar isso ou você vai se arrepender. Outro escreveu, um pouco mais direto, ele vai chutar o seu traseiro e deixam você sentir grande. E então, finalmente, este é talvez algo que eu só posso mostrar por escrito, mas, segundo a partir do fundo aqui. [Risos] Então, eu não tenho certeza se você tem muitos amigos que fizeram este curso, mas que tipo de que uma série de prejuízos para os alunos do ano passado. Introduzimos, no início, várias palestras, um quizzes poucos, um casal define problemas, essa noção de lolcats. Você não pode ver o que posso ver aqui, mas em um momento em que você vai ver um jovem chamado gato feliz que é o líder do lolcat chamados. Este é um dos forwards internet estúpido que eu acho, francamente a dicotomia entre esses dois deputados aqui e que agora temos na tela é, talvez. [Risos] Uma das utilizações mais inadequado deste teatro, até à data. E, por que não fazemos um pouco mais real um pouco mais pessoal essa noção de verdade resolver um problema de forma mais eficiente. Um problema simples em um dia de qualquer escola é para se sentar ou se levantar e começar a contar os alunos, chamada direito das sortes. Bem abordagem, a mais ingênua, mas ainda assim, muito certo que um professor pode ter um, dois, três, quatro, cinco, seis, sete, e nós estaríamos aqui há algum tempo. Então, o que é uma melhoria marginal sobre este mesmo que você poderia ter feito como um miúdo? Como vocês contam as pessoas mais rápido? E, não começar a ler as instruções do meu próprio país? O que você teria feito como um miúdo? Comece contando pares, à direita, como assim que eu sou muito bom em dois, quatro, seis, oito, dez, 12. Então, isso é algo para a direita interessante. Então, quanto de uma melhoria é que há? Portanto, é obviamente um factor de dois. Leva-me metade do tempo. Porém, você sabe o que, como nós vamos encontrar ao longo do semestre, grande negócio, como excesso de velocidade acima de seu tempo de corrida por apenas um fator de duas não é tão interessante, porque o analógico aqui no mundo da informática é que eu sou um CPU Eu sou um computador, oras, se eu esperar 12 meses, 18 meses, eu, o computador irá apenas ser capaz por natureza, pelo número de gigahertz tenho em mim para ser capaz de contar as pessoas nesta sala mais rápido. Então, esses tipos de, estes tipos de aceleradores lineares como factor de duas três, mesmo factor de dez, quem se importa? Certo, podemos lançar hardware para o problema. Podemos esperar as coisas. Nós podemos desenvolver máquinas mais rápidas. Mas, intelectualmente, sim, que era uma espécie de inteligente, mas ele realmente não altera fundamentalmente o problema. Eu ainda estou indo da esquerda para a direita, de frente para trás. É realmente o mesmo algoritmo. Mas, eu ofereço o que podemos fazer melhor. Nós podemos fazer mais esperto do que isso e não fundamentalmente uma implementação mais rápida. Mas, para demonstrar isso, precisamos que você nos humor por apenas um momento. E é neste ponto onde ele vai ser eu a falar menos e você está falando mais. Mas eu preciso de você para executar uma etapa juntos, o que é se você poderia humor nos, por favor, stand up. As indicações aqui no quadro, você sabe que são, sim, um casal de que você tem que sentar. Aqueles de vocês na volta, lá vamos nós, tudo bem. Obrigado. Assim, o programa está aqui diante de vocês. Está agora os computadores executando este programa. É bastante auto-explicativo neste momento. Sim, você deve ser o número um. Get it? Certo, muitos de vocês provavelmente estão pensando que isso de qualquer maneira já, primeiro ano em primeiro lugar. Assim, pensar a si mesmo, você é o número um. Então, passo, três aqui, par-se com alguém em pé, adicione os dois números juntos e adotar esse montante como o seu número novo e nós vamos fazer um teste de sanidade. [Noises da multidão] Você sabe quantos temos? >> [Inaudível] >> Não [inaudível]. >> Precisamos de ter uma resposta-chave. [Silêncio] > Sim>. [Noises da multidão] >> David: Nesse ponto, o algoritmo deve ser enrolando para baixo. [Noises da multidão] Talvez devêssemos ter ido com a minha abordagem, afinal. >> 43. >> 163. >> David: Ooh aritmética na frente de mais de 300 pessoas. [Risos] O que é o nosso resultado final vai ser? >> 180. [] Riso >> 1200. >> 386. >> David: 386, e estão-lhe a última uma posição? É que toda a gente? Você sabe a resposta? > Quê? > David: Você sabe o que é a resposta? Nós não trazer uma resposta-chave com a gente assim, 386 é, na verdade, precisamente a resposta certa para o primeiro tempo. [Torcida] [Aplausos] Tudo bem. [Aplausos] Muito, muito bem feito. Então, qual foi o takeaway porque isso definitivamente me senti um pouco mais lenta que a minha abordagem muito simples, mas ainda assim muito correcto apenas de ir onesies e twosies e apenas começá-lo feito com da esquerda para a direita. Mas, o que nós realmente fazer lá? Bem, se houvesse a grosso modo, digamos, de 400 você parado em um ponto, e depois a metade de você, muito rapidamente, do que eu poderia dizer, queria sentar-se. Então, metade do que você sentou, fomos 400-200, em seguida, para 100, em seguida, para 50, depois para 25. Então, novamente, há que dividir e conquistar mesma idéia que nós tivemos com a agenda. Novamente, a cada iteração temos metade do tamanho do problema, é reduzida para metade, nós metade dela. Assim, em teoria, o seu algoritmo deve ter sido muito mais rápido que a minha abordagem linear porque a minha abordagem já teria tomado dizer 400 passos ou talvez se eu sou um pouco inteligente 200 passos. Mas, vocês já teria tido muito menos, o direito 400-200, 100, 50, 25, 13, seis, de modo menos de dez passos, no final contra o meu 200 ou 400. E há o germe de uma idéia muito interessante. E sim, matematicamente o que você fez foi apenas algo que é um pouco de natureza logarítmica log por base dois, divididos em dois a dois novamente. E nós vamos rever mais tarde neste semestre. Mas é aí que está outra vez uma implementação muito inteligente. E, nós estamos apenas arranhando a superfície do muito inteligente abordagens muito inteligente, eficiente para os problemas que podemos resolver em última instância. Então, quem são as pessoas que apenas conversou com que brevemente? Uma preocupação comum em um curso como este é que toda a gente à esquerda de você e de todos o direito de vocês devem saber claramente mais do que você. Bem, isso é absolutamente o caso. E, de fato, nos últimos anos, este curso tem feito um esforço concentrado para chegar aos menos confortável, por assim dizer. E por isso, não significa que as pessoas que nunca tocaram um computador antes, porque isso é realmente difícil de encontrar por aqui estes dias, mas os povos que usam e-mail, use o Facebook, talvez até agora, mas não são necessariamente muito bem o que fazer quando algo dá errado ou quando eles são perguntados sobre qualquer coisa tecnológica, você sabe, as mãos para cima ou para que tipo de empurrar o hardware para um amigo que é talvez mais versados na mesma do que eles. Bem, essas são algumas estatísticas do semestre do ano anterior. Assim, quando perguntado, quando pedimos para que nossos 400 alunos do último ano, você sabe, qual é o seu nível de conforto que vem para esta classe, assim escreveu-se 34% abaixo do que entre aqueles menos confortável. Então, se você veio neste quarto e ainda estão pensando agora que, você sabe o que este termo descreve-me menos confortável, saiba que você está em muito boa companhia. Mas, percebemos também que, se você está vindo neste curso com formação em ciência da computação e você estava realmente muito geek no ensino fundamental e médio da escola que estava escrevendo códigos e linguagens vos ensino, assim que é bom também porque não é definitivamente um trivial empresas audiência com o fundo, assim, cerca de 13%, o prazo passado. E depois, há todos os outros, uma espécie de alguém que não acha que eles são menos confortáveis, eles definitivamente não acho que eles estão mais confortáveis, mas eles estão apenas em um curso para conseguir alguma coisa fora dele. Assim, realizar este curso não tirar completamente o espectro de estudantes. E, para colocar isso em termos mais concretos, 71% dos alunos, no ano passado, tinha zero cursos por trás deles. Então, se você está entrando neste curso a pensar oh todos que tem CS50 foi um génio da informática na escola, não é o caso. A maioria das pessoas são, presumivelmente, apenas interessado nela. E alguns, sim, absolutamente ter tomado alguns cursos, alguns, ou pelo menos uma pessoa no ano passado tinha tido cinco cursos anteriormente. Então, nós definitivamente temos alguns outliers, mas novamente a carne da curva é nos menores valores completamente. E uma outra estatística interessante que nós compartilhamos nos últimos anos é a relação de gênero. Assim, historicamente, pelo menos em ciência da computação, existe um pouco de inclinação masculina e feminina. Eu alguns anos atrás era muito mais acentuada do que no ano passado. Então, agora estamos quase no nível de 40%. E se eu posso derrubar uma luva apenas por uma questão de ter um gráfico de pizza do terceiro ano seguinte, que é ainda mais justa. Gostaria de salientar que não há absolutamente nenhuma razão a partir da perspectiva de cursos que os machos e as fêmeas não devem ser inscrever neste tipo de curso. Em relativamente igual número e realizar a 38 por cento, 48 por cento, nós estamos realmente muito satisfeitos em ver que estamos quase em que, pelo menos, um valor ainda estatisticamente de 50%. Então, se você está, na verdade feminino, do resto garantir também que este não é, de fato, uma classe dominada pelos homens. Bem, isso só acontece de modo a ser 20 º aniversário do CS50. Eu, bem, obrigado. [Torcida] [Aplausos] É muito agradável de você, porque nós trouxemos o bolo para você realmente. E assim, quando você sair daqui ainda hoje, você vai realmente ter uma oportunidade de conhecer muitos dos cursos de ensino companheiros que vai ser prolongada no corredor. E sim, serei um tipo legal de forma incentivada de reunião os colegas de ensino. No entanto, nós tomamos uma viagem até uma pequena padaria e, novamente, de acordo com o curso é de natureza lúdica, enquanto, no entanto está esperando montante trivial de trabalho, enquanto nós estamos tendo que a diversão. Mas, nós temos um desses bolos para você. [Risos] Então, se você está rindo de que é realmente bom, porque mesmo se você está entre um dos menos confortável, pelo menos, você está ciente disso. Aqueles de vocês que nos 14 por cento podem preferir este sabor. [Risos] E então, se você não sabe o que diabos está acontecendo agora, nós também temos isso para o resto de vocês. [Torcida] [Aplausos] Assim, aqueles estão sendo cortadas em pedaços no exterior, como falamos. Então, novamente, vamos levar as coisas acima de um entalhe e, pelo menos, introduzir algumas inquilino básicas que nós tomamos para concedido, em seguida, no restante deste semestre. Então, todos nós sabemos que os computadores provavelmente ferver, em última instância, de alguma forma a zeros e uns, essas coisas chamadas bits. O que significa isso? Bem, você pode pensar sobre isso francamente como uma lâmpada, um pouco é uma lâmpada que está dentro ou está fora. É uma opção, que é ligado ou é desligado. Agora, cientistas da computação em geral, pensar em off como o número zero e arbitrariamente, e sobre a noção de como um todo. Então, se você joga um interruptor de luz em que é um desligá-lo que é um zero. Ou, equivalentemente, acender a luz que é o valor verdadeiro do turno fora que é o valor de false. Então, essas são apenas sinônimos. No final do dia, sim, todos os cálculos, tudo o que se passa debaixo do capô de um computador que, em última análise se resumem a zeros e uns. E, quando você parar para pensar sobre isso, é bastante notável da barragem que o mundo tem feito com estes blocos básicos de construção, incluindo alguns dos dispositivos que você está segurando em sua mão. Bem, por que são zeros e uns é útil? Meu Deus, até mesmo no mundo real nós temos pelo menos dez dígitos, de zero a nove. Porque é tão limitado? Bem, em termos de hardware é muito fácil. É muito mais fácil para representar dois estados, a direita. Se os computadores estão conectados à tomada, normalmente, você tem essa fonte fácil de natureza binária. É ligado ou desligado. Electricidade está fluindo ou não é. Então, esse é o tipo de um dos motivos iniciais que o mundo entrou com apenas zeros e uns nos computadores. Mas, você pode usá-las como blocos de construção. Então, isso realmente é um pouco pequeno na tela, mas aqui podemos contar em binário, ou podemos representar qualquer coisa que queremos em binário como podemos, por exemplo, decimal, assim como podemos, mesmo, de facto, com letras em ordem alfabética. E assim, aqui está o sistema rápido. Em apenas alguns minutos o tempo que você já sabe como contar, como escrever, como falar binário muito parecido com o seu próprio computador portátil. Bem, você tem, no mundo de tipo binário, como colunas de ensino fundamental ou valores. Assim, na escola aprendemos este é o mais esta coluna é a coluna de dezenas, centenas coluna e assim por diante. Em outras palavras, porque é o número que nós conhecemos como 123 o número 123? Bem, meu professor me ensinou isto é os de coluna, esta foi a dez, esta foi a centenas de pessoas. Bem o que isso significa? Bem, para descobrir qual é o valor total é o que é contrário a seqüência de dígitos, apenas hash marcas na placa. Bem, temos um 100, de modo que é uma 100 vezes e, em seguida, mais do que dois 10, para que a as duas vezes 10, mais três, de modo que é 3 vezes 1, ok, então me parece ter conseguido voltar para onde eu comecei. Mas, este processo simples de apenas multiplicar os dígitos do valor da coluna é exatamente o binário é tudo. Mas, em binário você usar os poderes dos dois não potências de dez. Então, aqui vai uma série de oito lâmpadas. Os cientistas da computação como a utilização de valores como dois e oito, 16 e 24 e 32, porque eles estão todos os valores geralmente conveniente de usar. Assim, quando falamos de oito valores em seqüência como essa é chamada de byte. E esses dias que raramente falam apenas em bytes, megabytes falamos gigabytes e terabytes estes dias. Mas é tudo a mesma coisa, em última instância. Aqui tem oito bits AKA um byte, apenas jargão simples. Então, todas essas lâmpadas desligadas. Assim, a matemática é realmente muito fácil. Então, lá na direita, mas é pequeno para ver, é a coluna um, a dois, a quatro, os oitos, a 16s, 32s, 64s, 128s. Tudo bem, talvez seja difícil de memorizar no início, mas é só multiplicar por dois da direita para a esquerda. Assim, você pode sempre recriar isso. Bem, eles estão todos fora de modo que a 0 espaço reservado vezes, espaço reservado 0 vezes. Então, esse é o número 0 representado em binário. Em outras palavras, como você escreve o número que nós conhecemos como 0 em binário? Bem, um, dois, três, quatro, cinco, seis, sete, oito, e tecnicamente como em decimal, todos esses zeros à esquerda, eles não acrescentam nada à fórmula que eles estão lá apenas porque nós decidimos que arbitrariamente quero oito dessas coisas em uma fileira, à direita. Se eles são objetos físicos, temos oito assim que tem que ser todos fora. Então, nós poderíamos ter acabado de acabar com um zero. Bem como você representar o número um? Bem, instintivamente você está indo jogar um dos switches. Você vai virar uma lâmpada diante. Assim, não é o número um porque agora colocar um, uma lâmpada que está ligada, em posição de cada um. Como é que vamos para representar dois? Bem, nós estamos indo realmente jogar duas opções agora, pelo menos, contra este estado, nós temos que ligar a duas colunas é desligar as colunas e agora temos o valor de um na coluna dois. Então, esse é o valor total de dois. Agora, um rápido exercício mental, o que vai acontecer com a próxima seqüência? Como faço para apresentar o número três? Bom, eu preciso de uma coluna de dois, um na coluna três e ha ah. Então, agora eu tenho que uma incrementada. E agora, este mesmo padrão se repete de base. Qual é o número quatro? Bem, vamos ver, eu só preciso de um na coluna e, em seguida, quatro zeros em pares e queridos. Então, ele continua dessa forma. E é apenas esta seqüência de passos. E na noção de binário não é realmente tão complicado. No topo há temos oito zeros. Abaixo disso, temos sete zeros e um. Abaixo disso temos seis zeros, um, zero e um e que é binário. 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. [] Riso >> 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. [Aplausos] ==== Transcribed by Automatic Sync Technologies ====