Learning

Harvard CS50: who it is for, what it teaches and how to take it.

The free intro to computer science from Harvard: the 11-week syllabus, how the weeks work, how to take it and earn a certificate, what the CS50 duck is, and whether it still makes sense when an AI can write code.

O que é o CS50What CS50 is

O CS50 é a disciplina de introdução à ciência da computação da Universidade de Harvard, dada pelo professor David J. Malan. A versão aberta para o mundo todo se chama CS50x: as aulas em vídeo, os exercícios e a correção automática são gratuitos. O site oficial a descreve como uma introdução ao uso de computação para resolver problemas, com e sem código, valorizando correção, design e estilo. Dois terços dos alunos nunca tinham feito uma disciplina de computação antes.CS50 is Harvard University’s introductory computer science course, taught by professor David J. Malan. The version open to the whole world is called CS50x: the video lectures, the exercises and the automatic grading are free. The official site describes it as an introduction to using computation to solve problems, with and without code, valuing correctness, design and style. Two thirds of students had never taken a computing course before.

Ele não ensina “uma linguagem”. Ele usa várias (Scratch, C, Python, SQL, HTML, CSS, JavaScript) como ferramenta para ensinar ideias que valem em qualquer lugar: abstração, algoritmos, estruturas de dados, memória, segurança e engenharia de software.It does not teach “a language”. It uses several (Scratch, C, Python, SQL, HTML, CSS, JavaScript) as tools to teach ideas that hold everywhere: abstraction, algorithms, data structures, memory, security and software engineering.

Curso gratuito, certificado opcional. Estudar e entregar os exercícios para correção não custa nada. O que pode ter custo é o certificado verificado da edX; existe também um certificado gratuito emitido pelo próprio CS50 (detalhes na seção “Como cursar”).Free course, optional certificate. Studying and submitting the exercises for grading costs nothing. What may cost money is the edX verified certificate; there is also a free certificate issued by CS50 itself (details in the “How to take it” section).

Para quem serveWho it is for

Seu perfilYour profileO CS50x serve?Is CS50x right?
Nunca programou e quer entender computação de verdadeNever programmed and wants to really understand computingÉ o público central. Não há pré-requisito formal. Prepare-se para um ritmo exigente nas semanas de C.It is the core audience. There is no formal prerequisite. Be ready for a demanding pace in the C weeks.
Estudante de tecnologia que quer base sólidaTech student who wants a solid baseSim: memória, ponteiros, estruturas de dados e SQL costumam ser as lacunas de quem aprendeu só “o framework”.Yes: memory, pointers, data structures and SQL are usually the gaps of people who only learned “the framework”.
Já desenvolve (trabalha com web, scripts)Already develops (works with web, scripts)Talvez em parte. A orientação do próprio CS50 é que quem tem alguma experiência técnica pode pular o CS50x e ir direto a um curso específico (Python, Web, IA, SQL, Cibersegurança). Se nunca viu C e gerência de memória, as semanas 1 a 5 ainda valem.Maybe partly. CS50’s own guidance is that people with some technical experience can skip CS50x and go straight to a specific course (Python, Web, AI, SQL, Cybersecurity). If you never saw C and memory management, weeks 1 to 5 are still worth it.
Quer só “aprender a fazer um site rápido”Just wants to “learn to build a quick website”Provavelmente não é o caminho mais curto. O CS50W (web com Python e JavaScript) é mais direto. O CS50x é investimento em base.Probably not the shortest path. CS50W (web with Python and JavaScript) is more direct. CS50x is an investment in foundations.
Profissional de outra área (negócios, direito)Professional from another field (business, law)Existem versões próprias, CS50 for Business e CS50 for Lawyers, com menos código.There are dedicated versions, CS50 for Business and CS50 for Lawyers, with less code.

O que ele ensina, semana a semanaWhat it teaches, week by week

A estrutura abaixo é a do site oficial do CS50x. A coluna da direita é minha tradução do tema para o dia a dia de quem programa.The structure below is the one on the official CS50x site. The right-hand column is my translation of each topic into day-to-day programming.

