I worked on a small project (in the Agile or JIRA world, it’s a story), and I experimented Copilot more this time, in fact, I think I tried to use Copilot as much or as practically as possible, for 2 out of the 3 main coding tasks. This is in addition to the Copilot code review feature which I have been using probably for a year now. Back to the coding tasks: refactoring and adding unit tests are the two main tasks that I used Copilot extensively. I also think Copilot did a decent job on bath. The 3rd task, which is to create a controller (an end point), I forgot to try the Copilot – hope I can try something like that down the road.
I used the IntelliJ Ultimate edition for my Java project IDE, and I was familiar with some IDE basic features on refactoring, such as extract methods, or change method signature. This mini project involves moving code from one layer down (from UI to the service layer). Copilot did it in one shot when I asked it to perform the task, from and to, mainly using the correct prompt.
For Unit Testing, I did two things, I changed the mocking framework from EasyMock to Mockito (which is more modern), also I added and cleaned all the unit tests, as much as I can. I admit I am still learning on the unit testing front. Sometimes I felt it’s somewhat like “teach an old dog a new trick”, I mean the “test driven development” or writing a complete unit test suite. But I am getting there: not just on Java, for JavaScript, I had some fun writing Jest test as well. For Java it’s JUnit.
Code review
This is similar as before I worked on this mini project, but I am getting more out of the Copilot code review comments, most of which I think is valid.
On a side note, I did a coding test for this LinkedIn AI trainer gig – not sure that I passed it, as I was not very confident on my Python language. But I still think it’s good exercise for me – I mean the coding test via HackerRank.

