🚨 This DP problem almost looked impossible… until I broke it down step by step. Day 23 of my Backend Developer Journey — and today was all about thinking in transitions, not brute force 👇 🧠 LeetCode Deep Dive Solved Minimum Total Distance Traveled 💡 What clicked: → Sorting robots & factories simplifies decisions → DP helps track minimum cost efficiently → Key idea: assign k robots to one factory within capacity ⚡ Transition-based thinking = Game changer ⚙️ Approach Breakdown ✔️ Sort robots & factories ✔️ Use DP → dp[i][j] = min distance for first i robots using first j factories ✔️ Try assigning multiple robots to a factory (within limit) 🔗 My Submission: https://lnkd.in/gtj9xka3 ☕ Spring Boot Learning Today I strengthened my understanding of Spring Data JPA 🚀 🔹 What I Learned: 👉 Dynamic Sorting with Sort.by() 👉 Pagination using Pageable 👉 Writing cleaner and scalable repository queries 🧠 The Real Learning 👉 DP is not about memorizing patterns 👉 It’s about breaking problems into smaller decisions 👉 Backend is not just CRUD 👉 It’s about efficient data handling at scale 📘 Spring Boot Notes: https://lnkd.in/gpWQvkyK 📈 Day 23 Progress: ✅ Improved DP intuition ✅ Better understanding of scalable APIs ✅ Stronger problem-solving mindset 💬 Have you ever struggled with DP until one idea suddenly made everything click? 👇 #100DaysOfCode #BackendDevelopment #SpringBoot #Java #LeetCode #DataStructures #CodingJourney
Manish Srivastav’s Post
More Relevant Posts
-
🚨 I stopped loading all data at once today… and my API got smarter. Day 24 of my Backend Journey — and this is where things started feeling real-world 👇 🧠 LeetCode Learning Solved LeetCode 2515. Shortest Distance to Target String in a Circular Array 💡 What clicked: → Circular traversal thinking → Checking both directions (forward & backward) → No extra space needed ⚡ Smart iteration > complicated logic 🔗 My Submission:https://lnkd.in/gja7CGPS ☕ Spring Boot Realization Today I learned Pagination using Spring Data JPA 👉 Page = chunk of data 👉 Pageable = pagination config 👉 PageRequest = implementation Instead of loading everything: ✔ Fetch only what’s needed ✔ Add sorting + pagination ✔ Build scalable APIs 🧠 The Shift 👉 Backend is not just about working code 👉 It’s about efficient data handling Small changes like pagination = big impact in real apps 📘 Spring Boot Notes: https://lnkd.in/gRgxP7Th 📈 Day 24 Progress: ✅ Better API design understanding ✅ Improved problem-solving approach ✅ Thinking like a backend engineer 💬 Do you prefer writing optimized code first, or refining later? 👇 Let’s discuss #100DaysOfCode #BackendDevelopment #SpringBoot #Java #LeetCode #CodingJourney
To view or add a comment, sign in
-
-
Hey everyone 👋 "Finally got my local AI pipeline running!" 🚀 I’ve been diving deep into how to connect enterprise backend tools with local LLMs, and I finally finished this project. It’s a real-time data stream that goes from Java to Python using Kafka as the bridge. The "How it works" part: Java (Spring Boot): I’m using this as the producer to send live messages. Kafka & Docker: This is the "Data Highway." It handles the messaging so the systems don't have to talk directly to each other (Decoupling!). Python & Llama 3.2: A Python script listens to the Kafka topic and feeds the data into a local Llama 3.2 model (via Ollama) for instant analysis. The hardest part? Honestly, managing the memory. Running Docker, a Heavy Java app, and an LLM at the same time on one laptop is no joke. I had to optimize the heap settings and switch to a 1B parameter model to keep everything from crashing, but the latency now is almost zero. No expensive Cloud APIs, no internet needed—just pure local engineering. 💻 Check out the video to see the Java producer trigger the AI analysis in real-time. #SoftwareEngineering #Java #Python #Kafka #LLM #BuildInPublic #DeveloperLife
To view or add a comment, sign in
-
🚀 Built a Production-Grade RAG System with Spring Boot Most GenAI projects stop at “chatbot with PDFs”. I wanted to go deeper - and build something closer to how real backend systems work. Over the past few days, I designed and implemented a Spring Boot-based RAG system that ingests and queries knowledge across multiple sources. 🔧 What I built: 1️⃣ Ingestion Layer Multi-source connectors for PDFs, wiki documents, and PostgreSQL — with incremental updates. 2️⃣ Chunking Strategy (Critical for RAG) PDFs → fixed-size pragmatic chunks Wikis → semantic sections DB → row-level chunking 3️⃣ Embeddings + Vector Store Ollama embeddings Redis vector store with rich metadata (source, timestamps, access rules) 4️⃣ Retrieval Pipeline Semantic search + metadata filtering Supports domain constraints (date ranges, visibility rules) 5️⃣ Prompt Orchestration Grounding rules + structured prompts Source-aware responses with citations (reduced hallucination) 6️⃣ Knowledge Lifecycle Management Admin APIs to ingest/delete sources independently No need for full re-indexing 💡 Key Learnings: ✔️ Chunking strategy matters more than model choice ✔️ Metadata design = production-grade retrieval ✔️ Local models (Ollama) are great for cost-efficient development ✔️ RAG systems are fundamentally backend + data problems, not just AI 🧱 Tech Stack: Java 17 • Spring Boot 3.5 • Spring AI • Redis • PostgreSQL • Ollama 🔗 Repo: https://lnkd.in/dR5drAU3 Next: → Adding React UI for interactive querying → Writing a deep-dive on RAG system design & trade-offs #SpringBoot #RAG #AIEngineering #Backend #Java #SystemDesign
To view or add a comment, sign in
-
While reviewing a client's SageMaker pipeline last week, I found a CRITICAL security vulnerability in their feature engineering code. The culprit was eval() — a single line executing arbitrary Python expressions from a string input. Bandit flags it immediately as B307/CRITICAL. In a production ML pipeline with external data sources, that's a remote code execution risk. The code ran fine in every environment. No errors, no warnings. Without static analysis in CI it would have stayed there indefinitely. It wasn't the only issue in the file: — A hardcoded secret flagged HIGH by Bandit — Silent in-place DataFrame mutation producing wrong results with no error thrown — Missing type annotations mypy would have caught at review time This wasn't junior code. It was written by an experienced engineer under deadline pressure — the exact conditions where these things slip through. The fix was straightforward — a five-tool pre-commit stack and four parallel CI jobs that catch all of it before anything merges. Takes a few hours to set up. Catches issues that could take days to debug in production. Code quality issues in ML pipelines don't stay in the code. They compound in production infrastructure — and they rarely show up until you're already paying for them. Link in the comments.
To view or add a comment, sign in
-
-
🚨 I thought this was just grouping… but prefix sums changed everything. Day 32 of my Backend Developer Journey — and today was about 👉 turning brute force into math 🧠 LeetCode Breakthrough Solved today’s Daily Challenge using HashMap + Prefix Sum logic 💡 What clicked: → Group indices of same values → Use prefix sums to calculate distances efficiently → Avoid recalculating distances again and again ⚡ The real trick: 👉 Don’t compute distances individually 👉 Precompute and reuse calculations 🔍 Key Insight Instead of O(n²): 👉 Split into left + right contribution 👉 Use running sums ⚡ Optimized to O(n) 🔗 My Submission: https://lnkd.in/g9Dar9cq ☕ Spring Boot Learning 🔄 Cascading in JPA (Game Changer for Projects) Working on my Hospital Management System, I explored cascading 👇 👉 CascadeType.PERSIST 👉 CascadeType.MERGE 👉 CascadeType.REMOVE 👉 CascadeType.ALL ⚡ Why this matters 💡 Instead of manually saving related entities: 👉 Save parent → child automatically saved 👉 Delete parent → child automatically handled 🔥 Real Example 👉 Saving Patient → Insurance also gets saved 👉 Deleting Patient → related records handled automatically 🧠 The Shift 👉 Optimization = math + observation 👉 Backend = relationships + lifecycle management 👉 Projects teach more than theory ever will 📘 Spring Boot Notes: https://lnkd.in/gpWQvkyK 🔗 GitHub Repo https://lnkd.in/gWb8ZPdv 📈 Day 32 Progress: ✅ Learned prefix sum optimization ✅ Understood cascading deeply ✅ Improved real-world backend thinking 💬 Do you prefer solving problems using logic or math-based optimization? 👇 #100DaysOfCode #BackendDevelopment #SpringBoot #Java #LeetCode #CodingJourney #SystemDesign
To view or add a comment, sign in
-
-
I published a write-up about a design decision I care about when adding AI capabilities to backend systems: How to use LangChain4j in a Spring Boot app without letting it take over the architecture. What changed in this project was not just "adding AI support". The bigger improvement was architectural: - the code is now organized by context - use cases stay in the application layer - LangChain4j sits behind clear ports and adapters - PostgreSQL + pgvector still own retrieval - tests were reorganized to match the architecture instead of generic technical layers The project now shows a more realistic RAG-style flow with: - document ingestion through REST - chunking and embedding generation - vector storage in PostgreSQL - hybrid retrieval with vector similarity, full-text search, and metadata filters - prompt building and answer generation through LangChain4j adapters What I like most is that the code did not become framework-shaped. The application core still owns the use cases. The infrastructure stays at the edges. Replacing providers is much closer to a wiring change than a rewrite. That is the lesson I think matters in real projects: Use frameworks as adapters. Do not let them become your architecture. Article: https://lnkd.in/dqf2mcRj Repository: https://lnkd.in/dCC5WPNB #java #springboot #postgresql #pgvector #langchain4j #softwarearchitecture #hexagonalarchitecture #cleanarchitecture #rag #backend
To view or add a comment, sign in
-
-
Still spending time on Spring Boot code reviews? • Missed edge cases • Security gaps slipping through • Endless PR cycles slowing delivery There’s a better way. Introducing SpringInsight - an open-source autonomous AI intelligence suite built for Java & Spring Boot teams. ⚡ Run 18 specialized AI agents on your repo ⚡ Get severity-ranked issues + exact fixes ⚡ All in under 60 seconds 🔍 AI Code Review (18 Agents) Catch what humans miss: • OWASP vulnerabilities • N+1 query issues • Concurrency bugs • Architecture flaws Upgrade Advisor → migrate to Spring Boot 3.5 / 4.0 effortlessly Reverse Engineering → understand legacy code instantly 🔮 Semantic Code Search Ask your codebase questions like: 👉 “How does authentication work?” Get precise, contextual answers grounded in your actual code. ✔ Runs fully local (RAG + vector DB) ✔ Your code never leaves your machine 🤖 SpringTeam (Autonomous Dev Agents) Describe a feature → AI delivers: • Code implementation • JUnit 5 tests • Documentation • Ready-to-review PR ⚙️ Built for Real Dev Workflows • GitHub PR integration (scan only changed files) • VS Code extension + MCP support + Web UI 💡 MIT Licensed. Self-hosted. Zero lock-in. 👉 Get started: https://lnkd.in/dJD_Cmm8 https://lnkd.in/dw_5u9Eb ⭐ If this saves you time, consider starring the repo! #SpringBoot #Java #AI #DeveloperTools #OpenSource #DevOps #CodeReview
To view or add a comment, sign in
-
Sharing a small but important lesson from building my first RAG pipeline 👇 This week I built a local RAG (Retrieval-Augmented Generation) system using: • Spring Boot • Ollama (local LLM + embeddings) • PostgreSQL + pgvector But the real learning wasn’t building it — it was debugging why it didn’t work. At first, everything looked correct: • embeddings generated • chunks stored • retrieval query working …but the answers were noisy, irrelevant… or sometimes nothing came back at all. What changed my thinking: RAG is not just “Embed → Search → Answer” It’s about controlling what goes into the model. What finally worked: • Retrieve Top-K (not everything) • Filter by similarity (distance threshold) • Limit context (1–2 strong chunks only) • Treat retrieved data as context, not instructions • Always return citations Biggest takeaway: RAG is not something you “add” It’s a system design problem: • retrieval quality • filtering logic • prompt discipline • understanding failure modes Next step: securing the system against prompt injection. #genai #rag #java #springboot #aiarchitecture #llm
To view or add a comment, sign in
-
-
🚀 Exciting Update: Solving the Latest Spring Boot Bugs with Scenario-Based AI Contexts! If you are building AI-driven applications in Java, managing runtime contexts effectively is crucial. I’ve just pushed a significant update to my open-source project: Scenario-Based Runtime Context for AI. In our latest update, I’ve added detailed descriptions and concrete evidence demonstrating how this framework successfully resolves some tricky bugs encountered in the latest Spring Boot releases. 🐛🔨 By utilizing a scenario-based approach, we can handle dynamic AI runtime contexts much more smoothly without clashing with Spring Boot's latest lifecycle or dependency injection changes. Curious to see how it works? Check out the updated repository and the new use cases here: 🔗 https://lnkd.in/gUnnVG5y I'd love to hear your thoughts! If you find it helpful, a ⭐️ on GitHub is always appreciated. Feedback and PRs are welcome! #SpringBoot #Java #AI #OpenSource #GitHub #SoftwareEngineering #DeveloperTools
To view or add a comment, sign in
-
I hit a strange realization today. Not a new concept. Not a new framework. Just something I’ve already used in production. But still… *I couldn’t explain it cleanly. We often say “I know this.” But do we really? Today’s trigger was a simple API design scenario in Spring Framework: 👉 Upload a file + send structured JSON data in the same request Sounds basic, right? But when I tried to break it down clearly— the *why*, the *how*, the *right annotation*— there was hesitation. --- Then the clarity came back: * `@RequestParam` → key-value inputs * `@PathVariable` → resource identity * `@RequestBody` → pure JSON payload * `@RequestPart` → **multipart boundary where file + structured data meet That moment reminded me of something deeper: > “Exposure creates familiarity. > But only articulation proves understanding.” In real systems, this gap shows up everywhere: * You’ve seen the pattern, but can’t justify it * You’ve fixed the bug, but can’t explain root cause * You’ve used the annotation, but don’t know *why it exists* At scale, this matters. Because senior engineering is not about: ❌ Writing more code It’s about: ✔ Explaining decisions clearly ✔ Designing with intent ✔ Debugging with first-principles thinkin --- **Today wasn’t about learning something new. It was about realizing what I hadn’t fully understood.** And that’s a different kind of progress. #SoftwareEngineering #Java #SpringBoot #SystemDesign #Backend #EngineeringMindset
To view or add a comment, sign in
Explore related topics
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development