SemanaWeekTemaTopicPara que serve depoisWhat it is for later
0ScratchPensar em passos, laços e condições antes da sintaxe.Thinking in steps, loops and conditions before syntax.
1CVer o que uma linguagem faz “de verdade”: compilar, tipos, laços.Seeing what a language really does: compiling, types, loops.
2Arrays (vetores)ArraysTexto como sequência de bytes; base de criptografia simples e de toda manipulação de dados.Text as a sequence of bytes; the base of simple cryptography and of all data handling.
3AlgoritmosAlgorithmsBusca, ordenação e custo (Big O). Veja também Entendendo Algoritmos.Search, sorting and cost (Big O). See also Grokking Algorithms.
4MemóriaMemoryPonteiros, pilha e heap. É a base para entender vazamentos de memória e por que existem falhas de segurança como o buffer overflow.Pointers, stack and heap. The base for understanding memory leaks and why security flaws such as buffer overflow exist.
5Estruturas de dadosData structuresListas ligadas, tabelas hash, árvores, filas, pilhas: o que há dentro de dict, Map e dos índices de banco.Linked lists, hash tables, trees, queues, stacks: what is inside dict, Map and database indexes.
6PythonMesma lógica em uma linguagem de alto nível: você percebe quanto trabalho ela esconde.The same logic in a high-level language: you notice how much work it hides.
7SQLConsultar e modelar dados. Continue em Postgres para desenvolvedores.Querying and modelling data. Continue in Postgres for developers.
—Inteligência Artificial (módulo)Artificial Intelligence (module)Uma visão do que está por trás dos sistemas de IA atuais. Veja Attention Is All You Need.A look at what is behind today’s AI systems. See Attention Is All You Need.
8HTML, CSS, JavaScriptO que o navegador entende; a base do front-end.What the browser understands; the base of the front end.
9FlaskUm servidor web em Python, ligando dados e páginas.A web server in Python, tying data to pages.
10O fim + projeto finalThe end + final projectUm software seu, resolvendo um problema real.Software of your own, solving a real problem.

Um gostinho: “olá, mundo” em C e em PythonA taste: “hello, world” in C and in Python

O curso começa a programar de verdade pelo C. A mesma ideia nas duas linguagens mostra o que o Python faz por você. O exemplo de C é o clássico da semana 1 (usa a biblioteca cs50.h do curso, que já vem no ambiente dele). Não o executei aqui.The course starts real programming with C. The same idea in both languages shows what Python does for you. The C example is the classic from week 1 (it uses the course’s cs50.h library, already present in its environment). I did not run it here.

// hello.c
#include <cs50.h>
#include <stdio.h>

int main(void)
{
    string name = get_string("What's your name? ");
    printf("hello, %s\n", name);
}

// no terminal:   make hello   e depois   ./hello
# hello.py
name = input("What's your name? ")
print(f"hello, {name}")

# no terminal:   python hello.py

Em C você declara o tipo, inclui bibliotecas, compila e sabe que o texto é uma sequência de caracteres na memória. Em Python tudo isso é invisível. O curso faz você passar pelo difícil primeiro para que o fácil, depois, não seja mágica.In C you declare the type, include libraries, compile, and know the text is a sequence of characters in memory. In Python all of that is invisible. The course makes you go through the hard part first so that the easy part, later, is not magic.

Como é: o ritmo de cada semanaWhat it is like: each week’s rhythm

