Skip to main content

Even agents need discipline

· 21 min read
Adnan Rafiq
VP of Technology
Even agents need discipline

Agents are a proxy for your discipline. If you have been using LLMs in any capacity, you already know it, but consciously — the exact ability LLMs lack. Now draw your attention to AGILE and what it brings with it: EPIC, SPIKE, STORY, TASK, Definition of Done (DoD), the INVEST principle and what each letter in it holds, and a few other things like meetings, coffee breaks, shower ideas. I have painted many opposing thoughts on the canvas intentionally, but where am I going with this?

The goal is to think it through with you as you read. If you can recall the most effective and optimized AGILE team you have worked on, what was the process? I am sure it involved multiple teams and stakeholders coming together to deliver highly valuable features and experiences.

The question is: do AI innovations make all the processes and principles obsolete and outdated, or is the essence preserved while the mechanics of applying it have evolved?

If your answer is that the processes and principles I have mentioned were never an effective way in the first place, then we have opposing opinions — regardless, keep disagreeing till you agree, because I am going to show you THE GOOD PARTS.

The key point I am driving home is: How to transform your Team or Organization to be AI First.

The Discipline and the Good Parts

The pre-AI workflow expands or collapses with different value streams. The boxes hold the work. They do not hold the people — their different experiences, their different tastes.

AGILE run by hand, as one loop. Vision, Values and Goals set direction, and an EPIC is sliced in refinement — a room holding Product, UX/UI, Engineering and QA/Test, whose work is checked against INVEST and produces four artifacts: a STORY, its acceptance criteria, a SPIKE when the terrain is unknown, and a Definition of Done agreed once for every story. That output enters the sprint, and inside the sprint the engineering process is a sub-workflow of its own: optional TASKS, then EXECUTION, then REVIEW, with review sending work back for changes. After it come the DONE check against the same DoD, the DEMO, and the RETRO, which feeds back into the goals.

If you notice, it is a process. Each box serves its purpose well.

Now look inside one box.

The story refinement meeting. You may think of it as a waste of time.

Where does the call-to-action go on the hero image of the home page?

You already have an answer. So does everyone else in the room, and none of you are answering the same question.

Product wants it above the fold, because the funnel says so. Design wants it where the eye lands, not where the metric points. Engineering knows the hero is a shared component, so the change is not local. QA asks what happens at 360 pixels wide.

Twenty minutes, for a button that moves forty pixels.

Somebody senior could have said left and shipped it, and it would probably have been fine. That is what makes it look like waste.

Here is what the twenty minutes bought. The button is the smaller half of it. The four of them now agree on what will produce the valuable outcome. Every acceptance criterion written to achieve a goal gets written deliberately.

The deliberation is the nuance. Written and spoken language never captures the whole.

I do not believe any of the good parts are changing. In fact, in agentic-first orgs, the discipline and principles have to be defined more clearly. Saying otherwise is wishful thinking.

Here is the nuance about the nuance. Some of it was captured, and captured well. The criteria made the story testable and demoable, and that is not a small thing.

The ticket had no field for the rest of it.

Skill. Communication. Psychological safety — a room where the junior engineer can say the funnel is wrong. The drive to make the thing good, and the need that made anyone care in the first place.

Those are human things, and they are what drove the high-value outcome. The people mechanics were never static either. The same four argue differently next quarter, because they remember this one.

That lived in the team's culture. Not in a document, and not lost either.

What does that mean in an agentic-first org?

Before you read on, answer this.

What was the refinement meeting for?

Most people say sizing. Some say writing the tickets properly. A few say it existed for the product manager's benefit.

Hold on to your answer. If it was any of those three, the next two years are going to cost you more than you think.

Who calls Dispose in .NET and how Finalization works in .NET

· 8 min read
Adnan Rafiq
VP of Technology

Dispose Myth's - Two Questions

Read the below code to answer the questions that follow the code.

General Myth's - Two Questions

PrintFileContent();
Console.ReadKey();

static void PrintFileContent()
{
//Notice that I have not wrapped the DisposableStream object in a using block and neither I am calling Dispose method.
var disposableStream = new DisposableStream("file");//Assume that file exists in the current directory.
disposableStream.PrintAllLines();
Console.WriteLine("I am done with the stream.");
}

