Content and Authority for AI Answers

On Teaching Computer Programming in Today’s AI-Enabled World

Strategic Applied Analytics Leader and Professor Dave Cameron offers commentary on teaching computer programming in today’s AI-enabled world. This article originally appeared in Insight Jam, an enterprise IT community that enables human conversation on AI.

Since the inception of teaching how to write programs so that a computer will execute code to meet a need, university and high school courses have stressed details on syntax. This has been true no matter what the platform is or what the computer language is. Semester classes followed traditional textbooks that ran upwards of 400 pages covering details of various types of situations along with options for coding specific to each situation. Grading was based on how perfect the syntax was. Yet, that model of teaching is no longer applicable. In the business world, the cost of producing working code has collapsed. The cost of producing trustworthy analysis has not.

Students today can produce syntactically correct first-pass program code within two minutes for nearly any coding exercise in the traditional textbooks using a generative AI assistant. What they cannot produce in two minutes is the judgment to know whether the code answers the right question, whether the data it consumed is fit for purpose, and whether the result is something they can stake their reputation on.

In past years, analysts would leverage a software engineer to write the code for their analysis. In today’s world, analysts are expected to leverage generative AI along with their domain expertise to do the analysis. Writing elegant code is less important than getting the correct insight. A student who writes picture-perfect code but misreads the true question has not done what is needed. A student that writes suboptimal code yet surfaces a real decision-grade insight has done what is needed.

Since generative AI tools can produce a working first draft of nearly every coding exercise from a traditional textbook, teaching is now focused on defining the question, validating the data, sense-checking the output, and translating the findings into a recommendation that a business will act on.

Most introductory programming materials begin where the file already exists, the columns are named correctly, and the values are clean. That is not the world a working analyst lives in. In a typical engagement, before any analysis happens, the analyst spends roughly 70 percent of the project on a sequence of unglamorous questions (based on surveying recent university graduates):

  • What is the right dataset to answer this question?
  • Which system holds it — a transactional database, a data warehouse, a third-party API, a vendor file, a spreadsheet on someone’s laptop?
  • Do I already have access? If not, who grants it, and how long will that take?
  • Once I have it, how do I structure, clean, and verify it before I trust it?
  • How do I document what I did so a colleague can reproduce or audit it later?

Only after those questions are resolved does the analyst write the code that the textbook treats as the entire job. The remaining 30 percent — the analysis, the model, the chart, the deck — is the visible part. The 70 percent underneath it is what makes the visible part trustworthy. Given today’s generative-AI capabilities, programming courses are more valuable when teaching how to best answer those questions.

For classes in coding, my colleagues and I have moved to an eight-point approach:

  1. Business Context: A short narrative establishing the background, the stakeholder needs, and the decision on the table.
  2. The Data: A description of the dataset students will work with, including a data dictionary and notes on known quirks or planted defects.
  3. Technical Learning Objectives: What programming concepts the exercise is designed to introduce or reinforce.
  4. Critical Thinking Learning Objectives: What judgment, framing, or interpretation skills the case is designed to develop.
  5. Suggested AI Prompt: A prompt that students can paste into an AI assistant as a starting point. Each prompt is intentionally underspecified so that students must refine it once they see what comes back.
  6. Common AI Pitfalls: The specific ways an AI-generated solution is likely to be wrong, misleading, or incomplete in this case.
  7. Discussion Questions: Five to seven open-ended questions for in-class discussion, designed to escalate from technical to strategic.
  8. Deliverable: What each student produces. Most deliverables are short — a one-page memo, an exception report, or a labeled segmentation map.

Let’s illustrate the 8 points through a real-world example:

Business Context

Pinegrove Foods, is a fictional grocery store chain consisting of 90 stores. They have an app available for smartphones. For customers who download the app, their purchase history is retained. Discount offers and other promotional offers are made available based on a combination of customer purchase history at the app user level and Pinegrove’s business needs. Pinegrove will be launching a new family pack and wants to target profitable customers.

Data

The data consists of all the products and prices for each of the last 12 months of shopping trips. Also included are demographics such as age, income, number of people in the household, number of kids, home address, and distance to the nearest store.

Technical Learning Objectives

Process the data, ensuring data quality, and use it to predict how much each customer will spend on the new family pack over the next few months.

Critical Thinking Learning Objectives

Determine what could go wrong with the data, determine what common-sense features would likely be predictive, and decide on code that would work should the marketing efforts change.

Suggested AI Prompt

Provide the above information from points 1 and 2 to generate a thorough AI prompt.

Common AI Pitfalls

With customer address, we have a zip code. Would AI generate code that makes the zip code an integer? If so, we lose the 10% of the U.S. where the zip code starts with 0. Are there missing data? Could number of people in the household be 0?

Discussion Questions

  • What should we do with missing data?
  • What rules do we set for what’s good or not good? Such as the oldest age someone could have.
  • What would be appropriate predictors for a family pack?

Deliverable

An equation that uses the data on each household to predict spend at the app user level for the new family pack. Ensure predictors make sense. Running everything through AI results in an equation that has a negative coefficient for number of kids. This means the more kids you have, the less you are likely to spend on the family pack. That is a function of multi-collinearity. The code is “right” but the answer is wrong.

In the past, the focus would be on the syntax needed to produce the output along with efficiency as if the code would be put into a production system where CPU time was crucial. Today, with Cloud-based services, CPU time no longer at a premium, and the strength of AI-tools for tasks such as coding, this new approach is what employers often want. So, instead of spending hours in class discussing optimal syntax for decision statements, data length, appropriate variable names, which loop to use, and so on, we cover that in much less time and focus on optimizing the AI prompt along with everything that could go wrong.

Grading is now done by evaluating the following four points:

  1. Framing – does the deliverable answer the question that was actually asked for by the decision maker – not the question the student wished had been asked.
  2. Process and validation – assumptions need to be documented, outputs checked, anomalies noticed and handled appropriately.
  3. Technical execution – the code runs and the logic is graded; efficiency and elegance are not part of the grade – a working, verifiable result is.
  4. Communication and recommendation – the process and the solution are explained well, along with a clear actionable recommendation – including what could go wrong.

Surveys of recent graduates have repeatedly shown that they are expected to perform on their job according to the four points above. This approach will leverage today’s AI-driven environment and set students up for success post-graduation.

Share This

Related Posts

Solutions Review Thought Leaders Ad

Solutions Review Events Ad