aulalecture em vídeoon video seção · shortssection · shorts opcionaloptional problem setproblem set 10 a 20 h10 to 20 h check50 testa antestests first submit50 entrega e notahand in and grade falhou? corrija e rode de novofailed? fix it and run again Cada semana conta só quando todos os problemas obrigatórios dela atingem a nota mínima (70%).Each week counts only when all of its required problems reach the minimum score (70%). Reenviar é permitido; vale a última entrega. No seu ritmo, sem prazo por exercício.Resubmitting is allowed; the latest counts. Self-paced, with no per-exercise deadline.
O ciclo de uma semana: assistir, praticar, testar, entregar.One week’s cycle: watch, practise, test, submit.
  • Aulas. Vídeos longos e bem produzidos, com demonstrações ao vivo. As aulas foram dubladas para português e espanhol (via lingopal.ai), e existe uma versão do site em português em cs50.ly/pt.Lectures. Long, well-produced videos with live demonstrations. The lectures were dubbed into Portuguese and Spanish (via lingopal.ai), and there is a Portuguese version of the site at cs50.ly/pt.
  • Problem sets. É onde o aprendizado acontece. São programas de verdade, corrigidos por check50 (correção) e style50 (estilo). A nota semanal é 75% correção e 25% estilo. Não há prova; o requisito final é o projeto.Problem sets. This is where learning happens. They are real programs, graded by check50 (correctness) and style50 (style). The weekly score is 75% correctness and 25% style. There is no exam; the final requirement is the project.
  • Ambiente. O curso recomenda o Visual Studio Code do CS50 (cs50.dev), que roda no navegador com tudo já instalado, então você não precisa configurar compilador nenhum para começar.Environment. The course recommends CS50’s Visual Studio Code (cs50.dev), which runs in the browser with everything preinstalled, so you do not need to set up a compiler to start.
  • Projeto final. Você constrói um software seu, em qualquer linguagem, que resolva um problema real. Pode ser em grupo de até três pessoas (com escopo proporcional). O próprio enunciado sugere criar “algo que sobreviva ao curso”.Final project. You build software of your own, in any language, that solves a real problem. It can be in a group of up to three (with proportional scope). The brief itself encourages you to create “something that outlives this course”.
  • Dificuldade. A curva é íngreme nas semanas 1 a 5 (C, memória, estruturas de dados). É normal travar. O curso foi desenhado para isso: recomenda-se estimar de 10 a 20 horas por semana só nos problem sets.Difficulty. The curve is steep in weeks 1 to 5 (C, memory, data structures). Getting stuck is normal. The course is designed for it: it suggests estimating 10 to 20 hours per week on problem sets alone.

Como cursar, passo a passoHow to take it, step by step

  1. Crie as contas. Uma conta no GitHub (o certificado gratuito é resgatado com o login do GitHub) e uma conta na edX (o CS50 diz que o registro na edX é necessário para os dois tipos de certificado).Create the accounts. A GitHub account (the free certificate is claimed with the GitHub login) and an edX account (CS50 says edX registration is required for both certificate types).
  2. Entre no site do curso (cs50.harvard.edu/x), comece pela semana 0 e assista à aula. Se preferir em português, use a versão em cs50.ly/pt.Open the course site (cs50.harvard.edu/x), start at week 0 and watch the lecture. For Portuguese, use the version at cs50.ly/pt.
  3. Abra o ambiente (cs50.dev) e faça o problem set da semana, seguindo o enunciado.Open the environment (cs50.dev) and do the week’s problem set, following the brief.
  4. Teste e entregue. Rode check50 com o identificador do problema (está no enunciado) até passar, depois submit50 com o mesmo identificador. Os envios aparecem no seu Gradebook na hora.Test and submit. Run check50 with the problem’s identifier (it is in the brief) until it passes, then submit50 with the same identifier. Submissions show up in your Gradebook right away.
  5. Repita até a semana 10 e entregue o projeto final.Repeat through week 10 and submit the final project.
  6. Resgate o certificado, se quiser (veja abaixo).Claim the certificate, if you want one (see below).

Quanto tempo reservar (conta minha)How much time to set aside (my arithmetic)

São 11 unidades (semanas 0 a 10) e o curso sugere 10 a 20 horas por semana de conteúdo só nos problem sets. Multiplicando, são algo entre 110 e 220 horas, fora o tempo de assistir às aulas. Com isso:There are 11 units (weeks 0 to 10) and the course suggests 10 to 20 hours per unit on problem sets alone. Multiplying, that is somewhere between 110 and 220 hours, not counting time spent watching lectures. With that:

