Readplace

Unlocking AI’s Potential for Programming Productivity and Flow Without the Pitfalls

fagnerbrack.com ~2 min read
View original
  • current
Summary (TL;DR)
AI tools like Github Copilot boost productivity and help maintain creative flow, even when they give incorrect answers. They help developers regain focus quickly after interruptions, which is valuable since interruptions can cause significant stress and take 15+ minutes to recover from. By offering imperfect initial solutions within the IDE, AI prompts developers to recall correct approaches and overcome the 'blank page' problem. This is especially helpful for those with ADHD, keeping them on task without distractions.

Some developers might be sceptical about using AI tools like Github Copilot due to the occasional incorrect answers. However, my experience has been quite the opposite. Although I was very sceptical at the beginning, the real power of these tools lies in their ability to increase productivity and maintain the creative flow, not to provide correct answers. In this blog post, we’ll explore the ways in which AI tools can help you harness these benefits and transform your development process.

Although AI tools like Copilot may sometimes provide incorrect answers, their real value lies in their ability to improve productivity and facilitate action and flow. By providing an initial approach to coding problems and keeping developers engaged, AI tools can help you stay focused and maintain your creative momentum.

It’s been shown[1] that after only 20 minutes of interrupted performance, people reported significantly higher stress, frustration, workload, effort, and pressure. It can take 15 minutes or more for people to get back into the flow after being interrupted during a programming task [2]. However, what I noticed in my own experiments is that AI tools like Github Copilot help me regain my focus in a matter of seconds. By offering personalized suggestions within the IDE, the copilot can quickly bring me back to my task and minimize the time spent regaining my bearings.

Here's an example: I was designing a simple validation function using TDD (Detroit School), and I got distracted by something outside and lost my focus. I asked ChatGPT to "continue TDD to build the next test from where I left off". After a few enter key presses, it suggested the wrong test based on the previous ones, but at least by analysing its suggestion, I managed to delete it and get back on track, knowing exactly what the next step was.

Here's the thing: AI tools can provide a starting point for tackling familiar problems, even if their initial solutions are not perfect. This technique is reminiscent of psychological methods used to overcome procrastination and maintain action and flow [3]. By offering an imperfect solution, AI prompts developers to recall the correct approach, allowing them to efficiently tackle problems they’ve solved numerous times before.

Overcoming the Dreaded “Blank Page”

The “blank page” refers to the overwhelming feeling of staring at an empty screen, unsure of how to start a project or tackle a problem. AI tools like Copilot can help developers overcome this barrier by providing initial suggestions and code snippets to kick-start the creative process.

The convenience of staying within the IDE view and receiving personalized suggestions makes AI tools like Copilot invaluable for keeping developers on track and avoiding time-consuming rabbit holes. By providing targeted assistance within the familiar environment of the IDE, developers can maintain their focus and avoid distractions, which is very useful for those with ADHD.