Day #8: Stack Overflow? Not On Our Watch! ⚡️🛡️

Today we ventured into the realm of data structures, implementing our own generic stack while restructuring our project organization. It’s one thing to use Java’s built-in collections, but building them from scratch? That’s where the real learning happens! The code changes from this session can be found here. Day 8 Summary Overview Restructured project organization and implemented a generic stack data structure with modern Java features while focusing on clean code principles and API design. ...

February 15, 2025 · 2 min · 274 words · Çağlar Turalı

Day #5: Dealing with Java: High Cards and Higher Principles 🃏

Today we brought our card game to life, implementing a complete multiplayer High Card game while diving deeper into Java’s object-oriented features. The code changes from this session can be found here. Day 5 Summary Overview Built a complete multiplayer High Card game while exploring Java’s object-oriented features, modern syntax, and clean code practices. Environment & Tools Git workflow with feature branching zsh git shortcuts for efficient version control Proper package organization Concepts Covered Domain Modeling Record types for immutable data (Card, GameResult) Class design for mutable state (Player, Game) Enum implementation with behavior Clean separation of concerns Modern Java Features Records with validation Enhanced enum capabilities String formatting Stream operations for collections Optional for null safety Design Patterns & Principles Dependency Injection (IO handling) Immutable value objects Builder pattern for game setup Interface segregation Single Responsibility Principle Console Interface Interactive gameplay Input/Output abstraction Error handling User feedback Game state management Implementation Progress Created core game entities Implemented deck management Added player validation Built interactive console interface Established proper error handling Key Takeaways Java enums can contain behavior Records provide clean immutable data structures Dependency injection enhances testability Clean separation between domain and UI Proper error handling improves user experience Next Steps Ready to explore: ...

February 12, 2025 · 2 min · 279 words · Çağlar Turalı