Who Is The Better Half?

Who Is The Better Half?

I have been itching to write this post for more than a month now but have been postponing it for a good reason. Before you get yourselves comfortable on your couch with a bowl of popcorn, I do want to clarify that this post is not about who is better among me and my wife ??. That is a universally foregone conclusion. This is about a futuristic code completion extension from GitHub which is currently in private beta testing (technical preview).?

Just reading about this brought in a flood of thoughts & emotions in my head taking me all the way back to my serious programming days. To me coding has never been only about creating some cool functionality, that is an eventual byproduct. It is always about the joy of formulating a piece of logic, hearing the sound of keyboard button clicks, watching the fingers trying to keep pace with the mind, and continuously refactoring the code to death.?

I have had the good fortune of doing pair programming with some of the best minds. In particular, I fondly recollect the times when I did pair programming with my German colleague. We worked together for a decade and had a good understanding of each other's strengths. We took turns at the keyboard while other was overseeing and implemented quite a lot of features in the product. My colleague was much senior to me with brilliant ideas and I was a disciplinarian with an eye for detail. Few things got accomplished in that process, the code written was creative, well thought through, reviewed, bug-free, and mostly worked the first time saving a lot of rework.

The learnings that I gathered from pair programming were stowed away in my memory to be referred to for years to come. The other source of learning I had was to go through the code written by my seniors in the team within the context of the product that we were building. This taught me an efficient & elegant way of coding logic which shaped my thought process ever since.

When I moved on to another organization I was in for a shock as it had a completely different culture. I seldom found anyone coding after 4 or 5 years of experience. People were made team leads after 4 years and were mostly given managerial tasks. Young programmers had no one to look up to and were turning to sites like Stack Overflow and tutorial pages for solutions & examples. As part of my responsibilities, I had to review the design & code of several applications. On one hand, I was frustrated looking at some bad code but on the other hand, had sympathy for the developers who implemented them. When I spoke to them, in many cases, what I figured is they didn’t really understand what the code was doing. They simply copied it to complete their work and that was all that mattered to them.

You might be wondering where I am going with this and getting digressed. Please stay with me as the idea is to set some context upfront for the arguments that I wish to make in the rest of the post. More on that shortly. Now some details on the extension in question and what it does.

Copilot is an AI-based advanced code completion tool from GitHub. It is built on codex AI system from OpenAI. It is being offered as an extension in popular IDEs like Visual Studio Code, JetBrains, and Neovim. There are plans to offer it as API as well once the system matures. It has support for most of the popular programming languages out there.?

As programmers, we are quite familiar with the simple IDE-based code completion for things like try-catch blocks, loops, function & class definitions, and more. Consider Copilot as code completion on steroids i.e., implementing the actual logic within the skeleton above without the need to type a single line of code. Sounds too good to be true?

Well, it certainly piqued my interest when I read about it in multiple forums and made me share my thoughts. But as I mentioned at the beginning of this post, the delay in holding on to this was not due to lack of time or interest but I felt it wouldn't be fair to give an opinion without getting one's hands dirty. Though I registered for the access more than a month back, I got the privilege only recently and hence the delay.?

Like an eager child unwrapping his birthday gift, I diligently followed the instructions to install the Copilot extension in VS Code and completed the authorization for GitHub to collect telemetry data. Created a new file named copilot.js and sat for a few seconds with the blank file open. Running out of intelligent problems to try I settled for the time-tested add function and typed "function add" and voila the following got splattered onto the screen as a suggestion. Upon pressing Tab the suggestion got added as actual code.

function add

Buoyed by the sudden euphoria I started trying out a few utility functions like string manipulations, array operations, and date functions. Added to this, Copilot was able to suggest the first line of the code just by looking at the comment typed capturing the intent of the function; confirmation of which autocompleted the rest of the function logic. And to add icing on the cake it even offered to autocomplete the comment that I was typing to describe the function. At this point, I was almost expecting it to read my mind without even me tying anything. But I guess we have to wait for the next release for the brain interface support. That is not all, for any given suggestion if you press Ctrl+Enter it shows a number of alternative code snippets allowing the user to choose one from them.?

Create function from comment

Basics out of the way I pressed on writing a comment to get the weather for a given city using a REST API and it actually suggested a fully working code from the Open Weather Map API complete with markers for passing the city name and API key. I mean what more can you ask for?.

Create function for a REST API

I switched to Java and the suggestions for many of the functions were mostly comparable. There were also other cool capabilities like auto-creation of sample data i.e., arrays, lists. Creating a function immediately after that was even taking the contextual details while naming the function and variables.?

Create function with contextual details

