Welcome to Coding With Aman!
I'm Aman Sahni, an IT professional sharing 10+ years of knowledge to help you learn important concepts and crack interviews.
Learn Java, Spring Boot, and how to design systems that can handle anything.
With 10 years in IT, I've seen it all and I'm here to guide you. My tutorials are designed to be clear, concise, and focused on real-world application.
Join me on this coding journey – subscribe now!
Coding with Aman
Handling race conditions in your database is a must...
Let's say two users try to book the last seat on a flight at the exact same time.
Without proper isolation:
→ Both read "1 seat available"
→ Both book successfully
→ Database shows "−1 seats available"
→ Then you need to do refunds
Transaction Isolation Levels can help in this problem.
👉 Without proper locking → Race conditions everywhere
👉 With pessimistic locking → Consistent state guaranteed
Two Locking Strategies can be used:
a) Pessimistic Locking
- Lock row immediately
- Block others until transaction completes
- Use for high contention (booking systems, inventory)
b) Optimistic Locking
- Add @Version field
- Check version before update
- Retry on conflict
- Use for low contention (profile updates)
Isolation Levels to Know:
1) Read Committed → Default in PostgreSQL
2) Repeatable Read → Default in MySQL
3) Serializable → Safest but slowest
Your data integrity depends on this!
3 weeks ago | [YT] | 32
View 0 replies
Coding with Aman
Handling Curveball Questions is very important to crack Interviews!
You’ve nailed the tech rounds, and suddenly the interviewer throws a curveball:
👉 “What’s your favorite Java feature?”
👉 “What would you change in Java if you could?”
👉 “How do you stay up-to-date with Java?”
These aren’t textbook questions — they’re meant to test depth, authenticity, and how you think beyond code.
Below are some of the example responses:
1) Favorite Java Feature?
The Stream API. It changed how we write and reason about data processing — bringing functional style, better readability, and performance with parallel streams.
2) One thing you'd change?
Stronger native support for immutable collections, like Guava’s. Java's List.of() is a start, but the ecosystem deserves more expressive immutability tools.
3) How do you stay current with Java developments?
I follow OpenJDK mailing lists, participate in guilds, read JEPs, play with preview features, and contribute to OSS — it keeps my skills fresh and relevant.
These questions don’t have “right” answers. Use them to highlight your thinking, preferences, and growth mindset.
#java #springboot #programming
5 months ago | [YT] | 16
View 1 reply
Coding with Aman
If you have got an interview in the next 2-3 days then don’t try to learn everything from scratch. Instead, revise smart.
You can spend just ~3 hours on these focused videos to brush up on core concepts which can help in your interviews:
✅ Generics in Java (~10 mins)
🔗 linktw.in/UdHRxw
✅ Multithreading Crash Course (~90 mins)
🔗 linktw.in/kLDryG
✅ Java Streams In-Depth (~40 mins)
🔗 linktw.in/jdXjZq
✅ Top 10 Spring Boot Concepts (~50 mins)
🔗 linktw.in/hmooIN
✅ System Design Masterclass (~15 mins)
🔗 linktw.in/UWROqql
🧠 Revise smart. Go in confident.
If you find this helpful, feel free to share it with someone preparing too! 💪
7 months ago | [YT] | 30
View 1 reply
Coding with Aman
Based on my 10 years of experience in the industry, below two lessons are really important which can help in your career growth:
👉 An uncontrolled schedule is a silent career killer — you don’t even realize it until it's too late. Own your time like you own your meetings and proactively block time in your calendar for coding, learning, deep work, and strategic thinking.
👉 Being smart is important. But being someone people want to collaborate with is what truly sets you apart.
👉 Empathy, emotional intelligence, and the ability to work well with others will take you farther than cleverness alone.
8 months ago | [YT] | 29
View 0 replies
Coding with Aman
Java 24 got released a few days back, and I’m genuinely excited about how Java is solving long-standing multithreading challenges. 🙌
If you're a Java developer, start exploring below three features — they’re not just cool, they’re the future of Java:
1) Virtual Threads – Lightweight threads that make writing scalable concurrent apps much easier.
2) Structured Concurrency – Treat multiple tasks as a single unit of work, making cancellation and error handling super clean.
3) Scoped Values – A modern, safer alternative to ThreadLocal for sharing immutable data across threads.
These APIs will be game-changers especially when used together.
#java
9 months ago | [YT] | 29
View 0 replies
Coding with Aman
Which of the following naming styles are supported by Spring Boot's relaxed binding for configuration properties?
1 year ago | [YT] | 6
View 3 replies
Coding with Aman
You have a base class Bird with a fly() method, but you need to create a subclass Penguin that cannot fly. Which SOLID principle does this violate?
1 year ago | [YT] | 12
View 0 replies
Coding with Aman
You notice that class A has a private field of type class B, and class B has a private field of type class A. Both classes are accessing each other’s internal states frequently. Which code smell is this?
1 year ago | [YT] | 5
View 1 reply
Coding with Aman
You are developing a text editor that supports optional features like spell-checking, grammar-checking, and plagiarism detection. You want to add these features dynamically without altering the core editor functionality. Which pattern should be applied and why?
1 year ago | [YT] | 6
View 0 replies
Coding with Aman
I have started Java Design patterns (low level design) playlist which will help to understand the basics of design patterns, who invented them, how to use them, categories, 21 Design patterns and code smells.
Feedbacks and suggestions always welcomed 😊👨🏻💻
#designpatterns #lld #java
1 year ago | [YT] | 13
View 0 replies
Load more