The code the interns and I were looking at during this discussion was written in a procedural style. Procedural code accomplishes the goals of the system through a series of instructional steps, often breaking those steps up into procedures—called functions, routines, subroutines, etc.—as a way of making the code more modular and easier to understand.

It's the way most of us learned to code. Once you start thinking of programming as the manipulation of data, this style comes pretty naturally. Do this, then do this. Assign this value to that variable. If this condition is true, do this. Then pass these variables into this function, etc.

Here's a real world example based on a project I actually worked on, and it should help illustrate a fairly common pattern in procedural code.

Imagine a front-end form that allows users to create a new "schedule" (recurring set of events). Once a form is submitted, the form data is passed to a function that figures out if anything is missing and does a few transformations to get the data into the right format. Then it passes it to another function that saves it to the database.

You've been asked to build an importer to load data from an uploaded CSV, so you'll need to reference this existing code a lot and figure out where your importer will need to intersect with it, if at all.

Here's a simplified version of what that looks like.