$30 off During Our Annual Pro Sale. View Details »

Learning and coding in the age of AI

Avatar for Reuven M. Lerner Reuven M. Lerner
December 25, 2025
2

Learning and coding in the age of AI

Reuven Lerner's keynote from PyCon India 2025 (Bangalore). I describe how the age of AI is changing things, how we're just at the beginning, and how we *could* use AI to help us code -- but for now, it's even better to use AI to help us learn. I present a number of techniques you can use to learn (and teach) faster, better, and deeper.

Avatar for Reuven M. Lerner

Reuven M. Lerner

December 25, 2025
Tweet

Transcript

  1. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com 2 Courses • Exercises • Of f ice hours • Discord • Projects I teach Python and Pandas!
  2. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com New Python articles every Monday 3 BetterDevelopersWeekly.com
  3. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com New Pandas challenges every Wednesday 4 BambooWeekly.com
  4. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com 5
  5. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com But today? Let’s talk about learning, coding, and AI. 6
  6. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • Lived 1706-1790 • Writer, scientist, inventor, statesman, diplomat, printer, and publisher • A “founding father” of the United States Benjamin Franklin 7
  7. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • Franklin, and other scientists at the time, created “Leyden jars,” which produced and stored electricity • They experimented with different materials and sizes • Some of them got pretty serious shocks! Leyden jars 8
  8. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • Franklin would invite people over and have them hold hands in a circle. • One person would put one hand on the Leyden jar’s inside connector • A second person would be one hand on the Leyden jar’s outside connector • Zap! Everyone in the entire circle felt the electric shock Electric parties 9
  9. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • People in the 1700s had electricity • But it was a party game! • It didn’t seem to have a practical use • It was dangerous… but fascinating • Indeed, “electricians” were popular entertainers in 18th-century Europe They had no idea 10
  10. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • 300 years have passed since Franklin and his friends held these electric parties • And we haven’t stopped innovating: • Energy creation is getting cleaner (e.g., wind and solar) • Batteries are getting better, and charging faster • Many electric cars already outperform gasoline-powered rivals • Standards have helped make it ubiquitous • Not bad for a 300-year-old technology! Three centuries later… 11
  11. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • Franklin and his friends were there at the beginning • They could never have predicted how electric power would transform our world • (Even though Franklin wrote annual predictions) • Who can see three centuries ahead? They couldn’t have known 12
  12. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • Electricity is great — but there are downsides • Because there are always downsides, to any advance! • Balancing and minimizing the downsides is the key • Downsides come in many different ways: • Physical harm • Environmental harm • Economic harm • Risks are often unknown Unexpected downsides, too 13
  13. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • It’s a world-changing technology • We’re only at the beginning • It’ll affect everyone • It has downsides and risks • It’ll continue to improve and evolve • We cannot even begin to think of where it’ll be in 300 years • Or even in 100 years! • Or even in 10 years! AI is the new electricity 14
  14. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • 1956: Dartmouth Summer Research Project on Arti f icial Intelligence • Claude Shannon, John McCarthy, Marvin Minsky, and others • Introduced the term • 6-8 weeks AI isn’t new 15
  15. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • Advances happen in f its and starts • We have had two “AI winters” in the last 50 years • Neural networks were written off • Deep learning revolutionized image processing • Now we have oodles of money going into training, models, infrastructure, and protocols • Agents and MCP will allow us to do even more But you have to be patient 16
  16. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com 17
  17. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • We were, until recently, in the Leyden jar era of AI • But AI is now serious, and seriously useful • That said, we’re still where electricity was in the early 1900s • Lots of companies • Emerging standards • What will and won’t work? • No regulation, which means huge safety issues • (Reasonable) concerns about automation replacing jobs Emerging from the Leyden jar era 18
  18. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com Also: It’s all happening so, so fast. 19
  19. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com How can we prepare ourselves? How can we protect ourselves? 20
  20. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • Steve Jobs once said that the computer is “a bicycle for the mind.” • Not a motorcycle! • A bicycle, which multiplies your effort • You have to learn to ride a bike • The better shape you’re in, the farther and faster you can ride • AI is an even greater force multiplier for your mind What is AI, really? 21
  21. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • Today, all human knowledge is available at anyone’s f ingertips • Do we need lawyers? • Do we need doctors? • Do we need architects? • Knowledge isn’t enough: • It isn’t wisdom • It isn’t experience • It isn’t judgment • It isn’t context • It isn’t critical thinking Knowledge isn’t enough 22
  22. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • To use AI effectively, you need to write well. • Word choice • Meaning • Precision • The more clearly you can write, the better your AI results will be. • Faster writing == faster iterations • (Learn to touch type!) • The more you write, the better you’ll get At the core? Writing. 23
  23. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • AI will make us all like project managers • We’re writing speci f ications • AI will perform the tasks • It’s not about “prompts” but about being clear and speci f ic We’re all project managers now 24
  24. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • What’s so special about research librarians? • We know how to read • We know how to f ind things in the library • But: • We don’t know how to phrase the questions • We don’t know in which resources to start looking • We are all going to have to gain these skills We’re all research librarians now 25
  25. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • “The new coding language is English” • No, it isn’t! English is a human language. It’s imprecise. It’s flexible. It’s vague. • That’s why it’s so powerful! • That allows us to make jokes! • Programming languages are different: They are rigid. Precise. Formal. Speci f ications vs. execution 26
  26. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • There is lots of talk about “vibe coding.” • In the hands of an experienced coder, vibe coding is a massive accelerant • But if you don’t have experience? You can get yourself into trouble • Jazz can be great! • Only from someone who has studied music • If a non-programmer vibe codes, they’ll get the software equivalent of me playing jazz Vibe coding! 27
  27. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • It uses the average of the Internet • Training determines everything • It knows more about Python than Haskell — because there’s more Python code on the Internet than Haskell • It can answer more questions in English than Spanish — because there’s more written about coding in English than Spanish. • It extrapolates, and thus exaggerates • It makes up (“hallucinates”) method, function, and package names • It suggests coding practices that are bad, old, or wrong • These problems are less common than used to be the case, but your experience and judgment are crucial How AI writes programs 28
  28. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • Even when speci f ied perfectly, software has bugs • So the combination of poor speci f ications + agents coding + inherent bugs means lots of new testing requirements • Dropping a production database (whoops!) • Claude Code non-English code injection • QA is about to get even harder and hairier • We’ll need to use AI Avoiding catastrophe 29
  29. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com The age of AI is the age of continuous learning 30
  30. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • Surviving (and thriving) means: • Good communication skills • Good research skills • Good learning skills • Not just new skills, but new ways of thinking • Gain experience in things you didn’t know before • Become an interdisciplinary researcher Continuous learning 31
  31. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com How can you do this best? With AI, of course! 32
  32. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • Everyone is talking about how AI will replace human coders • I don’t believe that’ll happen, at least not entirely • Coders will direct GenAI to produce code • And those coders will need to be really good! Coding isn’t going away 33
  33. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • How well can you use autocomplete if you don’t know the language well? • How well can you use autocomplete in Chinese if you only know pinyin, and not Chinese characters? • Not well at all, of course • Using a coding tool without knowledge, without judgment, will only lead to problems • It’s like playing jazz without a musical background GenAI coding is autocomplete 34
  34. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • We can (and should) use AI to improve our learning • Gain experience • Research topics • Understand things in greater depth • Even when GenAI automatically writes code, we’ll need experienced coders to supervise and understand it • So… how can we gain the experience we need? The promise of AI for learning 35
  35. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • I’m going to share my favorite AI-based learning techniques • These are not about having GenAI write code for you! • Rather, they’re about helping you gain experience, depth, and critical thinking skills faster so that you can write code yourself faster and also supervise GenAI coding better Techniques 36
  36. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • Jewish tradition is based on argument • We love to argue! • A great way to learn • A great way to understand better • It leads to chaos — but from that chaos, emerges a stronger, better understanding • Leads to healthy skepticism • Forces you to prove things, to f ind logical flaws Argue! 37
  37. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • The most important part of Cursor and Copilot: The chat window • AI-generated code often uses bad ideas • If you see something suspicious, push back: • Why did you use this technique: • What about this other technique? • No, I want to code it another way • An enthusiastic intern, not an expert Argue with the AI! 38
  38. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • I’m still re f ining these • I use some with my classes • Including them in my new book • I use many on my own, to learn things better myself • They’re all based on the ideas that • Interactions are key to learning • You’re forced to crystallize your thinking when talking • AI provides us with unlimited interactions AI learning techniques 39
  39. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • The simplest idea: Brainstorming! • “What do you think about this?” • The most important part: • But what about… • But isn’t… • What if I focus on… • Wouldn’t this have implications… Brainstorming 40
  40. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • Often, especially in my courses for newbies, even seemingly easy exercises are really, really hard for them •The biggest problem: Where do we start? •I often run a strategy session with my students •But this feels like cheating — I’m breaking things down for them •AI can make it better and personal •Present a strategy •Have AI criticize it •Important: Tell the chatbot not to write any code! Strategy sessions 41
  41. • My favorite new technique! • Give a working program

    to the chatbot • Ask it to interview you about the program • Important: Tell it what level you’re at! (This might be the hardest part) • This is a great way to reinforce ideas in class • Plus: It solves the homework problem Interview
  42. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • Once you have working code, ask the GenAI to modify it to include a new bug • Then you have to f ind the bug, and explain what the implication would be • It’s mutation testing, but where you’re the test system! “Plant a bug” 46
  43. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • This technique is the opposite of the previous one • You add a bug to the code, and ask the GenAI to identify the problem • Yes, it’s amazing to see how well AI systems can identify issues • But creating the bug, and knowing what the implications will be, is good for your learning “Find the bug” 47
  44. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • Pair programming works because you’re communicating • When you communicate, you’re forced to crystalize your ideas • “Rubber-duck programming” basically means pairing with yourself • You don’t have to wait for anyone else • You crystallize your ideas • Chatbots are great for this! • You have to write clearly… and they respond • But again, tell them to respond, not to write code Rubber duck programming 48
  45. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • The Socratic method: Ask students questions, forcing them to think and develop their thinking • The Reverse Socratic method: Ask the LLM directed questions to research or learn a subject • Asking questions crystallizes your thinking • Reduces the chance of LLM errors • Argue, summarize, and develop with prompts like: • Counter-examples (“but what about…”) • Summaries (“So what you’re saying is…”) • Comparisons (“So X differs from Y by …”) • It’s totally OK (crucial, even!) to say, “I don’t understand.” Reverse Socratic method 49
  46. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • Chatbots shouldn’t write code • But they can do a great job of reviewing code • What works well? • What could be better? • Be careful: Code reviews result in hallucinations • Again, it’s great to argue with the chatbot — don’t hold back! Code reviews 50
  47. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com 51 Reuven M. Lerner AI-Assisted Python for Nonprogrammers Learn Programming from the Ground Up
  48. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • Fred Brooks (“The Mythical Man- Month”) • When designing a new kind of system, a team will design a throw-away system (whether it intends to or not). • GenAI can create that version! • See the issues in the speci f ication • Better understand the potential holes • When you write one for real, it’ll be better Throw one away 52
  49. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • Ask a chatbot what it thinks, and it’ll almost always flatter you • Be careful to remain skeptical You’re a genius! 53
  50. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • You used to need someone to answer your of f ice phone, type correspondence, and schedule things for you • Now, you can do all of that by yourself! • Or you hire someone in another country to handle it for you on a part-time basis • Pretty soon, agents will be able to do much of what these people do • I’m already a pretty productive one-person company; just wait until I have agents at my disposal — for me and for my students The next step: Agents 54
  51. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • Agents have the potential to really change things • But you’ll still direct them via a prompt • Which means you’ll still need to use precise language in writing specs • And you’ll still need to supervise the outputs, and suggest alternative solutions • Which means that even when agents are everywhere, you’ll still need these fundamental techniques • And the learning techniques I’ve presented will still be useful, no matter what topic you’re learning The fundamentals will still help! 55
  52. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • AI-related changes are happening faster than the industrial revolution • And they’re even more widespread • Many, many people will lose their jobs in the coming decades • Every factory has a man and a dog • So yes, we need factories — but they don’t (and won’t) look like old ones Is society ready? 56
  53. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • Governments need to be ready for a much faster, much wider set of changes • A social safety net • Better schooling for children • More continuing education for adults • A focus on critical thinking and self learning, not on facts • Great book: “Weapons of Math Destruction,” by Cathy O’Neil Are governments ready? 57
  54. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • Learn to write better • Use AI to challenge yourself, to learn • It can be your gateway to learning, researching, and feedback • It’ll give you instant feedback on your code (and documentation) • Use it to write code, but only in small chunks • Only use AI-generated code where you can explain or justify it • Use your judgment to evaluate what it has done What should your next steps be? 58
  55. Learning & coding in the age of AI • PyCon

    India 2025 Reuven M. Lerner • https://LernerPython.com • E-mail: [email protected] • LinkedIn: https://LinkedIn.com/in/reuven • YouTube: https://YouTube.com/reuvenlerner • Better Developers: https:// BetterDevelopersWeekly.com • Bamboo Weekly: https://BambooWeekly.com • https://LernerPython.com Let’s be in touch! 59