1 00:00:08,976 --> 00:00:16,546 >> Olá este é CS50 meu nome é David Malan 2 00:00:16,546 --> 00:00:18,596 e eu serei o seu instrutor neste semestre; 3 00:00:18,596 --> 00:00:21,756 e alguns de vocês estão aqui porque você viu alguém rasgar um telefone 4 00:00:21,756 --> 00:00:24,596 livro pela metade em algo chamado Harvard pensa no ano passado Big; 5 00:00:24,806 --> 00:00:25,856 e alguns de vocês podem estar aqui 6 00:00:25,856 --> 00:00:27,646 porque você está usando uma pequena ferramenta chamada 7 00:00:27,646 --> 00:00:30,956 HarvardCourses e nós apenas assim se passou a colocar CS50 8 00:00:30,956 --> 00:00:31,966 em sua lista de compras. 9 00:00:31,966 --> 00:00:34,696 Mas seja qual for o motivo para estar aqui este é 10 00:00:34,696 --> 00:00:37,646 na verdade a nossa introdução a Ciência da Computação, e ao contrário 11 00:00:37,646 --> 00:00:40,816 para o que você pode ter ouvido ou visto ou percebido 12 00:00:40,816 --> 00:00:43,616 na escola, as probabilidades são ciência da computação não é completamente 13 00:00:43,656 --> 00:00:45,126 o que você imaginou que fosse. 14 00:00:45,126 --> 00:00:47,006 Em primeiro lugar não é, em última análise 15 00:00:47,236 --> 00:00:49,896 sobre a programação, apesar este é, infelizmente, a 16 00:00:49,896 --> 00:00:52,416 mensagem que é transmitida, mas à luz de um lote 17 00:00:52,416 --> 00:00:55,386 dos currículos do ensino médio melhor, a programação é apenas uma ferramenta 18 00:00:55,606 --> 00:00:57,686 que os cientistas da computação e engenheiros 19 00:00:57,686 --> 00:01:00,846 e cada vez mais humanistas e os povos de todos os tipos 20 00:01:00,846 --> 00:01:03,966 de campos de usar para realmente resolver problemas de interesse para eles. 21 00:01:03,966 --> 00:01:07,016 O aspecto de programação é apenas um meio para um fim; 22 00:01:07,016 --> 00:01:09,416 e assim reservar este telefone na minha mão é apenas representante 23 00:01:09,416 --> 00:01:11,556 a um problema de uma pessoa pode resolver, 24 00:01:11,556 --> 00:01:13,146 completamente não-digital um presente, 25 00:01:13,146 --> 00:01:16,316 mas muito do mundo real em que há alguma pessoa 26 00:01:16,316 --> 00:01:20,176 ou algo assim em um grande bloco de dados aqui, mil 27 00:01:20,176 --> 00:01:24,896 ou mais páginas de texto e eu quero para encontrar alguém como Mike Smith. 28 00:01:24,896 --> 00:01:27,906 Agora pensa em Harvard Big aconteceu de eu rasgo 29 00:01:27,906 --> 00:01:30,496 para mim essa coisa e parece um pouco inútil 30 00:01:30,496 --> 00:01:31,986 para re-hash demo que mesmo 31 00:01:31,986 --> 00:01:36,376 assim, em vez pensei solicitar um ideal suficientemente forte 32 00:01:36,376 --> 00:01:38,086 voluntário para vir para cima. 33 00:01:38,426 --> 00:01:41,746 Você tem que ser confortável diante das câmeras mas esta é sua primeira chance 34 00:01:41,776 --> 00:01:43,796 para dizer Olá a mãe e meu pai na frente das câmeras. 35 00:01:45,786 --> 00:01:47,686 Um voluntário, sim vem sobre o que é seu nome? 36 00:01:48,456 --> 00:01:48,666 >> Sumit. 37 00:01:49,006 --> 00:01:50,096 >> Sumit, tudo bem vamos lá para cima 38 00:01:50,976 --> 00:01:53,276 e se você pudesse realizar desajeitadamente nesta frente até aqui por um momento. 39 00:01:53,776 --> 00:01:56,986 [Aplausos] 40 00:01:57,486 --> 00:01:58,566 >> David Malan: Então, se você quero apenas ficar aqui 41 00:01:58,566 --> 00:02:01,466 por apenas um momento vamos andar através do problema em questão. 42 00:02:01,466 --> 00:02:02,716 Estou à procura de Mike Smith. 43 00:02:02,966 --> 00:02:05,486 Há alguns milhares de páginas deste livro, 44 00:02:05,666 --> 00:02:09,586 e eu o ser humano poderia certamente Mike Smith encontrar todos com facilidade, 45 00:02:09,586 --> 00:02:13,336 muito corretamente, começando, se você vai simular a partir da frente 46 00:02:13,446 --> 00:02:17,286 do livro de telefone na página 1, à procura de Mike Smith. 47 00:02:17,286 --> 00:02:20,456 Não vejo Smiths Mike porque eu estou na página 1 48 00:02:20,816 --> 00:02:24,336 onde a é um simples são tão Viro-me para o de B eo da C 49 00:02:24,336 --> 00:02:26,436 e os D's e assim por diante e, finalmente, chego ao de S 50 00:02:26,436 --> 00:02:28,296 mas no pior caso eu olhei 51 00:02:28,296 --> 00:02:30,396 através do 1000 ou mais páginas. 52 00:02:30,396 --> 00:02:32,266 Agora você o ser humano inteligente 53 00:02:32,266 --> 00:02:35,186 apenas com os instintos do intestino provavelmente não seria tão ingênuo 54 00:02:35,186 --> 00:02:37,436 como para começar a partir da esquerda e trabalhar sua maneira para a frente. 55 00:02:37,696 --> 00:02:39,046 O que você faria? 56 00:02:39,046 --> 00:02:40,906 >> Dive direita para o meio. 57 00:02:40,966 --> 00:02:42,536 > Direito de mergulho> Então, no meio 58 00:02:42,536 --> 00:02:47,316 por isso, se você simular seria um ser humano comum pode fazer, 59 00:02:47,726 --> 00:02:49,956 onde você iria mergulhar em primeiro a encontrar Mike Smith? 60 00:02:50,976 --> 00:02:57,006 Tudo bem então, aproximadamente, em meio (oh este será 61 00:02:57,006 --> 00:02:58,836 mais rápido demais) cerca de para o meio 62 00:02:58,836 --> 00:03:00,466 e neste momento você perceber o que carta 63 00:03:00,466 --> 00:03:01,526 do alfabeto você está? 64 00:03:01,856 --> 00:03:02,056 >> Aluno: L. 65 00:03:02,056 --> 00:03:04,446 >> David: Tudo bem, então estamos em L assim sensivelmente a meio; 66 00:03:04,606 --> 00:03:07,096 de modo que o agora é intuitiva é claro que Mike não é 67 00:03:07,166 --> 00:03:09,666 à esquerda da lista telefônica porque isso é L e antes, 68 00:03:09,666 --> 00:03:10,886 mas ele está à direita 69 00:03:11,056 --> 00:03:14,076 para que possamos literalmente lágrima este problema pela metade - 70 00:03:14,076 --> 00:03:14,886 cue rasgar - cue lacrimejamento. 71 00:03:15,076 --> 00:03:16,766 >> Estudante: Você está falando sério? 72 00:03:17,296 --> 00:03:19,296 >> David: Eu sou muito sério. 73 00:03:19,396 --> 00:03:21,856 Eu preciso de você Não a rasguemos a página para fora; 74 00:03:21,856 --> 00:03:23,816 Eu preciso de você para rasgar este livro de telefone pela metade 75 00:03:23,816 --> 00:03:25,606 na frente de 500 de seus pares. 76 00:03:25,606 --> 00:03:26,036 [Aplausos] 77 00:03:26,036 --> 00:03:26,406 >> David: Excelente. 78 00:03:30,466 --> 00:03:32,666 Agora nós vamos whittled este problema em meia 79 00:03:33,056 --> 00:03:34,446 e assim podemos literalmente 80 00:03:34,446 --> 00:03:37,056 e dramaticamente jogar metade do problema de distância. 81 00:03:37,196 --> 00:03:44,106 Então, agora ficamos com um problema que é, mas 500 páginas grandes 82 00:03:44,106 --> 00:03:47,706 e assim o que pode um ser humano fazer agora para encontrar Mike ainda mais de perto? 83 00:03:48,766 --> 00:03:50,486 Mergulhar em linha reta ao meio novamente 84 00:03:50,486 --> 00:03:52,326 e agora nós terminamos até sobre o que carta? 85 00:03:52,616 --> 00:03:52,746 >> Aluno: P. 86 00:03:53,026 --> 00:03:55,246 >> David: P Então, por isso estamos recebendo mais perto, mas nós não chegamos lá 87 00:03:55,246 --> 00:03:59,076 e ainda para que este problema lágrima pela metade, whittling esse problema 88 00:03:59,076 --> 00:04:03,986 baixo, embora seja ficando um pouco mais fácil; 89 00:04:04,486 --> 00:04:06,206 whittling o problema ainda mais para baixo na metade 90 00:04:06,316 --> 00:04:08,626 e se fizermos isso de novo e uma e outra vez fomos 91 00:04:08,626 --> 00:04:12,776 de 1.000 páginas, a 500 páginas, de 250 a 125 e assim por diante; 92 00:04:12,936 --> 00:04:15,466 e assim depois de apenas uma poucos relativamente falando 93 00:04:15,466 --> 00:04:18,546 dessas lágrimas página de nós espero que encontrou Mike Smith 94 00:04:18,546 --> 00:04:21,566 local, e assim em computador termos ciência que realmente dizer 95 00:04:21,566 --> 00:04:22,956 que este algoritmo ou este processo, 96 00:04:22,956 --> 00:04:24,936 este programa é logarítmica. 97 00:04:24,936 --> 00:04:27,396 Você deve se lembrar vagamente logaritmos da matemática do ensino médio 98 00:04:27,396 --> 00:04:29,266 e tal, mas o que isso sugere para nós, 99 00:04:29,266 --> 00:04:30,256 os cientistas da computação, é 100 00:04:30,256 --> 00:04:33,616 que este é certamente um mais inteligente, um algoritmo mais rápido. 101 00:04:33,616 --> 00:04:36,216 Então, colocar isso em perspectiva, imagine agora não um livro de telefone 102 00:04:36,216 --> 00:04:39,366 com 1.000 páginas, mas como índice de um motor de busca 103 00:04:39,366 --> 00:04:43,586 com digamos 1 milhão de páginas ou ainda maior, 4 bilhões de páginas, 104 00:04:43,586 --> 00:04:45,936 que não é assim como muitos web páginas como poderia estar lá fora 105 00:04:46,006 --> 00:04:47,456 então se você tem 4000 milhões 106 00:04:47,456 --> 00:04:50,916 de algo quantas vezes você pode rasgar uma página de 4.000 milhões 107 00:04:50,916 --> 00:04:52,696 lista telefônica ao meio, pela metade, 108 00:04:52,856 --> 00:04:55,286 pela metade, até encontrar o pessoa que você está procurando? 109 00:04:55,896 --> 00:05:00,826 Alguém? Quantas vezes você pode rasgar um livro de telefone 4000000000 página 110 00:05:00,826 --> 00:05:02,046 pela metade? 111 00:05:03,936 --> 00:05:08,776 É 33, 32, é apenas 32 vezes e você pode verificar que a matemática 112 00:05:08,776 --> 00:05:11,716 em casa, mas aqui reside o poder do pensamento algorítmico, 113 00:05:11,716 --> 00:05:13,486 computacional de pensar como eles dizem. 114 00:05:13,726 --> 00:05:17,016 Você pode tirar um problema que pode ser relativamente intuitiva 115 00:05:17,016 --> 00:05:18,616 para resolver, mas quando você escala essa coisa 116 00:05:18,616 --> 00:05:21,026 -se como é cada vez mais o caso da web, 117 00:05:21,026 --> 00:05:23,246 em grandes sistemas de dados e assim por diante, você realmente tem 118 00:05:23,246 --> 00:05:26,046 agora acho que inteligente, você realmente tem que pensar de forma eficiente 119 00:05:26,046 --> 00:05:28,366 e você tem que resolver este problema de forma eficaz. 120 00:05:28,366 --> 00:05:31,506 E que é afinal o que Ciência da Computação 50 vai 121 00:05:31,506 --> 00:05:32,036 para ser. 122 00:05:32,036 --> 00:05:34,126 Um grande aplauso para os nossos voluntários aqui. 123 00:05:34,126 --> 00:05:35,216 [Aplausos] 124 00:05:35,216 --> 00:05:35,746 >> David: Obrigado. 125 00:05:39,156 --> 00:05:40,676 Temos esse presente de despedida um - 126 00:05:40,676 --> 00:05:43,166 apenas um pouco de isenção legal para as câmeras, se você o faria. 127 00:05:45,956 --> 00:05:50,806 Então não vamos colocá-lo apenas no o local, há um monte 128 00:05:50,806 --> 00:05:53,146 de nós nesta sala e podemos realmente aplicar esta mesma idéia 129 00:05:53,146 --> 00:05:55,936 não a estas telefone livros, mas na verdade 130 00:05:55,936 --> 00:05:58,316 para outros problemas do mundo real, há um monte 131 00:05:58,316 --> 00:05:59,266 das pessoas nesta sala. 132 00:05:59,536 --> 00:06:01,836 E, francamente, seria incrivelmente demorado 133 00:06:01,836 --> 00:06:04,256 e tedioso para mim, contar essa sala cheia 134 00:06:04,256 --> 00:06:08,536 de pessoas da velha escola estilo - 1, 2, 3 e assim por diante. 135 00:06:08,536 --> 00:06:10,196 Então o que você faz quando você é uma criança e você quer 136 00:06:10,196 --> 00:06:12,506 para contar um pouco mais rápido do que 1 e 2 e 3 137 00:06:12,506 --> 00:06:14,076 e 4 que é o coisa mais simples que você faz? 138 00:06:14,076 --> 00:06:17,626 Então tente 2m 4, 6, 8 e isso é bom né? 139 00:06:17,856 --> 00:06:19,606 Isto não é para menosprezar que a simplicidade 140 00:06:19,606 --> 00:06:20,796 da idéia, que é maravilhoso. 141 00:06:20,796 --> 00:06:23,676 É, literalmente, as metades da quantidade de tempo que leva para resolver 142 00:06:23,676 --> 00:06:25,986 esse problema, mas nós pode realmente fazer melhor. 143 00:06:26,266 --> 00:06:30,396 Assim, proponho esse algoritmo, este programa, este processo 144 00:06:30,716 --> 00:06:32,656 para a contagem de pessoas nesta sala. 145 00:06:32,956 --> 00:06:35,696 Em um momento em que eu vou pedir você nós e humor stand up 146 00:06:35,696 --> 00:06:38,046 mas não agora, e então você está indo para cada tomada 147 00:06:38,046 --> 00:06:41,566 sobre o número 1 - acho que para si mesmo eu sou o número 1. 148 00:06:41,606 --> 00:06:42,966 Então você está indo par off 149 00:06:42,966 --> 00:06:45,256 com alguém que está de pé ao lado de você, você vai 150 00:06:45,326 --> 00:06:47,306 a soma de seus números juntos e um 151 00:06:47,306 --> 00:06:49,696 de vocês quem é mais rápido provavelmente vai sentar-se 152 00:06:49,916 --> 00:06:52,486 ea outra pessoa vai para assumir o seu número, 153 00:06:52,696 --> 00:06:56,156 a soma desses números; e então você vai repetir 154 00:06:56,156 --> 00:06:58,616 e se você seguir a lógica aqui em apenas alguns momentos, 155 00:06:58,616 --> 00:07:01,266 deve haver apenas um dos você muito desajeitadamente de pé. 156 00:07:01,566 --> 00:07:06,976 Então, se você ficar todos até, assumir o número 1 e ir embora. 157 00:07:07,516 --> 00:08:07,906 [Talking e música] 158 00:08:08,406 --> 00:08:10,956 > Direito> All nesse Eu vejo um ponto, 159 00:08:10,956 --> 00:08:13,356 2 almas solitário em pé; mais alguém? 160 00:08:13,356 --> 00:08:16,776 3, tudo certo para que você tenha dois parceiros potencialmente, 4 de vocês, 161 00:08:17,146 --> 00:08:17,906 isso deve ser fácil, então. 162 00:08:18,506 --> 00:08:24,406 Ah, e lá em cima, mais ninguém precisa de um parceiro lá em cima? 163 00:08:24,406 --> 00:08:27,636 Daí o título deste slide tudo certo modo 2, 164 00:08:28,016 --> 00:08:33,906 temos que duas emparelhados? 165 00:08:34,166 --> 00:08:39,626 Ok então troca números; boa meia ok 166 00:08:39,836 --> 00:08:45,616 desse problema é ido agora que acabamos de deixar esses dois. 167 00:08:45,906 --> 00:08:48,176 Sim? Oh 3 bem. 168 00:08:48,176 --> 00:08:51,846 Isto é, quando recebe a adição muito estranho isso publicamente. 169 00:08:51,846 --> 00:08:52,216 [Risos e aplausos] 170 00:08:52,216 --> 00:09:07,296 >> Ok 210 e? 171 00:09:09,546 --> 00:09:13,576 >> Estudante: 233. 172 00:09:13,826 --> 00:09:17,546 >> Wow 210 e 233 eo total 173 00:09:17,546 --> 00:09:21,646 que os companheiros de ensino recebi foi 550 dar ou tomar 174 00:09:22,036 --> 00:09:27,446 para tomar um pouco talvez, mas vamos chamá-lo um sucesso. 175 00:09:27,446 --> 00:09:28,956 Parabéns a você mesmo aqui. 176 00:09:29,456 --> 00:09:32,316 [Aplausos] 177 00:09:32,816 --> 00:09:37,536 >> Então, agora que não poderia ter senti como se o algoritmo mais rápido 178 00:09:37,536 --> 00:09:40,166 mas pense no que você poderia ter feito com que o algoritmo 179 00:09:40,166 --> 00:09:42,896 em cada iteração, bem como a agenda aqui na frente, 180 00:09:43,106 --> 00:09:47,656 você literalmente dividido esse problema em dois 181 00:09:47,656 --> 00:09:50,486 porque em cada iteração cerca de metade do que estavam sentados 182 00:09:50,486 --> 00:09:52,476 para baixo e depois a outra metade e depois outra metade. 183 00:09:52,596 --> 00:09:53,616 Então, ainda que pode ter começado 184 00:09:53,616 --> 00:09:55,116 com 500 algumas pessoas estranhas, 185 00:09:55,256 --> 00:09:57,866 muito rapidamente se tornou um problema pessoa 250 186 00:09:57,866 --> 00:09:59,676 e depois um problema pessoa 125. 187 00:09:59,906 --> 00:10:03,386 E assim, em teoria, depois de apenas dois ou 3 passos que estavam em ordem 188 00:10:03,386 --> 00:10:06,776 de magnitude mais adiante neste processo de contagem 189 00:10:06,776 --> 00:10:08,336 do que eu seria porque Eu ainda estaria 190 00:10:08,336 --> 00:10:10,876 em pessoa, literalmente, 3 ou 4. 191 00:10:10,956 --> 00:10:14,496 Agora considere supor um todo outras 500 pessoas a pé 192 00:10:14,496 --> 00:10:16,776 para esta sala, de repente, agora há 1.000 pessoas. 193 00:10:16,936 --> 00:10:19,236 Bem quantos passos mais faz este algoritmo tomar? 194 00:10:19,496 --> 00:10:21,146 Bem, aqui é o poder - 1. 195 00:10:21,566 --> 00:10:23,356 E isso é quando as coisas realmente interessantes 196 00:10:23,356 --> 00:10:25,726 e por isso esta apenas sugestões os tipos de pensamento 197 00:10:25,726 --> 00:10:28,296 que se pode derivar da campo da ciência da computação 198 00:10:28,296 --> 00:10:31,296 e aplicar tanto ao campo próprio da ciência da computação, 199 00:10:31,296 --> 00:10:35,486 ou o que é de domínio que você está aqui também estudo. 200 00:10:35,486 --> 00:10:39,356 Então, onde você pode realmente aplicar esses tipos de truques? 201 00:10:39,356 --> 00:10:42,146 Assim um número de vocês passou na semana passada jogando 202 00:10:42,146 --> 00:10:43,186 com esta ferramenta particular 203 00:10:43,186 --> 00:10:44,806 que é um projeto da Claro vem trabalhando 204 00:10:44,806 --> 00:10:48,516 por algum tempo em um esforço para tornar mais fácil e mais social 205 00:10:48,626 --> 00:10:50,306 realmente a loja para cursos. 206 00:10:50,306 --> 00:10:51,546 Uma pergunta natural a primeira semana 207 00:10:51,546 --> 00:10:53,426 da escola é o que Você está comprando? 208 00:10:53,816 --> 00:10:57,716 Bem o nosso objetivo aqui foi responder a essa pergunta para as pessoas 209 00:10:57,716 --> 00:11:00,396 e então esperamos facilitar amigos se reunindo, 210 00:11:00,396 --> 00:11:02,546 cursos de shopping com cada outro, um para o outro, 211 00:11:02,546 --> 00:11:05,086 captando currículos e assim nasceu o que nós dub 212 00:11:05,326 --> 00:11:06,176 Cursos de Harvard. 213 00:11:06,176 --> 00:11:09,646 Para aqueles não familiarizados este é um site na courses.cs50.net 214 00:11:09,816 --> 00:11:12,216 e tem a Harvard inteira Catálogo de cursos na mesma 215 00:11:12,436 --> 00:11:13,686 eo que tem no canto superior esquerdo 216 00:11:13,686 --> 00:11:16,186 como você pode ver é definitivamente o botão de login do Facebook. 217 00:11:16,456 --> 00:11:19,006 Simplesmente clicando nesse link, você pode, então, entrar em sua conta; 218 00:11:19,226 --> 00:11:21,666 e em seguida, no lado esquerdo o que aparece é um pequeno menu 219 00:11:21,766 --> 00:11:24,286 de todos os seus amigos que também estão usando esta ferramenta 220 00:11:24,286 --> 00:11:26,516 e você pode selecionar qualquer um deles e realmente ver o que 221 00:11:26,646 --> 00:11:27,886 essa pessoa é shopping. 222 00:11:27,886 --> 00:11:31,126 Você pode pesquisar, obviamente, por qualquer dos campos de topo por dia 223 00:11:31,126 --> 00:11:32,326 da semana você quer uma classe; 224 00:11:32,376 --> 00:11:35,006 dias da semana você não quero uma classe, nível de pós-graduação 225 00:11:35,006 --> 00:11:38,266 ou nível de graduação, professores pontuações que são 4.0 e superiores, 226 00:11:38,266 --> 00:11:40,586 pontuação geral do curso que são 4.0 e superior; 227 00:11:40,846 --> 00:11:42,706 e um número inteiro de outros recursos, incluindo 228 00:11:42,706 --> 00:11:44,306 sincronização com Google calendário. 229 00:11:44,656 --> 00:11:48,646 E este é exatamente o tipo de projeto que todo mundo 230 00:11:48,646 --> 00:11:51,516 nesta sala 11 semanas, portanto, poderia absolutamente enfrentar 231 00:11:51,756 --> 00:11:52,796 como um projeto final. 232 00:11:52,796 --> 00:11:55,766 As peças que tirou a prateleira aqui foram finalmente 233 00:11:55,766 --> 00:11:59,456 reduzido a coisas como 4 loops eo que nós vamos chamar funções 234 00:11:59,556 --> 00:12:03,046 eo que chamaremos de abstração; e todos esses fundamentos 235 00:12:03,046 --> 00:12:05,456 que à primeira vista pode ter algumas bastante RK 236 00:12:05,456 --> 00:12:06,836 e jargões associados a eles. 237 00:12:06,836 --> 00:12:09,076 No final do dia desta é equipar os que 238 00:12:09,076 --> 00:12:11,186 com habilidades e conhecimentos e compreensão com que 239 00:12:11,396 --> 00:12:13,956 tomar um problema, tomar um grande conjunto de dados, talvez 240 00:12:14,116 --> 00:12:15,786 e realmente produzir algo de útil - 241 00:12:15,786 --> 00:12:18,906 produzir um projeto que é do seu interesse. 242 00:12:19,006 --> 00:12:21,936 Fatos do divertimento para aqueles de vocês que poderia ter sido de mergulho 243 00:12:21,936 --> 00:12:25,626 para esta aplicação já, Olhei os logs 244 00:12:25,626 --> 00:12:27,376 e as estatísticas que mantemos no site 245 00:12:27,606 --> 00:12:29,366 para ter uma noção do que está funcionando bem eo que não é 246 00:12:29,636 --> 00:12:31,106 e algumas curiosidades incluir estes - 247 00:12:31,326 --> 00:12:36,466 11.782 cursos estão no lista de compras no momento; 248 00:12:36,466 --> 00:12:39,826 1384 Harvard usuários do Facebook estão ativamente usando este; 249 00:12:40,306 --> 00:12:43,186 607 pessoas têm sincronizado suas programações de compras 250 00:12:43,186 --> 00:12:45,926 com o Google Calendar, e para os curiosos se você quiser 251 00:12:45,926 --> 00:12:48,346 para decidir se você são de nível médio em termos 252 00:12:48,346 --> 00:12:51,226 de quanto você está shopping fazendo, 10 é o número médio 253 00:12:51,226 --> 00:12:54,006 de cursos da melhor forma que podemos dizer que um aluno está shopping 254 00:12:54,316 --> 00:12:55,876 e não seria um fato divertido 255 00:12:55,876 --> 00:12:57,486 se nós também não parecia com o fato assustador. 256 00:12:57,766 --> 00:12:59,556 O número máximo de alguém cursos 257 00:12:59,556 --> 00:13:01,126 neste campus é shopping esta semana - 258 00:13:02,276 --> 00:13:07,436 não um outlier seguido por perto de 70, 66, 259 00:13:07,556 --> 00:13:14,456 63 em baixo de modo que é bastante um monte de compras para fazer. 260 00:13:14,456 --> 00:13:17,396 Então você vê um problema como isso no mundo real; 261 00:13:17,396 --> 00:13:19,636 você vê um problema no campus você pode querer resolver. 262 00:13:19,636 --> 00:13:20,856 Finalmente você vai acabar 263 00:13:20,856 --> 00:13:22,976 empregando-se algo chamado de programação, 264 00:13:22,976 --> 00:13:27,366 o ato de construir, contando um computador para fazer o seu lance. 265 00:13:27,596 --> 00:13:29,806 Bem que forma se isso realmente tomar? 266 00:13:29,806 --> 00:13:31,466 Bem neste curso você verá ao longo 267 00:13:31,466 --> 00:13:33,936 das próximas semanas um número de línguas; 268 00:13:33,936 --> 00:13:36,056 porque aqui também há interesse em takeaway; 269 00:13:36,386 --> 00:13:38,796 o idioma que você aprende em um curso introdutório, 270 00:13:38,796 --> 00:13:41,356 que idiomas você conhece não é tanto importante 271 00:13:41,356 --> 00:13:44,636 como é a compreensão de como esses línguas de trabalho, aprendendo um 272 00:13:44,636 --> 00:13:46,546 ou dois diferentes tipos de linguagens 273 00:13:46,546 --> 00:13:49,426 e então você pode muito facilmente parlay suas habilidades em uma língua 274 00:13:49,426 --> 00:13:52,786 como C ou PHP ou JAVA ou qualquer outro número 275 00:13:52,786 --> 00:13:54,236 de línguas para os outros. 276 00:13:54,236 --> 00:13:57,146 E então o que é realmente capacitar sobre este curso em particular é 277 00:13:57,146 --> 00:13:59,386 que em última instância um dos objetivos é 278 00:13:59,386 --> 00:14:02,986 para ajudar você a ajudar a si mesmo; de modo que mesmo se 50 prova 279 00:14:02,986 --> 00:14:06,756 a ser um curso terminal para você, você decide CS não é necessariamente 280 00:14:06,756 --> 00:14:09,666 para mim, nenhum lhe a menos de saída este curso com um monte 281 00:14:09,666 --> 00:14:11,836 de habilidades e esclarecido que você pode sair 282 00:14:11,836 --> 00:14:14,646 e aplicar onde quer que seja você está mais interessado em 283 00:14:14,646 --> 00:14:17,406 Na verdade eu só conheci algumas semanas há com um ex-estudante 284 00:14:17,596 --> 00:14:19,996 que não é um cientista da computação, nem mesmo um estudante de engenharia; 285 00:14:19,996 --> 00:14:22,896 ele é realmente pré-med e ele foi trabalhando para alguns MDs neste verão 286 00:14:23,396 --> 00:14:27,196 e eles tinham lhe deu um enorme arquivo de texto contendo como dezenas 287 00:14:27,196 --> 00:14:30,546 de milhares de pacientes registros, e dezenas de milhares 288 00:14:30,756 --> 00:14:35,656 de registros médicos, e eles perguntou-lhe apenas um semestre 289 00:14:35,766 --> 00:14:39,136 à frente do CS50 você pode dizer nos exatamente que pacientes preencheram 290 00:14:39,136 --> 00:14:41,186 com que os médicos e quantas vezes? 291 00:14:41,546 --> 00:14:42,126 Tudo bem este é o tipo 292 00:14:42,126 --> 00:14:44,596 do Microsoft Excel problema do inferno aqui certo? 293 00:14:44,596 --> 00:14:47,156 Gosto de como você pode possivelmente descobrir isso 294 00:14:47,336 --> 00:14:49,756 com realmente convincente uma máquina para fazer isso por você 295 00:14:49,756 --> 00:14:52,056 e com certeza nós conversamos por alguns instantes, 296 00:14:52,056 --> 00:14:54,096 Eu meio que gentilmente apontou sair bem é meio 297 00:14:54,096 --> 00:14:55,826 de como o problema 7 do ano passado. 298 00:14:56,046 --> 00:14:58,816 E assim com certeza ele tomou este arquivo de texto muito grande, 299 00:14:59,006 --> 00:15:02,426 ele escreveu um programa em uma linguagem PHP chamada que não é ainda 300 00:15:02,426 --> 00:15:05,996 tanto tempo, algumas linhas de código sim grande, que correu grande arquivo de dados 301 00:15:05,996 --> 00:15:08,576 através dele, importou em o que é chamado um banco de dados 302 00:15:08,966 --> 00:15:12,116 o que é realmente apenas uma super fantasiosa versão do Microsoft Excel 303 00:15:12,116 --> 00:15:15,286 ou similar, e então ele foi capaz de escrever linhas de código 304 00:15:15,416 --> 00:15:18,076 que lhe permitiu selecionar alguns pacientes, selecione alguns médicos 305 00:15:18,266 --> 00:15:19,906 e olhar para onde o cruzamento foi 306 00:15:19,906 --> 00:15:23,816 para que a saída para o seu patrões era exatamente a resposta 307 00:15:24,096 --> 00:15:25,016 eles estavam procurando. 308 00:15:25,016 --> 00:15:27,956 Não é apenas possível resolver alguns destes problemas com a mão 309 00:15:28,156 --> 00:15:31,066 e isso não é mesmo um domínio que é necessariamente 310 00:15:31,066 --> 00:15:32,636 no mundo do CS, mas fala 311 00:15:32,636 --> 00:15:34,626 para você a aplicabilidade de tudo isso. 312 00:15:34,886 --> 00:15:37,086 Então, o que significa realmente programa? 313 00:15:37,086 --> 00:15:39,846 Bem dentro das próximas semanas vamos mergulhar em todos os tipos 314 00:15:39,846 --> 00:15:42,526 de línguas, mas o primeiro um é um pouco algo 315 00:15:42,526 --> 00:15:43,346 chamado Scratch. 316 00:15:43,346 --> 00:15:46,476 Acontece que Scratch, uma linguagem de programação desenvolvida 317 00:15:46,476 --> 00:15:49,276 pelo Media Lab do MIT, nos proporciona um agradável, 318 00:15:49,426 --> 00:15:51,686 tipo de usuário amigável ambiente gráfico 319 00:15:51,896 --> 00:15:53,646 que pensei que poderia olhar um pouco bonito, 320 00:15:53,796 --> 00:15:57,196 ela realmente é apenas uma encarnação pictórica 321 00:15:57,196 --> 00:15:59,906 das idéias mesmo que estamos vai ser explorar na próxima semana 322 00:16:00,126 --> 00:16:01,656 com apenas um piscar cursor e texto. 323 00:16:01,776 --> 00:16:04,266 Vamos fechar o círculo mais tarde, em do semestre e realmente começar 324 00:16:04,266 --> 00:16:06,136 para criar as coisas como animado novamente. 325 00:16:06,546 --> 00:16:08,546 Programação nesta ferve contexto 326 00:16:08,576 --> 00:16:10,536 para baixo para dizer a computador o que fazer. 327 00:16:10,796 --> 00:16:13,766 Assim, no lado esquerdo desta ambiente línguas particulares 328 00:16:14,006 --> 00:16:16,676 Tenho algumas peças do puzzle e são modeladas e coloridas 329 00:16:16,946 --> 00:16:19,806 de uma forma que sugira a sua funcionalidade; 330 00:16:19,806 --> 00:16:23,106 todos os blocos que contam a Cat como veremos em um momento, 331 00:16:23,106 --> 00:16:25,216 o que fazer alguma coisa acontecer de ser laranja. 332 00:16:25,216 --> 00:16:28,416 Tudo o que diz a ele para sentir algo como o mouse do usuário 333 00:16:28,416 --> 00:16:31,896 ou a borda de sua tela na verdade é na cor roxa; 334 00:16:31,896 --> 00:16:34,186 e assim eles estão muito bem colorida e tudo isso 335 00:16:34,226 --> 00:16:36,246 mas o que é direito de aventura agora é este. 336 00:16:36,426 --> 00:16:37,756 É um puzzle pouco parte que diz 337 00:16:37,756 --> 00:16:40,386 quando a bandeira verde é clicado e este é o tipo 338 00:16:40,386 --> 00:16:42,096 de como o início de um programa; 339 00:16:42,096 --> 00:16:43,246 quando você der um duplo clique em um ícone 340 00:16:43,246 --> 00:16:45,476 no seu desktop este é como algo 341 00:16:45,476 --> 00:16:48,856 como que é implementado, é escuta para que dê um duplo clique, 342 00:16:48,856 --> 00:16:50,576 é ouvindo que a bandeira verde. 343 00:16:50,776 --> 00:16:52,066 Eu estou indo para ir em frente e mude 344 00:16:52,066 --> 00:16:53,966 Looks para esta palete aqui. 345 00:16:54,166 --> 00:16:55,816 Há um monte de blocos que veremos 346 00:16:55,986 --> 00:16:58,306 em detalhe mais divertido na sexta-feira mas eu vou 347 00:16:58,306 --> 00:17:00,416 para escolher o mais fácil aqui e eu vou para digitar 348 00:17:00,416 --> 00:17:03,296 neste string "Olá CS50", 349 00:17:03,296 --> 00:17:06,416 zoom em dizer o quão bonito as peças do puzzle são 350 00:17:06,416 --> 00:17:07,536 muito bem entrelaçados? 351 00:17:07,536 --> 00:17:10,486 E então aqui é o verde bandeira, eu subir aqui e clique, 352 00:17:10,986 --> 00:17:14,486 e com certeza Olá CS50 e este é um programa - 353 00:17:14,676 --> 00:17:17,906 trivial que isso seja, este sugere a relativa facilidade 354 00:17:17,906 --> 00:17:20,256 com o qual você pode começar fiação seus pensamentos em conjunto, 355 00:17:20,456 --> 00:17:23,626 instruindo uma linha de computador linha para fazer alguma coisa para você; 356 00:17:23,816 --> 00:17:26,986 e podemos ir muito depressa a partir de algo simples como este 357 00:17:27,276 --> 00:17:30,166 para algo muito mais dinâmico com algumas peças mais puzzle 358 00:17:30,396 --> 00:17:34,146 mas algo que prova para o que você pode conseguir 359 00:17:34,146 --> 00:17:36,286 em apenas algumas semanas foi implementado 360 00:17:36,286 --> 00:17:38,856 por um ex-aluno em um prazo prévio. 361 00:17:38,856 --> 00:17:43,516 Eu dou-lhe um pouco animação que foi implementado 362 00:17:43,516 --> 00:17:44,846 com esta linguagem de programação 363 00:17:44,846 --> 00:17:48,226 em apenas uma noite chamada Raining Men. 364 00:17:49,516 --> 00:19:21,516 [Música] 365 00:19:22,016 --> 00:19:22,083 [Aplausos] 366 00:19:27,116 --> 00:19:30,016 >> Então, o que você começa a ver mesmo em programas como este, 367 00:19:30,076 --> 00:19:32,616 que eles são realmente muito metódica debaixo da capa 368 00:19:32,616 --> 00:19:34,636 e mesmo que à primeira vista você poderia pensar em si mesmo, 369 00:19:34,696 --> 00:19:37,426 "Eu nunca fiz nada parecido que, eu nunca usei um programa 370 00:19:37,426 --> 00:19:40,026 que não tenha sido re-informando ", se você começar a olhar de perto 371 00:19:40,026 --> 00:19:42,776 o que está na tela, você percebe oh se eu apenas foco 372 00:19:42,776 --> 00:19:46,046 em um desses cantores na primeiro, eu primeiro tenho esse sprite 373 00:19:46,046 --> 00:19:48,886 como é chamado, esta animação personagem, mas não é animado 374 00:19:48,886 --> 00:19:50,896 por padrão muito parecido o gato não se mexeu 375 00:19:50,996 --> 00:19:53,226 e assim eu preciso de algo que nós vamos chamar um loop - 376 00:19:53,226 --> 00:19:56,356 algo que torna este mover sprite de lado a lado 377 00:19:56,356 --> 00:19:57,986 mas não posso deixá-lo ir todo o caminho até a borda. 378 00:19:57,986 --> 00:20:00,416 Assim que eu detectar com o que nós vamos chamar uma condição 379 00:20:00,496 --> 00:20:03,036 se eu estou tocando a borda Eu tenho que essencialmente spin 380 00:20:03,036 --> 00:20:06,116 cerca de 180 graus e em seguida, continuar looping. 381 00:20:06,116 --> 00:20:08,536 E assim, com essas básica blocos de construção, você pode construir 382 00:20:08,536 --> 00:20:10,656 até muito mais interessante coisas e eles não têm 383 00:20:10,656 --> 00:20:12,426 ser animações estáticas como este. 384 00:20:12,686 --> 00:20:15,496 Você pode até mesmo implementar suas próprias versões de alguns 385 00:20:15,496 --> 00:20:17,876 dos mais populares consola de jogos hoje 386 00:20:18,146 --> 00:20:20,146 para que eu preciso outro voluntário. 387 00:20:21,476 --> 00:20:22,296 Sim vamos lá para cima. 388 00:20:22,296 --> 00:20:22,736 Qual é seu nome? 389 00:20:23,356 --> 00:20:23,736 >> Fox. 390 00:20:23,856 --> 00:20:28,976 >> Fox vamos lá para cima e para o seu temos - vamos até yep - 391 00:20:29,756 --> 00:20:31,046 assim o teclado desta vez 392 00:20:32,646 --> 00:20:36,096 para você, temos Scratch, Revolução do zero. 393 00:20:36,286 --> 00:20:42,256 Assim, em um momento você vai vá em frente e bateu a barra de espaço 394 00:20:42,306 --> 00:20:44,606 e depois como as coisas caem do a tela quando linha 395 00:20:44,606 --> 00:20:46,256 com a seta para a esquerda, bater a seta para a esquerda 396 00:20:46,256 --> 00:20:47,566 com diferentes seta, hit que a seta 397 00:20:47,566 --> 00:20:48,986 e ver como um bom pontuação você pode começar. 398 00:20:49,076 --> 00:20:51,586 Então sempre que você está pronto atingiu o espaço. 399 00:20:53,516 --> 00:21:46,566 [Música] 400 00:21:47,066 --> 00:21:47,976 >> Um grande rodada de aplausos. 401 00:21:48,146 --> 00:21:54,846 Muito bem feito. 402 00:21:54,846 --> 00:21:54,913 [Aplausos] 403 00:21:54,913 --> 00:21:57,886 >> Então, essa música feita por um dos nossos ex-alunos; 404 00:21:58,406 --> 00:22:00,916 mas não tem que ser algo escrito em Scratch, 405 00:22:00,916 --> 00:22:02,016 ele não tem que ser um jogo 406 00:22:02,016 --> 00:22:05,156 ou animação pode simplesmente ser um inacreditavelmente, 407 00:22:05,156 --> 00:22:08,926 maravilhosamente maneira de passar o tempo. 408 00:22:08,926 --> 00:22:11,726 Portanto, este é, talvez, um site que alguns 409 00:22:11,726 --> 00:22:14,456 do que você gastou demais muito tempo no ano passado, 410 00:22:14,456 --> 00:22:18,676 se não for na semana passada ou assim, este é isawyouharvard.com. 411 00:22:18,676 --> 00:22:20,546 Esta foi feita por Tej Toor, 412 00:22:20,656 --> 00:22:23,566 uma economia concentrador Mather em Casa, 413 00:22:23,676 --> 00:22:26,046 no ano passado para seu final projeto; 414 00:22:26,046 --> 00:22:29,296 Tej e antes tinha 50 nunca programou antes 415 00:22:29,296 --> 00:22:33,946 e ela se viu completamente mal preparados para os exames finais 416 00:22:33,946 --> 00:22:37,586 como resultado dessa coisa de ter decolado na noite anterior ao 417 00:22:37,656 --> 00:22:40,816 CS50 Fair que vamos discutir um pouco; 418 00:22:41,276 --> 00:22:44,116 antes que ela mandou para fora um e-mail à sua lista da casa 419 00:22:44,456 --> 00:22:47,976 e bam - mil posts mais tarde, ela estava lutando 420 00:22:47,976 --> 00:22:50,096 para adicionar recursos, adicionar funcionalidade 421 00:22:50,266 ---> 00:22:52,226 or start moderating some of the posts. 422 00:22:52,476 ---> 00:22:56,486 It was a wonderfully good problem to have this too 423 00:22:56,486 ---> 00:22:58,336 at the culmination of just a few weeks. 424 00:22:58,336 ---> 00:23:00,576 So what are the expectations 425 00:23:00,576 ---> 00:23:02,236 over the course of these few weeks? 426 00:23:02,436 ---> 00:23:04,316 To attend these lectures in sections-- 427 00:23:04,316 ---> 00:23:06,746 more on that in a moment; to submit 9 problem sets, 428 00:23:06,986 ---> 00:23:11,186 take two quizzes and ultimately design a final project. 429 00:23:11,486 ---> 00:23:15,296 A word about grades-- you may in fact take this course pass-fail. 430 00:23:15,296 ---> 00:23:19,076 In fact one of the frankly best things I ever did 431 00:23:19,076 ---> 00:23:22,116 as an undergraduate was, perhaps fittingly, 432 00:23:22,116 ---> 00:23:24,556 take this course pass-fail. 433 00:23:24,556 ---> 00:23:27,896 I was an undergraduate here in 1995 as a freshman, 434 00:23:28,096 ---> 00:23:30,816 I came in thinking I was going to major in government 435 00:23:30,996 ---> 00:23:33,606 and sure enough I started off on the track; I'd like history, 436 00:23:33,606 ---> 00:23:34,776 I'd like government, English, 437 00:23:34,776 ---> 00:23:36,186 these kinds of things in high school. 438 00:23:36,386 ---> 00:23:40,026 I knew from the relatively limited set of course offerings 439 00:23:40,026 ---> 00:23:42,356 that my school had the things I felt I was good at 440 00:23:42,356 ---> 00:23:44,156 and so I went off on the path. 441 00:23:44,156 ---> 00:23:46,566 I was curious; I was even a user assistant at the time, 442 00:23:46,566 ---> 00:23:48,486 I was certainly a geek at the time and 443 00:23:48,486 ---> 00:23:52,266 yet I had no sense really of what actually went 444 00:23:52,266 ---> 00:23:53,596 on in a classroom like this. 445 00:23:53,596 ---> 00:23:55,746 In fact I used to glance in the window 446 00:23:55,746 ---> 00:23:58,086 at the computer science classes that my high school had 447 00:23:58,086 ---> 00:23:59,316 that some of my friends were taking, 448 00:23:59,606 ---> 00:24:01,006 and they just weren't interesting, 449 00:24:01,006 ---> 00:24:02,486 the problems they were working on were 450 00:24:02,486 ---> 00:24:05,326 like adding some numbers together and moving a cursor 451 00:24:05,326 ---> 00:24:07,916 around the screen-- it was incredibly underwhelming 452 00:24:07,916 ---> 00:24:09,556 and it wasn't until I dived 453 00:24:09,556 ---> 00:24:11,806 into this particular course sophomore year, 454 00:24:11,806 ---> 00:24:14,486 having only gotten over the threshold of discomfort 455 00:24:14,646 ---> 00:24:17,376 by filling out a little pink slip like this that said I'd 456 00:24:17,376 ---> 00:24:19,096 like to enroll in this course pass-fail, 457 00:24:19,366 ---> 00:24:21,726 but I honestly had the courage to venture 458 00:24:21,726 ---> 00:24:23,566 out beyond my comfort zone. 459 00:24:23,566 ---> 00:24:27,396 And five weeks less one day later I decided you know what 460 00:24:27,516 ---> 00:24:30,646 this might actually be for me and I switched from pass-fail 461 00:24:31,306 ---> 00:24:35,016 to letter graded status at that point in time. 462 00:24:35,326 ---> 00:24:37,986 It's an unfortunate thing I think pedagogically 463 00:24:37,986 ---> 00:24:40,356 at this school that there's really not this mindset, 464 00:24:40,386 ---> 00:24:43,636 this mentality on campus that actually exploring new waters, 465 00:24:43,796 ---> 00:24:45,616 perhaps by way of mechanisms 466 00:24:45,616 ---> 00:24:48,886 like pass-fail is actually the norm; I think it's just not part 467 00:24:48,886 ---> 00:24:51,556 of the culture here and I also think that there saying 468 00:24:51,876 ---> 00:24:53,986 in a demographic like this there's perhaps this 469 00:24:54,206 ---> 00:24:55,856 disinclination to say, 470 00:24:56,616 ---> 00:24:59,136 especially when you need an instructor's signature I would 471 00:24:59,136 ---> 00:25:00,796 like to take this course pass-fail, 472 00:25:00,996 ---> 00:25:04,046 let's you think quite reasonably that your peers might think 473 00:25:04,276 ---> 00:25:06,626 that maybe you're taking it pass-fail because you can't 474 00:25:06,766 ---> 00:25:08,586 in fact cut it in a course like this. 475 00:25:08,586 ---> 00:25:10,146 And this is absolutely not true; 476 00:25:10,406 ---> 00:25:13,936 it's for the most part the entire freshman year 477 00:25:13,936 ---> 00:25:16,116 for instance at MIT is taking pass-fail. 478 00:25:16,116 ---> 00:25:18,996 You can similarly explore your sophomore year 479 00:25:18,996 ---> 00:25:21,446 and Harvard thankfully does have this mechanism. 480 00:25:21,636 ---> 00:25:23,266 And so ultimately one of the messages we'd 481 00:25:23,266 ---> 00:25:26,406 like to send today is that if you are the type who's kind 482 00:25:26,406 ---> 00:25:27,976 of on-the-fence don't think this is for you, 483 00:25:27,976 ---> 00:25:31,006 worried about hurting your GPA or anything like that. 484 00:25:31,226 ---> 00:25:33,716 Realize that there's this wonderful mechanism in place 485 00:25:33,716 ---> 00:25:35,636 that allows you to put your toe in the water 486 00:25:35,746 ---> 00:25:38,406 for several weeks no less and then get a sense, 487 00:25:38,406 ---> 00:25:41,396 and then decide whether or not this is something for you. 488 00:25:41,396 ---> 00:25:43,776 So you may take this course ultimately via pass-fail 489 00:25:43,776 ---> 00:25:46,476 or letter grade and I am more than happy to chat with you 490 00:25:46,476 ---> 00:25:49,466 about the implications and to sign any paper work 491 00:25:49,526 ---> 00:25:52,006 such as the stack here that you might need. 492 00:25:52,006 ---> 00:25:55,056 So what are you all like? 493 00:25:55,376 ---> 00:25:58,646 If history is any indication 72% of the people 494 00:25:58,646 ---> 00:26:02,006 in the theater have no prior programming experience; 495 00:26:02,166 ---> 00:26:04,786 despite what you may think and despite the fact that some 496 00:26:04,786 ---> 00:26:05,986 of you may very well be thinking, 497 00:26:06,226 ---> 00:26:09,366 odds are I know the least about computers than anyone in here, 498 00:26:09,676 ---> 00:26:11,436 I'm actually a little scared of my computer. 499 00:26:11,786 ---> 00:26:13,956 There are lots of other people in this course 500 00:26:13,956 ---> 00:26:15,716 and there have been lots of other people 501 00:26:15,716 ---> 00:26:16,686 in this course like you. 502 00:26:17,336 ---> 00:26:20,406 The chart you see here suggests that 72% 503 00:26:20,406 ---> 00:26:23,226 of last year's students had zero prior computer 504 00:26:23,226 ---> 00:26:24,246 science background. 505 00:26:24,476 ---> 00:26:27,156 Moreover there really isn't a typical student in this course. 506 00:26:27,156 ---> 00:26:28,806 We asked students as we will this year 507 00:26:28,996 ---> 00:26:31,776 to describe themselves based on gut instinct early on, 508 00:26:32,016 ---> 00:26:34,596 do you consider yourselves among those less comfortable 509 00:26:34,706 ---> 00:26:37,546 with computers or just the mere idea of being in this class? 510 00:26:37,866 ---> 00:26:39,486 Are you among those more comfortable, 511 00:26:39,486 ---> 00:26:41,906 have you taken any computer science, were you programming 512 00:26:41,906 ---> 00:26:44,406 at the age of 10 but you'd actually like to learn a bit 513 00:26:44,496 ---> 00:26:48,086 about things you don't yet know and challenge yourself 514 00:26:48,126 ---> 00:26:51,226 with new content or are you somewhere in between? 515 00:26:51,546 ---> 00:26:54,296 And so the breakdown that we've had in past terms are just 516 00:26:54,296 ---> 00:26:56,326 under half of the students describe themselves 517 00:26:56,326 ---> 00:26:58,196 as among those less comfortable just 518 00:26:58,196 ---> 00:27:00,656 over 10% among those more comfortable, 519 00:27:00,816 ---> 00:27:03,906 and then with the remaining students are indeed somewhere 520 00:27:03,906 ---> 00:27:04,456 in between. 521 00:27:04,626 ---> 00:27:08,106 And what the course has done to accommodate these varying levels 522 00:27:08,106 ---> 00:27:09,786 of background that come into this course, 523 00:27:10,076 ---> 00:27:12,276 is we offer not only multiple faixas 524 00:27:12,556 ---> 00:27:14,926 so to speak of sections, we'll see in a moment 525 00:27:14,926 ---> 00:27:17,206 that we have different tracts for students less comfortable, 526 00:27:17,206 ---> 00:27:19,746 more comfortable and somewhere in between, and particularly 527 00:27:19,746 ---> 00:27:21,466 for those students more comfortable who are coming 528 00:27:21,466 ---> 00:27:23,356 in with say an AP computer science background, 529 00:27:23,546 ---> 00:27:26,236 may very well know some of the content on the syllabus but like 530 00:27:26,236 ---> 00:27:27,466 to push themselves further. 531 00:27:27,736 ---> 00:27:31,246 Do we offer what we dub packer editions of problem sets 532 00:27:31,246 ---> 00:27:33,076 which extensively cover the same material 533 00:27:33,246 ---> 00:27:35,196 but with a more technical sophistication, 534 00:27:35,196 ---> 00:27:39,046 with more detail, and these are simply options that students 535 00:27:39,046 ---> 00:27:41,516 in this course can elect as per the syllabus. 536 00:27:41,886 ---> 00:27:44,666 So there are also an increasing number of women 537 00:27:44,666 ---> 00:27:46,756 in computer science and particular this course 538 00:27:47,046 ---> 00:27:48,526 which we are thrilled about. 539 00:27:48,526 ---> 00:27:51,286 Over the past couple of years there have been record numbers 540 00:27:51,286 ---> 00:27:53,476 of women enrolling in CS50 specifically 541 00:27:53,476 ---> 00:27:56,566 up from single digits and 20% range years past; 542 00:27:56,906 ---> 00:27:59,726 and this is wonderful because we absolutely think despite the 543 00:27:59,786 ---> 00:28:02,796 faces you may see in high school classes, the faces you may see 544 00:28:02,796 ---> 00:28:05,866 in industry and the press, it is absolutely a field 545 00:28:05,866 ---> 00:28:08,846 that is equally accessible to men and women alike 546 00:28:08,946 ---> 00:28:11,346 so it is 50-50 that we hope to see as a result 547 00:28:11,346 ---> 00:28:13,566 of that reality before long. 548 00:28:13,566 ---> 00:28:15,736 So what is it you actually do? 549 00:28:15,736 ---> 00:28:19,026 As much as I might talk on stage twice a week it turns 550 00:28:19,026 ---> 00:28:21,906 out that it's really by doing and really by diving in 551 00:28:21,906 ---> 00:28:22,836 and getting your hands dirty 552 00:28:22,836 ---> 00:28:25,626 that you really take away the course's lessons. 553 00:28:25,626 ---> 00:28:29,016 Last year for the pieces that do vary year to year a bit, 554 00:28:29,286 ---> 00:28:31,766 last year's first problem set challenged students 555 00:28:31,766 ---> 00:28:34,236 to write their first or maybe second 556 00:28:34,236 ---> 00:28:37,146 or third program using this environment called Scratch. 557 00:28:37,406 ---> 00:28:41,096 And after just a few words on Scratch which we'll look 558 00:28:41,096 ---> 00:28:43,516 at in more detail on Friday will you actually feel 559 00:28:43,516 ---> 00:28:45,676 that you know what, this is actually very intuitive. 560 00:28:45,676 ---> 00:28:48,696 Once you know what pieces to look for, what mental constructs 561 00:28:48,696 ---> 00:28:50,696 to reach for, can you realize all right I want 562 00:28:50,696 ---> 00:28:52,986 to make some dancing figures go back and forth, 563 00:28:52,986 ---> 00:28:56,206 I need to loop this way and loop this way and check if I'm 564 00:28:56,206 ---> 00:28:57,236 on the edge and so forth. 565 00:28:57,406 ---> 00:28:58,616 You begin to realize that all 566 00:28:58,616 ---> 00:29:01,696 of these big seemingly complicated pieces of software 567 00:29:01,696 ---> 00:29:04,786 in websites that you use, if you just hone in on little pieces 568 00:29:04,786 ---> 00:29:06,696 of them at a time and you realize oh I can do 569 00:29:06,696 ---> 00:29:08,246 that and oh I can do that. 570 00:29:08,556 ---> 00:29:10,936 And then really the fun begins when you realize all you have 571 00:29:10,936 ---> 00:29:13,366 to do is now start wiring these ideas together; 572 00:29:13,536 ---> 00:29:16,446 wiring these little bite size problems together and so 573 00:29:16,446 ---> 00:29:18,206 in the end that actually make, per Tej's project, 574 00:29:18,246 ---> 00:29:21,156 a really impressive whole. 575 00:29:22,036 ---> 00:29:26,676 And for Problem Set 0, too, those of you might think Scratch kind 576 00:29:26,676 ---> 00:29:30,076 of imploding since I was 6, well then we'll hand you some 577 00:29:30,076 ---> 00:29:31,976 of these little logic boards which are a variety 578 00:29:31,976 ---> 00:29:34,246 of real world sensors you can connect to your Mac or PC 579 00:29:34,246 ---> 00:29:35,956 and push yourself a little further 580 00:29:35,956 ---> 00:29:37,476 with interactions, with the real world. 581 00:29:37,686 ---> 00:29:40,556 In problem set 1 last year we introduced students to C, 582 00:29:40,556 ---> 00:29:42,336 this is the language we use for a good deal 583 00:29:42,336 ---> 00:29:44,816 of the course before we transition it or it turns 584 00:29:44,816 ---> 00:29:47,786 into a web program but you'll implement a number of problems 585 00:29:47,786 ---> 00:29:49,076 that really get you comfortable 586 00:29:49,286 ---> 00:29:52,496 in what's called the command line environment for lack 587 00:29:52,496 ---> 00:29:54,276 of a more friendly sounding term; 588 00:29:54,576 ---> 00:29:57,656 and an environment called Linux or UNEX 589 00:29:57,886 ---> 00:30:00,946 and really this is not something that might be as foreign to you 590 00:30:00,946 ---> 00:30:02,666 in a week as might be right now. 591 00:30:02,666 ---> 00:30:04,976 We introduce throughout this semester real world 592 00:30:04,976 ---> 00:30:06,016 problem domains. 593 00:30:06,016 ---> 00:30:07,406 Last year we challenged students 594 00:30:07,406 ---> 00:30:10,236 to implement their own encryptions ciphers that's 595 00:30:10,456 ---> 00:30:13,946 perhaps a common need these days to want to scramble or encrypt, 596 00:30:13,946 ---> 00:30:16,396 to secure your information; whether it's a credit card, 597 00:30:16,676 ---> 00:30:19,396 whether it's instant messages, or e-mails; simply any kind 598 00:30:19,396 ---> 00:30:21,166 of information you don't want people to see-- 599 00:30:21,296 ---> 00:30:23,076 well we talk about how you yourselves 600 00:30:23,076 ---> 00:30:26,796 in the second week can implement some of these so-called ciphers 601 00:30:26,796 ---> 00:30:30,236 with which to protect your own privacy and security. 602 00:30:30,236 ---> 00:30:33,106 The week after we implemented the so-called game of 15, 603 00:30:33,106 ---> 00:30:34,036 this little party favor 604 00:30:34,036 ---> 00:30:36,066 where you move the numbers up, down, left or right. 605 00:30:36,306 ---> 00:30:38,536 In just a couple of weeks can you start implementing things 606 00:30:38,756 ---> 00:30:41,406 that take input from users; and if you really want 607 00:30:41,406 ---> 00:30:43,536 to push yourselves with that particular week can you 608 00:30:43,536 ---> 00:30:45,316 implement what we dub God mode. 609 00:30:45,316 ---> 00:30:47,306 You can play not against yourself; 610 00:30:47,566 ---> 00:30:49,866 you can program the computer to play against yourself-- 611 00:30:49,866 ---> 00:30:51,336 you can program the computer to play against you. 612 00:30:51,336 ---> 00:30:53,046 And so that's a little something for those 613 00:30:53,046 ---> 00:30:54,066 of you more comfortable. 614 00:30:54,066 ---> 00:30:55,756 And then Sudoku we did last year 615 00:30:55,986 ---> 00:30:57,616 where it actually becomes a little more interesting 616 00:30:57,616 ---> 00:31:00,156 where we start providing students not with a blank slate, 617 00:31:00,306 ---> 00:31:02,436 but with some distribution code. 618 00:31:02,436 ---> 00:31:04,916 We hand you a bunch of programming code that we wrote 619 00:31:04,996 ---> 00:31:07,066 because this is very much the norm in the real world. 620 00:31:07,066 ---> 00:31:09,366 You're not going to start for the rest of your life 621 00:31:09,366 ---> 00:31:11,336 if you ever need to solve a problem with a computer 622 00:31:11,576 ---> 00:31:13,516 from scratch, odds are you're going to reach 623 00:31:13,576 ---> 00:31:17,206 for some off the shelf packages or libraries or tools 624 00:31:17,346 ---> 00:31:20,416 that other people wrote so that people like us don't have 625 00:31:20,456 ---> 00:31:22,406 to reinvent the wheel again and again. 626 00:31:22,406 ---> 00:31:23,376 What do I mean by wheel? 627 00:31:23,576 ---> 00:31:25,446 If you want to get some input from the user, 628 00:31:25,656 ---> 00:31:28,586 my God I don't want to have to program it to low level zero 629 00:31:28,586 ---> 00:31:30,866 and 1 just to get keys from the keyboard; 630 00:31:30,866 ---> 00:31:33,156 please let there have been someone who does that for me 631 00:31:33,406 ---> 00:31:36,216 and indeed there are an increasingly sophisticated 632 00:31:36,216 ---> 00:31:38,156 options that you can pull off the shelf. 633 00:31:38,156 ---> 00:31:42,406 In problem set 5, last year I took a stroll around campus 634 00:31:42,406 ---> 00:31:44,566 with one of the teaching fellows with his digital camera, 635 00:31:44,836 ---> 00:31:47,176 we shot photographs of identifiable 636 00:31:47,176 ---> 00:31:49,766 but non-obvious spots on campus and then 637 00:31:49,766 ---> 00:31:51,066 like an idiot I always seem 638 00:31:51,066 ---> 00:31:53,846 to erase my compact flashcard accidentally. 639 00:31:54,066 ---> 00:31:55,906 But no matter, I spent a year 640 00:31:56,346 ---> 00:31:58,976 in graduate school doing forensic research and working 641 00:31:58,976 ---> 00:32:01,486 for the local Middlesex DA's office where I learned how 642 00:32:01,486 ---> 00:32:03,246 to make a so-called forensic image 643 00:32:03,286 ---> 00:32:05,676 of a digital camera's media card. 644 00:32:05,676 ---> 00:32:09,426 And so we do this very much real world, we grab all of the 0's 645 00:32:09,426 ---> 00:32:13,746 and 1's that have been erased or mangled somehow by my mistake, 646 00:32:14,016 ---> 00:32:16,886 I then hand that to every student in the class a file 647 00:32:17,086 ---> 00:32:19,586 that contains all of those 0's and 1's 648 00:32:19,586 ---> 00:32:22,496 and they're then challenged to recover those jpegs 649 00:32:22,756 ---> 00:32:26,296 by writing a program from the start of those 0's and 1's 650 00:32:26,366 ---> 00:32:28,816 to the end of them, looking for the patterns that it turns 651 00:32:28,816 ---> 00:32:32,666 out identify these things all of you know as jpegs or photographs 652 00:32:32,666 ---> 00:32:35,476 that you probably everyday upload or look at on sites 653 00:32:35,536 ---> 00:32:36,836 like Facebook and the like. 654 00:32:37,046 ---> 00:32:40,506 It turns out they're relatively simple to find even 655 00:32:40,506 ---> 00:32:42,316 when they've been deleted whether accidentally 656 00:32:42,316 ---> 00:32:44,346 or in some cases intentionally-- 657 00:32:45,046 ---> 00:32:47,486 that too is part of the job undeleting things 658 00:32:47,486 ---> 00:32:48,446 that people had deleted. 659 00:32:48,796 ---> 00:32:52,436 And then we hand you 140,000 English words in the form 660 00:32:52,436 ---> 00:32:56,666 of a big text file much like our aspiring pre-med students 661 00:32:56,666 ---> 00:32:58,326 in recent months, and we challenge you 662 00:32:58,326 ---> 00:33:01,216 to implement the fastest spellchecker possible. 663 00:33:01,416 ---> 00:33:05,686 We challenge you to use little RAM, memory as few CPU cycles 664 00:33:05,726 ---> 00:33:08,106 to write your program as fast as possible 665 00:33:08,256 ---> 00:33:10,426 and the funny thing here is, is that this tends 666 00:33:10,426 ---> 00:33:11,596 to be historically the piece 667 00:33:11,596 ---> 00:33:13,796 that students put the most time into; 668 00:33:14,006 ---> 00:33:16,306 not at all because it requires the most time; 669 00:33:16,306 ---> 00:33:18,736 not at all because it's the hardest or anything like that, 670 00:33:19,006 ---> 00:33:22,246 but because we add on an often basis those sufficiently 671 00:33:22,246 ---> 00:33:24,756 comfortable with the idea of displaying their name 672 00:33:24,756 ---> 00:33:26,446 on the course's website you can choose 673 00:33:26,446 ---> 00:33:29,786 to show your running time; show the amount of RAM you're using 674 00:33:30,046 ---> 00:33:31,436 on the course's homepage, 675 00:33:31,586 ---> 00:33:34,626 and it's this fascinating pedagogical motivational tool 676 00:33:34,626 ---> 00:33:35,316 where you do this. 677 00:33:35,556 ---> 00:33:37,706 You then go to dinner, you come back and you realize 678 00:33:37,706 ---> 00:33:40,386 that your roommate has now vested you by five seconds 679 00:33:40,746 ---> 00:33:43,186 and three hours later you've inched ahead again 680 00:33:43,186 ---> 00:33:46,056 so it's a wonderfully motivational tool; 681 00:33:46,696 ---> 00:33:50,626 and speaks to just how addictive frankly this stuff was 682 00:33:50,626 ---> 00:33:51,636 and that too for me. 683 00:33:51,756 ---> 00:33:53,966 And this may or may not be the case for you yourself, 684 00:33:54,256 ---> 00:33:56,466 but one of the realizations I had in college 685 00:33:56,466 ---> 00:33:59,836 when venturing beyond my comfort zone engulfed toward these 686 00:33:59,836 ---> 00:34:02,546 waters of CS was wow like there's no cliche. 687 00:34:02,726 ---> 00:34:05,776 Like homework for me at the time was actually fun 688 00:34:05,816 ---> 00:34:07,516 and there is some addictive about this; 689 00:34:07,516 ---> 00:34:13,036 and I even asked Tej during last year's final exam period. 690 00:34:13,286 ---> 00:34:15,806 And then toward the end of the semester do we transition away 691 00:34:15,806 ---> 00:34:19,036 from this lower level language known as C and certainly Scratch 692 00:34:19,336 ---> 00:34:20,656 to things more familiar. 693 00:34:20,866 ---> 00:34:23,386 Towards the end of the semester do we introduce what languages 694 00:34:23,386 ---> 00:34:28,176 like PHP and SQL, HTML, CSS, to varying degrees, 695 00:34:28,436 ---> 00:34:31,616 but with them can you implement the same kinds of ideas 696 00:34:31,616 ---> 00:34:34,526 that you might have in your mind in the context of a web page. 697 00:34:34,526 ---> 00:34:35,806 And increasingly that is 698 00:34:35,806 ---> 00:34:38,256 where the human computer interaction is, 699 00:34:38,466 ---> 00:34:40,736 and so will you be empowered by terms and not to just 700 00:34:40,736 ---> 00:34:43,876 to make a website per se but to make an application, 701 00:34:43,956 ---> 00:34:45,076 something that's of interest to you, 702 00:34:45,076 ---> 00:34:46,156 something that solves problems, 703 00:34:46,376 ---> 00:34:48,786 something that lets you tell someone 704 00:34:48,786 ---> 00:34:50,726 through the most electronic means possible 705 00:34:50,726 ---> 00:34:53,916 that you saw them somewhere on campus. 706 00:34:53,916 ---> 00:34:57,056 In the case of last year we did hand students some code 707 00:34:57,056 ---> 00:34:59,446 with which they could write programs that talked 708 00:34:59,446 ---> 00:35:02,746 to Yahoo Finance, finance.yahoo.com, free website. 709 00:35:02,966 ---> 00:35:04,786 Turns out they make stock data and the 710 00:35:04,786 ---> 00:35:07,646 like available essentially via text files 711 00:35:07,646 ---> 00:35:11,186 or via a simple API application programming interface 712 00:35:11,486 ---> 00:35:12,846 which will be one of the themes of the course. 713 00:35:13,036 ---> 00:35:16,036 And with this data, where students were able 714 00:35:16,036 ---> 00:35:19,036 to implement last year their own E-trade-like website; 715 00:35:19,216 ---> 00:35:21,996 whereby you have accounts and you log in your hand age 716 00:35:21,996 ---> 00:35:24,446 of your users 10,000 virtual dollars 717 00:35:24,446 ---> 00:35:27,796 and with them can they get stock quotes, by stocks, sell stocks 718 00:35:27,796 ---> 00:35:29,796 and the like, all of this accomplished just 719 00:35:29,796 ---> 00:35:31,506 after a few weeks time. 720 00:35:31,506 ---> 00:35:33,916 And last year to did we hand students Google maps, 721 00:35:33,916 ---> 00:35:37,076 Google news, asked them to mash those two very familiar real 722 00:35:37,076 ---> 00:35:39,106 world products together so that they had a map 723 00:35:39,246 ---> 00:35:41,566 of the United States, little markers sprinkled throughout, 724 00:35:41,776 ---> 00:35:43,296 that indicated exactly 725 00:35:43,296 ---> 00:35:46,746 where there were current events going on. 726 00:35:46,746 ---> 00:35:49,986 So how do we get you from for many of you zero 727 00:35:49,986 ---> 00:35:52,546 to 60 miles per hour after just 11 weeks, 728 00:35:52,806 ---> 00:35:54,876 well like many courses here is the course structured 729 00:35:54,876 ---> 00:35:57,286 around not only lectures for conceptual introductions, 730 00:35:57,526 ---> 00:35:59,736 but sections, office hours and walkthroughs. 731 00:35:59,956 ---> 00:36:03,256 So in sections where you have the opportunity to work 732 00:36:03,256 ---> 00:36:05,646 in smaller environments with one of the teaching fellows, 733 00:36:06,496 ---> 00:36:09,166 in office hours we have an opportunity to work one on one, 734 00:36:09,166 ---> 00:36:11,416 hands-on in the computer lab or else we're on campus 735 00:36:11,416 ---> 00:36:13,796 and really get personalized attention when it comes 736 00:36:13,796 ---> 00:36:15,506 to diving into these problems. 737 00:36:15,896 ---> 00:36:18,706 And similarly, particularly for those less comfortable, 738 00:36:18,706 ---> 00:36:21,586 do we offer prior to the start of each week for a new piece 739 00:36:21,586 ---> 00:36:23,926 at what we dub a walkthrough whereby one 740 00:36:23,926 ---> 00:36:25,896 of the teaching fellows will literally start 741 00:36:25,896 ---> 00:36:28,626 on the first page, give you a mental framework 742 00:36:28,626 ---> 00:36:31,156 for the week's problems and talk about the ideas that it covers, 743 00:36:31,376 ---> 00:36:33,986 and then walk through the piece set so that you have a roadmap 744 00:36:34,106 ---> 00:36:35,416 of sorts that you can follow. 745 00:36:35,416 ---> 00:36:37,756 So that you're not just handed something that's entirely new 746 00:36:37,756 ---> 00:36:40,376 to you with no idea which direction to go, 747 00:36:40,486 ---> 00:36:44,046 we actually do set you off on an appropriate path. 748 00:36:44,046 ---> 00:36:46,306 And towards that end to give you a sense of the size 749 00:36:46,306 ---> 00:36:48,346 of the support structure in place for this course, 750 00:36:48,776 ---> 00:36:52,166 this is the size at the moment of CS50's staff inclusive 751 00:36:52,246 ---> 00:36:54,616 of teaching fellows, course assistants, myself, 752 00:36:54,906 ---> 00:36:55,926 as well as folks who help 753 00:36:55,926 ---> 00:36:57,466 with our video production e assim por diante. 754 00:36:57,686 ---> 00:37:02,496 Course assistants as we use the jargon are alumni of CS50 755 00:37:02,586 ---> 00:37:04,386 who return to the course for a couple 756 00:37:04,386 ---> 00:37:07,346 of hours a week having taken it in prior years, to help you, 757 00:37:07,346 ---> 00:37:10,286 the newest batch of students, one on one with office hours, 758 00:37:10,286 ---> 00:37:13,016 with problem sets; and similarly do the CS function 759 00:37:13,266 ---> 00:37:14,886 as they might in many courses. 760 00:37:15,126 ---> 00:37:18,006 Office hours tend to happen in this very beautiful place, 761 00:37:18,006 ---> 00:37:20,506 at least beautiful according to this picture, never quite feels 762 00:37:20,506 ---> 00:37:23,106 like that when you're walking in to it; but we're very excited 763 00:37:23,106 ---> 00:37:25,336 to say that one of the directions 764 00:37:25,336 ---> 00:37:27,316 in which the Harvard School of Engineering 765 00:37:27,316 ---> 00:37:28,676 which is a relatively new entity 766 00:37:28,676 ---> 00:37:32,246 on campus has been putting together this summer 767 00:37:32,246 ---> 00:37:37,666 with four undergraduates on campus social and learning 768 00:37:37,666 ---> 00:37:40,116 and teaching space; whereby the goal is 769 00:37:40,116 ---> 00:37:42,016 to actually provide students like yourselves 770 00:37:42,016 ---> 00:37:44,396 with an opportunity to interact with each other whether it's 771 00:37:44,396 ---> 00:37:49,376 to work on P sets, talk, relax, and as you'll see game. 772 00:37:49,376 ---> 00:37:50,886 It turns out that this space 773 00:37:50,886 ---> 00:37:54,086 to which you'll have access throughout the year dubbed the 774 00:37:54,086 ---> 00:37:56,636 lounge, has not only white boards and screens 775 00:37:56,636 ---> 00:38:00,596 for teaching purposes; we may have also slipped in an Xbox, 776 00:38:00,596 ---> 00:38:01,996 a Wii and the PlayStation 777 00:38:02,416 ---> 00:38:06,726 which actually does help make homework fun. 778 00:38:06,726 ---> 00:38:08,916 Thanks to some friends there's a foosball table, 779 00:38:08,916 ---> 00:38:09,896 there's a candy machine 780 00:38:09,896 ---> 00:38:11,466 and there's also a cat in the ceiling. 781 00:38:12,096 ---> 00:38:16,486 So the so-called lounge what you'll be able to find 782 00:38:16,486 ---> 00:38:18,156 in just a week or so is timed with the first 783 00:38:18,156 ---> 00:38:21,576 of the office hours if you so choose to join us for them. 784 00:38:21,836 ---> 00:38:24,786 Also one of the most useful resources you'll find is the 785 00:38:24,786 ---> 00:38:27,466 course's website; where not only will the obvious be posted 786 00:38:27,466 ---> 00:38:30,256 like handouts and such, pests in the syllabus, 787 00:38:30,496 ---> 00:38:32,996 but there will also be a variety of tools that you can turn 788 00:38:32,996 ---> 00:38:33,686 to over the course 789 00:38:33,686 ---> 00:38:36,336 of the semester including our own videos. 790 00:38:36,336 ---> 00:38:37,946 As you can tell from the cameras, the course is 791 00:38:37,946 ---> 00:38:40,696 in fact filmed for reasons of distance education 792 00:38:40,696 ---> 00:38:43,696 and your benefit for review; we've been working 793 00:38:43,846 ---> 00:38:47,266 on this past summer what we dubbed cs50.tv 794 00:38:47,266 ---> 00:38:49,866 which is our own delivery mechanism for these videos. 795 00:38:49,866 ---> 00:38:51,746 Though this is always a bit awkward since you're 796 00:38:51,746 ---> 00:38:54,416 about to see myself seeing myself, 797 00:38:54,816 ---> 00:38:57,786 we have put together this new 798 00:38:57,786 ---> 00:39:01,556 and improved user interface this year whereby 799 00:39:01,726 ---> 00:39:05,046 after a few days time will each lecture be available via the 800 00:39:05,046 ---> 00:39:07,366 website, and which you'll notice too flanking it 801 00:39:07,366 ---> 00:39:12,766 on the right hand side will be a complete English transcript 802 00:39:12,766 ---> 00:39:16,526 of everything that comes up during lecture. 803 00:39:16,526 ---> 00:39:18,286 And so being computer scientists, 804 00:39:18,286 ---> 00:39:21,426 being programmers having taken CS50 that we read a little code 805 00:39:21,606 ---> 00:39:24,006 that synchronizes the words that are highlighted in the screen 806 00:39:24,006 ---> 00:39:26,636 with the words that though on this very dark screen are coming 807 00:39:26,636 ---> 00:39:27,796 out of my mouth in your hands; 808 00:39:28,026 ---> 00:39:30,796 we also thought it would be a little fun just partly 809 00:39:30,796 ---> 00:39:35,246 because we can, and partly for accessibility purposes for folks 810 00:39:35,246 ---> 00:39:38,456 who might tune into the course's open courseware material thanks 811 00:39:38,456 ---> 00:39:42,466 to Google translate, do I now speak nearly fluent Spanish. 812 00:39:42,496 ---> 00:39:44,316 If you'd like to see me subtitled 813 00:39:44,316 ---> 00:39:48,236 in Spanish can you actually watch CS50 this year in Spanish 814 00:39:48,236 ---> 00:39:50,666 and soon two dozen languages? 815 00:39:50,996 ---> 00:39:53,906 It's imperfect, though the English is quite spot on, 816 00:39:53,906 ---> 00:39:55,866 I call myself during this lecture a couple 817 00:39:55,866 ---> 00:39:57,576 of times a major government 818 00:39:57,916 ---> 00:40:01,566 because gov major didn't quite translate very perfectly. 819 00:40:02,376 ---> 00:40:07,876 So what can you expect in terms of the preparation 820 00:40:07,876 ---> 00:40:10,496 and the fundamentals that will empower you ultimately 821 00:40:10,496 ---> 00:40:12,046 to tackle projects like these? 822 00:40:12,266 ---> 00:40:14,866 Well this Friday when we start our lucky computer science 823 00:40:14,866 ---> 00:40:18,806 itself and introduce Scratch, the programming language 824 00:40:18,806 ---> 00:40:20,686 in an environment we looked at, but also some 825 00:40:20,686 ---> 00:40:22,686 of the fundamentals that we'll lace throughout the course. 826 00:40:22,916 ---> 00:40:26,866 In week 1 computer scientists for those unindoctrinated yet, 827 00:40:27,086 ---> 00:40:30,586 start counting from 0 typically, you may notice the astute 828 00:40:30,626 ---> 00:40:32,696 that when we did our self-counting exercise I had 829 00:40:32,696 ---> 00:40:34,356 to number the steps from 1 to 4; 830 00:40:34,466 ---> 00:40:37,136 it's only because Keynote does not actually let you start at 0 831 00:40:37,136 ---> 00:40:39,206 which is perhaps the norm for normal people anyway; 832 00:40:39,506 ---> 00:40:42,686 but with Week 1 we'll look at C and some of the basics 833 00:40:42,686 ---> 00:40:44,446 of computer science as they relate 834 00:40:44,446 ---> 00:40:46,266 to actually manipulating a computer. 835 00:40:46,466 ---> 00:40:50,096 In Week 2 we'll look at things like cryptography and functions 836 00:40:50,096 ---> 00:40:53,606 and the tools that by which you begin to assemble solutions 837 00:40:53,606 ---> 00:40:56,646 to problems; in Week 3 we'll introduce what are generally 838 00:40:56,646 ---> 00:40:59,226 known as algorithms and data structures; 839 00:40:59,226 ---> 00:41:02,476 mechanisms by which you can solve problems more efficiently, 840 00:41:02,476 ---> 00:41:03,376 de forma eficaz. 841 00:41:03,656 ---> 00:41:08,196 What we'll introduce in Week 4 additional lower level details 842 00:41:08,196 ---> 00:41:10,406 which really interesting about a computer is 843 00:41:10,406 ---> 00:41:13,196 that there are these very familiar things like RAM 844 00:41:13,196 ---> 00:41:16,416 and disk space and the like, but it terms out with just a modicum 845 00:41:16,416 ---> 00:41:19,296 of experience with manipulating the computer by way 846 00:41:19,296 ---> 00:41:22,286 of programming, can you actually now use that memory 847 00:41:22,426 ---> 00:41:25,956 as you see fit, put 0's and 1's in data wherever you see fit; 848 00:41:25,956 ---> 00:41:29,296 and in the case of the forensic problem set even extract it 849 00:41:29,296 ---> 00:41:31,836 as someone perhaps did not want you to find. 850 00:41:32,016 ---> 00:41:35,446 For those perhaps familiar with some 851 00:41:35,446 ---> 00:41:38,056 of the jargon do we introduce what we call link lists 852 00:41:38,056 ---> 00:41:39,386 and hash tables and tries, 853 00:41:39,386 ---> 00:41:42,126 increasingly sophisticated data structures, that allow us 854 00:41:42,126 ---> 00:41:45,746 to solve problems that are much bigger and much more interesting 855 00:41:45,926 ---> 00:41:48,286 than the very familiar one that we started with here. 856 00:41:48,486 ---> 00:41:51,216 We transition to actually real world applications later 857 00:41:51,216 ---> 00:41:54,456 on like a compression-- how do you take a huge amount of data 858 00:41:54,676 ---> 00:41:57,196 and actually whittle it down into something more manageable; 859 00:41:57,196 ---> 00:41:59,136 something that uses less of your disk space. 860 00:41:59,446 ---> 00:42:01,766 We then look toward the end of the semester at these languages 861 00:42:01,766 ---> 00:42:03,916 that you've might have heard of now, the acronyms therefore 862 00:42:04,146 ---> 00:42:08,966 like HTML and HTTP, PHP and SQL and the like. 863 00:42:08,966 ---> 00:42:10,246 And then after that we look 864 00:42:10,246 ---> 00:42:12,436 at what's increasingly trendy and compelling. 865 00:42:12,436 ---> 00:42:14,016 A lot of the features you yourself use 866 00:42:14,016 ---> 00:42:16,356 in Facebook these days are very much dynamic. 867 00:42:16,406 ---> 00:42:17,736 Things are moving and changing 868 00:42:17,816 ---> 00:42:19,546 without the whole page reloading; 869 00:42:19,546 ---> 00:42:21,276 when we looked towards the end of the semester 870 00:42:21,276 ---> 00:42:23,436 at implementing these increasingly dynamic, 871 00:42:24,016 ---> 00:42:28,946 Ajax enabled websites much like the ones we all use today. 872 00:42:28,946 ---> 00:42:32,766 But truly the climax of this course is what we've dubbed the 873 00:42:32,766 ---> 00:42:33,706 CS50 Fair. 874 00:42:33,706 ---> 00:42:35,966 Towards semester's end you will have the opportunity 875 00:42:36,316 ---> 00:42:41,156 to choose a project to work on, choose a project 876 00:42:41,316 ---> 00:42:45,306 that is entirely of your own choice to execute. 877 00:42:45,676 ---> 00:42:49,616 And waiting for you across the street ultimately will be a 878 00:42:49,616 ---> 00:42:52,486 whole lot of balloons, a whole lot of candy, family, friends. 879 00:42:52,706 ---> 00:42:55,956 Last year's event was attended by 1,000 plus attendees 880 00:42:55,956 ---> 00:42:59,326 and it will be an opportunity for you to really mingle 881 00:42:59,506 ---> 00:43:01,586 and to conclude the course with a look at your 882 00:43:01,726 ---> 00:43:03,206 and other friends' projects. 883 00:43:03,256 ---> 00:43:08,936 But also this year you will see a whole variety of achievements. 884 00:43:08,936 ---> 00:43:10,496 So though you'll find yourself playing 885 00:43:10,496 ---> 00:43:14,776 with Scratch toward term's start, playing with C 886 00:43:14,776 ---> 00:43:17,056 and similar languages toward term's middle, 887 00:43:17,296 ---> 00:43:20,166 you'll see last year that when you end up producing yourselves 888 00:43:20,166 ---> 00:43:23,766 and seeing ads for CS50 Fair are all types of problems 889 00:43:23,766 ---> 00:43:25,096 and applications being solved. 890 00:43:25,096 ---> 00:43:28,046 This quick list here suggests last year's students implemented 891 00:43:28,046 ---> 00:43:31,196 Android apps for their phones, Facebook apps, applications 892 00:43:31,196 ---> 00:43:33,426 for iPhone and iPods; applications for Mac OS; 893 00:43:33,426 ---> 00:43:34,936 things involving SOS and the 894 00:43:35,426 ---> 00:43:40,266 like whereby you can actually send text messages 895 00:43:40,466 ---> 00:43:43,176 to a program you wrote and get back a response, 896 00:43:43,206 ---> 00:43:44,876 much like you can for those familiar 897 00:43:45,116 ---> 00:43:48,256 with this other CS50 App called Shuttleboy. 898 00:43:48,256 ---> 00:43:52,766 The images you'll see are a little something like this-- 899 00:43:52,766 ---> 00:43:56,396 absolutely mesmerizing what will be on each of your screens 900 00:43:56,396 ---> 00:43:59,886 and oh there is also some popcorn toward term's end. 901 00:44:00,156 ---> 00:44:03,006 But we will also introduce towards the end of this semester 902 00:44:03,006 ---> 00:44:08,726 in an effort to really make it okay to stay up all night, 903 00:44:08,726 ---> 00:44:10,726 will be the first ever CS50 hack-a-thon. 904 00:44:10,976 ---> 00:44:13,846 This will be optional, given the late hour, 905 00:44:14,086 ---> 00:44:16,916 this will be probably bean innovation I will completely 906 00:44:16,916 ---> 00:44:21,756 regret to the night before; but what we will do is model this 907 00:44:21,756 ---> 00:44:25,216 after an event that happens at MIT quite often, 908 00:44:25,216 ---> 00:44:26,676 at Facebook quite often; 909 00:44:26,886 ---> 00:44:29,516 at 9 p.m. there will be served some pizza; 910 00:44:29,516 ---> 00:44:32,146 at 2 a.m. there will be Chinese food 911 00:44:32,326 ---> 00:44:33,556 and for anyone left standing 912 00:44:33,556 ---> 00:44:36,406 at 6 a.m. there will be a field trip to IHOP in the square. 913 00:44:36,706 ---> 00:44:38,446 What is the goal of these 10 hours? 914 00:44:38,626 ---> 00:44:40,576 Well partly this is just for fun-- 915 00:44:40,686 ---> 00:44:44,066 this is what computer people sometimes do, intentionally 916 00:44:44,066 ---> 00:44:47,556 or unintentionally but as also will see a really nice way 917 00:44:47,556 ---> 00:44:49,656 to culminate the semester and frankly carve 918 00:44:49,656 ---> 00:44:52,096 out a 10 hour block where you can bite off your final 919 00:44:52,096 ---> 00:44:55,086 project's implementation surrounded by friends 920 00:44:55,086 ---> 00:44:55,906 and the course's staff. 921 00:44:56,296 ---> 00:44:58,826 But if you're the type who prefers to be bed by midnight, 922 00:44:59,036 ---> 00:45:00,966 that's quite okay too; there'll be plenty of time 923 00:45:00,966 ---> 00:45:02,566 to work on the project. 924 00:45:02,806 ---> 00:45:05,946 Why don't we go ahead for those of you who need a bit 925 00:45:05,946 ---> 00:45:08,876 of a rest bit, let's take a two minute break and we'll resume 926 00:45:08,876 ---> 00:45:10,976 with just some final thoughts on 50. 927 00:45:11,516 ---> 00:45:15,636 [ Break ] 928 00:45:16,136 ---> 00:45:21,006 >> We are back so a quote that's been on CS50's website 929 00:45:21,006 ---> 00:45:22,256 for several years now, 930 00:45:22,256 ---> 00:45:24,126 long enough that we're not actually not sure 931 00:45:24,126 ---> 00:45:26,796 who first said it; but that really captures we all think the 932 00:45:26,796 ---> 00:45:29,276 spirit of this course is this one here, "Demanding 933 00:45:29,276 ---> 00:45:33,116 but definitely doable, social but educational, a focused topic 934 00:45:33,116 ---> 00:45:34,676 but broadly applicable skills, 935 00:45:34,736 ---> 00:45:37,426 CS50 is the quintessential Harvard course." 936 00:45:37,426 ---> 00:45:40,816 Every one of you standing behind me and this is only like half 937 00:45:40,816 ---> 00:45:44,756 of them, have taken this course or one like it and are here 938 00:45:44,976 ---> 00:45:47,506 as your support for the entire semester. 939 00:45:47,966 ---> 00:45:50,856 In particular let me draw your attention to these two folks 940 00:45:50,856 ---> 00:45:52,666 on the end who's probably come a little close 941 00:45:52,666 ---> 00:45:54,276 to my microphone to say hello. 942 00:45:54,626 ---> 00:45:58,766 Cansu Aydede and Yuhki Yamashita, the course's head teaching fellows [applause] 943 00:46:01,026 ---> 00:46:03,686 and our leaders from Mather House 944 00:46:03,686 ---> 00:46:06,226 and Eliot House respectively would 945 00:46:06,226 ---> 00:46:09,606 like to say a little hello to you. 946 00:46:12,626 ---> 00:46:16,046 >> Hello, welcome to CS50. 947 00:46:16,916 ---> 00:46:18,856 Well I've been taking this course or I've been part 948 00:46:18,856 ---> 00:46:21,176 of this course for the last three years so every years 949 00:46:21,176 ---> 00:46:22,566 at Harvard I've been part of CS50 950 00:46:22,606 ---> 00:46:27,236 and it's a really special class or organization 951 00:46:27,236 ---> 00:46:28,696 to be a part of-- really a family 952 00:46:28,696 ---> 00:46:30,586 and I think Cansu will talk a little bit 953 00:46:30,586 ---> 00:46:32,316 about that. 954 00:46:34,116 ---> 00:46:38,446 But yeah we're all excited to have you here 955 00:46:38,446 ---> 00:46:42,046 and we have all sorts of things planned outside of problem sets 956 00:46:42,046 ---> 00:46:44,056 and we have the Fair and everything 957 00:46:44,056 ---> 00:46:45,756 that David has been talking 958 00:46:45,756 ---> 00:46:49,426 about so we're really excited to start so. 959 00:46:49,676 ---> 00:46:53,346 >> Thanks Yuhki, so CS50 is a da família. 960 00:46:54,196 ---> 00:46:55,606 This is what I'm supposed to tell you guys 961 00:46:55,606 ---> 00:46:57,556 and we're all here to help you out. 962 00:46:57,556 ---> 00:47:01,086 I am a senior in Eliot House 963 00:47:01,086 ---> 00:47:04,726 and this is my fourth year getting involved with CS50 964 00:47:04,726 ---> 00:47:07,656 and that's the reason why a lot of CS 965 00:47:07,656 ---> 00:47:11,086 and everybody else comes back on this stage 966 00:47:11,086 ---> 00:47:15,386 because we all love CS50 and we all love to be a part 967 00:47:15,386 ---> 00:47:18,156 of this family again; so welcome to the family. 968 00:47:18,156 ---> 00:47:20,346 And if you have any questions we're here for you. 969 00:47:20,346 ---> 00:47:21,486 >> David: So we're here for you 970 00:47:22,086 ---> 00:47:23,976 and we asked last year's students 971 00:47:24,006 ---> 00:47:28,136 for some choice words we could offer to this year's students. 972 00:47:28,246 ---> 00:47:29,476 There's of course the queue guy 973 00:47:29,476 ---> 00:47:31,016 but we survey students throughout the term 974 00:47:31,016 ---> 00:47:34,566 and we asked them a matter of fact what should we communicate 975 00:47:34,736 ---> 00:47:36,346 to this semester's student body. 976 00:47:36,566 ---> 00:47:39,806 Perhaps a mistake with some of the answers we got but one 977 00:47:39,806 ---> 00:47:41,576 of our choice favorites was this one 978 00:47:41,576 ---> 00:47:44,916 and it's actually fairly worth drawing one's attention to 979 00:47:44,916 ---> 00:47:46,776 and that's this: I planned on taking the class 980 00:47:46,776 ---> 00:47:48,976 as a freshman then convinced myself otherwise 981 00:47:48,976 ---> 00:47:51,136 because I couldn't fit it into my workload. 982 00:47:51,386 ---> 00:47:54,216 Same story for sophomore, same story for junior year, 983 00:47:54,286 ---> 00:47:55,906 I finally took it senior year 984 00:47:56,006 ---> 00:47:58,716 because they wouldn't get another chance even though it 985 00:47:58,746 ---> 00:48:01,126 still doesn't fit in the workload ha ha. 986 00:48:01,806 ---> 00:48:05,056 So I pulled this one out of our archives 987 00:48:05,126 ---> 00:48:07,646 because of precisely that reason. 988 00:48:07,646 ---> 00:48:10,126 It's very easy to get caught up in one's own studies here; 989 00:48:10,126 ---> 00:48:13,496 and even I freshman year, dove into a world very much familiar 990 00:48:13,496 ---> 00:48:16,556 to me-- a world that I did like but I just didn't realize 991 00:48:16,556 ---> 00:48:17,926 that there were in fact worlds 992 00:48:17,926 ---> 00:48:23,106 that I loved well beyond my domain of familiarity. 993 00:48:23,356 ---> 00:48:25,956 In a few moments we will adjourn to the transept 994 00:48:26,196 ---> 00:48:27,996 where cake happens to await. 995 00:48:28,056 ---> 00:48:30,656 For those who don't know what this cake means-- 996 00:48:30,656 ---> 00:48:34,786 fix this in post production. 997 00:48:34,986 ---> 00:48:39,346 In a moment we will adjoin to the transept where cake awaits 998 00:48:39,346 ---> 00:48:41,726 and in just a few quotes will you actually see a picture 999 00:48:41,726 ---> 00:48:45,306 of said cake, but we thought we'd paw off a few quotes 1000 00:48:45,306 ---> 00:48:47,816 who tend to have appeared on campus 1001 00:48:47,816 ---> 00:48:49,536 at some websites familiar to you. 1002 00:48:49,536 ---> 00:48:51,416 This one was among our favorite-- 1003 00:48:51,706 ---> 00:48:54,746 "I was you at the CS50 Fair; I went to your station 1004 00:48:54,746 ---> 00:48:56,996 to see your program, you were my best friend; 1005 00:48:56,996 ---> 00:48:58,386 but when our hands touched 1006 00:48:58,386 ---> 00:49:00,336 as you handed me a Smiley face sticker, 1007 00:49:00,886 ---> 00:49:02,576 my heart skipped a beat. 1008 00:49:03,246 ---> 00:49:05,266 There's a lot of love in CS50." 1009 00:49:06,136 ---> 00:49:09,456 Some folks on this particular website are a little more 1010 00:49:09,456 ---> 00:49:10,106 to the point. 1011 00:49:10,396 ---> 00:49:13,306 "I saw you at the CS50 Fair; you were with your friends, 1012 00:49:14,146 ---> 00:49:16,666 wearing a tight white polo looking hawt." 1013 00:49:17,586 ---> 00:49:22,066 And this one too, "I saw you walking around the CS50 Fair 1014 00:49:22,066 ---> 00:49:23,906 with a name tag that said you were in the class. 1015 00:49:24,386 ---> 00:49:25,806 You were smart and adorable 1016 00:49:26,066 ---> 00:49:31,506 and all this time I assumed you were dumb and adorable. 1017 00:49:31,656 ---> 00:49:33,036 You just became so much hotter." 1018 00:49:35,196 ---> 00:49:38,426 So in a moment a cake much like this awaits. 1019 00:49:38,426 ---> 00:49:40,456 If you don't know why you're about to eat cake 1020 00:49:40,456 ---> 00:49:42,886 like that you will soon, but you know this. 1021 00:49:43,296 ---> 00:49:47,296 My path in life was fundamentally altered 1022 00:49:47,466 ---> 00:49:49,726 by just a handful of courses at this place 1023 00:49:49,966 ---> 00:49:51,876 and this was in fact one of them. 1024 00:49:52,066 ---> 00:49:55,586 There will in fact never be a good time to try something new, 1025 00:49:55,586 ---> 00:49:58,296 and there will actually never be a semester 1026 00:49:58,466 ---> 00:50:00,876 where you do have that more time. 1027 00:50:00,876 ---> 00:50:04,376 So we do hope that you bear that in mind 1028 00:50:04,596 ---> 00:50:06,806 as we continue this discussion on Friday. 1029 00:50:07,246 ---> 00:50:08,906 This is CS50. 1030 00:50:09,516 ---> 00:50:17,516 [ Applause ] 1031 00:50:18,016 ---> 00:50:29,006 [ Music ]