<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Clean Code | Guillermo F. Parra</title><link>https://guillermo.parralopez.com/tags/clean-code/</link><atom:link href="https://guillermo.parralopez.com/tags/clean-code/index.xml" rel="self" type="application/rss+xml"/><description>Clean Code</description><generator>HugoBlox Kit (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Fri, 01 May 2026 00:00:00 +0000</lastBuildDate><image><url>https://guillermo.parralopez.com/media/icon_hu_c22ca16efde0ca17.png</url><title>Clean Code</title><link>https://guillermo.parralopez.com/tags/clean-code/</link></image><item><title>ExpenseManager V2</title><link>https://guillermo.parralopez.com/projects/expensemanager/</link><pubDate>Fri, 01 May 2026 00:00:00 +0000</pubDate><guid>https://guillermo.parralopez.com/projects/expensemanager/</guid><description>&lt;h3 id="description"&gt;Description&lt;/h3&gt;
&lt;p&gt;ExpenseManager is a robust solution for financial control. Unlike simple expense trackers, this system implements complex logic for shared accounts (flatmates, trips, couples) and a proactive alert system based on temporal strategies.&lt;/p&gt;
&lt;h3 id="technical-features"&gt;Technical Features&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Expense Management (CRUD)&lt;/strong&gt;: Detailed tracking with date, amount, category, and payer, supporting secure editing and deletion.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Shared Accounts&lt;/strong&gt;: Group management with configurable splitting algorithms (Equitable vs. Percentage) for automatic debt calculation among users.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Alert System&lt;/strong&gt;: Real-time notifications upon exceeding user-defined spending limits (Weekly or Monthly).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Statistical Dashboard&lt;/strong&gt;: Data visualization using interactive charts and advanced filtering (by dates and multiple categories).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bulk Import&lt;/strong&gt;: Data loading from external CSV files using robust adapters.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Persistence&lt;/strong&gt;: Automatic local storage in JSON format using the Jackson library.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="architecture--design-patterns"&gt;Architecture &amp;amp; Design Patterns&lt;/h3&gt;
&lt;p&gt;The project strictly follows the &lt;strong&gt;MVC (Model-View-Controller)&lt;/strong&gt; pattern alongside several GoF design patterns to ensure scalability and maintainability:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Singleton&lt;/strong&gt;: Unique session management (&lt;code&gt;ControladorSesion&lt;/code&gt;) and factories (&lt;code&gt;FactoriaEstrategia&lt;/code&gt;, &lt;code&gt;FactoriaImportadores&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Strategy&lt;/strong&gt;: Interchangeable algorithms for expense splitting (&lt;code&gt;RepartoEquitativo&lt;/code&gt;, &lt;code&gt;RepartoPorcentual&lt;/code&gt;) and temporal alert logic (&lt;code&gt;EstrategiaAlertaMensual&lt;/code&gt;, &lt;code&gt;EstrategiaAlertaSemanal&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Factory Method&lt;/strong&gt;: Dynamic creation of strategies and importers based on context, decoupling instantiation from business logic.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Observer&lt;/strong&gt;: Reactive communication where &lt;code&gt;ControladorAppGastos&lt;/code&gt; automatically notifies Views (&lt;code&gt;IObservador&lt;/code&gt;) of model changes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Adapter&lt;/strong&gt;: Integration of external CSV files into the application domain (&lt;code&gt;ImportadorCSV -&amp;gt; ImportadorGastos&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Repository (DAO)&lt;/strong&gt;: Abstraction of the data layer (&lt;code&gt;RepositorioGastosJSON&lt;/code&gt;, &lt;code&gt;RepositorioCuentasJSON&lt;/code&gt;) for flexible storage switching.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="code-quality-clean-code"&gt;Code Quality (Clean Code)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Design by Contract&lt;/strong&gt;: Defensive validations in constructors and setters to ensure data integrity (preventing negative amounts, null values, etc.).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Modern Java (Streams &amp;amp; Lambdas)&lt;/strong&gt;: Extensive use of the Stream API for financial calculations and collection filtering.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Immutability&lt;/strong&gt;: Protection of internal data structures using defensive copies and unmodifiable lists.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="installation--execution"&gt;Installation &amp;amp; Execution&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Technical Requirements&lt;/strong&gt;: Java JDK 21 (Mandatory), Maven 3.8+.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GUI Mode (JavaFX)&lt;/strong&gt;:
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git clone &lt;span class="o"&gt;[&lt;/span&gt;https://github.com/GuillermoPL/TDS-25-26.git&lt;span class="o"&gt;](&lt;/span&gt;https://github.com/GuillermoPL/TDS-25-26.git&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; TDS-25-26
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;mvn clean javafx:run
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>