Business Central Musings

For the things we have to learn before we can do them, we learn by doing them

Test-driving Github Copilot for AL developers + thoughts

Share This Post

Many of us, AL developers, have seen the launch of Github Copilot late last year and some of us have already tried it.

I recently started to work a few weeks ago with it and would like to share what I learnt.

Set your Github Copilot up

First, in VS Code, install Github Copilot.

Start your free trial on Github web site:

Next, review the Github Copilot settings in VS Code. From File – > Preferences -> Settings (search for Copilot):
VS Code Github Copilot Settings

You can disable / enable Github Copilot from the right side of the VS Code Status bar:

For more information on:

  • enabling/disabling inline suggestions or
  • enabling/disabling copilot for a specific programming language
  • configure proxy settings
  • enabliong/disabling telemetry

Please visit official Docs Github page.

Lastly, start writing AL code.

I am going to go through an example that any AL junior developer would go through in an AL Developer interview.

AL Interview Question for Copilot

7-8 years ago I was tested on an exercise that simply resembled the text below:

“Add on Sales Order a field and propagate that field value to the posted document”.

If you’re curious how that went please watch my youtube video to see how Github Copilot helped with this exercise.

Some basic things like adding page fields or populating table, page and field properties are within the range of what Copilot can help with at this point.

Github Copilot didn’t know about adding fields to a Base application table via table extensions and page extensions, or about passing values between documents and their posted counterparts.

Some final thoughts

AL developer leads the way right now, but Copilot can help with table/page/field properties, obvious assignments, like posted doc field takes original doc field value, or repeating patters like do something with a PO, but do something similar with a return PO. How far is Copilot from leading the way and only wait on developer at strategic software crossroads? I don’t know… it might be faster than what a human might believe, as seen on what it can do with more mainstream languages like Javascript or Python.

There is a gap between requirements and final code as Copilot is not aware of business processes in BC, fields transition from original documents to the posted documents, like I showed in my video.

I also admitted that I only used copilot for a few weeks, and the Copilot behavior today will most likely be different a year from now (need set that reminder in twitter … ), behavior and learning drawn from my own AL code and from all other AL developers that use Github Copilot.

For many out there here comes the dilemma:

  • Do you use a tool that you know it can help you produce more quality code and faster for your customers, OR
  • You train “the machine” on ERP and AL skills that you learnt in the last x years, fully aware that “the machine” one day might be better than you, and potentially replace you.

For me the dilemma is quite easy to solve, there is much more to learn than I know now and I am willing to allow Copilot in my daily work. Today, I am training Copilot, but tomorrow I could learn from it.

Share This Post

Related Articles

Leave a Reply

Recent Posts

Get Notified About New Posts

Categories