Category algorithms
This one shows up in online coding assessments under the name Items in Containers, and it’s a trap: the obvious solution passes the examples and then times out on the...
Four nested loops solve this problem in five minutes, and that’s exactly the trap. With up to 1,000 prices per category, brute force has to check 10¹² combinations. Here’s how...
You’ve written a hundred articles, and you want a bot to share one of them every three hours, even while you sleep. “Pick a random article” sounds like one line...
This problem looks easy, and most candidates find the right idea within minutes. Then many of them implement it in a way that passes the examples and fails on half...
Merging two sorted lists is one of the classic coding interview problems, and one of the most useful: it is the heart of merge sort, of merging k sorted lists,...
Big O Notation is a mathematical notation that helps us analyze how complex an algorithm is in terms of time and space. When we build an application for one user...
Depth-First Search (DFS), is an algorithm to search for information in Graphs.
Tree data structures are non-linear data structures, and they allow us to implement algorithms much faster than when using linear data structures.
Write a method that, given an original number N, returns the smallest number with the same number of digits.
Category test-driven development
The Knapsack problem is a classic optimization problem in computer science and mathematics. It belongs to a class of problems known as combinatorial optimization problems. The basic idea of the...
Category design
Your Java application works fine in testing, then falls over in production: requests pile up, the database runs out of connections, the server stops responding. The fix is rarely “add...
Why are some codebases still easy to change after five years, while others need a rewrite after one? It’s rarely the framework or the language. It’s whether the people who...
The Unified Modeling Language (UML) is a graphical notation for modeling software systems. UML diagrams are not just pretty pictures: they communicate design decisions to the developers who build the...
SOLID principles tell you how to arrange your functions into classes and how those classes should depend on each other. Applied well, they make your software easier to change, easier...
SOLID principles tell you how to arrange your functions into classes and how those classes should be interrelated.
Category Web APIs
By the end of this guide you’ll have a working Spring Boot RESTful API, built with Gradle and documented with OpenAPI, and a live Swagger UI page you can show...
You’ve designed your API. Now comes the boring part: writing controllers, models and request mappings that only repeat what the spec already says. Swagger Codegen writes that code for you....
Most API problems aren’t coding problems. They’re design problems found too late: a missing field, an inconsistent name, an error nobody documented. Design-first fixes that by agreeing on the contract...
Your API has rate limiting. But does it actually work when several clients hammer different endpoints at the same time, on Black Friday? You don’t want to find out in...
A restaurant app needs a supplier’s food prices; the supplier’s system needs the restaurant’s orders. Two companies, two technologies, no shared code, and REST is how they talk. This tutorial...
A partner company starts integrating with your API. On day one, their developer writes a loop to load test data, and suddenly your API answers slowly for every other client....
Your nightly job sends 50,000 articles to a partner’s API, in batches of 1,000. At batch 23, the API answers 503 Service Unavailable. What should your client do? Give up,...
Your Java client calls an HTTPS API and fails before sending a single request:
Your REST API is documented with OpenAPI, and anyone who finds the URL can call it. This tutorial secures it with OAuth2: clients get a short-lived access token and send...
The main idea for documenting our back-end RESTful APIs is to communicate to third-party developers what our endpoints are doing.
Category Coding Practices
Clean code is code that a developer other than its author can read, change and extend without fear. The idea was made popular by Robert C. Martin in his book...
Category distributed-systems
System Design on AWS: The Trade-offs Every Engineer Should Know Before Their Next Whiteboard Interview
Recent logs are written and searched all the time. Logs from last month are searched now and then, and logs from three months ago almost never. Keeping all of them...
Category Object-Oriented
Get object-oriented programming (OOP) wrong and you’ll pay for it for years: tangled classes, features that break other features, a codebase nobody wants to touch. Get it right, and new...
Category Domain-Driven Design
The business people say delivery note, the ticket says shipping document, and the code says DocService.getDoc(). Every conversation needs a translation, and every translation is a chance for a bug....
Category Language
I have worked as a software developer in Berlin for more than ten years. This list contains the German words I hear and use most often in meetings, documents, emails,...
Your Java application runs on two servers behind a load balancer. Both write images to the same file server. Everything works, until one day old images stop being deleted, and...
Category career
System Design on AWS: The Trade-offs Every Engineer Should Know Before Their Next Whiteboard Interview
Two developers on the same team write equally good code. One of them leads the next project; the other is still waiting. The difference is almost never technical. It’s how...
Category startup
Most side projects built by developers don’t fail because of the code. They fail because nobody wanted to pay for them. The code was clean, the tests were green, and...
Category Project
“Build the new customer portal” is not a task. Nobody can estimate it, start it, or tell when it’s done. Projects fail less from bad code than from work nobody...
Category data structures
One endpoint in a B2B order system I worked on returned 1,000 orders, and it was slow. The database wasn’t the problem. Two innocent-looking nested loops were. Here’s how one...
Choosing the wrong data structure is one of the most common reasons code is slow, and one of the most common interview questions. A list where you needed a map...
Category programming
In the previous post, we built a program that walks an Order API (buyers, suppliers, customer numbers, articles) and places a test order. It works, but it’s built on OAuth2RestTemplate,...
Testing an order API by hand means clicking through buyers, suppliers, customer numbers and articles until you find a combination that works. This program does it in seconds: it walks...
When a login fails at 3 a.m., you want to know who tried, how often, and whether it worked. Spring Boot Actuator already publishes these security events; you only have...
The OCP Java exam doesn’t test whether you can write code. It tests whether you can read code like a compiler: which line fails, what exactly gets printed, which object...
An order API has to report several problems at once: a wrong quantity, a price difference and an article that no longer exists. Sending a list of strings works, but...
Before Java 5, every collection held Object, and every value you took out needed a cast, which could fail at runtime. Generics moved that check to the compiler. Here’s how...
You already use functional programming in Java every time you write a lambda or a stream. Used well, it turns a 20-line loop over orders into five readable lines. Used...
Category system-design
System Design on AWS: The Trade-offs Every Engineer Should Know Before Their Next Whiteboard Interview
Category aws
System Design on AWS: The Trade-offs Every Engineer Should Know Before Their Next Whiteboard Interview
Category book-review
System Design on AWS: The Trade-offs Every Engineer Should Know Before Their Next Whiteboard Interview