🚨 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
Backend Developer Journey Day 32: Prefix Sums and Cascading in JPA
More Relevant Posts
-
We analyzed 790 CLAUDE.md files from GitHub. Not hand-picked examples. Real files from real repos — C++, Go, Python, TypeScript, Terraform, Rust, and 4 non-English languages. Here's what the data actually says: Structure convergence is real. → 65% of multi-section files start with Identity then Commands → 92% use code blocks (the single most consistent pattern across all domains) → The canonical structure: Identity → Commands → Architecture Brevity correlates with quality. → Median file: 4,536 characters (~100 lines) → Files under 5K chars pass quality assessment at 2x the rate of files over 8K → 86% stay under 300 lines → The 14% that exceed it are project diaries or status trackers, not config files What surprised us most: → MUST/NEVER emphasis markers are rare — under 10% of files use them (our smaller sample had overestimated this) → Non-English files (11% of corpus) follow identical structure patterns — the template is language-agnostic → The highest-scoring file is just 63 lines and 2,502 characters (a Go CLI tool) What developers actually put in CLAUDE.md: → 54% lead with project identity → 30% put commands second → 18% include naming/style conventions → 14% have formal constraint sections The takeaway that surprised me: The best CLAUDE.md files look nothing like comprehensive documentation. They look like a one-page cheat sheet a senior dev would hand a new team member on their first day. Short. Specific. Structured. The worst files read like READMEs, project diaries, or wish lists of how they want AI to behave. What does your CLAUDE.md look like — a cheat sheet or a diary? #AIEngineering #DataDriven #ClaudeCode #DeveloperExperience #CodingAssistants
To view or add a comment, sign in
-
-
🚨 I didn’t check every pair… and still got the maximum distance. Day 29 of my Backend Developer Journey — and today was about 👉 thinking smart instead of thinking more 🧠 LeetCode Breakthrough Solved “Two Farthest Houses with Different Colors” 💡 What clicked: → No need to compare all pairs → Just compare with first and last house → Expand from both ends ⚡ The real trick: 👉 The farthest distance will always involve either the first or the last element 🔍 Key Insight Instead of brute force (O(n²)): 👉 Use two pointers 👉 Compare edges only ⚡ Optimized to O(n) with simple logic 🔗 My Submission:https://lnkd.in/gE4cBmuV ☕ Spring Boot Learning 🔁 JPA Repository Revision Today I revisited the core of Spring Data JPA 👇 👉 JpaRepository simplifies database operations 👉 No need to write boilerplate SQL 👉 Built-in methods like: → save() → findById() → findAll() → delete() ⚡ Why this matters 💡 Strong fundamentals > New concepts 👉 Writing less code 👉 Getting more done 👉 Cleaner backend design 🧠 The Shift 👉 Optimization is about observing patterns 👉 Revising basics makes concepts stronger 👉 Backend mastery = consistency + clarity 📘 Spring Boot Notes:https://lnkd.in/gpWQvkyK 📈 Day 29 Progress: ✅ Improved problem-solving efficiency ✅ Strengthened JPA fundamentals ✅ Practicing consistency daily 💬 Have you ever solved a problem faster by doing less work? 😄 #100DaysOfCode #BackendDevelopment #SpringBoot #Java #LeetCode #CodingJourney
To view or add a comment, sign in
-
-
🚨 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
-
-
Most token optimization tools look at your config: unused skills, bloated system prompts, model routing. Tokenomics looks at something different: how you actually work. Roni Koren Kurtberg ran both approaches side by side on 240 Claude Code sessions and found completely different problems. Config audits catch the overhead you pay before typing a word. Behavioral analysis catches the patterns you repeat session after session without realizing it. 43% context snowball rate. 645 redundant file reads. 44% of sessions with unbounded bash output. No settings file will fix those. You need to see them first. Great post with real numbers, not theory.
I burned through 1.63 BILLION tokens in 30 days on Claude Code. ~$850 in API costs. Before you panic: 90% of those tokens were cached context replays at $0.30-$0.50/MTok. The real damage? 4.9M output tokens at $15-25/MTok and cache writes. That's where the money actually goes. I ran two tools to understand where it all went: Tokenomics (https://lnkd.in/dBrFv_jE by Gal Naor) analyzed 240 sessions: 🏆 Context Snowball: 43% of sessions had runaway growth. One project ballooned 27x. ~277M tokens wasted. 📖 File Re-reads: unchanged files re-read 645 times. One file read 44 times. It never changed. 🔍 42 consecutive file reads in one session dumped into context. Could've used a subagent. 💻 Bash Bloat: 44% of sessions had unbounded output. "Here Claude, hold this 10,000 lines." 👻 Phantom MCP: one server across 240 sessions, used in 0. 🧠 Opus Overkill: 7% of sessions used Opus for single-file edits. 5x cost, identical results. Token Optimizer (https://lnkd.in/dYViXfNi) audited my config (134 sessions, 1.36B tokens): • 65.1% of tokens (886M) went to Opus on routine work. Haiku: 0.2%. • 76K tokens/session on 61 unscoped rule files. C++, Swift, Go rules in a Java project. • 45 duplicate skills, 46 of 47 never used in 30 days • 118 plugin skills, only ~10 relevant to my stack • BASH_MAX_OUTPUT_LENGTH not set. 2,450 bash calls dumping unlimited output. Overhead: ~49K tokens before typing a word. Full potential: ~90K tokens/session eliminated + 40-50% cost reduction. This week I'm cleaning up and implementing both tools' suggestions. Will post a follow-up with real savings and whether output quality improved or took a hit. Run both tools, each gives you different interesting stuff. #ClaudeCode #AI #DeveloperTools #TokenOptimization #LLM
To view or add a comment, sign in
-
Your Claude Code token bill drops 36% the day you stop dumping your repo into context. Your agent's token usage drops 27x on the same task. Same model. Different retrieval. Here's what's broken right now. Your README is from six months ago. Your architecture doc predates the rewrite. Your agent quotes both like they're scripture and burns tokens doing it. Repowise(https://lnkd.in/gxjrWD8T) scores every doc by confidence. Every git diff updates the score. When a function changes, the docs that referenced it get flagged before your agent ever reads them. Four layers feed retrieval. Git history. Code graph. Versioned docs. Decision records. Your agent pulls from the layer that matches the code you shipped yesterday, with a confidence number attached. Stale wiki page from 2024 scores low. Decision record from last week scores high. Your agent picks accordingly. Seven MCP tools. Self-hosted. Code never leaves your machine. Works with Claude Code, Cursor, any MCP client. pip install repowise Python 3.11+ v0.3.0 AGPL-3.0 Benchmarks run against naive full-repo context on Claude Code. 36% cheaper. 27x more token efficient. Numbers in the repo.
To view or add a comment, sign in
-
-
I've been spending time recently doing structured deep dives into topics I want to genuinely understand — and implement simple toy models around those topics. So, over the weekend I spent a lot of time exploring web-sockets with Claude Code. The approach I followed: 1. Theory first. Before writing a single line of code, I spent time building a mental model — basic preview of how web sockets work, why they are so expensive, how statefulness affects every layer of the infrastructure, when to use / not-use WebSockets. Some real-world examples of when they are used and when they are not. 2. Design before implementation. I defined the scope and agreed on a test list before touching code. Scope: A WebSocket client and server where: - The server echoes client messages - The server can also push messages independently - The client can close the connection cleanly Test list (same 9 tests implemented in all three languages): 1. Server starts and listens on a port 2. Client connects to the server 3. On connection, client receives a welcome message from the server 4. Client sends a message and receives the echo correctly 5. Server sends an independent message, client receives it correctly 6. Client closes the connection cleanly (close code 1000) 7. Server handles multiple sequential messages correctly 8. Client handles multiple sequential messages correctly 9. Server handles multiple clients independently 3. Strict TDD. Kent Beck style — write the test list first, then one test at a time: red → green → refactor. No additional code before a failing test. 4. Three languages. Python (`websockets` + `pytest-asyncio`), Go (`gorilla/websocket`), and C# (`System.Net.WebSockets` + `xUnit`). I consider myself pretty proficient with python and use C# at work, but have been wanting to get a better understanding of Go for some time. Tell me how are you using Claude and other llms to learn and do things better? P.S. - Repository link in comments, I typed in everything for the source code, and didn't use auto-edits at all. The article is generated by Claude, and edited by me. Any feedback is greatly appreciated!
To view or add a comment, sign in
-
🚨 I didn’t optimize this problem… and that was the right decision. Day 31 of my Backend Developer Journey — and today taught me: 👉 Not every problem needs a complex solution. 🧠 LeetCode Breakthrough Solved today’s challenge using controlled brute force 💡 What clicked: → Compare each query with dictionary words → Count character differences → Accept if differences ≤ 2 ⚡ The real trick: 👉 Break early when condition fails 👉 Keep logic simple and readable 🔍 Key Insight 👉 Sometimes constraints allow brute force 👉 Optimization is useful… but only when needed ⚡ Clean logic > unnecessary complexity 🔗 My Submission: https://lnkd.in/gVDCQx5y ☕ Spring Boot Learning 🏥 Hospital Management System — Project Progress Today I leveled up my project significantly 👇 👉 Created core entities: → Patient → Insurance → Doctor → Appointment 🔗 Real Database Relationships 💡 Implemented real-world mappings: 👉 Patient ↔ Insurance (relationship mapping) 👉 Patient ↔ Appointment 👉 Doctor ↔ Appointment ⚡ This is where backend becomes real: 👉 Not just tables… but connected data systems 🔥 Big Realization 👉 Designing relationships is harder than writing APIs 👉 Good schema design = scalable backend 🧠 The Shift 👉 Simplicity in DSA + Complexity in System Design 👉 Moving from coding → engineering thinking 👉 Building something real changes everything 📘 Spring Boot Notes: https://lnkd.in/gpWQvkyK 🔗 GitHub Repo (Project): https://lnkd.in/gWb8ZPdv 📈 Day 31 Progress: ✅ Practiced clean brute-force logic ✅ Designed real-world DB relationships ✅ Strengthened project-building mindset 💬 What’s harder according to you — DSA problems or designing real systems? 👇 #100DaysOfCode #BackendDevelopment #SpringBoot #Java #LeetCode #SystemDesign #CodingJourney
To view or add a comment, sign in
-
-
March wrap. What I built, what I solved, what's almost done. DSA. 35 problems in 30 days Arrays. Strings. Sliding window. Backtracking. Linked Lists. SQL. Backtracking was the hardest week. Generate Parentheses, 3Sum, Letter Combinations, Combination Sum. All in 7 days. The pattern didn't click on problem one. It clicked on problem three. One habit changed everything. Tracing on paper before writing any code. Not after getting stuck. Before. Should've started months ago. Java. Built something that actually runs. OOP, collections, Java 8, then Spring Boot. Built an async report generator. Jobs move through a state machine: queued, processing, done, failed. Thread pool handles the load. The async logic wasn't the hard part. A job kept getting stuck between PROCESSING and DONE and I had no idea why. Took an hour to find it. One missing state transition. Wrote it, broke it, found it. That's how I know I actually understand it now. ContentMorph. Almost there. Next.js 14, Tailwind, shadcn/ui, Tambo AI. Paste anything. Article, email, notes, code. The UI figures out the best way to show it. Architecture took a few sessions to get right. Old responses kept stacking every time a new message came in. Clean now. Dark charcoal and amber gold. Shipping soon. April. Trees start Monday. 40 problems. ContentMorph ships before the 15th. What are you building this month? #BuildingInPublic #DSA #LeetCode #Java #WebDevelopment
To view or add a comment, sign in
-
Spent the last few days building something I've been wanting to exist for a while. Code reviews are one of those things that everyone agrees matter but nobody has enough time to do properly. Security issues slip through, architectural problems get ignored, and by the time someone catches them it's already in production. So I built CodeSentinel — an AI-powered code review tool that analyzes your code or PR diff and gives you a full breakdown in under 10 seconds. Here's what it catches: → SQL injection and hardcoded secrets → Broken authentication and IDOR vulnerabilities → Missing error handling and DRY violations → Architectural patterns that won't scale You paste your code or PR diff, pick the language, and it scores your codebase across security, architecture, and code quality — each out of 100 — with the exact affected lines and concrete fixes. Works across JavaScript, TypeScript, Python, Go, Java, Rust, C++, PHP, Ruby, and SQL. I also built a GitHub Actions bot that triggers automatically on every pull request and posts the full AI review as a comment — so your team gets feedback without changing any workflow. Built with React, Vite, and the Anthropic Claude API. Full source code is on GitHub 👇 https://lnkd.in/erE9Tq4h Happy to answer any questions about how it works or what I learned building it. #productmanagement #buildinpublic #AI #cybersecurity #developertools #javascript #react #opensource
To view or add a comment, sign in
-
I recently completed a full-stack Expense Tracker project, and I wanted to share what I took away from building it end to end. 🔗 GitHub: https://lnkd.in/gWRktn-b The project is a Personal Finance Dashboard built with: 🐍 Python ⚡ FastAPI — REST API backend 🎨 Streamlit — Interactive frontend 🗄️ MySQL — Relational database 📬 Postman — API testing 🧪 Pytest — Unit testing Key things I learned through this project: → How to structure a full-stack Python application with a clear separation between frontend and backend → Designing and querying a relational database schema from scratch using MySQL → Building and documenting REST APIs with FastAPI and Swagger UI → Writing unit tests with Pytest and organizing test folders properly → Testing API endpoints effectively using Postman → How small decisions in project structure make a big difference in readability and maintainability This was a practice project, but it gave me a much clearer picture of how real-world applications are built and connected together. The full source code is available on GitHub — feedback and suggestions are always welcome. #Python #FastAPI #Streamlit #MySQL #Pytest #Postman #DataEngineering #Learning #DataScientist #Project
To view or add a comment, sign in
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