AI and Future of Programming

This is a big topics these days. Try any AI, it can write better code than most human programmers. As a faculty in number of top universities, including Carnegie Mellon, Princeton, Rutgers, I have seen many students who were excellent programmers, but still lacked the ability to test the correctness or efficiency of the code they write. So, students often wrote code good enough to pass all the 'correctness' and timing tests related to the assignment. The 'correctness' really did not mean their code was correct, but was able to pass a finite number of tests. That is, for a given input, it gave the correct output. But because the number of possible inputs are countably infinite, there was no way to test the program with all inputs. So, we never really had many opportunities to test if a program is correct and should be recognized as exemplary.

Now, I am beginning to question if teaching students a programming language with specific syntax and semantics and then teaching them computational thinking to design an algorithm, translate that algorithm to computer code, test it and deploy is a useful skill anymore. Of course, I love the process of coding. It is always fun to think about how to put together the right set of instructions to get the job done. When your code runs, it is very rewarding to see the output. Especially, if it produces some cool graphic, a simulation or a nice long output. But I am getting lazy now. I no longer want to spend my time writing code, I can just ask one of many generative AI's to write code from a description. So my task now is to check if the program is correct and perhaps test to see if it runs under the time limits I have. As far as I know, there is no way to ask an AI to write a program that runs under a certain time limit, because for the most part it depends on how you plan to run the program, what data set etc.

Ok, so given that, it seems like we do not need as many programmers anymore. AI can do that really well. Perhaps we want to train students to use AI to generate programs, and test them for accuracy, improve them and do time tests. With that kind of skill set, students no longer need to learn to program (which is harder for a lot of people), but can learn other skills that make them code testers, code modifiers etc. I have not yet thought about how our introductory curriculum will change as a result though. The understanding of data structures and algorithms still seem important to computer science majors, but for vast majority, those skills may no longer be needed.

Moreover, the future of programming may not be the classical approach. Students need to learn how to find examples, good data sets, design architectures, and train machine learning models to allow the machine to create the program. Unlike classical programming where the human wrote the program, in the future it will be limited to human teaching the machine using some examples of a scenario to allow the machine to find the program. I do not think this is a bad thing, as more people can now learn to train machines to do what they want the machine to do.

So, what happens to computer science? We always used to tell the students computer science is not about programming. Its deep core message has always being what is computable? how can we compute it? how to prove a program is correct etc etc. So, now we can focus more on the depth of computer science to create better computer scientists, not marginal programmers who have introduced many bugs into our software systems costing companies and people, lots of time and money.

To view or add a comment, sign in

Others also viewed

Explore content categories