Harvard’s Malan Defends C as AI Automates Boilerplate Coding

Harvard Professor On Why You Should Learn C in 2026 | David Malan — Ryan Peterman

Ryan Peterman

Developers must master low-level memory primitives rather than just high-level tools because first-principles knowledge separates true engineers from surface-level coders whose work can be replaced by generative artificial intelligence.

AI-assisted summary of Harvard Professor On Why You Should Learn C in 2026 | David Malan — original source. Check the original for full context.

Source published:

Key ideas

  • David Malan defends starting CS50 with C, explaining that its placement just above assembly allows students to master procedural fundamentals without relying on high-level abstractions. (0:00)
  • By week five of CS50, students manually build foundational data structures like hash tables and tries in C, preparing them to appreciate the single-line abstractions introduced in Python during week six. (0:00)
  • Malan distinguishes between what an engineer needs to *use* daily versus what they need to *know*, arguing that deep foundational knowledge remains essential even if high-level languages dominate everyday work. (3:09)
  • With generative AI capable of generating boilerplate code, Malan argues that first-principles understanding of low-level building blocks is what separates true engineers from replaceable surface-level programmers. (3:09)

Detailed notes

## Background Published on YouTube by Ryan Peterman on July 22, 2026, this clip comes from an extended interview with Harvard professor David Malan. The show notes explain that their broader conversation examines the story behind CS50, lecturing techniques, and how artificial intelligence is impacting computer science education and academic integrity.

## TL;DR David Malan defends CS50's choice to start students with C, explaining that building memory-managed data structures from scratch establishes an essential mental model before moving into high-level abstractions like Python. Addressing modern critiques that aspiring web developers do not need low-level knowledge, Malan draws a clear line between what an engineer routinely uses day-to-day and what they fundamentally need to know. He points out that while he rarely writes C outside of teaching, understanding how hardware and memory operate is crucial for diagnosing bugs, evaluating performance trade-offs, and truly mastering the full computing stack. Ultimately, Malan argues that as generative AI automates routine application code, first-principles comprehension is what separates genuine problem-solving engineers from surface-level programmers.

## Atmosphere & style The exchange has an articulate, reflective, and collegiate feel, driven by Ryan Peterman's conversational prompts and David Malan's polished pedagogical clarity. When Peterman brings up clickbait critique videos, Malan responds with warm, self-aware amusement before smoothly transitioning into an earnest defense of engineering rigor. Watching the clip feels like sitting in on a thoughtful mentorship session, stripping away modern industry hype to focus on the timeless educational philosophy of building software from the ground up.

## Bulletin - [00:00](https://www.youtube.com/watch?v=vhgI_F-WMwA&t=0s) David Malan defends starting CS50 with C, explaining that its placement just above assembly allows students to master procedural fundamentals without relying on high-level abstractions. - [00:00](https://www.youtube.com/watch?v=vhgI_F-WMwA&t=0s) By week five of CS50, students manually build foundational data structures like hash tables and tries in C, preparing them to appreciate the single-line abstractions introduced in Python during week six. - [03:09](https://www.youtube.com/watch?v=vhgI_F-WMwA&t=189s) Malan distinguishes between what an engineer needs to *use* daily versus what they need to *know*, arguing that deep foundational knowledge remains essential even if high-level languages dominate everyday work. - [03:09](https://www.youtube.com/watch?v=vhgI_F-WMwA&t=189s) With generative AI capable of generating boilerplate code, Malan argues that first-principles understanding of low-level building blocks is what separates true engineers from replaceable surface-level programmers.