Se você estudaIf you studyTermina em cerca deYou finish in about
5 h por semana5 h per week22 a 44 semanas22 to 44 weeks
10 h por semana10 h per week11 a 22 semanas11 to 22 weeks
20 h por semana20 h per week6 a 11 semanas6 to 11 weeks
Existe um prazo geral. Segundo o FAQ, o prazo atual do curso é o fim do dia 30 de junho de 2027 (UTC); ele pode ser estendido em seis ou doze meses, e parte do trabalho pode ser transferida. Trabalho enviado antes de 1º de janeiro de 2026 não é transferido. De 26 de outubro de 2026 a essa data são cerca de 35 semanas: quem estuda 5 h por semana está no limite. Confira o FAQ para o prazo vigente.There is an overall deadline. According to the FAQ, the course’s current deadline is the end of June 30, 2027 (UTC); it may be extended by six or twelve months, and some work may carry forward. Work submitted before January 1, 2026 does not carry forward. From October 26, 2026 to that date is about 35 weeks: at 5 h per week you are at the limit. Check the FAQ for the current deadline.

Certificado: gratuito ou pagoCertificate: free or paid

Certificado do CS50CS50 CertificateCertificado verificado da edXedX verified certificate
CustoCostgratuitofreepago (o preço fica na edX; há ajuda financeira para quem não pode pagar)paid (the price is set on edX; financial aid exists for those who cannot pay)
Como saiHow you get itemitido pelo CS50; resgatado no Gradebook com o login do GitHubissued by CS50; claimed in the Gradebook with the GitHub logincomprado na edX; gerado em até 30 dias depois de cumpridos os requisitos, com verificação de identidadepurchased on edX; generated within 30 days after the requirements are met, with identity verification
RequisitoRequirementNota mínima de 70% em cada problema obrigatório e o projeto final. Sem prova.At least 70% on every required problem and the final project. No exam.

O próprio CS50 avisa que o certificado verificado não é crédito acadêmico de Harvard (créditos e transferência vêm pela Harvard Extension School ou Summer School). Para o mercado, o que pesa é o que você construiu: o projeto final e os repositórios dizem mais que o PDF.CS50 itself notes that the verified certificate is not Harvard academic credit (credit and transfer come through Harvard Extension School or Summer School). For the job market, what weighs most is what you built: the final project and repositories say more than the PDF.

Depois do CS50x: a família de cursosAfter CS50x: the family of courses

CS50x a basethe base CS50PPython CS50Wweb: Python e JavaScriptweb: Python and JavaScript CS50 AIIA com PythonAI with Python CS50 SQLbancos de dadosdatabases CS50 Cybersecurity também: Scratch, R,also: Scratch, R, React Native, Business,React Native, Business, Lawyers, AP CSPLawyers, AP CSP
O CS50x é a porta de entrada; quem já programa pode ir direto a um curso específico.CS50x is the front door; people who already program can go straight to a specific course.

A edX também vende “Professional Certificates” que juntam o CS50x a um curso específico (IA, Python, Web, Ciência de Dados, Cibersegurança ou Bancos de Dados com SQL), com 10% de desconto. A lista oficial muda; confira em cs50.harvard.edu/courses.edX also sells “Professional Certificates” that bundle CS50x with one specific course (AI, Python, Web, Data Science, Cybersecurity or Databases with SQL), at a 10% discount. The official list changes; check cs50.harvard.edu/courses.

E a IA? O pato de borracha e as regrasWhat about AI? The rubber duck and the rules

O CS50 não ignora a IA; ele a incorporou com regras claras. Existe o CS50 Duck, uma adaptação do ChatGPT para alunos e professores, disponível em cs50.ai e dentro do VS Code do curso (cs50.dev). O nome vem do rubber duck debugging: explicar o problema em voz alta, para um patinho de borracha, costuma revelar o erro. O pato foi desenhado como tutor: ele guia, faz perguntas e explica conceitos, mas não entrega a resposta do problem set.CS50 does not ignore AI; it built it in, with clear rules. There is the CS50 Duck, an adaptation of ChatGPT for students and teachers, available at cs50.ai and inside the course’s VS Code (cs50.dev). The name comes from rubber duck debugging: explaining the problem aloud to a rubber duck often reveals the bug. The duck was designed as a tutor: it guides, asks questions and explains concepts, but does not hand over the answer to the problem set.

