There is one line in almost every Spring Boot tutorial that runs flawlessly on your laptop and slowly corrupts your database in production: spring : jpa : hibernate : ddl-auto : update # works on your laptop, quietly rewrites prod With ddl-auto: update , Hibernate looks at your entities on every startup and alters the live schema to match them. No migration file. No version. No review. No rollback. Two developers add different fields, deploy in a different order, and now staging and production have quietly diverged — and the day one of those "updates" needs to drop a column, Hibernate will happily take your data with it. In Episode 5 of Building Instagram's Authentication Backend , we do the opposite. The database is not something Hibernate improvises at boot — it is a versioned artifact, checked into git, owned by Flyway . We build the persistence layer in three deliberate steps: the SQL migration , then the JPA entities , then the Spring Data r...
Java Streams Explained Clearly (Java 8–21): Intermediate, Terminal, Lazy Execution, Stateless vs Stateful, and takeWhile() / dropWhile() Java Streams are one of the most important features introduced in Java 8 , and they are now used heavily in real-world backend projects and Java interviews . In this article, you will learn Java Streams from the ground up , including: What Java Streams are and why they exist Intermediate vs Terminal operations Why streams are lazy Stateless vs Stateful operations (very important) takeWhile() and dropWhile() explained in detail (Java 9+) Performance and parallel streams Common mistakes and interview questions This guide is written in simple language , with clear examples , and is suitable for beginners, working professionals, and interview preparation . What Are Java Streams and Why Were They Introduced? Before Java 8, most data processing in Java was done using lo...