But when I tried something slightly complex the results were a standard two-line code that simply returned the parameter that was passed as an input. I guess this is a good juncture for me to stop on Copilot's capabilities as the intent of this post is not to delve into its detailed capabilities. There are several good articles and videos which does a good job on capabilities.

Under the hood, I guess Copilot is a combination of an NLP engine to determine the intent, a search/indexing algorithm scanning through GitHub's public repos, and an AI to rank the suggestions (and acceptances) before returning them. But of course, I am trivializing the complexity behind this powerful tool. Nevertheless, this has evoked a wide variety of views on the internet ranging from this being the next-best-thing-on-the-earth, to infringement of copyright, to an outright jobs killer.

But my take is about none of the above. I am more interested in the human experience and potential. It made me wonder whether this is a boon or bane for the young programmers? Will it help them to be self-taught or make them lazy dim wits? Will it aggravate the already existing problem of developers simply using aids for the sake of work completion?. Well, the answer is, it depends. It comes down to the individuals' perspective of how they will leverage it.

Having said that whatever I have seen so far doesn’t give an impression that this is a job killer, at least in its current state. It is good for creating utility functions and some well-published common functionality. In reality, the core of what gets built in real-world applications is much beyond this. What would really help is if the API, SDK, and integration providers package such capabilities as part of their offering so that programmers don’t have to unnecessarily spend time figuring them out. Today a lot of time is spent on figuring the documentation which in many cases is found wanting.

Before I closed this post I got my 15-year-old daughter, who has been taking Python programming in the last couple of years, to take a look at this cool tool. The disgust I saw in her face and in her own words "where is the fun if this does everything for me?" made me happy as a programmer (and as a father) which gives me hope that no matter how many such copilots emerge humans will always be the better half.

Selvakumar Srinivasan

Digital Transformation | Cloud | Digital Strategy, Architecture and Engineering | Microservices | Java

3 年

Nice to read. Hope AI pair programmer gives good company to developers :)

回复

Well written

Training a ML model is getting cheaper at rate of 68% YoY which is a crazy rate. So that will get better exponentially. One will still have a job if you do better than AI or design the AI :).

Rickson Kuriakose

Data Product Management at The Hartford

3 年

Nicely written! I love Excel's formula completion suggestions but totally hate it when GMail suggests next phrase when composing an email.

Shinoj GK

Scrum Master at Cognizant Technology Solutions,ICP-ACC?,CSM?,SA?

3 年

Nice one. I could connect till pair programming and I hear the same from my team mates as well. Also learning by experience is the best way to learn. What is learnt this way stays with you very long. Thanks for sharing this

要查看或添加评论,请登录

Balaji Mohan的更多文章

  • RECONNECT99: From An Observer's Vantage Point

    RECONNECT99: From An Observer's Vantage Point

    After an eventful road trip, I finally reached the venue of my college reunion, The Raviz Kadavu. Parked my car, got…

    4 条评论
  • A Road Trip To My College Reunion

    A Road Trip To My College Reunion

    It's been 25 long years since I left college and I was gearing up for the reunion meet (REConnect99). A year long…

    8 条评论
  • Subject To Market Risk

    Subject To Market Risk

    Those of us who have invested in the markets, in one way or the other, would've invariably done couple of things. One…

    6 条评论
  • A Blast From The Past

    A Blast From The Past

    Recently while I was rummaging through my cupboard, I got hold of the book Thirukkural. This was one of the first…

    1 条评论
  • The Time Of Our Lives

    The Time Of Our Lives

    If I were to ask you to think of a trending topic that will change the course of our lives irreversibly, then there is…

  • Through the Looking Glass

    Through the Looking Glass

    Successful organizations are fuelled by a seamless flow of communication among their employees. There has been no…

    4 条评论
  • The (Un)Real Estate

    The (Un)Real Estate

    The world is a strange place. This applies equally to the Metaverse as it takes shape and defines its purpose of…

  • NFTs - (Caught) Between CryptoPunks And CryptoPoops

    NFTs - (Caught) Between CryptoPunks And CryptoPoops

    Ever since I wrote my previous article (The Hitchhiker's Guide To The Metaverse), one particular aspect of Web 3…

    1 条评论
  • The Ancient Art Of Gamification

    The Ancient Art Of Gamification

    Gamification, as a term, came into existence in 2008. It took a while to get adopted in different domains but today we…

    2 条评论
  • The Hitchhiker's Guide To The Metaverse

    The Hitchhiker's Guide To The Metaverse

    Unless one has been spending time in a parallel universe it would've been hard to miss all the buzz around Metaverse…

    1 条评论

社区洞察

其他会员也浏览了