Permitido (política do curso)Allowed (course policy) • CS50 Duck (cs50.ai, cs50.dev)• CS50 Duck (cs50.ai, cs50.dev) • explica conceitos e mensagens de erro• explains concepts and error messages • faz perguntas para você pensar• asks questions so you think • não escreve a solução por você• does not write the solution for you Desonestidade acadêmicaAcademic dishonesty • outras IAs que sugerem ou completam• other AIs that suggest or complete respostas ou código (ChatGPT, Copilot…) answers or code (ChatGPT, Copilot…) • exceto se um curso permitir de forma• unless a course explicitly allows it explícita Para dúvidas sobre o que conta como cola, o FAQ remete à política de honestidade acadêmica do curso.For doubts about what counts as cheating, the FAQ points to the course’s academic honesty policy.
A regra do CS50 para IA: a do próprio curso pode, a que resolve por você não.CS50’s rule for AI: the course’s own is fine, one that solves it for you is not.

A página do CS50 sobre o assunto diz que usar IAs de terceiros que sugerem ou completam respostas ou código é desonestidade acadêmica, a menos que o curso permita; as ferramentas do próprio CS50 (o pato) são aceitas. O texto da política pode ser atualizado: leia a versão vigente no site antes de submeter qualquer trabalho.CS50’s page on the subject says that using third-party AIs that suggest or complete answers or code is academic dishonesty unless the course allows it; CS50’s own tools (the duck) are accepted. The policy text can be updated: read the current version on the site before submitting any work.

Há mais um motivo, prático, para respeitar a regra mesmo sem ninguém conferindo: se uma IA resolve o problem set, você aprende o que a IA faz, não o que o curso quer que você aprenda. A nota perfeita sem o entendimento é um certificado de nada.There is one more reason, a practical one, to respect the rule even when nobody checks: if an AI solves the problem set, you learn what the AI does, not what the course wants you to learn. A perfect score without the understanding is a certificate of nothing.

Faz sentido na era da IA?Does it make sense in the AI era?

Opinião, não verificada nas fontes: o que segue é a minha leitura, apoiada nos fatos acima (conteúdo do curso e política de IA), não uma pesquisa sobre emprego nem uma garantia de resultado.Opinion, not verified in the sources: what follows is my reading, based on the facts above (course content and AI policy), not job-market research nor a guarantee of results.

Se uma IA escreve código, para que aprender a escrever? A resposta curta: para saber se o que ela escreveu está certo. Um assistente de código gera algo plausível e, de vez em quando, errado de um jeito sutil (um índice fora do limite, uma consulta que explode em volume, uma falha de segurança). Quem não tem a base não enxerga o erro e entrega o código mesmo assim.If an AI writes code, why learn to write it? The short answer: to know whether what it wrote is right. A coding assistant produces something plausible and, now and then, wrong in a subtle way (an out-of-bounds index, a query that blows up at volume, a security flaw). Someone without the foundation does not see the error and ships the code anyway.

