Mar Java Mit Java Blog

Understanding MCP Client-Server Communication in ColdFusion

In a modern AI-assisted development environment, the Model Context Protocol (MCP) facilitates interaction between tools like Cursor VSCode and a backend server written in ColdFusion. Let’s walk through how an MCP client initializes communication,...

How Java dynamic proxy works internally

Here’s a practical example of a Java dynamic proxy used to log method calls on a real object — a common pattern in frameworks like Spring AOP. 🎯 Scenario You have a service: public...

What is Escape Analysis and Scalar Replacement

🧠 1. What is Escape Analysis? Escape Analysis asks a simple question: ❓ Does this object “escape” the method? (i.e., is it used outside the current method?) 🧪 Example: No Escape public int compute()...

How a word’s embeddings change as context varies

Let’s break down how a model like BERT or OpenAI produces different embeddings for the word “bank” in different contexts. 🎯 The Goal: We want: 🧠 Step-by-Step: How Different Embeddings Are Calculated 1. Tokenization...

A layman example of Vector database

Here’s a layman-friendly example of representing a word as a 2D vector (just two numbers) — even though real embeddings are often 384, 768, or 1536 dimensions. 🔤 Let’s take the word: “king” We...

Java stresms VS for loops

Let’s take the stream pipeline: List<String> result = names.stream() .filter(name -> name.length() > 3) .map(String::toUpperCase) .limit(2) .collect(Collectors.toList()); and write it using a classic for loop — then compare readability, performance, and flexibility. 🔁 Equivalent...