## Key takeaways - [00:00](https://www.youtube.com/watch?v=vhgI_F-WMwA&t=0s) C serves as an ideal pedagogical stepping stone because it sits directly above intimidating assembly language while keeping abstractions thin. - [00:00](https://www.youtube.com/watch?v=vhgI_F-WMwA&t=0s) Because C has a minimal standard library, it forces learners to understand memory and pointer mechanics by implementing data structures from scratch. - [00:00](https://www.youtube.com/watch?v=vhgI_F-WMwA&t=0s) CS50 students manually implement complex data structures—including linked lists, hash tables, tries, stacks, and queues—before using pre-packaged libraries. - [00:00](https://www.youtube.com/watch?v=vhgI_F-WMwA&t=0s) The transition from week five to week six illustrates the power of abstraction, moving from multi-line C hash table code to a single-line Python dictionary. - [00:00](https://www.youtube.com/watch?v=vhgI_F-WMwA&t=0s) Introductory courses relying exclusively on Python risk leaving students without any conceptual model of what happens under the hood. - [00:00](https://www.youtube.com/watch?v=vhgI_F-WMwA&t=0s) CS50 aims to educate engineers and informed problem solvers who understand computing from first principles, rather than merely producing programmers. - [03:09](https://www.youtube.com/watch?v=vhgI_F-WMwA&t=189s) Claims that full-stack developers do not need low-level knowledge contradict the core definition of working across the entire computing stack. - [03:09](https://www.youtube.com/watch?v=vhgI_F-WMwA&t=189s) A developer does not need to write C in their day-to-day job to benefit immensely from understanding how low-level systems function. - [03:09](https://www.youtube.com/watch?v=vhgI_F-WMwA&t=189s) Malan himself primarily codes in Python, JavaScript, HTML, and CSS, using C for only five weeks a year during CS50 instruction. - [03:09](https://www.youtube.com/watch?v=vhgI_F-WMwA&t=189s) Foundational understanding enables engineers to diagnose performance bottlenecks, solve tricky bugs, and design architectures beyond boilerplate solutions. - [03:09](https://www.youtube.com/watch?v=vhgI_F-WMwA&t=189s) As AI increasingly automates routine code generation, mastery of underlying hardware and computing primitives is vital for tackling novel engineering problems.

## Detailed walkthrough ### [00:00](https://www.youtube.com/watch?v=vhgI_F-WMwA&t=0s) Why Start with C in CS50

Ryan Peterman opens the discussion by asking why anyone should begin their programming journey with C in 2026. David Malan explains that C provides an unmatched foundation for understanding both how computer hardware operates and how software gets constructed. Sitting right above assembly language—which Malan notes looks far scarier to almost everyone—and raw binary zeros and ones, C strikes a sweet pedagogical balance. It provides procedural fundamentals such as loops, conditions, functions, variables, and return values with English-like syntax, while keeping abstractions thin enough that learners are forced to reckon directly with lower-level primitives. Because C has a very small standard library and lacks high-level built-in collections unless external libraries are imported, students are pushed to build nearly everything from scratch.

By week five of CS50, students are writing their own singly and doubly linked lists, hash tables, tries, trees, stacks, and queues. Unlike modern environments in Java or C++ where one can simply pull a ready-made structure from the Standard Template Library (STL), C demands manual memory and pointer manipulation. Malan emphasizes that the goal is not that graduates will constantly rewrite hash tables in their future careers, but that understanding bottom-up data layout enables three vital capabilities: making informed design trade-offs, diagnosing tricky bugs from first principles, and appreciating what modern languages conceal. One of his favorite pedagogical transitions occurs between weeks five and six: students go from writing a lengthy, multi-line C implementation to insert and retrieve data in a custom hash table, to accomplishing the exact same thing in Python with a single line of code instantiating a dictionary.

```mermaid flowchart TD accTitle: Pedagogical Progression in CS50 accDescr: Diagram illustrating the transition from low-level C concepts to high-level abstractions in CS50.

subgraph LowLevel ["Low-Level Foundations (Weeks 1–5)"] A["Hardware Primitives & Memory"] --> B["C Procedural Syntax<br/>(Loops, Conditions, Functions)"] B --> C["Manual Data Structures<br/>(Linked Lists, Hash Tables, Tries)"] end

subgraph HighLevel ["High-Level Abstraction (Week 6+)"] C -->|"Scaffolding to Abstractions"| D["Python Dictionaries<br/>(1-line implementation)"] D --> E["Advanced Tracks<br/>(Web Dev, Data Science, AI)"] end ```

Malan points out that while many introductory classes teach exclusively in Python—and CS50 does so for specific audiences—relying solely on high-level languages leaves students without a grasp of what happens under the hood. As Malan summarizes the philosophy of the course: “And our goal in CS50 among them is not to output programmers, but engineers and educated citizens and folks who really understand from first principles how technology works.”