public class DisposableStream(string fileName) : IDisposable
{
private readonly FileStream _fileStream = new(fileName, FileMode.Open);

public void PrintAllLines()
{
using var streamReader = new StreamReader(_fileStream);
while (streamReader.ReadLine() is { } line)
{
Console.WriteLine(line);
}
}

public void Dispose()
{
_fileStream.Dispose();
Console.WriteLine("DisposableStream dispose was called");
}
}
  1. Will the Dispose method be called on the DisposableStream object when the PrintFileContent method completes, since we are not wrapping it in a using block and neither calling the Dispose method explicitly?
  2. If the Dispose method is not called, how will the FileStream object be collected by the Runtime?

Refactoring code - All about variables

· 6 min read
Adnan Rafiq
VP of Technology

Any code written in the past is legacy code as soon as adding a new feature or fixing a bug makes it difficult to change it. There is only one cure to this problem: Refactor it, but only one refactoring at a time. Otherwise, you will be frustrated to the least.

Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior. Its heart is a series of small behavior preserving transformations. Each transformation (called a 'refactoring') does little, but a sequence of transformations can produce a significant restructuring. Since each refactoring is small, it's less likely to go wrong. The system is kept fully working after each small refactoring, reducing the chances that a system can get seriously broken during the restructuring. Martin Fowler

There is no better refactoring than making the code more readable. After all, to change code, you first have to understand it: by reading it.

ASP.NET Core 8 Request Timeout Control

· 3 min read
Adnan Rafiq
VP of Technology
Timeout in ASP.NET Core 8

There is no default way to control the request timeout in ASP.NET Core 6.0 or 7.0. But the ASP.NET Core 8.0 introduces a RequestTimeout Middleware. It supports policy convention/pattern to apply the timeout options on a specific endpoint or globally. You will find it familiar if you have configured CORS using the CORS middleware or any other middleware. But if you love extension methods, you are in luck, as it supports extension methods on the Builder.

Serilog with CreateApplicationBuilder in .NET 8 Worker or Hosted Service

· 3 min read
Adnan Rafiq
VP of Technology
How to use Serilog with Application Builder

Logs are facts emitted by your application especially when it is running in production.

Structured logging is a way to give facts a shape so that you can query logs better.

Serilog is a structured logging library for .NET and it is one of the most popular logging libraries in .NET.

But how to use Serilog with the new .NET 8 Worker template?

A Complete Guide to all ASP.NET Builtin Middlewares - Part 4

· 5 min read
Adnan Rafiq
VP of Technology

Middleware is a function in then ASP.NET 8, when many functions are invoked one after the other like a chain; it becomes a middleware pipeline. The middleware pipeline is responsible for handling the incoming HTTP request and outgoing HTTP response.

For in depth understanding of the middleware you can read my blog post here.

This is a series of blog posts in which I will cover all the builtin middlewares in ASP.NET 8.

Validate Complex Types On Startup in .NET 8

· 4 min read
Adnan Rafiq
VP of Technology
Validate Options on Startup

The .NET 8 Host Builder allows you to bind configuration with C# objects by using AddOptions<T> and binding to the configuration.

It provides you an opportunity to validate the configuration values when the host (WebApplication or Hosted Server) is starting by using ValidateOnStart.

But there are two interesting aspects of it, which I will explain in this post.

A Complete Guide to all ASP.NET Builtin Middlewares - Part 3

· 16 min read
Adnan Rafiq
VP of Technology
Diagnostic Middlewares

Middleware is a function in then ASP.NET 8, when many functions are invoked one after the other like a chain; it becomes a middleware pipeline. The middleware pipeline is responsible for handling the incoming HTTP request and outgoing HTTP response.

For in depth understanding of the middleware you can read my blog post here.

This is a series of blog posts in which I will cover all the builtin middlewares in ASP.NET 8.

Validate Options<T> on Startup in Hosted Services in .NET8

· 8 min read
Adnan Rafiq
VP of Technology
Validate Options on Startup

The .NET 8 Host Builder allows you to bind configuration with C# objects by using AddOptions<T> and binding to the configuration.

It provides you an opportunity to validate the configuration values when the host (WebApplication or Hosted Server) is starting by using ValidateOnStart.

But there are two interesting aspects of it, which I will explain in this post.

A Complete Guide to all ASP.NET Builtin Middlewares - Part 2

· 16 min read
Adnan Rafiq
VP of Technology
Title Image of the blog

Middleware is a function in then ASP.NET 8, when many functions are invoked one after the other like a chain; it becomes a middleware pipeline. The middleware pipeline is responsible for handling the incoming HTTP request and outgoing HTTP response.

For in depth understanding of the middleware you can read my blog post here.

This is a series of blog posts in which I will cover all the builtin middlewares in ASP.NET 8.