A favorForContra / cuidadoAgainst / caution
Ensina o que a IA não substitui: decompor um problema, raciocinar sobre custo (Big O), memória, dados e depuração.Teaches what AI does not replace: breaking a problem down, reasoning about cost (Big O), memory, data and debugging.É longo (centenas de horas) e as semanas de C não são o caminho mais curto para construir um produto.It is long (hundreds of hours) and the C weeks are not the shortest path to building a product.
Quem entende memória e estruturas de dados lê melhor o código gerado e faz revisões melhores.People who understand memory and data structures read generated code better and review better.Se você deixar uma IA fazer os problem sets, o curso perde todo o valor (e viola a política).If you let an AI do the problem sets, the course loses all its value (and breaks the policy).
O curso mesmo adotou IA como tutor 24h, o que reduz o maior problema do estudo sozinho: ficar travado sem ajuda.The course itself adopted AI as a 24/7 tutor, which reduces the biggest problem of studying alone: being stuck with no help.Um tutor que sempre responde pode virar muleta. Tente ficar um tempo travado antes de perguntar.A tutor that always answers can become a crutch. Try to stay stuck for a while before asking.
É gratuito, com projeto final que vira portfólio.It is free, with a final project that becomes a portfolio.O certificado, sozinho, pesa pouco. O que pesa é o que você consegue explicar e construir.The certificate alone carries little weight. What carries weight is what you can explain and build.

Um jeito de estudar com IA sem se enganarA way to study with AI without fooling yourself

  1. Tente resolver sozinho primeiro, por um tempo definido (por exemplo, 30 minutos).Try to solve it on your own first, for a set time (for example, 30 minutes).
  2. Se travar, explique o problema em voz alta ou por escrito (o “pato de borracha” funciona até sem IA).If stuck, explain the problem aloud or in writing (the “rubber duck” works even without AI).
  3. Ainda travado? Pergunte ao pato do curso: peça uma dica, não a solução.Still stuck? Ask the course’s duck: ask for a hint, not the solution.
  4. Quando funcionar, faça o teste de explicar: consegue dizer o que cada linha faz, e por que, sem olhar? Se não, ainda não aprendeu.When it works, do the explain test: can you say what each line does, and why, without looking? If not, you have not learned it yet.
  5. Fora do curso, depois da base, use qualquer IA para produzir código, mas revisando linha a linha. É aqui que o CS50 se paga.Outside the course, after the base, use any AI to produce code, but review it line by line. This is where CS50 pays off.

Resumo por perfilSummary by profile

  • Iniciante total. Sim, é um dos melhores pontos de partida. Faça sem atalhos com IA.Total beginner. Yes, it is one of the best starting points. Do it without AI shortcuts.
  • Quem já programa com ajuda de IA mas sente que “não entende o que está por baixo”. Sim, e é onde o ganho é maior. Faça ao menos as semanas 1 a 5 e o módulo de SQL.People who already program with AI help but feel they “do not understand what is underneath”. Yes, and that is where the gain is biggest. Do at least weeks 1 to 5 and the SQL module.
  • Desenvolvedor experiente. Provavelmente vá direto ao curso específico (CS50 AI, CS50 SQL, CS50 Cybersecurity) ou use o CS50x como revisão seletiva.Experienced developer. Probably go straight to a specific course (CS50 AI, CS50 SQL, CS50 Cybersecurity) or use CS50x as selective review.
  • Quer emprego rápido. O CS50x sozinho não basta; combine-o com um projeto real e com uma trilha específica (web, dados). Pense nele como a fundação, não como a casa.Wants a job fast. CS50x alone is not enough; combine it with a real project and a specific track (web, data). Think of it as the foundation, not the house.
Limites desta nota. Estrutura, regras de certificado, prazo, tempo estimado e lista de cursos vêm das páginas oficiais do CS50 (conteúdo, FAQ, syllabus e cs50.ai) e da página de cursos da edX, consultadas em 2026-10-26; prazos e preços mudam. A política de IA veio do resumo da página do CS50 sobre o pato; não consegui abrir a página de honestidade acadêmica em si. O preço do certificado da edX não está nas fontes oficiais que li. Não fiz o curso nem executei o exemplo em C; a seção “faz sentido” é opinião minha.Limits of this note. Structure, certificate rules, deadline, estimated time and course list come from CS50’s official pages (content, FAQ, syllabus and cs50.ai) and edX’s course page, checked on 2026-10-26; deadlines and prices change. The AI policy comes from CS50’s own summary on the duck page; I could not open the academic honesty page itself. The edX certificate price is not in the official sources I read. I did not take the course nor run the C example; the “does it make sense” section is my opinion.