How to Debug a Java Memory Leak Step by Step
Debug a Java memory leak step by step with a runnable example, jcmd commands, heap dumps, Eclipse MAT screenshots, and measured results before and after the fix.
Debug a Java memory leak step by step with a runnable example, jcmd commands, heap dumps, Eclipse MAT screenshots, and measured results before and after the fix.
Explore 40 top DSA problems to practice for coding interviews, grouped by pattern with practice links, approach hints, edge cases, and a study plan.
Spring AI interview questions with answers for Spring AI 2.0: ChatClient, advisors, chat memory, tool calling, MCP, RAG, structured output and testing.
Spring AI 2.0 migration guide: upgrade a Spring AI 1.x app to 2.0.1 step by step, with the build errors you will see and the fix for each one.
Spring AI Docker Model Runner example: run LLMs locally with the OpenAI starter and a base URL, then keep a second model in Ollama in the same app.
Spring AI Bedrock Converse in Spring Boot: the starter, AWS credentials, model access, a local model beside it, and switching model families by id.
Spring AI DeepSeek setup in Spring Boot: the starter, the API key, two ChatClients for DeepSeek and a local model, and reasoning mode in Spring AI 2.0.
Spring AI Gemini setup in Spring Boot: the starter, the API key, two ChatClients for Gemini and a local model, and the thinking budget in Spring AI 2.0.
Spring AI Anthropic Claude setup in Spring Boot: the starter, the API key, two ChatClients for Claude and a local model, and extended thinking.
Spring AI moderation with Llama Guard on Ollama and OpenAI’s ModerationModel: check customer messages in an advisor and block the unsafe ones.
Spring AI observability with Micrometer: read token and latency metrics in Actuator, trace one RAG request in Zipkin, and turn tokens into cost.
Spring AI testing at three levels: unit tests with a fake ChatModel, integration tests with Ollama in Testcontainers, and evaluators as judges.
Build Spring AI agents with five workflow patterns: chain, routing, parallelization, orchestrator and workers, and evaluator and optimizer, with real runs.
Build a Spring AI MCP server with @McpTool, @McpResource and @McpPrompt, test it with MCP Inspector, and call its tools from a Spring AI MCP client.
Spring AI advisors explained: how the advisor chain works, the built-in advisors, why their order matters, and how to write your own call advisor.
Spring AI RAG with Ollama: add QuestionAnswerAdvisor and RetrievalAugmentationAdvisor, compare them on real questions and fix wrong or missing answers.
Spring AI vector store comparison: the same app on SimpleVectorStore, Chroma, pgvector, Redis and Qdrant, with real timings, setup, traps and a rule.
Spring AI Redis vector store example: run Redis Stack, configure RedisVectorStore, declare metadata fields for filters, and fix the common Redis errors.
Spring AI multimodality with Ollama: send a parcel photo and a question to a vision model, accept an upload, and map the answer to a Java record.
Spring AI chat memory with Ollama: add MessageChatMemoryAdvisor, keep one conversation per customer, save it in HSQLDB with JDBC and pick a window size.
Spring AI streaming with Server-Sent Events in Spring MVC: return a Flux, test it with curl, read it in the browser with EventSource and keep the spaces.
Spring AI ChatClient examples: default system prompt, template parameters, Java records with entity(), token usage, per-request options and two clients.
Prompt injection in LLM apps explained: direct and indirect attacks run against a Python assistant, five defenses, and the attack counts after each.
Fine tuning vs RAG vs prompt engineering for LLM apps: what each changes, cost and data needed, a Java prompt example, and a flow to pick one.
Run LLMs locally from Java with Ollama, Docker Model Runner or LM Studio: compare the three, then call any of them with one plain Java HttpClient class.
Retrieval augmented generation (RAG) explained for Java developers: index, retrieve, generate, the key terms, a runnable offline example and the trap.
Build a Spring Boot and Vaadin CRUD app with a Grid, a validated form and Spring Data JPA. Complete code for every file, run steps and real screenshots.
TypeScript 7 ports the compiler to Go, and tsc is now a native binary. We measure it against TypeScript 6 on 1,001 modules and migrate a tsconfig step by step.
MCP tool poisoning hides instructions in a tool description. See it demonstrated in Python, with hash pinning, scanning and sandboxing as defenses.
Free-threaded Python (python3.14t) runs threads in parallel without the GIL. We install the build, reproduce race conditions and write thread-safe code with locks and queues.
CPython’s experimental JIT compiler (PEP 744) explained: how to enable it, a real from-source benchmark, and when it helps today.
Python 3.15 adds the lazy keyword (PEP 810) for imports that load on first use. This guide measures start-up time with -X importtime, shows a CLI tool that starts in 57 ms instead of 141 ms, and compares the older alternatives.
Context bloat is the growth of an LLM request with tokens the model does not need. Measure a real agent request and cut it with six techniques.
Python 3.15 makes UTF-8 the default encoding of open() on every platform. What breaks with cp1252 files on Windows, and the six steps to migrate safely.
Stateless MCP means every request carries what the server needs. What revision 2026-07-28 removed and added, shown with a stateful and a stateless Python server behind a two-instance proxy.
Upgrade the Python version of an existing project in seven steps with pip and venv: fix the deprecation warnings on the old version, check the wheels, test on both versions, then switch. Shown on a real project moving from 3.12 to 3.15.
A SKILL.md file holds on-demand instructions for a coding agent. This guide covers the format, the description that triggers it, a validator and two tests.
Fix the Dropwizard error Failed to parse configuration, could not resolve type id ‘http’ as a subtype of ConnectorFactory: add the Shade services merge.
Dropwizard health check examples with a custom HealthCheck, the admin /healthcheck, the health block in config.yml, Kubernetes probes and JUnit tests.
Dropwizard tutorial with a hello world REST API on Dropwizard 5 and Java 25: configuration, resources, fat JAR, ports, health check and JUnit 6 tests.
Dropwizard basic auth example with dropwizard-auth: Authenticator, Authorizer, BCrypt password hashes, @RolesAllowed, caching and tests for 401 and 403.
Dropwizard client guide with JerseyClientBuilder, HttpClientBuilder and config.yml settings for timeouts, connection pool, retries, gzip, TLS and tests.
Compare ten machine learning libraries for Java by version, license, minimum Java and maintenance status, with Smile and Tribuo examples and a pick-by-situation table.
Estimate LLM token costs in Java with current OpenAI, Anthropic and Gemini prices, read real token usage with Spring AI, and cut the bill with prompt caching.
Learn what the Model Context Protocol (MCP) is, how hosts, clients and servers exchange JSON-RPC messages, and how to build an MCP server and client in Java.
LLM terms for Java developers, from tokens and context windows to temperature, embeddings, RAG, tool calling and MCP, with Spring AI classes.
JUnit 5 vs JUnit 6 compared, with the Java 17 baseline, removed APIs, migration steps for Maven and Gradle, OpenRewrite and runtime changes.
What is data analytics? Learn the four types, the six-step process, the skills and free tools to start with, and a first analysis in SQL and Python.
Compare IntelliJ IDEA, VS Code, Eclipse, Cursor and Devin Desktop for AI-assisted Java development in 2026. AI models, free tiers, pricing, testing and CI/CD support at a glance.
@GetMapping maps HTTP GET requests and @PostMapping maps HTTP POST requests to controller methods in Spring. Both are shortcuts for @RequestMapping with a fixed HTTP method.
HowToDoInJava provides tutorials and how-to guides on Java and related technologies.
It also shares the best practices, algorithms & solutions and frequently asked interview questions.