Live data from Hacker News

Ask HN: How will AI affect learning programming?

news.ycombinator.com

11–15 of 15 posts

Re: Ask HN: How will AI affect learning programming?

#11
Similar to how calculators changed `sin(pi/2)`.

For some, they never have to learn. For others, it makes everything click. Maybe they didn't have a good teacher or book. But now they can experiment and play around with different variables and wonder. Then other things start to click - angles, friction, and so on.

I think it should accelerate things to either the point where people say good riddance or where they can build more things on top of it.

Re: Ask HN: How will AI affect learning programming?

#12
post #6

LLMs by their nature are good at word or concept association. Cohesiveness in length is where they begin to break down. I tend to liken them to very drunken scholars. They know things, usually at about a Wikipedia level, and they’re cheery too. But they lack a capacity to doubt themselves; they often are confidently wrong. Often the greatest help is understanding natural language, but given its hiccups… time using it…

> they often are confidently wrong.

Only when they can also dismissively sneer at a marketing person will they be truly ready to replace programmers.

Re: Ask HN: How will AI affect learning programming?

#13
AI helps me consider a wider range of approaches to lots of different problems. Especially when working with unfamiliar domains or esoteric technologies it helps me iterate so much faster.

It’s the world’s greatest rubber duck and even if that’s all it ever is, it’s a game changer for me.

Re: Ask HN: How will AI affect learning programming?

#14
I'm a tenured CS professor at a liberal arts college. I teach the entire curriculum, from intro programming up to senior-level electives.

I'm currently teaching a "Programming with AI" course where we're using Cursor with no restrictions. I now think "learning programming" as we've traditionally conceived it is toast. Core CS projects, the kind that would have been at the heart of the curriculum, take students maybe 30 minutes to do with modern tools.

Previously, the hard part of learning programming was developing the skill of putting code statements in the correct logical structure, and building that up from small programs of a few lines, to functions/classes, and eventually to larger programs. That happened in parallel with building the knowledge background of systems, libraries, algorithms, databases, etc. that you had to draw on to write complex applications.

The core work of the middle part of the CS major - building skill by writing progressively more complex functions and classes - can be largely automated at this point. You've still got to learn things, but the emphasis shifts. Details about libraries and frameworks - implementation at the level of functions and classes - are deemphasized. The scope of what my students can do is bigger, so they're dealing with the challenges of designing and debugging larger applications.

For new programmers the most important thing to learn is a mental model of how programs execute: Can you look at a small program and understand what it does? This is a prerequisite to generating bigger programs with AI. Students also need to learn to use AI collaboratively, to think through a problem like a pair programmer, rather than expecting to get complete one-shot generations.

I redesigned our intro course to move most of our core skills practice (what would previously have been homework problems) into class time. The out-of-class projects are now bigger and more ambitious, but also give students specific steps and prompts for using AI. A major point of the projects is agency. I like projects where there isn't one right answer, but instead students have to set a vision and then iterate on it.

Beyond the first course, we now need to spend more time on "software engineering" and craftsmanship:

- Clarifying requirements

- Reasoning about the design of a larger program with many parts

- Communication between parts of the application: DB design, APIs

- Debugging intuition, why is this thing breaking?

- Testing

- Working with bigger codebases

These things have always been around, but we often didn't teach them until upper-level courses. Early-level projects weren't complex enough to require serious craftsmanship. AI lets us do more ambitious things earlier in the curriculum - we should be looking for ways to raise our standards and continue challenging students.

For new programmers, I would encourage learning how to write standard single-file programs (with variables, loops, functions, lists, etc.) without using AI. Then bring in AI as a partner to write larger applications with specific libraries. Focus on raising the scale of your programs to the point where you can't immediately one-shot them, and then use the difficulties you encounter to think about design issues. Gradually build your knowledge base of systems and algorithms, but don't obsess about memorizing implementation details right away. Build end-to-end applications that do things; LeetCode problems have always been terrible.

For my fellow professors: You should start talking about how to redesign your courses and curriculum. That requires taking some guardrails off so you can see what students can really do with modern AI tools.

Re: Ask HN: How will AI affect learning programming?

#15
I think it speeds up learning programming because you don't have to spend a few minutes trying to find answers to your questions when you can just ask LLMs about it and get an instant answer. Ofc everything LLMs say can't be trusted so it's important to verify things and use your own judgement to decide if the LLM answer seems reasonable or not.

There are also tools like https://rockyai.me/ that are making LLMs accessible within your browser so you don't even have to context switch between chat gpt and the tab you are on to ask LLMs questions. I use this all the time when reading engineering blog and I want to dig more into a specific section that I don't understand

Post reply on HN