Sandwiching Technology: A Comparison of Traditional Programming and Machine Learning
Tasha Penwell
Founder/Educator | AWS Instructor, Education Professional, Subject Matter Expert
This past week teaching at Ohio University I introduced to my MIS class the classic activity of how to tell a computer to make a peanut butter and jelly sandwich. I explained that computers are essentially dumb machines that rely on specific programs to perform tasks as efficiently as they do.
Students were instructed to work in groups to write specific instructions on how to make the classic PB&J sandwich - including instructions on how to use the containers and utensils. It was interesting watching the students collaborate and ask questions "Are we talking about the good peanut butter that spreads easy or the cheap stuff?" The ability to spread easy and quality of all the products and packaging are examples of some of the variances that can make it challenging for programmers and developers to write bug free code.
The goal of this assignment is to help the students understand what makes machine learning different and why it has drastically impacted industries these past few years.
Let's begin with the traditional programming route...
Traditional Programming: The PB&J Recipe
In traditional programming, we need to provide explicit instructions for every step of the process. Failing to anticipate different scenarios can produce bugs, as the computer doesn't know how to handle unanticipated situations.
David Malan from Harvard University's CS50 has a great demonstration of the different ways not accounting for all the possibilities can lead to an error.
While traditional programming provides specific instructions for the computer to follow to create predictable results, an unexpected variable or unclear instructions can produce an error. Some of the limitations related to the PB&J sandwich includes the following:
Machine Learning: The PB&J Learner
Machine learning models, on the other hand, are trained on various data sets to recognize the different steps required to make a peanut butter and jelly sandwich. One example of this can include data sets on the various types of containers (jars, squeeze bottles, etc.).
After we reviewed the steps the groups developed, I asked them how would they typically tell someone to make a PB&J sandwich. These steps include things like...
The training that ML models go through can include things like being provided examples of successful PB&J sandwiches, analyzing the ingredients, proportions, and assembly methods, and learning the patterns and relationships from the data. This training allows the broader public a simpler way to engage with the computer to produce the desired result which allows these same users to invest their time and strengths into other areas of value.
Conclusion
While traditional programming remains essential for many tasks, machine learning offers powerful tools for tackling complex, data-driven challenges. Understanding the strengths and limitations of each approach allows developers to choose the right tool for the job.
Whether it's crafting the perfect PB&J recipe through traditional programming or creating adaptive systems that can whip up sandwiches for any taste using machine learning, both approaches have their place in our current business and technological world. The key is to recognize the complexity, data requirements, and maintenance needs of ML systems while leveraging their power and abilities.