The Six-Week Challenge
âPut frustrated minds in a single room, give them the tools, and you will see something groundbreaking.â Thatâs what I tell myself as I glance at the clock, already ticking past the four-minute mark since the meeting was supposed to begin. Weâre in the Turing room, a sparse, modern meeting space named after one of the pioneers of computer science. Tweet that opening line; youâll find it relevant soon.
Beside me sits Marco, his eyes shifting between his phone and the door, which weâve left half-open in anticipation of Ayseâs arrival. Should I send a Slack message? Cancel the meeting? Just then, I see a flurry of dark curls speed past the doorway.
âAyse?â I call out, though perhaps not loud enough. Sheâs already disappeared from view.
I stand up and walk toward the door. Marco, curious and obviously not wanting to be left out, follows suit. We both stand at the threshold, peering down the labyrinthine corridor of the office.
Finally, I spot Ayse at the far end of the corridor. Relieved, I wave to her. She waves back, lengthening her strides as if sheâs in the final stretch of a marathon.
When she reaches us, she shakes her head, almost in disbelief. âI thought the Lovelace room was on the other side,â she says, her tone laced with a mix of apology and exasperation.
We enter the room with a sign above the door saying âTuring.â I donât say a word.
Ah, the trials of navigating both code and corridors. It may just be the starting point we need. After all, the best melodies often begin with a bit of dissonance. Tweet that too, by the way. Shall we get started?
Managing an engineering team is like being the conductor of an orchestra where everyone is a soloist. Talented, yes, but also set in their own ways. Iâve been sensing the low hum of frustration for a while now, like a dissonant chord in an otherwise harmonious melody. Time to bring in something newâperhaps a touch of AIâto reinvigorate the team and solve some lingering issues.
I asked my tech leads who theyâd recommend for this new, exciting, yet risky pilot project. Their choices? Marco and Ayse. Marco is what youâd call vintage curiosity wrapped in the guise of a software developer. Ayse? Sheâs a modern-day renaissance woman juggling code and family life with apparent ease. Well, sometimes dropping a ball.
Weâre all settled into the Turing room now. With a ten-minute delay, I start the kickoff.
âAlright, listen up, Marco and Ayse. Your frustrations havenât fallen on deaf ears, Iâve heard them, loud and clear. Youâve got six weeks to find a fix. But not just any fixâa solution thatâs going to make life easier for everyone on all three teams in our department.â
I pick up a dry-erase marker and write â6 weeksâ boldly on the whiteboard, circling it for emphasis.
âFeel free to use our cloud infrastructure, within reason, of course. And hereâs the cherry on top: youâll have access to a Large Language Model to help you out.â
Marco: âWhat about sensitive data and intellectual property related to our source code? We canât just feed them into an LLM.â
âNo worries, Marco. This is a private model, brought to you by a startup run by a friend of mine. Our intellectual property will be safe and sound.â
Ayse: âI was thinking we could use the AI to tackle Vladimirâs Revenge.â
Marco and I exchange glances.
Ayse: âOh, sorry, thatâs what weâve been calling this particularly troublesome part of the legacy ORM. Itâs been a nightmare to debug and maintain.â
Marco: âLarge-scale refactor sounds tempting, Ayse, but youâre not thinking about the downsides. What if the AI introduces new, harder-to-spot bugs into the code? We might fix Vladimir only to invite Rasputin to the party.â
Now weâre getting into the crux of it. Ayse, the ever-optimistic problem solver, meets Marco, the cautious guardian of the codebase. Itâs like watching a symphony warm up. Cacophony hints at the music yet to come. Tweet this.
The Skeptic
Six weeks later, the big day arrives. The large meeting room, known as the âTesla Room,â is buzzing with anticipation as people trickle in. Developers, tech leads, and project managersâabout 20 of us in allâare gathering around the U-shaped table, setting up laptops and chattering about whatâs to come. âWhat did Marco and Ayse come up with?â is the question on everyoneâs lips.
Marco takes the stage first, laptop in hand. He tries to connect it to the projector, fiddling with cables and ports. No luck. âDemo effect,â someone calls out jokingly from the back, breaking the tension. Marco gives a half-smile, unplugs and replugs the cable, and voila! The projector springs to life.
The screen lights up in an eye-catching blend of sepia and vibrant magenta, a stark visual representation of the Marco-Ayse partnership. You can almost hear the collective âoohâ in the room. The user interface is deceptively simple, yet intriguing.
On the left, a large text box set against a sepia background is labeled, simply, âYour Thoughts.â It seems almost like an invitation to a bygone era, beckoning you to pour out your most complex algorithms or perplexing bugs.
Adjacent to it, on the right, a much larger text area stands out against a magenta backdrop. This one is labeled âAI Insight.â If âYour Thoughtsâ was an invitation, then âAI Insightâ is the party itselfâvibrant, dynamic, ready to engage.
Marco takes a moment to let the audience absorb the UI, then moves his cursor into the âYour Thoughtsâ box. âLetâs put it to the test, shall we?â
He types, âGive me an overview of our systemsâ health.â
The words appear on the sepia box in real-time, each keystroke echoing slightly through the speakers connected to Marcoâs laptop. As soon as he hits the âEnterâ key, the magenta âAI Insightâ box springs to life.
Nodes pop up on the screen, each one labeled with its name, average response time in the last hour, and uptime percentage. The crowd leans in, eyes scanning the data points. All the nodes are shaded in greenâexcept for one, which is highlighted in yellow.
âHere you go,â the AI writes in a simple, straightforward sentence at the bottom of the âAI Insightâ box. âAll systems are running smoothly. However, Node-23 shows a slightly higher response time. No immediate action required, but might be worth checking in an hour.â
The room is still, but you could almost hear the gears turning in everyoneâs minds. The AIâs judgment, delivered so succinctly, mirrors the collective assessments we often spend ten minutes reaching in team meetings. Marco turns to face the room.
âThis is just a morning routine. Itâs time to work.â He says while typing, âWhat shall I work on today? Consider my meetings and deadlines.â
The text Marco types appears in the sepia box, that rustic canvas awaiting a response. After a heartbeat, the magenta area beside it comes to life. A list materializes:
âOptions for Today:
Tackle Bug #345: âMemory Leak in Payment Gatewayâ - Time Estimate: 3-4 hours
Work on Feature âDynamic User Preferencesâ - Time Estimate: 5-6 hours
Review Pull Request #67 - Time Estimate: 30 minutes
Plan and Document Next Sprint - Time Estimate: 2-3 hours
Mentorship Session with Junior Dev - Time Estimate: 1 hour
Available time before next meeting: 4 hours.â
Below the list, another sentence appears, crystalline in its directness: âBased on your available time and priority settings, it is slightly better to focus on fixing Bug #345.â
A ripple of whispered commentary goes through the room. This is what many had been hoping forâan AI assistant that not just understands the nuances of software development but also factors in the all-too-human aspects of time and priority. Marco nods at the screen and then turns back to the audience.
An older team member, Jim, whoâs been with the company since its dial-up days, canât contain himself. âWell, thatâs nice, but all youâve done is hook up to Google Calendar and Jira through their APIs. Thatâs Programming 101.â
A murmur of agreement ripples through the room, and Marcoâs face tightens for a moment.
Memory Leak
Before Marco can find the words, Ayse steps in. âAbsolutely, Jim. Itâs like cooking, isnât it? We all have access to flour and sugar, but wait until you taste the cake.â
A knowing smile crosses her face as she continues, âAnd letâs not forget, we also had to make this âcakeâ compatible with AWS, which, as some of you might know, is not exactly a sprinkle of sugar on top. Now, shall we move on to the actual debugging capabilities of our tool?â
The roomâs atmosphere shifts subtly; the skepticism morphs into curiosity. Ayse gestures toward Marco. âNow that weâre all on the same page, let me hand it back to Marco. Heâll show you how we tackle something we all love and dread: bug fixing. Marco, why donât you show them what happens with Bug #345?â
Marco regains his composure, happy for the assist from Ayse. He moves his cursor back to the âYour Thoughtsâ text box and types, âWhatâs the best approach for fixing Bug #345?â
The âAI Insightâ area starts filling with text. âYou have 3 hours before your next meeting. You could either work on developing the Feature âDynamic User Preferencesâ, which would take approximately 5-6 hours, or you could address Bug #345, estimated to take 3-4 hours. Considering the impact and severity of Bug #345, itâs advisable to fix it first.â
Marco turns back to the crowd. âSee, it not only provides a recommendation but also considers our workday constraints. Itâs more than just connecting APIs; itâs about making smart, efficient choices that benefit the whole team.â
Jim, the skeptic from before, leans back in his chair, visibly impressed but not fully converted. Ayse catches Marcoâs eye and gives him a nod. Itâs clear their âcakeâ has more layers yet to be revealed.
Marco shifts his attention back to the screen. âBut before we dive in to fix the bug, letâs not forget the crucial step: triage.â He types, âIs this really a bug?â
The âAI Insightâ section begins to populate with text once again. âRelated Issues: #220 âPayment Gateway Timeoutâ, #312 âUnexpected Behavior in Payment Processâ. Relevant Documentation: âHandling Memory Allocation in Payment Gateway.â Conclusion: Given the evidence and related issues, this is indeed a bug related to a memory leak in the payment gateway.â
He pauses, letting the information sink in. âThe AI helps us to triage by pulling data not just from JIRA, but also by understanding the context within our documentation and related issues. It saves us the initial legwork, allowing us to focus on what we do bestâsolving the problem.â
Marco looks around the room; even Jim seems to be leaning in a bit more, his skepticism giving way to what might just be interesting.
âNow, letâs get to fixing it, shall we?â Marco grins, clicking back into the âYour Thoughtsâ text box to type his next query.
Ayse meets his eye, and they share a moment of silent triumph. Their six weeks of collaboration, tension, and ceaseless coding are beginning to pay off, one âAI Insightâ at a time.
Jim raises his hand, clearing his throat before speaking. âThis seems like a problem thatâs easier to diagnose since it happens within the system. What about bugs that involve user interaction?â
Ayse leans forward, intrigued. âThatâs a good point, Jim. What kind of bug are you thinking of? Something youâd like to see?â
Jim senses the shift in the room; the atmosphere is more receptive now, less skeptical. âWell, Iâve been wrestling with this one bug in the webshop module for a while.â
âWhich bug?â Ayse probes.
Jim doesnât hesitate. âBug #666,â he says, almost with a tinge of weariness. âItâs an evil one, let me tell you.â
A few colleagues nod in agreement.
Ayse chuckles, jotting down the bug number. âWell, if itâs as diabolical as its number suggests, then it sounds like the perfect candidate for our next demonstration.â
The roomâs collective curiosity peaks, perhaps none more so than Jimâs. Could this AI tool that Ayse and Marco have been working on really make a dent in something as âevilâ as bug #666?
The Devilâs Bug
Marco returns to his laptop and types into the âYour Thoughtsâ field, âShow what we know about bug #666.â
The âAI Insightâ section springs to life with a quick summary. âBug #666: âWebshop Module Failing on Checkoutâ. Status: âReproduceâ. Previously assigned to three other engineers. Currently assigned to Jim for the last 3 days.â
Marco turns back to the room, meeting Jimâs eyes. âAccording to this, the bug is currently in the âReproduceâ phase. So, the next step is actually to reproduce the issue. Seems like itâs been quite the hot potato.â
Jim nods, a blend of relief and trepidation on his face. The information is spot-on, and it seems like the AI has laid out the challenge for what it isâa puzzle thatâs been passed around, but one that needs solving, fast.
Marco looks around the room, his gaze sweeping over the faces of his colleagues. âSo, how do we go about reproducing this bug?â
The room falls quiet. Itâs as if everyone has suddenly discovered a deep interest in their notepads, or their cups of coffee, or the floor tiles.
With a half-shrug, Marco turns back to his laptop. âWell, if no one knows, letâs ask our friend here.â He types, âWhat are the steps to reproduce this bug?â
Once again, the âAI Insightâ section comes to life.
âTo reproduce Bug #666, the following strategy is recommended:
Find a screen recording of the bug.
Identify the user and when the incident occurred.
Locate the specific request in the logs that triggered the bug, along with a few prior requests from the same user leading up to it.
Consult the monitoring system to see if any anomalies were detected around the same time for that user.
Write a test that replays the original request.
Run the test in a local environment to verify.â
Then a new line appears, âWould you like to proceed with this strategy?â
Marco looks up from the screen, clearly pleased. âSo, what do you think? Shall we give it a try?â
The room, which had been so tentative before, now buzzes with renewed energy.
Marco smiles as he types âyes pleaseâ into the âYour Thoughtsâ text box. âI find itâs always good to be polite, even with machines. Believe it or not, I feel like I get better answers that way.â
The room chuckles softly. The screen in the âAI Insightâ box updates, showing a URL that leads to a JIRA ticket. As the audience watches, an image starts to load on the screen. Marco notes the loading time, âEven in the age of AI, we still canât escape the loading bar, can we?â
When the image finally fully loads, an arrow pointing to the right indicates that itâs actually a video. Marco remarks, âSee? Even the AI canât automatically click a video for us. Still need good old human interaction for that one.â
He clicks on the arrow to play the video. It starts off showing an ordering form on a website. A mouse pointer is seen hovering over various fields, eventually moving to click the âOKâ button. Instantly, an error message pops up on the screen.
As the video plays on screen, the âAI Insightâ box continues to populate with text. First, it shows the timestamp of when the error occurred. Marco interrupts, âWell, thatâs easy; it should be right there in the JIRA ticket.â
Next, the AI lists the database user ID associated with the error. Ayse chimes in playfully, âEasy peasy, itâs just a single SELECT statement from the database.â
Finally, lines from the access log start to appear in the âAI Insightâ box.
2023-09-29 09:32:12 [INFO] GET /webshop/item/1234?user_id=5678 HTTP/1.1 200 OK
2023-09-29 09:32:17 [INFO] POST /webshop/cart/add?user_id=5678&item_id=1234 HTTP/1.1 200 OK
2023-09-29 09:32:21 [INFO] GET /webshop/cart/view?user_id=5678 HTTP/1.1 200 OK
2023-09-29 09:32:27 [ERROR] POST /webshop/cart/checkout?user_id=5678 HTTP/1.1 500 Internal Server Error
Marco begins, âThatâs also easy becauââ He pauses, squinting at the text. The room holds its collective breath, waiting for him to complete his thought. After a moment, he spots the user ID appearing repeatedly in the URLs listed in the access logs. âAh, there it is. The user ID is actually part of the URLs in the access logs.â
As Marco spots the repetition of the user ID in the URLs in the access log, the âAI Insightâ text area starts to update again, this time with code.
âLetâs try to reproduce this bug locally,â the AI writes. âHereâs a Javascript test suite that should mimic the sequence of actions taken by the user in the video. This test suite uses Mocha and Chai for testing and assumes based on the source code,that the server-side functions serving these endpoints are named getItem
, addToCart
, viewCart
, and checkout
.
const chai = require('chai');
const expect = chai.expect;
// Importing the functions that serve each endpoint
const { getItem, addToCart, viewCart, checkout } = require('./webshopController');
describe('Webshop Endpoints', function() {
let userId = 5678; // replace with the actual user ID
let itemId = 1234; // replace with the actual item ID
it('Should get an item', async function() {
const result = await getItem(userId, itemId);
expect(result.status).to.equal(200);
});
it('Should add an item to the cart', async function() {
const result = await addToCart(userId, itemId);
expect(result.status).to.equal(200);
});
it('Should view the cart', async function() {
const result = await viewCart(userId);
expect(result.status).to.equal(200);
});
it('Should attempt to checkout and receive an error', async function() {
try {
const result = await checkout(userId);
} catch (error) {
expect(error.status).to.equal(500);
}
});
});
A beat passes as Marco glances at the room. âWell, Iâd say thatâs pretty comprehensive for a test suite aimed at bug reproduction, donât you think?â
Jim looks impressed, âAh, so it actually analyzed our codebase to map out the functions that serve these routes. Thatâs a level of automation thatâs not just about stringing APIs together.â
The screen comes alive once more, grabbing everyoneâs attention. The text starts to appear in the âAI Insightâ box:
[AI Insight Console]
-----------------------------------------------
Spinning up Docker instance with environment...
> docker-compose up -d
Instance ready.
Running JavaScript test to reproduce bug #666...
-----------------------------------------------
> jest reproduce-bug-666.test.js
PASS ./reproduce-bug-666.test.js
â Reproduce sequence of actions leading to bug (5ms)
Test passed.
Bug #666 has been successfully reproduced.
Awaiting further instructions.
Marco canât help but smile as he turns to face the audience.
Who Needs Coffee?
The atmosphere in the room has changed. From initial skepticism, the mood has shifted to one of curiosity and even excitement. Jim, who was initially critical, raises his hand, now looking more intrigued than skeptical.
âCan the AI trace back and tell us which commit introduced the bug?â Jim asks, his tone tinged with curiosity rather than doubt.
Ayse fields the question. âWell, in theory, yes. Git history would allow us to trace back each commit to see where the issue originated. We could even load up a database snapshot corresponding to earlier dates. However, that would be a rather time-consuming exercise.â
Just then, Tasha, the junior engineer known for her no-nonsense approach, chimes in. âAll this is fascinating, but can the AI actually help us fix the bug? Or perhaps even implement new features?â
Marco looks at Tasha and then around the room. âThatâs how far weâve gottenâidentification, triage, and reproduction. The AI hasnât yet moved on to bug fixing or feature implementation. But think about the hours weâd save with whatâs already been done. Thatâs more time for creative problem-solving and less for the mundane.â
I take this moment to stand up, clearing my throat to get everyoneâs attention. âI want to commend Marco and Ayse for this incredible work. Itâs a first step, but what a promising one! Weâre always on the lookout for innovators and curious minds. If what you saw today piques your interest, consider this an open invitation: youâre all welcome to join the AI DevEx team.â
There is one more thing I want to add. âThink of AI not merely as a tool,â I say, âbut as a new team member. AI, the newest junior on our DevEx team, may not bring the coffee. But who needs coffee when we have AI.â
Tweet this.
[Next story in the series: Pair-Programming with AI: A Tale of Man and Machine]