The Real Python Podcast

Solving Problems and Saving Time in Chemistry With Python


Listen Later

What motivates someone to learn how to code as a scientist? How do you harness the excitement of solving problems quickly and make the connection to the benefits of coding in your scientific work? This week on the show, we speak with Ben Lear and Christopher Johnson about their book “Coding For Chemists.”

Christopher is an associate professor of chemistry at Stony Brook University. Ben is a professor of chemistry at Penn State’s Eberly College of Science. They’re long-time friends who decided to collaborate on a book after discussing the challenges of teaching coding to chemistry students.

The book targets chemists and other researchers who want to streamline common workflows with Python. It covers core Python concepts, data visualization, and data analysis topics by sharing common problems encountered in chemical research and presenting a complete Python-based solution for each problem.

We discuss how they collaborated on the book and decided what libraries and tools to include. We cover how LLM tools have affected classroom teaching and require new techniques to reinforce learning. We also dig into what motivates students to learn how to code.

Course Spotlight: Defining Python Functions With Optional Arguments

In this video course, you’ll learn about Python optional arguments and how to define functions with default values. You’ll also learn how to create functions that accept any number of arguments using args and kwargs.

Topics:

  • 00:00:00 – Introduction
  • 00:02:06 – Ben’s background and starting with Python
  • 00:04:34 – Chris’ background and starting with Python
  • 00:07:16 – What has sped up Python for your use?
  • 00:08:22 – How did idea for the book start?
  • 00:11:30 – Shifting publisher and new release time frame
  • 00:12:24 – Three potential audiences
  • 00:13:20 – The ubiquitous need for programming skills in science
  • 00:15:05 – Difficult workflows with chemistry equipment
  • 00:16:06 – What is a chart recorder?
  • 00:16:34 – Working with proprietary equipment and exporting data
  • 00:23:37 – Explaining how programming will help chemists
  • 00:27:31 – Finding the problems to solve
  • 00:29:09 – The classic common chemistry workflow
  • 00:30:48 – Teaching Python in a classroom and starting with functions
  • 00:35:05 – Helping students cultivate inspiration
  • 00:37:06 – LLM and AI use by students
  • 00:41:19 – Video Course Spotlight
  • 00:42:36 – Using Spyder IDE and Positron
  • 00:45:29 – How does the book cover notebooks and managing packages?
  • 00:48:08 – Using marimo for archiving and sharing projects
  • 00:50:25 – What was difficult to put into the book?
  • 00:54:04 – What were you eager to share in the book?
  • 00:55:54 – Teaching students about file management
  • 00:58:13 – Sharing tools to plot data
  • 01:01:45 – Choosing not to teach pandas and using NumPy arrays instead
  • 01:04:03 – How can people learn more about the book?
  • 01:05:20 – What are you excited about in the world of Python?
  • 01:07:58 – What do you want to learn next?
  • 01:10:50 – How can people follow your work?
  • 01:12:15 – Thanks and goodbye
  • Show Links:

    • Coding For Chemists - Getting Started
    • Ben Lear - Eberly College of Science
    • Christopher Johnson - Department of Chemistry
    • Chart recorder - Wikipedia
    • pandas - Python Data Analysis Library
    • NumPy
    • Spyder - The Python IDE that scientists and data analysts deserve
    • Positron
    • marimo - A next-generation Python notebook
    • Streamlit - A faster way to build and share data apps
    • Plotly - Data Apps for Production
    • Bokeh
    • Vega-Altair: Declarative Visualization in Python
    • codechembook - PyPI
    • CodeChemBook: Companion library for Coding for Chemists Book - GitHub
    • Data Meets Design
    • The Lear Laboratory
    • Statistical Inference - 2nd Edition - George Casella - Roger Berger
    • Johnson Lab @SBU
    • Christopher J. Johnson - Google Scholar
    • Benjamin Lear - Google Scholar
    • Level up your Python skills with our expert-led courses:

      • Defining Python Functions With Optional Arguments
      • Data Visualization Interfaces in Python With Dash
      • NumPy Techniques and Practical Examples
      • Support the podcast & join our community of Pythonistas

        ...more
        View all episodesView all episodes
        Download on the App Store

        The Real Python PodcastBy Real Python

        • 4.7
        • 4.7
        • 4.7
        • 4.7
        • 4.7

        4.7

        136 ratings


        More shows like The Real Python Podcast

        View all
        Software Engineering Radio - the podcast for professional software developers by se-radio@computer.org

        Software Engineering Radio - the podcast for professional software developers

        274 Listeners

        The Changelog: Software Development, Open Source by Changelog Media

        The Changelog: Software Development, Open Source

        284 Listeners

        Thoughtworks Technology Podcast by Thoughtworks

        Thoughtworks Technology Podcast

        40 Listeners

        Data Skeptic by Kyle Polich

        Data Skeptic

        481 Listeners

        Talk Python To Me by Michael Kennedy

        Talk Python To Me

        590 Listeners

        Software Engineering Daily by Software Engineering Daily

        Software Engineering Daily

        621 Listeners

        The TWIML AI Podcast (formerly This Week in Machine Learning & Artificial Intelligence) by Sam Charrington

        The TWIML AI Podcast (formerly This Week in Machine Learning & Artificial Intelligence)

        441 Listeners

        Super Data Science: ML & AI Podcast with Jon Krohn by Jon Krohn

        Super Data Science: ML & AI Podcast with Jon Krohn

        298 Listeners

        Python Bytes by Michael Kennedy and Brian Okken

        Python Bytes

        215 Listeners

        Data Engineering Podcast by Tobias Macey

        Data Engineering Podcast

        141 Listeners

        Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

        Syntax - Tasty Web Development Treats

        987 Listeners

        CoRecursive: Coding Stories by Adam Gordon Bell - Software Developer

        CoRecursive: Coding Stories

        189 Listeners

        DataFramed by DataCamp

        DataFramed

        267 Listeners

        Practical AI by Practical AI LLC

        Practical AI

        192 Listeners

        The Stack Overflow Podcast by The Stack Overflow Podcast

        The Stack Overflow Podcast

        62 Listeners