Can AI write code for me now? Well, kind of.

Over the past couple of years, AI tools have proliferated. Among them, tools like GitHub Copilot and have been introduced, which add AI to the coder’s arsenal. So does that mean AI will write all of our code for us now, and replace the need for human developers? Definitely not! But it can save significant time and keystrokes. It’s not unrealistic to say that using AI in the engineering process will likely become critical to maintaining a competitive billing rate in the not-too-distant future.


Think of AI coding tools as autocomplete on steroids; on a lot of steroids, and with a lot of example code to base its suggestions on. Tools like IntelliSense have been able to provide accurate autocompletion for which variables and methods to use for some time now, by keeping track of an entire codebase to provide suggestions with good context. AI does the same, but instead of using “only” an entire codebase as context, it uses all of GitHub.” Copilot provides autocomplete suggestions, not only for which variables and methods to use, but also for what values and parameters to use, what new lines of code to write, and entire blocks of code and functions to write. That’s some significant keystroke savings!


Can’t remember how to grab the nth character out of a string? Rather than doing a quick search, Copilot can autocomplete that for you. Need a controller method that fetches a User by ID from the database and returns it? Rather than copying an existing method and making changes, Copilot can autocomplete that for you.


And it’s fast. Faster than your Google search.


But it cannot be trusted to act autonomously and requires a human to satisfy your client’s needs. I’ve been using Copilot in VSCode for a few months now, and it has definitely saved me time. Some suggestions are remarkably accurate and it can feel like it read my mind and wrote the same block of code that I would have written. Other suggestions miss the mark completely and provide no value. Other times, it’s in the right direction but needs changes. In all cases the process is as follows: start typing, wait a moment for autocomplete, read and review the autocomplete, accept or reject the autocomplete, make changes to the autocomplete, or write the code myself as usual. The net time savings are no doubt positive, but we humans are still essential to the process of creating code. AI is just another tool, albeit a very powerful tool, that aids us in that process.