Author: marjavamitjava

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...

How short circuit work in Java streams

Understand how limit() short-circuits and how a stream pipeline executes lazily and element-by-element. 🔄 Example Code List<String> names = Arrays.asList(“Alice”, “Bob”, “Charlie”, “David”, “Eve”);List<String> result = names.stream() .filter(name -> { System.out.println(“Filtering: ” + name);...

Can Two Classes Have the Same Fully Qualified Name in Java?

What Is a Fully Qualified Name (FQN)? In Java, a class’s fully qualified name is its package name + class name. For example: package com.example;public class MyService {} FQN = com.example.MyService But What Really...

Building your own MCP server

RAG Pinecone MCP Server This server implements the Model Context Protocol (MCP) for RAG (Retrieval-Augmented Generation) using Pinecone as the vector database. Environment Variables Required environment variables in your .env file: PINECONE_API_KEY= # Your Pinecone API...

Model context protocol – A multi vendor tool

MCP (or an MCP-like system) can absolutely integrate tools/APIs from different vendors, acting as a universal orchestrator. This is one of its most powerful features—it dynamically selects and combines services from multiple providers based on context, without...

Creating cursor Plugin to interact with your RAG server

This is a VS Code extension (written in TypeScript) that provides RAG‑powered ColdFusion code completions. Here’s how it’s structured: 1. Output Channel 2. SharedContext Singleton 3. ColdFusionCompletionProvider Implements VS Code’s CompletionItemProvider to generate AI‑driven snippets: 4....

Understanding Text Embeddings: How AI Converts Words into Vectors

Introduction In recent years, AI models have become incredibly powerful at understanding human language. But how does an AI system “understand” a sentence? The answer lies in text embeddings, which transform words and sentences...

Understanding Embeddings: Converting Text into Searchable Vectors

Introduction Embeddings are a way to represent text (or other data) as dense numerical vectors that capture semantic meaning. These vectors allow us to perform tasks like similarity searches, clustering, and machine learning efficiently....