<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jeremiah Udoh on Medium]]></title>
        <description><![CDATA[Stories by Jeremiah Udoh on Medium]]></description>
        <link>https://medium.com/@jerryudohdev?source=rss-f9e66f444b43------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bK-4kF1hF1-_tq9utu_Sxw.jpeg</url>
            <title>Stories by Jeremiah Udoh on Medium</title>
            <link>https://medium.com/@jerryudohdev?source=rss-f9e66f444b43------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 12:28:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jerryudohdev/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Modern Angular, Then vs Now (Part 3): Forms & Data]]></title>
            <link>https://jerryudohdev.medium.com/modern-angular-then-vs-now-part-3-forms-data-abd2d085f990?source=rss-f9e66f444b43------2</link>
            <guid isPermaLink="false">https://medium.com/p/abd2d085f990</guid>
            <category><![CDATA[angular-cli]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[angular-21]]></category>
            <category><![CDATA[angular2]]></category>
            <dc:creator><![CDATA[Jeremiah Udoh]]></dc:creator>
            <pubDate>Wed, 21 Oct 2026 11:46:18 GMT</pubDate>
            <atom:updated>2026-10-21T11:46:18.830Z</atom:updated>
            <content:encoded><![CDATA[<h4>Signal Forms and signal-based data fetching</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k-DiycDvOwZ8pXiHEJxZXA.png" /></figure><p>In this final part, we bring it all together. We’ll compare Reactive Forms with the new <strong>Signal Forms</strong>, replace hand-written loading and error flags with <strong>httpResource</strong>, and finish with a step-by-step playbook for upgrading an existing app.</p><h4>I. Forms rebuilt on signals (Reactive Forms vs Signal Forms)</h4><p>Signal Forms (experimental in v21, stable in v22) let you build a form straight from your data. You keep your data in a signal, Angular creates a matching form from it, and each field tells you its value, its errors and whether it was touched. All the validation rules sit in one place, right next to the form.<br>Previously<strong>,</strong> with Reactive Forms, you described your data twice: once as your model(1), then again as a tree of FormControls(2). Getting typed values was awkward, changing validation rules at runtime took extra code, and reacting to changes meant subscribing to the valueChanges observable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ofUYpfecFlN2WMaOkvh7tA.png" /><figcaption>Reactive Forms compared with Signal Forms.</figcaption></figure><p><strong>Then:</strong></p><pre>export class SignupComponent {<br>  private fb = inject(FormBuilder);<br>  // Then: a second copy of your model, built from FormControls<br>  form = this.fb.nonNullable.group({<br>    email: [&#39;&#39;, [Validators.required, Validators.email]],<br>    password: [&#39;&#39;, [Validators.required, Validators.minLength(8)]],<br>  });<br>  submit() {<br>    if (this.form.invalid) return;<br>    // getRawValue() needed to include disabled fields<br>    this.api.signup(this.form.getRawValue()).subscribe();<br>  }<br>}</pre><pre>&lt;form [formGroup]=&quot;form&quot; (ngSubmit)=&quot;submit()&quot;&gt;<br>  &lt;!-- String names: a typo only fails at runtime --&gt;<br>  &lt;input formControlName=&quot;email&quot; /&gt;<br>  &lt;!-- Long lookups just to show one error --&gt;<br>  &lt;span *ngIf=&quot;form.get(&#39;email&#39;)?.hasError(&#39;required&#39;) &amp;&amp; form.get(&#39;email&#39;)?.touched&quot;&gt;Required&lt;/span&gt;<br>&lt;/form&gt;</pre><p><strong>NOW:</strong></p><pre>export class Signup {<br>  readonly model = signal({ email: &#39;&#39;, password: &#39;&#39; });<br>  // Previously: the model was rebuilt as FormControls with fb.group()<br>  readonly f = form(this.model, (p) =&gt; {<br>    required(p.email); // Previously: Validators.required<br>    email(p.email); // Previously: Validators.email<br>    required(p.password);<br>    minLength(p.password, 8); // Previously: Validators.minLength(8)<br>    debounce(p.email, &#39;blur&#39;); // Previously: updateOn: &#39;blur&#39;<br>  });<br>}</pre><pre>&lt;input [formField]=&quot;f.email&quot; /&gt; &lt;!-- Previously: formControlName=&quot;email&quot; --&gt;<br>@let emailField = f.email();<br>@if (emailField.touched() &amp;&amp; emailField.getError(&#39;required&#39;)) {<br>  &lt;!-- Previously: *ngIf=&quot;form.get(&#39;email&#39;)?.hasError(&#39;required&#39;) &amp;&amp; form.get(&#39;email&#39;)?.touched&quot; --&gt;<br>  &lt;span&gt;Required&lt;/span&gt;<br>}<br>&lt;button [disabled]=&quot;f().invalid()&quot;&gt;Sign up&lt;/button&gt; &lt;!-- Previously: [disabled]=&quot;form.invalid&quot; --&gt;</pre><p><strong>When to use it in a real app:</strong></p><ol><li>New forms on v22+: use Signal Forms. They are stable and integrate smoothly with even Angular Material.</li><li>Migrate custom controls first: <strong>FormValueControl</strong> Components work in both Reactive and template-driven forms, so this unlocks gradual adoption.</li><li>Template-driven <strong>ngModel</strong> forms: jeez, still using this, the most natural candidates to move, since Signal Forms keep the &quot;model first&quot; feel with real typing.</li></ol><h4>II. Async data with resources.</h4><p>Resources (resource, rxResource and httpResource, stable in v22) let you fetch data in one line. You tell Angular where to get the data from, and it fetches it again whenever the inputs change. The result gives you the data, whether it is still loading, any error, and a way to reload, all as signals.</p><p><strong>The old way: </strong>every screen repeated the same code: a loading flag, an error field, a subscribe, <strong>switchMap</strong> to cancel old requests, and <strong>takeUntil</strong> to clean up when the component was destroyed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*in_GMbXCzJSjGf5_2PLUqQ.png" /><figcaption>Fetching data with subscriptions compared with resources.</figcaption></figure><p><strong>Then:</strong></p><pre>export class UserDetailComponent implements OnInit, OnDestroy {<br>  // Then: three fields to track one request<br>  user?: User; loading = false; error?: string;<br>  private destroy$ = new Subject&lt;void&gt;();<br>  ngOnInit() {<br>    this.route.paramMap.pipe(<br>      tap(() =&gt; (this.loading = true)), // manual loading flag<br>      switchMap((p) =&gt; this.http.get&lt;User&gt;(`/api/users/${p.get(&#39;id&#39;)}`)), // cancel stale requests<br>      takeUntil(this.destroy$) // avoid leaks<br>    ).subscribe({<br>      next: (u) =&gt; { this.user = u; this.loading = false; },<br>      error: (e) =&gt; { this.error = e.message; this.loading = false; }, // reset the flag in both paths<br>    });<br>  }<br>  ngOnDestroy() { this.destroy$.next(); }<br>}</pre><p><strong>Now:</strong></p><pre>export class UserDetail {<br>  readonly id = input.required&lt;string&gt;(); // Previously: read from route.paramMap<br>  readonly user = httpResource&lt;User&gt;(() =&gt; `/api/users/${this.id()}`);<br>  // Previously: switchMap + subscribe + loading and error fields + takeUntil<br>  readonly orders = httpResource&lt;Order[]&gt;(({ chain }) =&gt; {<br>    const u = chain(this.user);<br>    return u ? `/api/orders?customer=${u.customerId}` : undefined;<br>  }); // Previously: a nested switchMap<br>}</pre><pre>&lt;!-- Previously: *ngIf on hand-managed loading, error and user fields --&gt;<br>@if (user.isLoading()) { <br>  &lt;spinner /&gt; <br>}<br>@else if (user.error()) {<br> &lt;error-banner (retry)=&quot;user.reload()&quot; /&gt; <br>}<br>@else if (user.hasValue()) {<br> &lt;user-card [user]=&quot;user.value()&quot; /&gt; <br>}</pre><p><strong>When to use it in a real app:</strong></p><ol><li><strong>httpResource</strong>: reads (GET) driven by signals, such as detail pages, filtered lists and dashboards.</li><li><strong>Use rxResource</strong>: when the loader is already an Observable from an existing service.</li><li>Keep plain <strong>HttpClient</strong> calls for writes (POST, PUT, DELETE). Resources are for reading state, not for commands.</li><li>Keep RxJS for streams (WebSockets, polling with backoff); expose the result to templates with <strong>toSignal</strong>.</li></ol><p><a href="https://medium.com/@jerryudohdev/modern-angular-then-vs-now-part-1-structure-and-templates-ce317befb481?sharedUserId=jerryudohdev"><strong>In Part 1</strong></a><strong>,</strong> we covered how Angular apps are structured now<strong>: standalone components, inject(), and the new @if, @for, </strong>and<strong> @defer</strong> syntax. <a href="https://medium.com/@jerryudohdev/modern-angular-then-vs-now-part-2-reactivity-373941ec04c8?sharedUserId=jerryudohdev"><strong>In Part 2</strong></a>, we looked at how Angular knows when something has changed: signals and running without Zone.js. And in this part, we looked at Signal Forms and resources, which bring forms and data fetching into the same signal-based world.</p><p>Together, these changes make Angular simpler, faster, and more predictable than the version many of us first learned. You don’t need to rewrite your old apps overnight. Most of these features work side by side with the old ones, so you can adopt them one component at a time. But for any new project, there’s no reason to keep writing Angular the old way.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abd2d085f990" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Modern Angular, Then vs Now (Part 2): Reactivity]]></title>
            <link>https://jerryudohdev.medium.com/modern-angular-then-vs-now-part-2-reactivity-373941ec04c8?source=rss-f9e66f444b43------2</link>
            <guid isPermaLink="false">https://medium.com/p/373941ec04c8</guid>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[angular2]]></category>
            <category><![CDATA[angular-22]]></category>
            <dc:creator><![CDATA[Jeremiah Udoh]]></dc:creator>
            <pubDate>Thu, 15 Oct 2026 15:19:10 GMT</pubDate>
            <atom:updated>2026-10-15T15:33:07.923Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-O-IClTQ3ADlk63QYW_6Dg.png" /></figure><p>In <a href="https://jerryudohdev.medium.com/modern-angular-then-vs-now-part-1-structure-and-templates-ce317befb481">Part 1</a>, I covered how Angular apps are now structured: standalone components instead of NgModules, <strong>inject()</strong> instead of constructors, and the new <strong>@if, @for and @defer</strong> syntax in templates.</p><p>But the structural changes are only half the story. The bigger shift in modern Angular is how it knows when something has changed. For years, Zone.js handled that quietly in the background, watching every click, timer and HTTP call and re-checking your whole app just in case. It worked, until it didn’t.</p><p>In this part, we’ll be looking at the two changes that replaced that model, which are signals and zoneless change detection.</p><h4>I. Signals (The new reactive core)</h4><p>Signals give Angular a value that knows who reads it, so the framework updates exactly the views that depend on a change instead of checking the whole tree. Signals have been stable since Angular v20 and are now used in inputs, queries, forms(signal forms), and data fetching.</p><p><strong>Previously (Angular 2–15):</strong> state changes lived in plain fields (Angular could not tell when they changed). Then, you had the option of <strong>BehaviorSubjects, </strong>but every read needed <strong>subscribe</strong>, the async pipe, and manual cleanup. Also, you could use <strong>ngOnChanges</strong> as the only way to react to input changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yx5m57JSWni20iWGp5rgAQ.png" /><figcaption>A table showing the comparison btw then and now.</figcaption></figure><p><strong>Then:</strong></p><pre>export class CartComponent implements OnChanges, OnDestroy {<br>  @Input() items: CartItem[] = []; // Angular cannot tell when this field changes<br>  @Output() checkout = new EventEmitter&lt;number&gt;();<br>  private destroy$ = new Subject&lt;void&gt;(); // manual cleanup plumbing<br>  total = 0;<br><br>  // Then: recompute by hand whenever any input changes<br>  ngOnChanges() {<br>    this.total = this.items.reduce((s, i) =&gt; s + i.price * i.qty, 0);<br>  }<br>  // Forget this and subscriptions leak<br>  ngOnDestroy() { this.destroy$.next(); }<br>}</pre><p><strong>Now:</strong></p><pre>export class Cart {<br>  readonly items = input&lt;CartItem[]&gt;([]); // Previously: @Input() items: CartItem[] = []<br>  readonly checkout = output&lt;number&gt;(); // Previously: @Output() checkout = new EventEmitter&lt;number&gt;()<br>  readonly coupon = model&lt;string&gt;(&#39;&#39;); // Previously: @Input() coupon + @Output() couponChange<br><br>  readonly total = computed(() =&gt;<br>    this.items().reduce((s, i) =&gt; s + i.price * i.qty, 0)<br>  ); // Previously: recalculated by hand in ngOnChanges<br><br>  readonly selectedId = linkedSignal(() =&gt; this.items()[0]?.id);<br>  // Previously: copied from the input into a field in ngOnChanges<br><br>  constructor() {<br>    effect(() =&gt; localStorage.setItem(&#39;coupon&#39;, this.coupon()));<br>    // Previously: subscribe() + takeUntil(destroy$) + ngOnDestroy<br>  }<br>}</pre><p><strong>When to use signals in your real applications:</strong></p><ol><li>Use signals for synchronous UI and component state: toggles, selections, filters, counters.</li><li>Use computed for anything derived. If you are writing an effect to set another signal, you almost always want computed or linkedSignal instead.</li><li>Keep RxJS for event streams with time semantics: WebSockets, Kafka-style event feeds, retry and backoff, switchMap cancellation. Convert at the edge with toSignal.</li><li>For shared state, a @Service() holding private writable signals and public asReadonly() views covers most apps before you need NgRx SignalStore.</li></ol><h4>II. Life without Zone.js (zoneless and OnPush by default)</h4><p>Zoneless change detection (stable in v20.2, default for new apps in v21) means Angular re-renders only when it is told something changes: a signal update, a template event, an async pipe emission or <strong>markForCheck()</strong>. Zone.js is no longer shipped, and since v22, components are <strong>OnPush</strong> unless you opt out.</p><p>Previously, Angular used <strong>Zone.js</strong> to detect changes after actions like timers, promises, and clicks. It checked the whole app each time(that&#39;s quite a lot !!!), even when nothing important changed. This caused unnecessary work, errors, extra workarounds, and larger app sizes because Zone.js had to be included in the app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PaAtWRfbXo8iciB9nynn-Q.png" /><figcaption>This is table showing comparison between a zone.js application and the new zoneless application</figcaption></figure><p>The bug that bites everyone after migrating:</p><pre>// Then: worked because Zone.js saw the setTimeout<br>export class Toast {<br>  message = &#39;&#39;;<br>  show(msg: string) {<br>    this.message = msg;<br>    setTimeout(() =&gt; (this.message = &#39;&#39;), 3000); // UI never clears zoneless<br>  }<br>}<br><br>// Now: signals tell Angular exactly what changed<br>export class Toast {<br>  readonly message = signal(&#39;&#39;);<br>  show(msg: string) {<br>    this.message.set(msg);<br>    setTimeout(() =&gt; this.message.set(&#39;&#39;), 3000);<br>  }<br>}</pre><p><strong>When to use the new zoneless feature:</strong></p><ol><li><strong>New apps:</strong> zoneless from day one. It is the default; No need to touch it.</li></ol><p><strong>For Existing Apps</strong></p><ol><li>Before removing <strong>Zone.js</strong>, make sure Angular can detect changes when data updates in the background. Use signals or the <strong>async</strong> pipe to handle these updates. <strong>Switch</strong> components to <strong>OnPush</strong> first. If something breaks with <strong>OnPush</strong>, it will likely break without Zone.js too.</li><li>Keep <strong>Zone.js</strong> for now if an important library still needs it. You can still use signals and <strong>OnPush</strong> while preparing to remove it.</li><li>When upgrading to Angular v22, components without a change detection strategy get <strong>ChangeDetectionStrategy.Eager</strong> is added automatically. Treat each one as something to review and update later.</li></ol><p><strong>Migrate with</strong> the <strong>onpush_zoneless_migration</strong> tool in the Angular CLI MCP server, then remove <strong>zone.js</strong> from the <strong>polyfills</strong> and <strong>angular.json</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=373941ec04c8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Modern Angular, Then vs Now (Part 1): Structure and Templates]]></title>
            <link>https://jerryudohdev.medium.com/modern-angular-then-vs-now-part-1-structure-and-templates-ce317befb481?source=rss-f9e66f444b43------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce317befb481</guid>
            <category><![CDATA[angularjs]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[angular-4]]></category>
            <category><![CDATA[angular2]]></category>
            <dc:creator><![CDATA[Jeremiah Udoh]]></dc:creator>
            <pubDate>Tue, 13 Oct 2026 00:26:23 GMT</pubDate>
            <atom:updated>2026-10-13T00:26:23.260Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GvAF18fR1AatrhgeRfhRKg.png" /></figure><p>I learned Angular back in the Angular 6 days, and like many developers, I still spend some of my day maintaining apps built on versions 2 to 14. But the framework has changed significantly since then. Standalone components, new control flow, signals, zoneless change detection and Signal Forms have reshaped how Angular apps are written. If you are starting a new project today or doing an upgrade, it is worth leaving the old patterns behind and building with what Angular has become.</p><p>This part series compares the old and new side by side, so a working Angular developer can see what changed, why, and when to reach for each feature in a production app. In Addition, this is for developers who learned Angular with NgModules, *ngIf and RxJS everywhere, and now maintain or start apps on v19 to v22.</p><p>If you still type $scope.$apply() i.e., Angular.js(Retired 2021), please shift 😂, this is not for you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EurOfC5NPIrjR1agUvsnHA.png" /><figcaption>A simple version timeline to reference for the angular framework</figcaption></figure><h4><strong>I. Say Goodbye to NgModules (Standalone, inject() and @Service)</strong></h4><p>Standalone components removed the extra layer of <strong>NgModules</strong>: each component now declares its own dependencies, so the unit of reuse is the component, not the module. Since v19, <strong>standalone: true</strong> is implied, so every new component is standalone unless you say otherwise.</p><p><strong>The old way</strong>: Previously, a component could not be used until it was declared in exactly one module, and that module had to be imported wherever it was needed, causing shared modules to grow into dumping grounds, and lazy loading meant writing a module just to hold a route and just one component at times.</p><p><strong>Then (NgModule era):</strong></p><pre>@NgModule({<br>  declarations: [AppComponent, UserCardComponent],<br> /* Previously, when declaring a component, you had to use the approach shown one line above.<br>  Now, components are standalone by default, so no additional configuration is needed. */<br><br>  imports: [BrowserModule, HttpClientModule, AppRoutingModule],<br>  bootstrap: [AppComponent],<br>})<br>export class AppModule {}<br><br>@Injectable({ providedIn: &#39;root&#39; })<br>export class UserService {<br>  constructor(private http: HttpClient) {}<br>}</pre><p><strong>Now (v19 to v22):</strong></p><pre>// main.ts<br>bootstrapApplication(App, {<br>  providers: [provideRouter(routes)],<br>}); //previously: to bootstrap an app you use platformBrowserDynamic().bootstrapModule(AppModule)<br><br><br>// user.service.ts<br>@Service() // previously: @Injectable({ providedIn: &#39;root&#39; })<br>export class UserService {<br>  private readonly authService = inject(AuthenticationService);<br>}<br><br><br>// user-card.ts<br>@Component({<br>  selector: &#39;app-user-card&#39;,<br>  imports: [DatePipe, AvatarComponent],<br>  template: `...`,<br>})<br>export class UserCard {<br>  private readonly users = inject(UserService); <br>  // Previously: injection happens via constructor parameters<br>}<br><br><br>// routes.ts<br>export const routes: Routes = [<br>  { path: &#39;admin&#39;, loadChildren: () =&gt; import(&#39;./admin/admin.routes&#39;) },<br> //Previously: to achieve lazy loading you have to loadChildren to a feature module but now you loadComponent or loadChildren to a routes file. <br>  { path: &#39;users/:id&#39;, loadComponent: () =&gt; import(&#39;./user-detail&#39;) },<br>];</pre><p><strong>When to use it in a real app:</strong></p><ol><li><strong>New code:</strong> Your new components should always be standalone. There is no remaining reason to write a new NgModule; you don’t need it.</li><li><strong>Existing apps: </strong>Update one feature at a time, starting with simple components like cards, buttons, directives, and pipes. Standalone and NgModule components can work together, so you don’t need to rewrite the entire app at once.</li><li>Keep an NgModule only where a third-party library still ships one; import that module into a standalone component’s using <strong>imports:[]</strong>.</li><li>Prefer <strong>inject() </strong>over constructors: it works in functional guards, interceptors and resolvers, and it plays well with inheritance.</li><li>Use <strong>injectAsync()</strong> (v22) for heavy services needed only after a user action, such as a PDF export service.</li></ol><h4>II. Cleaner Templates with (@if, @for, @switch, @let, @defer)</h4><p>In v17+, built-in control flow replaces structural directives with block syntax that is compiled, not imported. You get better type narrowing, a mandatory track for lists, and no CommonModule import just to write an <strong>*ngIf</strong> directive.<br>While the old pain <strong>*ngIf</strong> with <strong>else</strong> needed a separate <strong>&lt;ng-template&gt;</strong> reference, <strong>*ngFor</strong> silently re-rendered lists without <strong>trackBy</strong>, and <strong>[ngSwitch]</strong> spread one decision over three directives.</p><p><strong>Then:</strong></p><pre>&lt;div *ngIf=&quot;user$ | async as user; else loading&quot;&gt;<br>  &lt;ul&gt;<br>    &lt;li *ngFor=&quot;let order of user.orders; trackBy: trackById&quot;&gt;{{ order.ref }}&lt;/li&gt;<br>  &lt;/ul&gt;<br>  &lt;p *ngIf=&quot;!user.orders.length&quot;&gt;No orders yet&lt;/p&gt;<br>  &lt;ng-container [ngSwitch]=&quot;user.tier&quot;&gt;<br>    &lt;gold-badge *ngSwitchCase=&quot;&#39;gold&#39;&quot;&gt;&lt;/gold-badge&gt;<br>    &lt;basic-badge *ngSwitchDefault&gt;&lt;/basic-badge&gt;<br>  &lt;/ng-container&gt;<br>&lt;/div&gt;<br>&lt;ng-template #loading&gt;&lt;spinner&gt;&lt;/spinner&gt;&lt;/ng-template&gt;</pre><p><strong>Now:</strong></p><pre>@let current = user(); <br>/* Previously, to achieve a local template variable you have to used the async<br>   hack *ngIf=&quot;obs$ | async as data&quot; */<br>  @if (current) {<br>    &lt;ul&gt;<br>      @for (order of current.orders; track order.id) {<br>        &lt;li&gt;{{ order.ref }}&lt;/li&gt;<br>      } @empty { <br>        /* Previously, to specify you&#39;d have needed an extra<br>           block of *ngIf=&quot;!users.length&quot; */<br>        &lt;p&gt;No orders yet&lt;/p&gt;<br>      }<br>    &lt;/ul&gt;<br>    @switch (current.tier) {// Previously, [ngSwitch], *ngSwitchCase, *ngSwitchDefault<br>      @case (&#39;gold&#39;) { &lt;gold-badge /&gt; }<br>      @case (&#39;silver&#39;) { &lt;silver-badge /&gt; }<br>      @default never; /* Previously: specifying NEVER wasn&#39;t possible in an *ngswitch directive.<br>      from v21.2+ this now available */<br>    }<br>  } @else { <br>     /* Previously, to achieve this type of conditional if else with loading spinner you have to use<br>      *ngIf=&quot;user; else loading&quot; + &lt;ng-template #loading&gt;*/<br>    &lt;spinner /&gt;<br>  }</pre><pre>@defer (on viewport; prefetch on idle) {<br>/* Previously, to lazy load a chuck of UI, you could only use a <br>   Router-only, or manual dynamic components */<br>  &lt;order-analytics-charhtt [orders]=&quot;current?.orders&quot; /&gt;<br>} @placeholder {<br>  &lt;div class=&quot;chart-skeleton&quot;&gt;&lt;/div&gt;<br>} @loading (minimum 300ms) {<br>  &lt;spinner /&gt;<br>}</pre><p><strong>When to use it in a real app:</strong></p><ol><li>where you’ve been using <strong>*ngif, *ngfor, *ngSwitch</strong> directive you now need to start using <strong>@if / @for / @switch</strong> everywhere. They are the default now; you don’t want to use deprecated directives as part of your code going forward.</li><li><strong>track</strong>: use a stable ID (<strong>order.id</strong>). Use <strong>$index</strong> only for static lists that never reorder.</li><li><strong>@default never</strong>: This is used with a switch case, never alone. It is used on <strong>union-typed</strong> status fields, i.e. <strong>enums,</strong> in simple terms, e.g(&#39;PENDING&#39; | &#39;APPROVED&#39; | &#39;REJECTED&#39;) so the compiler flags a new status you forgot to render if the union type has changed.</li><li><strong>@let:</strong> use it to read a signal once and reuse it, or to name a long expression. Do not use it to hold business logic.</li><li><strong>@defer: </strong>use it for heavy, below-the-fold or rarely opened UI: charts, rich text editors, maps, admin panels. Do not defer content needed for first paint or SEO, and avoid deferring tiny components (the extra chunk costs more than it saves).</li></ol><p>In Part 2, we drop <strong>Zone.js</strong>, meet <strong>signals</strong>, and find out why your <strong>setTimeout</strong> suddenly stopped updating the UI.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce317befb481" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tips On Migrating a Legacy Spring Boot Java 8 Project to Java 25]]></title>
            <link>https://jerryudohdev.medium.com/tips-on-migrating-a-legacy-spring-boot-java-8-project-to-java-25-f69828b1d17c?source=rss-f9e66f444b43------2</link>
            <guid isPermaLink="false">https://medium.com/p/f69828b1d17c</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[java25]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[hibernate]]></category>
            <category><![CDATA[openrewrite]]></category>
            <dc:creator><![CDATA[Jeremiah Udoh]]></dc:creator>
            <pubDate>Sun, 16 Aug 2026 20:01:04 GMT</pubDate>
            <atom:updated>2026-08-16T20:01:04.688Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qbHkk9BLPQUMMk3e2o1hmg.png" /></figure><p>This is a practical, phase-by-phase playbook for moving a real, production Spring Boot application from Java 8 and Spring Boot 2.x to Java 25.</p><p>Moving a production Spring Boot application from Java 8 / Boot 2.x to Java 25 / Boot 4.x is not a version bump. It is a sequence mixed with platform migrations, and each has an official, documented set of breaking changes.</p><h3><strong>The version </strong>barriers<strong> you cannot skip</strong></h3><p>Before any code changes, know the hard constraints. These are must-do steps, not preferences:</p><ol><li><strong>Spring Boot 3.0 requires Java 17 as a hard minimum.</strong> If you are on Java 8 or 11, the JDK upgrade is a prerequisite, not a parallel task.</li><li><strong>The official Spring Boot 3.0 Migration Guide says to first upgrade to the latest 2.7.x</strong>, so you are building against the most recent 2.x dependency set before the major version jump.</li><li><strong>The Spring Boot 4.0 guide says to reach the latest 3.5.x first</strong>. Everything deprecated across 3.x is a removal candidate in 4.0; arriving from a clean 3.5 is far easier than from 3.0.</li><li><strong>Build tooling has its own version needs:</strong> Maven 3.8+ and Gradle 7+ are needed for Java 17.</li></ol><h3>The three layers</h3><ul><li><strong>Namespace: </strong>Boot 2→3 rewrites every javax.* import to jakarta.*. Mechanical, but it touches everything. This is the real work.</li><li><strong>Removed JDK APIs: </strong>The JDK removed whole modules between 9 and 17. These fail at runtime, not compile time, because the removed classes are usually only reached deep inside a library.</li><li><strong>The JDK bump: </strong>This is quite straightforward once the other two are done.</li></ul><h3><strong>The route, step by step</strong></h3><h4>Step 0—Get a successful build at the start</h4><p>Start from a fully successful build on your current JDK and Boot version. Never begin a migration from a red build; you won’t be able to tell your breakage from pre-existing breakage.</p><h4>Step 1 — <strong>JDK 8 to 17, still on Spring Boot 2.x</strong> (stay on old Spring Boot)</h4><p>Move to JDK 17 while staying on Spring Boot 2.x and the javax namespace. Every error here is the JDK removing something Java 8 gave you for free. They surface in sequence as startup gets further:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6_cBXwBfDWJ0x4mJk73b8g.png" /></figure><blockquote>This is a milstone, the app runs on JDK 17, Boot 2.7, builds successfully. Commit this part, it’s the reference point everything later.</blockquote><h4>Step 2 — Migrate Spring Boot 2→3</h4><h4>I. Using OpenRewrite</h4><p>Add the OpenRewrite dependency in your build.gradle/pom.xml file; Run one hop at a time by changing the activeRecipe in the dependency file, e.g <strong>UpgradeSpringBoot_3_0, then _3_1, then _3_5, up to _4_0;</strong> review and commit each. Never skip a version in the chain.</p><pre>//gradle sample, Get the one for the other build tools like maven.<br><br>plugins {<br>    id &quot;org.openrewrite.rewrite&quot; version &quot;latest.release&quot;<br>}<br><br>rewrite {<br>    activeRecipe(&quot;org.openrewrite.java.spring.boot4.UpgradeSpringBoot_4_0&quot;)<br>    setExportDatatables(true)<br>}<br><br>dependencies {<br>  rewrite(&quot;org.openrewrite.recipe:rewrite-spring:latest.release&quot;)<br>}<br><br>/* ------------------------------------------------------------------------<br>* 1. After adding your dependency, then sync your build <br>* 2. Then run &#39;gradle rewriteRun&#39; and allow it do it&#39;s magic<br>*/</pre><p>The tool’s import rewrites are excellent. However, its dependency versioning still needs improvement, causing it to miss the correct version for dependencies in your project, so expect to fix these by hand afterwards.</p><h4>II. Official breaking changes worth pre-loading</h4><p>Straight from the Spring Boot 3.0 Migration Guide and Spring Framework 6 notes, these break silently if you are not expecting them:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MoRfDOZT40L5KaD2pu2BZg.png" /></figure><h4><strong>III. Hibernate 5 to 6 in Boot 3 (If you use it in your project)</strong></h4><p>Boot 3 pulls Hibernate 6, and the Hibernate ORM 5→6 migration has its own documented breaking changes beyond the namespace swap. The compile errors are the easy part; the silent behavioural changes are what reach production:</p><ul><li><strong>Versioned dialects removed.</strong> PostgreSQL95Dialect, MySQL57Dialect and friends are gone; Hibernate 6 handles versions within a single dialect class and can even resolve the dialect from JDBC DatabaseMetaData.</li><li><strong>Legacy `org.hibernate.Criteria` API removed.</strong> Migrate to the JPA Criteria API. Do this while still on Hibernate 5, which supports both, to de-risk.</li></ul><p>Other silent breaking changes are that the Native `<strong>count()`</strong> now returns <strong>`Long`</strong>, not <strong>`BigInteger`; </strong>a new HQL parser; and the obvious migration from javax to jakarta.</p><blockquote><em>Additionally, Hibernate 6 no longer tolerates a JPA config bean that sets both an explicit persistence-unit name (routing through persistence.xml/hibernate.cfg.xml). Pick one mechanism for a Spring app, that means </em><strong><em>@EntityScan</em></strong><em> and retiring </em><strong><em>persistence.xml</em></strong><em>.</em></blockquote><h4>Step 3 — Walk JDK and Boot to the target</h4><p>On stable ground now, walk the JDK LTS ladder (17 → 21 → 25). Then take Boot 3.5 → 4.0 using openRewrite by changing the recipe in your dependency file(gradle/mvn), which the Spring team frames as the most significant release since the Jakarta jump but, crucially, without another namespace migration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tts_Br1UYzuX_Jc1rRaY-A.png" /><figcaption>The Boot 4 documented breaking changes</figcaption></figure><p>The Boot 4 breaking changes and all you need to know about it are concentrated and documented; see the link</p><blockquote><a href="https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-4.0-Release-Notes">https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-4.0-Release-Notes</a></blockquote><h4>Step 4 — The runtime bug hunt</h4><p>Compiling is not correctness. Start the app for real, hit real endpoints, run the full suite. The bugs here never show at compile time. Common ones:</p><ul><li>HTTP message-converter order changing, serialising with the wrong converter (bytes instead of JSON). Verify the registered order at runtime.</li><li>Non-static inner-class DTOs breaking under constructor-based data binding, which can’t supply the outer instance. Make stateless form DTOs static.</li></ul><h3>The shortcut: let an AI agent drive</h3><p>You don’t have to do every step by hand. An agentic coding tool (like <strong>Claude Code</strong>) can execute this playbook, *if* you give it the discipline in writing. That’s what the companion CLAUDE.md file is for.</p><p><strong>How to run the AI-assisted migration</strong></p><ol><li>Create, then drop CLAUDE.md/Agent.md into your repo root. The agent reads it automatically as standing context.</li><li>Drive one step at a time. Start with: <strong>“Do Step 1 only, bump the JDK to 17, keep Boot 2.7. Show me the diff and stop.”</strong></li><li>Make it name the failure category before fixing (removed API? namespace? version? framework default?).</li><li>You stay the reviewer. Every suggestion it proposes, you read, research and analyse it before accepting, or you can give it full access (lol 😂)</li></ol><blockquote>Treat the AI as a fast pair-programmer that has read every stack trace before, not as an autopilot. It clears the mechanical work; you keep the judgment.</blockquote><h3>Verification checklist for every single step of this migration</h3><p>Before calling any version bump done:</p><ol><li>Clean build succeeds</li><li>Full test suite passes, not a subset</li><li>App actually starts (real deploy target if the deployment model matters)</li><li>One real request/response verified: a public and an authenticated endpoint; test it using your testing tools like Postman and see that you’re getting the desired response.</li><li>Committed as its own reviewable commit</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f69828b1d17c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Extending Keycloak Brute Force Protection with Custom SPI’s]]></title>
            <link>https://jerryudohdev.medium.com/extending-keycloak-brute-force-protection-with-custom-spis-a21284769a99?source=rss-f9e66f444b43------2</link>
            <guid isPermaLink="false">https://medium.com/p/a21284769a99</guid>
            <category><![CDATA[keycloak-theme]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[keycloak]]></category>
            <dc:creator><![CDATA[Jeremiah Udoh]]></dc:creator>
            <pubDate>Thu, 16 Jul 2026 21:36:49 GMT</pubDate>
            <atom:updated>2026-07-16T22:04:26.527Z</atom:updated>
            <content:encoded><![CDATA[<p>Keycloak’s brute force detection is one of those features that works on the server and terribly for the human standing in front of the login page. Enable it, and after a configurable number of failed attempts, Keycloak temporarily disables the account. The attack is stopped. Mission accomplished, from the server’s point of view.</p><p>From the user’s perspective, something confusing happens: they finally enter the <em>correct</em> password, but Keycloak still says <em>“</em><strong><em>Invalid username or password.”</em></strong> No hint that the account is locked. No email telling them someone has been hammering their login. They retry, fail again, and eventually file a support ticket that reads: My password stopped working.</p><p>On a recent project with strict security requirements, experience wasn’t acceptable. We needed three things: a clear on-screen lockout message, an email alert when a lockout occurs, and an email notification for every brute-force lockout &amp; successful login. None of these comes with Keycloak natively. Here’s how I built them, and why you still can’t just switch them on in the latest release as of this writing(26.7.0).</p><h4>What Native Keycloak Doesn’t Offer (Even in 26.x)</h4><p>Before writing custom code, it’s worth being precise about the gaps. As of Keycloak 26.6, the current release line, none of the following exists as a configuration option:</p><ol><li><strong>A lockout message on the login form. </strong>The stock form deliberately shows <strong><em>“Invalid username or password”</em></strong> for brute-force-disabled accounts to prevent account enumeration. Sensible default, but there’s no toggle to change it. The only path is code.</li><li><strong>Email alerts on successful login. </strong>The built-in email listener covers login errors, password and OTP changes, but a <strong><em>“new sign-in”</em></strong> notification, the kind Google and GitHub send, isn’t in the list.</li><li><strong>Lockout-specific, deduplicated alerts. </strong>Natively, every LOGIN_ERROR looks the same: one email per failed attempt, no way to say <strong><em>“email exactly once per lockout.”</em></strong></li><li><strong>Branded templates for these events. </strong>Native event emails are bare-bones; application name, IP, and formatted timestamps require custom templates and a provider to feed them.</li></ol><p>None of this is missing because Keycloak is limited; its SPI architecture expects you to make these product decisions yourself.</p><h4>Part 1: Showing the Lockout Message on the UI</h4><p>Keycloak’s UsernamePasswordForm authenticator has two protected hooks specifically designed for this: <strong><em>disabledByBruteForceError()</em></strong> decides which message key is shown when a brute-force-disabled user tries to log in, and <strong><em>disabledByBruteForceFieldError()</em></strong> decides which field the error attaches to. Overriding them is all the Java you need:</p><pre>public class CustomizedUserNamePasswordForm extends UsernamePasswordForm {<br>  @Override<br>  protected String disabledByBruteForceError() {<br>    return Messages.ACCOUNT_TEMPORARILY_DISABLED;<br>  }<br>  @Override<br>  protected String disabledByBruteForceFieldError() {<br>    return null; // show as a global banner, not a field error<br>  }<br>}</pre><p>Returning the stock <strong><em>ACCOUNT_TEMPORARILY_DISABLED</em></strong> key means every locale bundle already has a translation; if you want custom wording, redefine the key in your login theme’s <strong><em>messages_en.properties</em></strong> instead of hardcoding text in Java. The factory is equally small, extend UsernamePasswordFormFactory, give it a unique provider ID, and return your singleton:</p><pre>public class CustomizedUserNamePasswordFormFactory <br>                 extends UsernamePasswordFormFactory {<br>public static final String PROVIDER_ID = &quot;custom-auth-username-password-form&quot;;<br>public static final CustomizedUserNamePasswordForm SINGLETON =<br>                 new CustomizedUserNamePasswordForm();<br>  @Override<br>  public Authenticator create(KeycloakSession session) {<br>      return SINGLETON;<br>  }<br>  @Override<br>  public String getId() {<br>    return PROVIDER_ID;<br>  }<br>}</pre><p>A security note: This intentionally trades away the anti-enumeration property of the generic error. An attacker who triggers a lockout now gets confirmation of it. <strong>For my application requirements that trade-off was explicitly accepted; make sure yours is too.</strong></p><h4>Part 2: Email Alerts for Logins and Lockouts</h4><p>The second half is an EventListenerProvider. Keycloak emits an event for every LOGIN and LOGIN_ERROR; the listener filters LOGIN_ERROR down to the one error I care about, <strong><em>user_temporarily_disabled</em></strong>, and sends a branded email for both event types.</p><p>The interesting problem is deduplication. During a lockout, every further attempt fires another LOGIN_ERROR with the same error code, and nobody wants five lockout emails in two minutes. The trick that was used: Keycloak’s login-failure record keeps <strong><em>failedLoginNotBefore</em></strong> constant for the duration of a given lockout window and only advances it when a new lockout starts. That makes it a reliable one-per-lockout dedupe key, stored as a user attribute:</p><pre>UserLoginFailureModel failure =<br>session.loginFailures().getUserLoginFailure(realm, user.getId());<br>int notBefore = failure != null ? failure.getFailedLoginNotBefore() : 0;<br><br>String alreadyNotified = user.getFirstAttribute(&quot;lockoutEmailNotifiedFor&quot;);<br>if (String.valueOf(notBefore).equals(alreadyNotified)) {<br>  return; // already emailed for this lockout window<br>}<br>user.setSingleAttribute(&quot;lockoutEmailNotifiedFor&quot;,String.valueOf(notBefore));</pre><p>From there the provider resolves the human-readable <strong>client name, assembles template attributes, user profile, IP address, event type, RFC-1123 timestamp</strong>, and hands everything to Keycloak’s EmailTemplateProvider with a custom FreeMarker template per event type. One template for successful logins and one for lockouts.</p><h3>Setting It All Up, Step by Step</h3><p>Once you code deployed, JAR in place, now everything else lives in the Admin Console.</p><h4>Step 0: Deploy the provider JAR</h4><p>Copy the JAR build of which you’ve written your custom SPI to the providers directory(usually inside the Keycloak folder /provider), run a build, and restart. Verify the provider is registered by checking the console.</p><h4>Step 1: Configure SMTP credentials</h4><p><strong>Admin Console → (your realm) → Realm Settings → Email</strong></p><p>Nothing sends without this, the listener fails silently into the server log if SMTP is missing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rStssRfax6opCyJXu3d8-g.png" /></figure><h4>Step 2: Register the event listener</h4><p><strong>Admin Console → (your realm) → Realm Settings → Events → Event listeners</strong></p><p>Add login-email-listener to the Event listeners field alongside the default jboss-logging entry and save. From this moment, every successful login and brute-force lockout in the realm flows through the provider; this is also your on/off switch if you ever need to disable emails quickly in production.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YYrl2LFUWqqKXKFFrFyJrA.png" /></figure><h4>Step 3: Enable and tune brute force detection</h4><p><strong>Admin Console → (your realm) → Realm Settings → Security defenses → Brute force detection</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TmhuqqlBRDouVsUPJfC1iQ.png" /><figcaption>Toggle Brute Force Detection on.</figcaption></figure><h4>Step 4: Build the custom browser flow</h4><p><strong>Admin Console → (your realm) → Authentication → Flows → browser → Duplicate</strong></p><p>Duplicate the built-in browser flow (name it something like Browser — Custom). In the copy, find the forms sub-flow and:</p><ul><li><strong>Delete </strong>the stock Username Password Form execution. This is the critical part, the custom form must replace the original, not sit next to it. Two credential forms in one flow means the stock one handles the login and yours never runs (and users get a strange second password-only page if you keep both).</li><li><strong>Add step </strong>→ select Customised Username Password Form → set the requirement to Required.</li></ul><p>Then bind it: <strong>Flow actions (⋮) → Bind flow → Browser flow</strong></p><p>Double-check there’s no client-level override pointing at the old flow under <strong>Clients → (your client) → Advanced → Authentication flow overrides</strong>, a client override silently wins over the realm binding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zQHXfcUwxhv93Tb_57Q9uA.png" /></figure><h4>Step 5: Point the realm at your email theme</h4><p><strong>Admin Console → (your realm) → Realm Settings → Themes → Email theme</strong></p><p>Easy to forget, and the failure mode is confusing: emails go out using Keycloak’s plain default templates, and you’ll wonder where your branding went. Select your custom theme in the Email theme dropdown. The theme must contain the two FreeMarker body templates the provider references, <strong><em>html/event-login.ftl</em></strong> and <strong><em>html/event-login_error_lock.ftl</em></strong>; plus the subject keys in messages/messages_en.properties (eventLoginSubject, eventLoginErrorSubject).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6eQeuvbLZlpHbfzJT4YuwQ.png" /></figure><blockquote>That’s the whole chain: <br><strong>Provider JAR(This is the JAR that contains the SPI)→ SMTP(Email Credentials)→ listener → brute force → flow → Keycloak theme.</strong></blockquote><p>Once all six are in place, a locked-out user sees a clear message on screen and gets a branded email for lockouts, and a successful sign-in from a new session triggers a notification.</p><h4>Full Source on GitHub</h4><p>The complete provider JAR source and the email theme update from this article live in one repository: <a href="https://github.com/jerry-tech/keycloak-login-lockout-notifications">https://github.com/jerry-tech/keycloak-login-lockout-notifications</a>. The layout mirrors what the deployment steps expect:</p><pre>keycloak-login-lockout-notifications/<br>├── build.gradle.kts<br>├── settings.gradle.kts<br>├── src/main/java/org/lockout/<br>│   ├── CustomizedUserNamePasswordForm.java<br>│   ├── CustomizedUserNamePasswordFormFactory.java<br>│   ├── LoginEventEmailListenerProvider.java<br>│   └── LoginEventEmailListenerProviderFactory.java<br>├── src/main/resources/META-INF/services/<br>│   ├── org.keycloak.authentication.AuthenticatorFactory<br>│   └── org.keycloak.events.EventListenerProviderFactory<br>└── klln-keycloak-theme/email/<br>    ├── theme.properties<br>    ├── html/<br>    │   ├── event-login.ftl<br>    │   └── event-login_error_lock.ftl<br>    └── messages/<br>        └── messages_en.properties</pre><p>Build the JAR with gradle build (it lands in build/libs/) and drop it in providers/; copy the themes/hvas folder into Keycloak’s themes/ directory (or package it as a theme JAR).</p><p>Finally, the changes needed are just two small classes, two service files, a couple of FreeMarker templates. The value is in knowing where Keycloak draws its lines: the platform deliberately ships secure-but-terse defaults and expects you to layer product-specific UX and notifications through SPIs .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a21284769a99" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beyond Blame: How Engineering Teams Can Use Causal Analysis and Resolution (CAR) to Build Better…]]></title>
            <link>https://jerryudohdev.medium.com/beyond-blame-how-engineering-teams-can-use-causal-analysis-and-resolution-car-to-build-better-8889d1f9172f?source=rss-f9e66f444b43------2</link>
            <guid isPermaLink="false">https://medium.com/p/8889d1f9172f</guid>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[quality-assurance]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Jeremiah Udoh]]></dc:creator>
            <pubDate>Sat, 09 Aug 2025 22:43:11 GMT</pubDate>
            <atom:updated>2025-08-10T16:17:08.164Z</atom:updated>
            <content:encoded><![CDATA[<h3>Beyond Blame: How Engineering Teams Can Use Causal Analysis and Resolution (CAR) to Build Better Software</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vk1hS5XHV9s1qidOCgqoYg.png" /></figure><p>For many engineering teams, the aftermath of a defect feels like a search for the guilty. Energy is spent finding out <strong>“who”</strong> caused the incident rather than understanding <strong>“why”</strong> the issue occurred in the first place. This blame-first culture not only demoralises teams but also traps organisations in a cycle of cost and debt, where the same types of defects keep reappearing, consuming time, money, and reputation repeatedly.</p><p>What if instead of treating incidents as one-off mistakes, your team used them as accelerators for growth?</p><p>This is where Causal Analysis and Resolution (CAR) comes into play, not only as a tool for defect analysis but also as a means of sharing lessons learned across teams and projects. By embedding CAR into your team’s culture, lessons from one project’s mistakes or successes can be shared with others, helping to prevent repeats and boost organisational maturity.</p><p>With it, every defect becomes an opportunity to cut long-term costs, and the teams shift from reactive firefighting to a deliberate, organisation-wide culture of continuous quality improvement.</p><h3>What is CAR?</h3><p><strong>Causal Analysis and Resolution (CAR)</strong> is a structured process within the Capability Maturity Model Integration for Development (CMMI-DEV). Its purpose is to identify the causes of selected outcomes, both successes and failures, and to take targeted actions to improve process performance.</p><p>CAR sessions aren’t conducted for every incident. Outcomes are prioritised based on their potential return on investment in quality, productivity, and cycle time. In Addition, CAR is not solely about analysing what went wrong. By examining successes, teams can recognise patterns that worked well and standardise them as best practices.</p><p>That said, this article focuses on the defect-related aspect of CAR; how engineering teams can utilise it as a blameless, process-driven approach to learning from failures and enhancing the quality of their software.</p><h3>Why Teams Need CAR (Not Just QA or Managers)</h3><p>Most defects aren’t caused by carelessness; they emerge from gaps in process, unclear requirements, rushed timelines, or weak design decisions. And often, these problems aren’t visible until something breaks.</p><p>Here’s why engineering teams, not just QA or leadership, need to be involved in CAR:</p><ul><li><strong>Spot Systemic Weaknesses: </strong>CAR helps teams find root causes like missing documentation, inadequate onboarding, application delusion of not having a real-world context or design misalignment.</li><li><strong>Improve Collaboration:</strong> Cross-functional teams (engineering, QA, product) can align better by understanding the impact of their decisions on quality downstream. With this,<br>The engineering team can make informed trade-offs by understanding the technical and user impact of every decision.</li><li><strong>Turn Mistakes into Improvements:</strong> Instead of firefighting, teams can evolve their process and tools to reduce defect recurrence.</li></ul><p>CAR isn’t a retrospective; it’s more focused, data-driven, and outcome-oriented. When adopted by engineering teams, it becomes a <strong>tool for continuous quality improvement</strong>.</p><h3>Building a Blameless Culture Around CAR</h3><p>For CAR to succeed, your team must feel safe discussing failures. That means <strong>psychological safety</strong> isn’t optional; it’s foundational.</p><ul><li>Avoid<strong> <em>“Who did this?”</em></strong> Ask <strong><em>“What failed in our process?”</em></strong></li><li>Normalise sharing mistakes as learning moments.</li><li>Let engineers lead CAR sessions, which would foster ownership and increase engagement.</li></ul><p>Continuously asking <strong><em>“How did this happen?”</em></strong> instead of <strong><em>“Who caused this?”</em></strong> starts to shift the team’s mindset toward a process improvement culture.</p><p>I once worked with a software engineer who, whenever there was an issue, would check git blame and use the name of the person who introduced the bug as the commit message. One example:</p><blockquote>“Fixed Jeremiah’s Null Pointer Exception bug”</blockquote><p>Acts like this are the exact form of blame culture that an engineering team needs to move away from. Not only does it discourage transparency, it pushes people into defensive behaviour, precisely the opposite of what’s required for long-term quality improvement.</p><p>When used regularly, CAR becomes a safe, constructive ritual where learning replaces finger-pointing, and collaboration replaces isolation.</p><h3><strong>The Simplistic Way of Running CAR Sessions.</strong></h3><p>Before we dive into the step-by-step process, let’s illustrate it with a realistic programme scenario. This example will walk through the entire CAR process so you can see precisely how each step works in practice.</p><h4>Program Scenario: Redis Stack Disk Space Incident</h4><blockquote>During the deployment of a Redis Stack instance used for caching, search, and time-series storage, the dir configuration (which specifies where Redis stores persistent snapshots and index data) was left at its default system directory, which had minimal disk space.This oversight went unnoticed during staging because the dataset was small.<br>However, in production, with growing JSON documents, vector indexes, and time-series datasets, the disk quickly filled up. Redis Stack could no longer persist RDB snapshots or maintain index updates, causing partial index corruption, degraded search results, and cache write failures.</blockquote><p>We’ll now use this scenario to demonstrate how a CAR session would be run step-by-step.</p><h4>1. Trigger &amp; Select Outcomes for Analysis</h4><p>CAR sessions can be reactive (triggered by incidents) or proactive (scheduled to analyse patterns and successes).<br> In this case, the trigger is a production outage caused by Redis Stack running out of disk space.</p><p><strong>Key Steps:</strong></p><ol><li><strong>Gather relevant data</strong> such as production defects, issues identified during peer reviews or testing, performance anomalies, process capability gaps, or requests for corrective actions from project management or operations teams.</li><li><strong>Prioritise which outcomes to analyse</strong> using methods like failure mode analysis (FMEA). Consider factors like impact, frequency, recurrence patterns, and analysis cost.</li><li><strong>Define the scope clearly</strong>, specifying the outcome to analyse, the stakeholders involved, and expected improvements or learning objectives.</li></ol><p><strong>Example: Redis Stack Disk Space Incident</strong></p><ul><li><strong>Gathered Data:</strong> Deployment logs, storage usage metrics, staging vs. production dataset comparisons.</li><li><strong>Selected Outcome:</strong> Redis Stack failed to persist snapshots and maintain indexes in production due to exhausted disk space in the default directory location.</li><li><strong>Why This Outcome:</strong> It had significant user impact (search degradation, data loss), was reproducible and preventable, and highlighted process gaps, making it a high-value target for analysis.</li><li><strong>Defined Scope:</strong> Investigate why the default configuration wasn’t updated, why provisioning overlooked disk sizing, and how future deployments can be guarded against similar infra oversights.</li></ul><h4>2. CAR Session Structure &amp; Documentation</h4><p>Consistently recording findings ensures the team can refer back to them later. When conducting a CAR session, organise it around these key fields for clarity and traceability. For example:</p><ul><li><strong>Problem Description: </strong>The Redis Stack production instance failed due to storage exhaustion in the default dir location.</li><li><strong>Impact Description: </strong>Search returned incomplete results, cache writes failed, and time-series data was lost, causing customer-facing errors and downtime.</li><li><strong>Root Cause Identified: </strong>Default configuration not overridden during provisioning; IaC templates/deployment scripts lacked storage path controls.</li><li><strong>Learnings: </strong>Configuration defaults must be reviewed, storage capacity must match expected growth, and monitoring thresholds must be defined.</li><li><strong>Action Plan &amp; Status</strong> : Update scripts, add pre-deployment validation, and implement disk usage alerts.</li></ul><h4>3. Analyse Root Causes — The Five Whys</h4><p>Utilise structured questioning to explore further, especially the Five Whys technique.</p><ol><li><strong>Why is it happening (Level 1)?</strong> Redis Stack ran out of disk space.</li><li><strong>Why (Level 2)?</strong> The data directory pointed to a small system partition.</li><li><strong>Why (Level 3)?</strong> The default dir configuration wasn’t changed.</li><li><strong>Why (Level 4)?</strong> IaC templates lacked a parameter for storage path overrides / The config file was not updated to override the storage path.</li><li><strong>Why (Level 5)?</strong> There is no operational review process to validate storage sizing against projected data growth.</li></ol><p>Involve the people closest to the work, like developers, QA, or the business team, while the event is still fresh, so you get both technical insight and process context. This method prevents superficial solutions and reveals deeper systemic or cultural problems.</p><h4>4. Resolution Planning &amp; Action Tracking</h4><p>Turn findings into <strong>root cause–aligned actions</strong>, not just surface fixes.</p><ul><li><strong>Deployment Update: </strong>Explicitly set the dir to a large, dedicated storage volume.</li><li><strong>Automation: </strong>Add pre-deployment disk capacity checks to enhance the robustness of the deployment checklist.</li><li><strong>Process: </strong>Include Redis configuration validation in peer reviews.</li></ul><p>Each action assigned to a player in the team must have an owner, due date, and success measure. See the sample below.</p><ul><li><strong>Owner: </strong>Named engineer/DevOps lead.</li><li><strong>Due Date: </strong>Fixed completion date.</li></ul><h4>5. Implement Preventive Mechanisms &amp; Follow Up</h4><p>Make the fix stick(permanent):</p><ul><li>Storage path check is automated in CI/CD.</li><li>The deployment checklist requires a Redis config review.</li><li>Alerts set for 70% disk usage.</li><li>Track zero recurrences of similar issues for two release cycles(follow up).</li></ul><h3>Takeaways</h3><p>You can’t afford to treat defects as isolated accidents. Causal Analysis and Resolution (CAR) gives engineering teams a systematic, blameless way to learn from what went wrong and improve what comes next.</p><p>First, start with one defect, run a lightweight CAR session, then turn one root cause into one actionable change.</p><blockquote>“Don’t fix the problem, fix the process that let it happen.”</blockquote><p>Make that your team’s mantra. And over time, your code, culture, and confidence will improve together.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8889d1f9172f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>