- **Key Data Structures Built in Week 5:** Singly linked lists, doubly linked lists, hash tables, tries, trees, stacks, and queues. - **The Week 5 to Week 6 Shift:** Moving from a full, manual C hash table implementation to a one-line Python dictionary instantiation. - **Systems vs. Applied Paths:** Students seeking deeper low-level depth can proceed to systems classes covering assembly and compilers, while those aiming for web programming, data science, or AI can comfortably build upon the dual foundations of C and Python.

---

[03:09](https://www.youtube.com/watch?v=vhgI_F-WMwA&t=189s) The "Don't Take CS50" Critique: Knowing vs. Using

Peterman brings up a popular clickbait YouTube video he encountered titled "Whatever you do, don't take CS50," which argued that aspiring full-stack engineers and web developers using JavaScript have no practical need to learn how a computer works under the hood. Malan chuckles at the clickbait strategy working on Peterman, but strongly rejects the underlying philosophy. He argues that such a view fundamentally misunderstands what it means to be an engineer, particularly when the title "full-stack" explicitly demands understanding across every layer of the computing stack.

To clarify the debate, Malan draws a crucial distinction between what a developer literally needs to *use* day-to-day versus what they need to *know*. Even though C remains consistently ranked near the top of programming language indexes due to its omnipresence and raw performance, Malan notes that he personally only writes C for five weeks out of the year during CS50, just as he only uses Scratch for a single week. Instead, his daily work involves Python, JavaScript, HTML, and CSS. Nevertheless, having deep knowledge of low-level building blocks is precisely what allows an engineer to evaluate performance bottlenecks, reason through edge cases, and design robust architectures rather than simply assembling boilerplate code.

In an era where generative AI can trivially produce boilerplate web apps, Malan argues that low-level mastery is more vital than ever if developers want to stay relevant. Highlighting the dividing line between shallow coding and deep engineering, David Malan asserts: “I think if you're going to call yourself an engineer, you should absolutely have mastery of and knowledge of those underlying building blocks if you want to not just output something that frankly AI could output nowadays, but you can understand and you can create the next thing or the solution to some other problem that we haven't even yet solved.”

- **Need to Know vs. Need to Use:** Practicing developers may not write C or Scratch daily, but the mental models developed from them inform higher-level architectural decisions and debugging. - **The Impact of AI:** With AI able to automate standard application code, the engineer's core value lies in solving novel problems from first principles rather than acting merely as a surface-level coder.

## Notable quotes > [00:00](https://www.youtube.com/watch?v=vhgI_F-WMwA&t=0s) And our goal in CS50 among them is not to output programmers, but engineers and educated citizens and folks who really understand from first principles how technology works. — David Malan

## Mentioned David Malan, Ryan Peterman, Harvard University, CS50, C, Python, JavaScript, Java, C++, Scratch, HTML, CSS

## Video description This is a clip from a longer conversation with David Malan who is a Harvard professor known for turning CS50 into a popular online computer science course.

We discussed the story behind CS50, how to lecture well, and how AI is changing CS education including in cheating/academic dishonesty.

Where to watch: • YouTube - https://youtu.be/bB2o81DnKHk • Spotify - https://open.spotify.com/episode/0ApdN6bBzzpiy4zHf9RvJA?si=ILpPmLL-TCqYMRmbhuPlDg • Apple Podcasts - https://podcasts.apple.com/us/podcast/the-peterman-pod/id1777363835 • Transcript - https://www.developing.dev/p/harvard-professor-cs50-what-matters

[Source](https://www.youtube.com/watch?v=vhgI_F-WMwA)

中文简报

哈佛大学Malan在AI自动化样板代码之际为C语言辩护 开发者必须掌握底层内存原语,而非仅仅依赖高级工具,因为第一性原理知识是将真正的工程师与工作可被生成式人工智能取代的浅层编码人员区分开来的关键。 David Malan为CS50课程选择以C语言起步进行了辩护,他解释称,在转向Python等高级抽象之前,从零开始构建具备内存管理的数据结构能够建立至关重要的心智模型。针对当下有观点认为有抱负的Web开发者无需底层知识的批评,Malan在工程师日常例行“使用”的内容与他们根本上需要“了解”的内容之间划出了明确的界限。他指出,尽管自己在教学之余很少编写C语言代码,但理解硬件和内存的运作机制对于排查漏洞、权衡评估性能以及真正掌握完整计算技术栈而言至关重要。Malan最终认为,随着生成式AI将常规应用代码自动化,基于第一性原理的理解力正是区分真正具备问题解决能力的工程师与浅层程序员的关键所在。 David Malan为CS50以C语言起步进行辩护,解释称该语言恰好位于汇编语言之上,能让学生在不依赖高级抽象的情况下掌握过程式编程基础。 (0:00) 在CS50第五周,学生会用C语言手动构建哈希表和前缀树等基础数据结构,为理解第六周Python中引入的单行抽象做好准备。 (0:00) Malan区分了工程师日常需要“使用”的内容与他们需要“了解”的内容,认为即便高级语言占据日常工作的主导,深厚的底层基础知识依然不可或缺。 (3:09) 在生成式AI能够生成样板代码的背景下,Malan认为,对底层构建模块的第一性原理理解,正是将真正的工程师与可被替代的浅层程序员区分开来的核心所在。 (3:09)

Reading summary

Harvard professor David Malan argues that learning C remains essential in 2026 because low-level programming establishes first-principles mental models that modern high-level abstractions conceal. Building Low-Level Foundations from First Principles (0:00) According to Malan, C provides an optimal pedagogical balance by sitting directly above assembly language and raw binary. Its thin abstractions and minimal standard library require students to manage memory and pointers directly rather than relying on pre-built collections from standard template libraries. In CS50, learners manually implement foundational data structures—including singly and doubly linked lists, hash tables, tries, trees, stacks, and queues—by week five. Malan highlights that the transition to week six, where a multi-line C hash table is replaced by a single line of Python to instantiate a dictionary, illuminates the mechanics running beneath modern high-level syntax. While introductory courses frequently teach solely in Python, Malan asserts that this approach prevents learners from understanding hardware-software interaction, which is necessary for diagnosing subtle bugs, evaluating trade-offs, and cultivating true engineering competence. Distinguishing What Developers Know Versus Use (3:09) Addressing online critiques claiming aspiring full-stack and web developers do not need low-level knowledge, Malan draws a clear line between what a practitioner uses day-to-day and what they need to know. Although C consistently ranks high in language indexes for its raw performance, Malan notes that his own daily development focuses on Python, JavaScript, HTML, and CSS, utilizing C for only five weeks during teaching. Nevertheless, Malan argues that understanding underlying building blocks remains essential for diagnosing performance bottlenecks, navigating edge cases, and making architectural decisions. Furthermore, as generative AI tools increasingly automate standard application boilerplate, Malan asserts that low-level technical mastery separates surface-level coders from engineers capable of solving novel problems from first principles. Malan maintains that introductory computer science should aim to educate thorough engineers rather than surface-level programmers, arguing that skipping low-level fundamentals leaves developers ill-equipped to innovate beyond the boilerplate code already commodified by AI.

精炼阅读摘要

哈佛大学教授 David Malan 指出,在2026年学习 C 语言对于培养真正的软件工程师依然不可替代,其核心价值在于让学习者从第一性原理理解软硬件运行机制,并建立应对复杂架构与人工智能挑战的底层认知。 C语言的教学基石作用与自底向上构建 (0:00) Malan 解释称,C 语言在计算机教学中处于理想的平衡点:它位于令人望而生畏的汇编语言及二进制之上,具备类似英语的过程式语法(如循环、条件分支、函数与变量),但其抽象层极其轻薄。由于 C 语言的标准库非常精简且缺乏高阶内置集合类型,学习者被迫直接与底层原语、手动内存管理和指针操作打交道,几乎所有数据结构都必须从零开始构建。 在 CS50 课程的第5周,学生需要纯手工编写单向与双向链表、哈希表、字典树(tries)、树、栈和队列,而非直接调用现代语言中现成的类库。Malan 强调,此举的目的并非让工程师在日后工作中重复实现哈希表,而是通过理解自底向上的数据排布,掌握权衡系统设计、诊断深层缺陷以及看透现代高级语言抽象的能力。课程在第6周随即过渡到 Python,让学生用单行代码实现此前在 C 中编写数十行才能完成的字典功能,以此直观展现抽象机制的形成。 区分日常工具使用与底层认知深度 (3:09) 针对网络上关于“全栈工程师或 JavaScript 开发者无需了解底层运行机制”的观点,Malan 明确反驳并划清了开发者日常“需要使用”的工具与“需要掌握”的知识之间的界限。他认为,自称“全栈”却对计算技术栈的底层运作一无所知是站不住脚的。 Malan 以自身工作为例指出,尽管 C 语言在各类排行榜中因极高效率与无处不在的特性名列前茅,但他个人每年也仅在 CS50 教学的5周内编写 C 语言,日常开发主要依赖 Python、JavaScript、HTML 和 CSS。然而,对底层积木的深刻理解,恰恰是工程师评估性能瓶颈、排查复杂极端情况(edge cases)以及进行稳健架构设计的基础,使工程师免于沦为只会拼凑模板代码的初级编程者。 生成式人工智能背景下的工程师价值 (3:09) 面对生成式人工智能已能轻易生成通用样板代码的现状,Malan 认为掌握底层基础不仅没有过时,反而成为工程师维持职业竞争力的核心壁垒。如果开发者仅仅停留在应用层拼凑表面逻辑,其产出将极易被自动化工具取代。 按照 CS50 的设立目标,课程旨在培养能够从第一性原理洞察技术本质的工程师与受过良好教育的公民,而非仅仅是流水线上的程序员。Malan 表示,只有彻底理解底层构件,工程师才能超越人工智能当前可直接生成的常规方案,去创造未曾解决的新问题解决方案,开拓下一个技术前沿。 Malan 确立了底层基础对长期工程认知与高阶创新的核心价值,但该论述主要面向系统设计与全栈理解的广度追求,对于仅需快速交付特定应用层业务、面临高昂前期学习时间成本的初学者而言,如何在深层理论探究与即时应用产出之间进行权衡仍是一个开放问题。

Source quotes

[0:00] David Malan: And our goal in CS50 among them is not to output programmers, but engineers and educated citizens and folks who really understand from first principles how technology works.

Original transcript

[0:00] Why start with C in in 20 26? [0:02] >> It is [0:04] a wonderful foundation on which to build [0:07] your understanding of how a computer [0:09] works and how software is built. It's [0:11] about as close as you can get to the [0:12] hardware before things devolve, at least [0:16] aesthetically, into assembly code, which [0:18] is much scarier-looking code, I think, [0:19] for most people, almost everyone, [0:21] perhaps. [0:22] Um and certainly, uh beyond that is [0:24] zeros and ones, which is not going to be [0:26] fun for anyone. Um so, C kind of [0:28] strikes, I think, pedagogically this [0:30] really nice balance of having [0:31] English-like syntax and abstractions on [0:33] top of lower-level primitives that allow [0:37] you to explore procedural programming, [0:40] uh in particular, with some fundamental [0:42] what constructs that are now fundamental [0:44] to those kinds of languages, loops and [0:46] conditions and functions and variables [0:47] and return values and so forth. It's [0:49] sort of got It's got everything, but [0:50] it's also a pretty small language, and [0:53] unless you download third-party stuff, [0:54] there's not a very large standard [0:56] library, in fact. So, most anything you [0:58] want, you need to build yourself. And [1:00] so, we leverage this significantly in [1:02] CS50, so much so that by mid-semester, [1:04] in week five of the class, students are [1:06] building their own hash tables, and [1:07] we're talking about how you could [1:08] construct singly linked, doubly linked [1:10] lists, uh hash tables and tries, uh [1:13] trees, abstract data types like stacks [1:16] and queues and so many more. And what I [1:18] think is especially meaningful about C [1:20] is that you can't just instantiate one [1:21] of those data structures if you want [1:23] one, like you can in Java and C++ with [1:25] STL and certain other libraries. Like, [1:27] if you want it, you're going to have to [1:28] build it yourself. And I think that [1:30] alone is a good educational exercise, [1:33] not because you're going to need to [1:34] build that thing again, but because [1:36] there's value, I think, in really [1:37] understanding from the bottom up what is [1:41] going on inside of that device, so that, [1:43] one, you can make more informed [1:44] decisions as to how you want to engineer [1:46] and design your own data structures down [1:48] the line. Two, you can [1:50] diagnose problems by reasoning through [1:52] first principles what could possibly go [1:54] wrong because you understand how the [1:57] data is being stored and what the [1:59] algorithms are that are performing on [2:00] that data. Um and three, it's a [2:04] wonderful scaffold to higher level [2:06] languages because one of my favorite [2:08] things from week five to six in CS50 is [2:11] students go from having written the week [2:12] in week five like their own hash tables [2:14] implementation [2:16] uh for adding data, retrieving data, and [2:17] so forth, which is like this many lines [2:19] of code for some font size. And it it [2:22] gets whittled down in week six to one [2:23] line where you just instantiate a Python [2:25] dictionary. But and you can be [2:27] productive with a dictionary and many [2:29] courses do teach programming by way of [2:31] Python alone and we too have done it for [2:33] some of our audiences. [2:34] But you really never get around to [2:36] understanding what's going on underneath [2:38] the hood. And our goal in CS50 among [2:40] them is not to [2:41] uh output programmers, but engineers and [2:45] educated citizens and folks who really [2:47] understand from first principles how [2:49] technology works. And so C for instance [2:51] strikes, I think just that right [2:53] balance. And for those students who want [2:54] to go even deeper in a systems class, [2:56] they can go learn about assembly and [2:58] compilers and so forth. Um but those [3:00] students who want to go on to web [3:01] programming or data science stuff or AI [3:04] nowadays can just build on top of the C [3:06] and then in turn Python um layers that [3:08] we use in the class. [3:09] >> I was doing research and I saw a YouTube [3:12] video that said, "Whatever you do, don't [3:13] take CS50." Clickbait, whatever. [3:16] >> Okay. Yeah, I So I watched the video. [3:18] >> Uh-huh. [3:18] >> And the person's So it worked. [3:20] >> Yeah, it got me. It got me. And the [3:22] perspective of the author of this video [3:24] was that CS50 teaches you all this stuff [3:28] that you don't really need to know if [3:29] you were like a full stack engineer or [3:31] something. Like if you if I was just [3:33] going into the industry and I'm just [3:34] making web apps or, you know, whatever [3:37] and using JavaScript or [3:40] that a lot of this um underlying stuff [3:42] you you might not need and so maybe it's [3:44] not a good use of time. And I'm curious [3:47] what you would say to someone that has [3:49] that that mindset that you don't need to [3:52] actually know how the computer works. [3:53] >> I don't want to get into a whole [3:54] internet fight here, but I think that is [3:57] absolutely the wrong mindset, certainly [3:59] for a full stack engineer. I mean, by [4:00] definition of full stack, you should be [4:02] understanding everything that's [4:04] happening among those layers. So, I [4:06] think the better formulation isn't that [4:08] you don't need to know these things, but [4:11] rather you won't need to use these [4:13] things. Use in a literal sense. Like, I [4:15] don't my C is a very popular language, [4:17] even according to some rankings each [4:19] year is, you know, the number one, [4:20] number two language in terms of its [4:22] omnipresence still to this day, because [4:24] it's very highly performant. Um [4:26] Albeit more challenging to write than [4:28] some languages. I only use C for 5 weeks [4:32] during CS50 itself, but that doesn't [4:34] mean that it hasn't helped me understand [4:36] higher-level languages, what is going on [4:39] inside of a system, how you can improve [4:41] the performance of the design of some [4:43] system by understanding, again, those [4:44] first principles. [4:46] Uh I don't use Scratch except for 1 week [4:49] out of the year. I do use Python more [4:51] frequently, and I use JavaScript and [4:52] some HTML and CSS, but I think if you're [4:55] going to call yourself an engineer, you [4:57] should absolutely [4:58] have mastery of and knowledge of those [5:02] underlying building blocks if you want [5:04] to not just output something that [5:06] frankly AI could output nowadays, but [5:09] you can understand and you can create [5:10] the next thing or the solution to some [5:13] other problem that we haven't even yet [5:14] solved. Um I think that's the better [5:16] mindset, to appreciate, yes, I'm not [5:18] going to need to use Scratch or C or [5:21] maybe some of the other things we touch [5:22] on in CS50, but the knowledge and the [5:26] principles that we extract from those [5:28] implementation details are incredibly [5:30] valuable. If you want to be an engineer [5:32] and not just say uh a coder, is which is [5:34] a distinction that some folks might [5:35] make.