HouariZegai/playground
60.4
Adequate · 21 September 2026
6.7k
lines of production code
Java
primary language
4
measurements over time
What this system is
This system is a Java-based educational repository that implements a comprehensive collection of algorithms, data structures, and design patterns. It provides concrete, testable examples of behavioral design patterns, SOLID principles, and common algorithmic problems. The codebase is organized into distinct modules for leetcode solutions, katas, and pattern implementations, serving as a reference for software engineering concepts.
Features
Add BoundedStack implementation with capacity constraints
A new \BoundedStack\ class and its \Stack\ interface are introduced, providing a fixed-capacity stack implementation that throws specific exceptions (\Overflow\, \Underflow\, \Empty\, \IllegalCapacity\) for boundary conditions. The implementation includes a \find\ method to locate elements and supports zero-capacity stacks that immediately reject operations. Comprehensive tests verify all stack behaviors including push, pop, top, and find operations.
katas/stack · high confidence
Add Command pattern implementation for controlling lights
Introduced the Command behavioral design pattern to manage light switching operations. The update adds a \Command\ interface and concrete implementations (\ToggleCommand\, \AllLightsCommand\) that encapsulate light toggle actions. A \Switch\ class acts as an invoker that stores and executes these commands, allowing users to control individual lights or toggle all lights simultaneously.
design-patterns/behavioural/command · high confidence
Add implementations for common data structures
Added new implementations for a variety of data structures, including a Binary Search Tree, Dynamic and Simple Arrays, Linked Lists (including Doubly Linked Lists), Queues (array and linked-list based), Stacks (array and linked-list based), Hash Tables, and Graphs. These additions provide foundational algorithms and data structures for users to reference or utilize.
data-structures · high confidence
Add new algorithm implementations and documentation
The algorithms module now includes several new algorithm implementations and supporting code. A README.md file documents search and sort algorithms with their time complexities. New Java classes implement Egyptian multiplication, binary tree traversal, depth-first search (DFS) on graphs, recursive factorial calculation, and various search algorithms including binary search, interpolation search, KMP string matching, and linear search. Utility functions for generating and displaying random arrays are also provided.
algorithms · high confidence
Added Chain of Responsibility pattern implementation
Added a new implementation of the Chain of Responsibility behavioral design pattern, featuring a request handling chain with Director, VR, and CEO handlers that process purchase and conference requests based on type and amount thresholds.
design-patterns/behavioural/chain-of-responsability · high confidence
Added Mediator pattern implementation with light control and timer example
Introduced a new Mediator pattern implementation that manages a collection of Light objects, allowing users to turn all registered lights on or off via Command objects. The package also includes a MediatorEveryDay example demonstrating the use of java.util.Timer for scheduled tasks, accompanied by corresponding unit tests for both the mediator logic and the timer example.
design-patterns/behavioural/mediator · high confidence
Added Memento pattern implementation for state management
Introduced the Memento behavioral pattern to enable state saving and restoration. The new implementation includes an Employee class that can save its current state (name and address) into an EmployeeMemento record, and revert to a previous state. A CareTaker class manages a stack of these mementos, allowing users to save checkpoints and revert to them. A corresponding test verifies the save and revert functionality.
design-patterns/behavioural/memento · high confidence
Added Template Method pattern implementation for order processing
Introduced the Template Method design pattern to standardize the order processing workflow. The \OrderTemplate\ abstract class defines the \processOrder\ sequence (checkout, payment, receipt, and delivery), while \StoreOrder\ and \WebOrder\ provide specific implementations for each step. A \TemplateDemo\ class demonstrates the pattern by executing orders for both web and store channels.
design-patterns/behavioural/template-method · high confidence
Added new easy-level algorithm solutions
The leetcode/src directory now includes a collection of new Java implementations for easy-level algorithmic problems. This update adds solutions for string manipulation, array processing, and pattern matching, including AddBinary, Anagram, DetectCapitalUse, FindIndexOfFirstOccurrenceInString, FindTheDifference, FirstUniqueCharacterInString, FizzBuzz, IsSubsequence, Isomorphic, LengthOfLastWord, LongestCommonPrefix, LongestPalindrome, NumberOfSegmentsInString, PalindromeNumber, RansomNote, RemoveDuplicatesFromSortedArray, RemoveDuplicatesFromSortedList, ReverseString, ReverseVowelsOfString, RomanToInteger, TwoSum, ValidPalindrome, ValidParentheses, and WordPattern. A new utility class ArrayUtil was also added to support printing array outputs.
leetcode/src · high confidence
Added new katas: Bowling, Lychrel, and Tennis
Added the Bowling kata with a complete Java implementation and test suite for calculating game scores. Added the Lychrel kata with Java classes and tests for identifying Lychrel numbers and palindromes. Added the Tennis kata with a Spring-based REST API, including Docker configuration, Maven wrapper scripts, and API documentation, allowing the application to be built and run as a containerized service.
katas · high confidence
Added state pattern implementation for a fan control system
Added a new implementation of the state design pattern to manage a fan's operational states. The change introduces an abstract State class and concrete state classes (FanOffState, FanLowState, FanMedState, FanHighState) that define transitions between off, low, medium, and high settings. The Fan class now delegates behavior to these state objects, allowing the fan to change its behavior based on its current state. A corresponding unit test was also added to verify the state transitions.
design-patterns/behavioural/state · high confidence
Added the Visitor pattern implementation for ATV parts
Introduced a new implementation of the Visitor behavioral design pattern for ATV parts. This adds a visitor interface and concrete visitors to separate operations like displaying parts and calculating shipping costs from the part classes (Oil, Fender, Wheel, and PartsOrder), allowing new operations to be added without modifying the existing component classes.
design-patterns/behavioural/visitor · high confidence
Adds Java implementation of the Interpreter design pattern
Users can now use a Java-based Interpreter pattern implementation, featuring an Expression interface with TerminalExpression, AndExpression, and OrExpression classes to evaluate logical conditions against string contexts. The change includes corresponding unit tests for both the custom interpreter logic and a reference to Java's built-in regex Pattern class.
design-patterns/behavioural/interpreter · high confidence
Introduce document export interfaces and employee tax calculation logic
The codebase now supports exporting employee documents in multiple formats via new interfaces: ExportableJson, ExportablePdf, and ExportableText. The Payslip class implements ExportableText to generate text-based payslips, while the WorkContract class implements all three export interfaces. Additionally, a new tax calculation system has been introduced, featuring a TaxCalculator interface and specific calculators for FullTime, PartTime, and Intern employees, selected via a factory pattern. This allows the system to compute taxes differently based on employee type, adhering to the business requirements for varying tax rules per employee category.
solid/isp · high confidence
Introduce employee tax calculation and HR management capabilities
Added a new HR module that models employees (FullTime, PartTime, Intern) and provides tools to manage them. Users can now save and retrieve employee records, request time off, and calculate taxes based on employee type. The update also includes a subcontractor approval workflow and document export interfaces.
solid/lsp · high confidence
Introduce tax calculation logic for different employee types
Added a new tax calculation feature that computes taxes differently for full-time, part-time, and intern employees. The implementation includes an abstract Employee model, specific employee classes, a TaxCalculator interface with distinct calculator implementations for each employee type, and a factory to select the correct calculator. This allows the system to apply specific tax rules (such as varying retirement tax percentages and state aid for interns) based on the employee's role.
solid/ocp · high confidence
Introduced HR document and employee management components
Added new source files for the HR module, including an ExportableDocument interface for document exports, a ConsoleLogger for logging, an EmployeeFileSerializer for data serialization, an EmployeeRepository for persistence operations, and employee model classes (Employee, FullTimeEmployee, PartTimeEmployee, Intern) to support the application's core functionality.
solid/srp · medium confidence
Introduces a modular HR system with interfaces for employee, payment, and tax calculations
The solid/dip module now contains a complete HR management system implementing the Dependency Inversion Principle. This includes new interfaces for employee types, document export formats, and tax calculations, alongside their concrete implementations. The system supports processing employee data, calculating taxes based on employee type, sending payment notifications, and exporting payslips. The change also adds test coverage for the payment processing logic.
solid/dip · high confidence
Introduces the Iterator design pattern for traversing collections
The codebase now includes a concrete implementation of the Iterator behavioral pattern, allowing users to traverse a collection of items (specifically bikes in this example) without exposing its underlying structure. The change adds a \BikeRepository\ class that implements \Iterable\<String\>\ and provides an \Iterator\<String\>\ for sequential access. Additionally, tests verify both the custom iterator logic and standard Java iterator usage, demonstrating how to iterate over collections using both enhanced for-loops and explicit iterator calls.
design-patterns/behavioural/iterator · high confidence
Tennis Kata API and game logic
Added a new Tennis Kata implementation featuring a Spring Boot application with REST endpoints for initializing a game, recording scores, and retrieving the current score. The change includes the core game logic in the service layer, controller mappings under /api/v1/tennis, data transfer objects for input and output, and exception handling for validation and uninitialized game states. Additionally, Swagger2 configuration is added to document the API endpoints.
katas/tennis · medium confidence
Behavioural changes
Added Strategy pattern implementation with credit card and everyday use cases
Introduced the Strategy behavioral pattern to demonstrate flexible algorithm selection at runtime. The update adds a core example featuring credit card validation strategies (Amex and Visa) that implement a common ValidationStrategy interface, allowing the CreditCard class to delegate validation logic. Additionally, an everyday demo showcases the pattern's utility in sorting a Person list by different criteria (age and name) using anonymous comparator strategies.
design-patterns/behavioural/strategy · high confidence
Dependencies
Added Maven build configurations for design patterns, SOLID principles, and katas
Added new Maven \pom.xml\ files to organize the project into distinct modules: \algorithms\, \data-structures\, \leetcode\, and several \katas\ (bowling, lychrel, stack, tennis). Additionally, new \pom.xml\ files were added for \design-patterns\ (covering chain of responsibility, command, interpreter, iterator, mediator, memento, state, strategy, template-method, and visitor) and \solid\ principles (dependency inversion, interface segregation, Liskov substitution, open/closed, and single responsibility). These configurations establish the build structure for these specific codebases, with most pattern and SOLID modules targeting Java 17 and including JUnit 5.8.2 for testing, while the tennis kata uses a Spring Boot parent.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 57 → 60 (+3.4)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 94 → 94 (+0.7)
- Architecture 100 → 97 (-3.2)
- Maturity 74 → 78 (+4.1)
- Readiness 26 → 31 (+5.1)
- Security 99 → 97 (-1.1)
Resolved (17)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- Duplicated block (10 lines × 2) (algorithms/src/main/java/org/zegai/algorithms/search/kmp/KMP.java)
- Duplicated block (10 lines × 2) (data-structures/src/main/java/org/zegai/dsa/dll/DoublyLinkedList.java)
- Duplicated block (12 lines × 2) (algorithms/src/main/java/org/zegai/algorithms/graph/dfs/DFS.java)
- Duplicated block (12 lines × 2) (leetcode/src/main/java/org/zegai/leetcode/easy/AddBinary.java)
- Duplicated block (12 lines × 2) (solid/isp/src/main/java/com/houarizegai/hr/main/CalculateEmployeeTaxesMain.java)
- Duplicated block (13 lines × 2) (leetcode/src/main/java/org/zegai/leetcode/easy/RomanToInteger.java)
- Duplicated block (7 lines × 2) (leetcode/src/main/java/org/zegai/leetcode/easy/FindTheDifference.java)
- Duplicated block (8 lines × 2) (leetcode/src/main/java/org/zegai/leetcode/easy/Anagram.java)
- Duplicated block (8 lines × 2) (leetcode/src/main/java/org/zegai/leetcode/util/ArrayUtil.java)
- Duplicated block (9 lines × 2) (data-structures/src/main/java/org/zegai/dsa/code2019/array/dynamic/DynamicArray.java)
- Medium IaC: CKV_DOCKER_3 (katas/tennis/Dockerfile)
- No exposed public API
- Scanner failed to run — not a clean result
- Test reliability not included
- single-maintainer — knowledge-concentration (bus factor) risk
New (88)
- Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
- Duplicated block (10 lines × 2) (algorithms/src/main/java/org/zegai/algorithms/search/kmp/KMP.java)
- Duplicated block (10 lines × 2) (leetcode/src/main/java/org/zegai/leetcode/util/ArrayUtil.java)
- Duplicated block (10 lines × 2) (solid/dip/src/main/java/com/houarizegai/hr/documents/Payslip.java)
- Duplicated block (10 lines × 4) (solid/dip/src/main/java/com/houarizegai/hr/logging/ConsoleLogger.java)
- Duplicated block (10 lines × 5) (solid/dip/src/main/java/com/houarizegai/hr/persistence/EmployeeFileSerializer.java)
- Duplicated block (11 lines × 2) (data-structures/src/main/java/org/zegai/dsa/code2019/array/dynamic/DynamicArray.java)
- Duplicated block (11 lines × 3) (solid/isp/src/main/java/com/houarizegai/hr/persistence/EmployeeRepository.java)
- Duplicated block (11 lines × 4) (solid/dip/src/main/java/com/houarizegai/hr/persistence/EmployeeFileSerializer.java)
- Duplicated block (11–12 lines × 3) (leetcode/src/main/java/org/zegai/leetcode/easy/RomanToInteger.java)
- Duplicated block (12 lines × 2) (data-structures/src/main/java/org/zegai/dsa/dll/DoublyLinkedList.java)
- Duplicated block (12 lines × 4) (solid/dip/src/main/java/com/houarizegai/hr/main/SaveEmployeesMain.java)
- Duplicated block (14 lines × 2) (algorithms/src/main/java/org/zegai/algorithms/graph/dfs/DFS.java)
- Duplicated block (14 lines × 2) (algorithms/src/main/java/org/zegai/algorithms/graph/dfs/DFS.java)
- Duplicated block (14 lines × 2) (leetcode/src/main/java/org/zegai/leetcode/easy/AddBinary.java)
- Duplicated block (14 lines × 2) (solid/isp/src/main/java/com/houarizegai/hr/main/NatHolidayEmployeeTimeOffMain.java)
- Duplicated block (15 lines × 3) (solid/dip/src/main/java/com/houarizegai/hr/taxes/InternTaxCalculator.java)
- Duplicated block (15 lines × 3) (solid/dip/src/main/java/com/houarizegai/hr/taxes/PartTimeTaxCalculator.java)
- Duplicated block (16 lines × 3) (solid/dip/src/main/java/com/houarizegai/hr/personnel/Intern.java)
- Duplicated block (16 lines × 5) (solid/dip/src/main/java/com/houarizegai/hr/taxes/FullTimeTaxCalculator.java)
- …and 68 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
HouariZegai/playground was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 736ab09d884a966def501550f740eb73eb23d358 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-fa71c66cabd8.