top of page


Tutorials, Errors and Exceptions
Its a journey to understand things better. It will have tutorials, any error/exceptions encountered, its resolutions and lots of learning.

Search


CodeForgeAI: Building a 5-Agent Multi-LLM Pipeline That Writes, Reviews, Tests, and Deploys Java Code β Entirely Locally
Multi Agent Framework TL;DR β CodeForgeAI is a Spring Boot + Vaadin application that orchestrates five specialised AI agents (Business Analyst β Code Generator β Code Reviewer β Test Generator β Test Executor) to transform a PDF requirements document into reviewed, tested, and deployed Java code β all running on-premise on a developer laptop, with no cloud LLM calls, no data leaving the machine. Table of Contents Motivation & Goals Tech Stack End-to-End Pipeline Architecture
Ankit Agrahari
Apr 1216 min read
Β
Β
Β


Building DevOps Intelligence using MCP Server with Spring AI: Tools, Challenges & Solutions
Devops Intelligence Today, I successfully built and deployed a Model Context Protocol (MCP) server using Spring AI that exposes real DevOps infrastructure through intelligent tools. But the journey? Let's just say it involved more debugging than coding. In this post, I'll walk you through: What we built (the DevOps Intelligence Platform) The tools we created (K8s, Prometheus, Logs, Deployments) Every challenge we faced (and how we solved them) Why Spring AI 2.0.0-M2 is the s
Ankit Agrahari
Mar 147 min read
Β
Β
Β


Building an AI Tutor with Spring AI, Ollama, and Vaadin
AI Tutor is a web application that uses Spring Boot and Spring AI on the backend, an Ollama -hosted LLM (e.g. Googleβs Gemma3) for natural language understanding, and Vaadin for the rich web UI. Its core innovation is a Retrieval-Augmented Generation (RAG) pipeline: when the user uploads course materials (PDFs, text, etc.), the app splits them into chunks, creates vector embeddings, and stores these in a PGVector -enabled PostgreSQL database. At chat time, similar chunk
Ankit Agrahari
Jan 115 min read
Β
Β
Β


Morphous AI: Building Multi-Modal AI Workflows with Spring Boot and Vaadin
Multi-modal AI workflows are becoming essential for modern backend systems. They allow applications to process and generate different types of dataβtext, images, audioβwithin a unified framework. This capability opens new possibilities for richer user experiences and more intelligent automation. The MorphousAI project, built with Spring Boot, Vaadin, and Spring AI, offers a practical example of how to implement such workflows in a backend-first Java environment. This article
Ankit Agrahari
Dec 17, 20255 min read
Β
Β
Β


Building the Foundation: APIs, Prompts, and First Runs
In Part 1 of this series, we introduced the Smart DevOps Assistant (SDA) β an AI-powered helper that reviews pull requests, generates...
Ankit Agrahari
Sep 27, 20254 min read
Β
Β
Β


Meet Smart Devops Assistant: Vision, Stack and Journey so far
PRs that review themselves. Tests that write themselves. Stand-ups that summarise themselves. Say hello to Smart DevOps Assistant (SDA)...
Ankit Agrahari
Aug 27, 20256 min read
Β
Β
Β


Chatbot using Spring AI and OpenAI
In the previous post about utilizing Spring AI with Ollama and employing Docker Model Runner to execute AI models locally, this post...
Ankit Agrahari
May 11, 20253 min read
Β
Β
Β


Β
Β
Β
Contact
bottom of page



![If this shifted how you think about AI β
you're ready to Harness it. π₯
π¬ Comment "HARNESS" below
β I'll DM you the open-source agent template
π Save this carousel β refer back when you build
π€ Share with one engineer who's still copy-pasting
Follow @backendbrilliance for more content on
AI agents, Spring Boot architecture & backend systems
that actually scale.
#AIHarnessing #BackendBrilliance #JavaDeveloper
#SpringBoot #SpringAI
[AIAgents SystemDesign BackendEngineering SoftwareDevelopment LLMOps]](https://scontent-den2-1.cdninstagram.com/v/t51.71878-15/729219604_894359219640315_5276418046541229917_n.jpg?stp=dst-jpg_e35_tt6&_nc_cat=102&ig_cache_key=MzkyNjU3ODk3MzMyNzMxMTg2Mw%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=a54f6b&efg=eyJlZmdfdGFnIjoiYmVzdF9pbWFnZV91cmxnZW4uQ0xJUFMuQzMifQ%3D%3D&_nc_ohc=VsI4oeqheXIQ7kNvwEoc1TP&_nc_oc=Adr4zLk7-QHOlitdh2IkD8lt9ApR4I-O14IABTpX8CNyJj8edpmVodnPKvu366aRnHs&_nc_zt=23&_nc_ht=scontent-den2-1.cdninstagram.com&edm=ANo9K5cEAAAA&_nc_gid=SOUWKYjp-pqeN5XBTz7XJA&_nc_tpa=Q5bMBQKESKH-NvbntENRUBTdVJ8MYbK8Fggbw6HRau42ZIFpa2W15MhTUM313tgXELYTZHlDtepXFIl1&oh=00_AQKRWtcEdGP-rGNsQACPtNZDJIc_vuY7bnyt9gIC-L_fRQ&oe=6AB14F6F)























![You think HashMap is always O(1).
It isn't. Here's what actually happens. π§΅
HashMap stores pairs using `index = hash(key) % capacity` β direct slot access, no scanning. Pure O(1). Until two keys land on the same slot. That's a collision β not a bug, a math inevitability.
Two ways to fix it π
π Chaining β each bucket holds a linked list. Collisions append to the list. Simple, handles high load, easy deletion. Downside: pointer overhead, poor cache performance, chains degrade to O(n) at high load. Java's fix? At 8 nodes, the list auto-converts to a Red-Black Tree β O(log n) worst case.
π¦ Open Addressing β no linked lists. Collision at slot X? Probe X+1, X+2 until empty. Cache-friendly, zero memory overhead. Downside: deletion needs tombstone markers, and keys cluster together making future collisions worse. Used by C++, Go, Redis.
βοΈ Load Factor = entries Γ· capacity
π’ Below 0.5 β rare collisions, wasted memory
π 0.75 β Java's sweet spot, triggers resize + rehash
π΄ Above 0.9 β collision cascade, O(n) territory
Double hashing kills clustering by varying the probe step per key:
`probe(i) = (h1 + i Γ h2) % m`
Elements scatter evenly. No bunching. O(1) preserved.
The truth: HashMap is O(1) until a bad hash function, wrong load factor, or wrong strategy turns it into O(n).
Three things protect you:
β Well-distributed hash function
β Load factor under 0.75
β Right collision strategy for your use case
π¬ Java interview question: what happens when a chain hits 8 nodes?
Drop your answer below π
π Save this before your next interview.
#java #hashmap #datastructures #dsa #algorithms
[codinginterview programming 100daysofcode]](https://scontent-den2-1.cdninstagram.com/v/t51.71878-15/641188820_1859196944673752_5535080284006983284_n.jpg?stp=dst-jpg_e35_tt6&_nc_cat=102&ig_cache_key=Mzg0NDY4MjE0NzAzMTAyMzAyNA%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=a54f6b&efg=eyJlZmdfdGFnIjoiYmVzdF9pbWFnZV91cmxnZW4uQ0xJUFMuQzMifQ%3D%3D&_nc_ohc=vOsupNueuZQQ7kNvwFSSLey&_nc_oc=Adp-hlXfAz2HH5ZiGK_SzILbZCio9J-YgoSzpupoLA__KsVq2Jn97vM2-4tvwfsf5OY&_nc_zt=23&_nc_ht=scontent-den2-1.cdninstagram.com&edm=ANo9K5cEAAAA&_nc_gid=SOUWKYjp-pqeN5XBTz7XJA&_nc_tpa=Q5bMBQJ4O40i-sMGo7YAfHWIuvXwXHdjsm_GdOxem9JY5693plGYNt9t4JFaxtEPhLDlyI7CvrrYWcC_&oh=00_AQJarq4esGDTaChZBisK--ljDjAOaqPWsvVXjNpe6SDVqw&oe=6AB17BFE)


