<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Bhaswanth Chiruthanuru on Medium]]></title>
        <description><![CDATA[Stories by Bhaswanth Chiruthanuru on Medium]]></description>
        <link>https://medium.com/@bhaswanth53?source=rss-2c7ab2c9c5fc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*sYwV-95rNH3sz9sNfVvQaw.jpeg</url>
            <title>Stories by Bhaswanth Chiruthanuru on Medium</title>
            <link>https://medium.com/@bhaswanth53?source=rss-2c7ab2c9c5fc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 00:32:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bhaswanth53/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Code Anatomy: The Art of Dissecting a Codebase]]></title>
            <link>https://bhaswanth53.medium.com/code-anatomy-the-art-of-dissecting-a-codebase-db83ef974ff5?source=rss-2c7ab2c9c5fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/db83ef974ff5</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Bhaswanth Chiruthanuru]]></dc:creator>
            <pubDate>Tue, 10 Nov 2026 13:06:28 GMT</pubDate>
            <atom:updated>2026-11-12T05:04:03.552Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XFi10g1JNvgRHcWd.png" /></figure><p>I’ve been vibe-coding most of the micro-tools I use in my daily life. Although I’d love to build them myself, I often want to get them ready as quickly as possible. So vibe-coding has become my go-to approach.</p><p>I’ve been enjoying this process so much because these tools work exactly the way I want them to (may be not production level, but enough for my personal use). However as I am using them, I often found myself curious about what was happening under the hood. I often feel tempted to explore their codebases and understand how they actually worked. Maybe it’s just my developer instinct kicking in.</p><p>However, whenever I tried to explore these codebases, I often found myself overwhelmed by their design and abstractions. There was so much messy, unformatted code, and most of the time, it wasn’t even readable at glance. This happens often enough that I started giving up after just a quick look at the codebase. What initially begin as curiosity often ends in frustration.</p><p>That’s when I realized how little patience I had when it comes to reading code. Until then, I had always jumped straight into coding once I had figured things out in my head. And it worked for me because I usually researched every line of code before writing it. But somewhere along the way, I failed to realize how much I was lacking when it comes to reading and analyzing code.</p><p>I wanted to improve that part of myself. So, I started reading codebases and documentation as much as I could. However most of the time, my mind gave up even while my eyes were still going through the content. This made me realize what I was missing. I wan’t able to keep my mind engaged with the content infront of me because I had no structured way of navigating through a codebase. I was jumping between files, trying to make sense of individual pieces without understanding how they all connected.</p><p>After a lot of brainstorming, I finally came up with a structured process for navigating through codebases. I don’t want claim it as something new or revolutionary, similar approaches may already exist. But since I’ve put this process together myself, I’d like to call it <em>Code Anatomy</em>.</p><p>The procedure consists of multiple steps, with a strong emphasis on exploring a project from the perspective of a regular user rather than a developer. The idea behind this process is to understand how the application works before trying to understand how its built. We start by exploring the project as an end user, gradually building a clear mental model of its features and workflows. We dive into the codebase only after we’ve complete understanding of the application.</p><h3>1. Understand the existence of the application</h3><p>This is the first step of the procedure. Before interacting with the application, we need to understand why it exists and what purpose it serves. Rather than jumping straight into its features, we first establish some basic context about the application.</p><p>At this stage, we try to understand a few fundemental things:</p><p>What is the purpose of this application?</p><p>What is the scope of this application?</p><p>What is the problem it is trying to solve?</p><p>Who are the target users of the application?</p><p>What are the limitations of the application?</p><p>How is it intended to be used?</p><p>The goal of this step is to establish a basic understanding of the application and its intended role. This will help us make better sense of it’s features and workflows in the following steps.</p><h3>2. Explore the application as a regular user</h3><p>Once we have a clear understanding of why the application exists, it’s time to move on to the next step.</p><p>If possible, install and run the application on your local system. This gives us an opportunity to understand the installation and setup process.</p><p>Once everything is up and running, its time to play around with it. Explore every available feature, module, and functionality. Interact with the application just as a regular user. Try different actions, navigate through different sections, and experiment with the available options until you understand how things work.</p><p>In this step, you are most likely to be tempted to look into the code every time you explore a feature. So it’s important to forget that you are a developer in order to resist the urge.</p><h3>3. Divide the application into modules</h3><p>Once we’ve explored the entire application, its time to move on to the next stage. That is breaking it down into smaller and manageable pieces.</p><p>Start by dividing the application into major modules. Then break each module into submodules, and continue this process until you can identify individual operations and steps involved in the application.</p><p>Let’s take a look at simple Todo application as an example:</p><p><strong>Round 1: Indentify the major operations</strong></p><pre>1. List Todos<br>2. Add Todo<br>3. Edit Todo<br>4. Delete Todo</pre><p>At this point, we’ve identified the primary operations of the application. However each operation consists of several smaller steps. So, let’s break down further.</p><p><strong>Round 2: Break into smaller operations</strong></p><pre>1. List Todos<br> 1. Retrieve the todos from database<br> 2. Display the todo page<br> 3. Display retrieved todos in the table<br>2. Add Todo<br> 1. Display add todo form<br> 2. Validate the submitted inputs<br> 3. Store todo in the database<br> 4. Show success message<br>3. Edit Todo<br> 1. Display todo form for editing<br> 2. Retrieve all the existing todo data<br> 3. Autofill inputs with existing todo data<br> 4. Allow user to make changes<br> 5. Validate the submitted inputs<br> 6. Find the existing todo in the database<br> 7. Update the todo with modified data.<br> 8. Display success message<br>4. Delete Todo<br> 1. Confirm if user want to delete<br> 2. Retrieve the existing todo<br> 3. Delete from database<br> 4. Show success message</pre><p>As we discussed, we’ve moved from identifying broad operations from understanding individual steps involved in each operation.</p><p>We repeat this process of breaking things down until we’ve covered every possible operation and workflow in the application. Simple applications might require only a couple of rounds, whereas larger applications can take several rounds of decomposition.</p><p>The objective is to break down the application into pieces small enough that we can understand each one independently without losing sight of how they fit into the bigger picture.</p><h3>4. Identify execution boundaries</h3><p>Once we’ve finished breaking the application down into smaller chunks, it’s time to move to the next step. In this step, we establish the starting point, ending point, intermediate stages, and interactions involved in every operation.</p><p>Let’s take the Todo listing operation as an example. Its starting point is displaying the todo page, and its ending point is loading the retrieved todos in the table. Everything that happens between these two points, such as fetching data and processing the results, represents an intermediate stage.</p><p>Since we’ve already broke down the application into smaller chunks, identifying these boundaries should be straightforward. Some operations may have several intermediate stages while others may have none at all.</p><p>The goal of this step is to establish a clear beginning and end for every operation and understand what happens along the way. This will give us a well-defined execution path to follow when we eventually start exploring the codebase.</p><h3>5. Trace the implementation</h3><p>From this point onwards, we finally dive into the codebase. In this stage, we connect everything we’ve learned from exploring the application as a regular user with its actual implementation.</p><p>Start with the operations we’ve identified and work through them one by one, following their execution order. Navigate through the codebase, tracing each operation from its starting point to its ending point. Identify the files, functions, classes, and other components involved along the way.</p><p>Once you’ve finished analyzing an operation, mark it as completed. This helps you keep track of your progress and distinguish between the operations that are already explored and those that are still pending.</p><p>That important thing to be noted here is to follow the execution path rather than jumping between files. Sometimes, we may see some files and snippets that may look important but completely unrelated to the operation. Make sure not to jump between files and keep in the path.</p><h3>6. Analyze and document</h3><p>This step is optional and depends on the developer and complexity of the project. However, I recommend documenting your findings rather than trying to keep everything in your head.</p><p>As you explore the codebase, take notes on important observations, execution flows, dependencies, and interaction between different components. Documentation of these findings helps retain the information and makes it easier to revisit and understand the codebase later.</p><h3>Conclusion</h3><p>Throughout this procedure, we haven’t introduced anything fundamentally new. All we’ve done is organize the way we approach the codebase. We’ve turned an otherwise unstructured exploration into a systematic process.</p><p>Although the procedure looks simple, following it may not always be easy. Depending on the project and circumstances, we might not have enough time or resources to invest in such an extensive exploration. That’s perfectly fine. The process can be adapted to suit the complexity of the project and the time available.</p><p>But one more thing I believe is essential regardless of the procedure we follow is <em>Patience</em>. Keep your mind calm and be patient while navigating through a codebase or reading documentation. Don’t rush to understand everything at once. Take your time, follow the flow and let the pieces come together. After all, no matter how good the procedure is, without patience, understanding anything becomes difficult.</p><p><em>Originally published at </em><a href="https://bhaswanth.com/blog/code-anatomy-the-art-of-dissecting-a-codebase"><em>https://bhaswanth.com</em></a><em> on November 10, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db83ef974ff5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I wanted a Simpler PHP Framework, So I Built One]]></title>
            <link>https://bhaswanth53.medium.com/i-wanted-a-simpler-php-framework-so-i-built-one-b2fb49e2c722?source=rss-2c7ab2c9c5fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2fb49e2c722</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[framework]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Bhaswanth Chiruthanuru]]></dc:creator>
            <pubDate>Wed, 30 Sep 2026 06:49:16 GMT</pubDate>
            <atom:updated>2026-10-01T04:48:50.304Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qn5M5ek0DRiwZVGO.png" /></figure><h3>My journey as a backend engineer</h3><p>I’ve been a backend developer for years with PHP as core technology. I started PHP at first because my work demanded it. But as I am working, I fell in love with the simplicity of PHP. We can start from nothing and build a complete working web app with PHP. And also, we can integrate any frontend technology and framework with it such as Vue and React.</p><p>Laravel has been my goto framework to create web application in PHP. I loved it because it is simple, organized and offers almost everything I need to build an application without having to worry about the underlying infrastructure.</p><p>It provides a well-defined structure for organizing an application, along with its features like routing, middleware, database helpers, migrations, artisan command-line tool, frontend scaffolding etc. Laravel also has a very huge community of developers, there are always some package available for everything I need in general. This helps me focus on building the actual application instead of spending time on writing dependencies.</p><p>When I first started using Laravel, it was version 5. Today, Laravel has reached version 13, but I still find myself using Laravel 8 for almost all my projects. Part of the reason is simply familiarity. Since version 9, Laravel abandoned Laravel-Mix, my favuorite asset mixing tool and migrated to Vite. I absolutely loved using Laravel Mix. It gave me a simple way to manage my frontend assets without having to think too much about underlying build tooling. Also I started to feel that Laravel had become a little too noisy for the kind of applications I want to build. This doesn’t mean newer versions of Laravel are bad. It has continued to evolve, and many of those changes make sense for the ecosystem.</p><h3>The idea behind a new framework</h3><p>The problem was that I started using Laravel by default for almost everything simply because of it’s convenience.</p><p>An e-commerce Platform? <strong>Laravel</strong>.</p><p>A blog? <strong>Laravel</strong>.</p><p>An online learning platform? <strong>Laravel</strong>.</p><p>A personal portfolio website? <strong>Laravel</strong>.</p><p>Laravel became my default choice for building almost anything, big or small. It was familiar, well-organized, and gave me almost everything I need out of the box.</p><p>Although Laravel is easy to work with, it is definitely not a lightweight framework. It comes with a lot of features, abstractions, and components, and all of that convenience comes with a cost. For a large enterprise application, that trade-off can make perfect sense. But for smaller applications and lightweight websites, that sometimes feel like an overkill.</p><p><em>Using full-featured framework to build a simple website feels like bringing a toolbox full of power tools just to hang a picture on the wall.</em></p><p>That’s when a thought came to me. <strong>Why can’t I build my own micro-framework for PHP?</strong></p><p>I had been working with Laravel for years, so I already had a rough idea of how a modern PHP framework is structured and what happens behind the scenes. Laravel does a great job at simplifying all of this, but underneath those abstractions, it is still PHP. It doesn’t magically introduce any new concepts, its still built on top of the same language concepts that are already available in the language itself.</p><p>So, I wanted to build a much smaller version of that. My goal was not to recreate Laravel. Laravel already has a micro framework called <strong>Lumen</strong>. Although its similar to Laravel, its more lightweight than Laravel. My idea was to build a small and simple foundation that could handle essentials required by a web application. If the developer need a particular feature for a project, he can write his own or use any third party package.</p><h3>Meet Lunaris — A New Micro-Framework Built Using PHP</h3><p>I’ve named the project Lunaris. Lunaris is a micro-framework built on top of PHP. The idea is to keep things simple while giving the developers complete freedom to extend the framework however they want.</p><h3>The core philosophy</h3><p>Lunaris is built around a few simple principles.</p><p><strong>1. Keep third party dependencies to a minimum:</strong></p><p>Laravel provides a huge ecosystem of features and integrations, which is one of the reasons it is so powerful. However that also means a huge part of the application is built around abstractions and external packages. I wanted to take a different approach with Lunaris.</p><p>The goal is to keep the core as self contained as possible and implement the fundamentals internally. This will help developer to understand, modify and extend the framework easily.</p><p><strong>2. One Action Per One Route:</strong></p><p>Unlike traditional Model-View-Controller pattern, Lunaris use Action based architecture. An Action receives everything it needs to handle the request, including input data, URL parameters and headers. This keeps the logic for a particular operation in one place and avoids additional request classes.</p><p><strong>3. Keep it simple, avoid features the application doesn’t need:</strong></p><p>Lunaris keeps its core focused on essentials. Features such as database, mailers, caching and other integrations can be added externally when the project actually needs them. The goal is not to build a framework that does everything, the goal is to build a small foundation that can become whatever the application needs.</p><h3>Architecture</h3><pre>my-project<br>├── system/<br>├── config/<br>│   └── vars.php<br>├── app/<br>│   └── Actions/<br>├── routes/<br>│   ├── web.php<br>│   └── console.php<br>├── docker/<br>│   ├── Dockerfile<br>│   └── docker-compose.yaml<br>├── public/<br>│   ├── css/<br>│   ├── js/<br>│   └── index.php<br>├── storage/<br>│   ├── logs/<br>│   └── app/<br>├── views/<br>├── .env<br>├── bootstrap.php<br>├── composer.json<br>├── lunar<br>└── helpers.php</pre><h3>Core</h3><p>All the core logic of Lunaris is implemented inside the system/ directory. This is where the framework&#39;s internal components and core functionality live.</p><p><em>Note:</em> Although Lunaris is designed to give developers the freedom to modify and extend anything they want, the system/ directory should generally be treated as framework internals. <strong>Modifying it is not recommended unless you understand how the framework works and what the changes might affect.</strong></p><h3>Config</h3><p>The config/ folder contains all the application configuration. System variables and their default values are defined in config/vars.php.</p><h3>App</h3><p>The app/ folder contains application specific code. Custom classes, actions, middlewares, models, services, commands, and other application logic can be organized here.</p><pre>app/<br>├── Actions/<br>├── Middlewares/<br>├── Facades/<br>├── Models/<br>├── Commands/<br>├── Services/<br>└── ...</pre><h3>Routes</h3><p>Routes are configured inside the routes/ folder.</p><ul><li>routes/web.php - Define the application&#39;s web routes.</li><li>routes/console.php - Register console commands.</li></ul><h3>Views</h3><p>All application views are defined inside views/ folder.</p><p>Lunaris uses <strong>Native PHP Templates</strong> instead of introducing an external templating engine. This keeps the view layer simple and allows developers to use PHP directly when building their views.</p><p><em>Info:</em> Developers can change the default templating engine and extend to whatever templating system they want.</p><h3>Lunar</h3><p>Lunar is the command line tool for Lunaris, similar to how Artisan works with Laravel.</p><p>It provides a convenient way to interact with the framework from the command line and can be used for tasks such as generating application components, running commands and managing the developer workflow.</p><h3>Conclusion</h3><p>Lunaris is still actively under development, and there is a lot more to build. This project started as a simple idea, I wanted a lightweight alternative for the smaller applications where using a full-featured framework felt like overkill.</p><p>More than anything, building Lunaris has been an interesting way for me to understand what actually happens behind the abstractions of a modern PHP framework. Things that seemed simple from the outside often turned out to have interesting design decisions behind them.</p><p>I am not trying to build a replacement for Laravel. Lavarel is still an excellent framework and will probably remain as my first choice for large projects that need it’s ecosystem and features. Lunaris is simply my attempt to build something smaller, simpler and more flexible for the projects that starts small and wants complete control over the codebase.</p><p>There is still a long way to go, and the architecture will likely continue to evolve as I use it in real projects and discover things that need to be improved.</p><p>If you are interested in the project, you can find the source code and follow its development on Codeberg:</p><p><strong>Repository:</strong> <a href="https://codeberg.org/lunarisphp/lunaris">https://codeberg.org/lunarisphp/lunaris</a></p><p>The project is open source, so feel free to explore the code, experiment with it and share your thoughts and ideas.</p><p><strong>This is only the beginning of Lunaris.</strong></p><p><em>Originally published at </em><a href="https://bhaswanth.com/blog/i-wanted-a-simpler-php-framework-so-i-built-one"><em>https://bhaswanth.com</em></a><em> on September 30, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2fb49e2c722" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I optimized PHP project in 3 days]]></title>
            <link>https://medium.com/freelancers-hub/how-i-optimized-php-project-in-3-days-8aaf633420c1?source=rss-2c7ab2c9c5fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/8aaf633420c1</guid>
            <category><![CDATA[website-development]]></category>
            <category><![CDATA[page-speed]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[optimization]]></category>
            <category><![CDATA[laravel]]></category>
            <dc:creator><![CDATA[Bhaswanth Chiruthanuru]]></dc:creator>
            <pubDate>Mon, 23 Feb 2026 07:05:27 GMT</pubDate>
            <atom:updated>2026-03-09T14:12:54.253Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m3QF6WfyBuLimRcH0H6iLA.jpeg" /></figure><p>This happened nearly 6 years ago, around the year 2019. I was working on my first job at the time as a junior web developer.</p><p>At that time I was working on an e-learning platform. My work mainly revolves around building and maintaining the marketing website for the platform. That includes home website, blogs and courses section. I was working in that project as the lead developer along with another front-end developer. <em>It’s a small startup, so I was involved on many things even though I was a junior developer.</em></p><p>The project was migrated from Wordpress, and rebuilt with Laravel &amp; MySQL. I handled most part of the migration that time.</p><p>The website was smooth, everything working fine. <em>In my perspective at that time, if the website loads, then it was smooth. I was naive.</em></p><p>One day my team lead, <em>(There was only one team lead in the entire company) </em>called me and explained his concerns regarding the website speed and performance. I didn’t understand it at first. The website was working fine. While it wasn’t loading at the same speed like a single-page application, it was decent enough. But for him, that wasn’t good enough.</p><p>He told me to do whatever I can to optimize the website to load faster. He gave me three days to do it.</p><p>At that moment, I was like a boy who had just been thrown into something much bigger.</p><p>I was just slightly better than a beginner at best. I knew how to build features, I knew how to make things work. But scaling? Performance? Optimization? I hand no idea where to even begin.</p><p>I couldn’t refuse the task. And honestly, I have no reason to refuse. He gave me complete freedom to research, experiment and approach the problem however I want.</p><p>Even though I hesitated at first because I thought I might break things that were working fine, I eventually agreed to do it. But to be honest, I had no clue where to start.</p><p>First day was all about researching and analyzing. I went through articles on Laravel optimization techniques, caching, query optimization, etc. I literally went through everything I found on Google.</p><p>I’ve analyzed the website through multiple tools like Checkbot, GTMetrix, etc., to find what’s affecting the performance.</p><p>I’ve listed out every suggested change I could. But honestly there wasn’t much I could do in the remaining two days.</p><p>I couldn’t risk trying to optimize queries in this stage and breaking something. We are using Laravel eloquent queries for database operations and I barely know basic SQL querying at that time.</p><p>I don’t know much about caching at that time and I don’t have the bandwidth to learn and implement it.</p><p>There were quite a few of limitations on what I could do.</p><p>First one is we are using shared hosting and hosted the website on cpanel. So, I can’t freely install additional software like Redis for caching. The server only supports PHP and MySQL.</p><p>Second one is, the website was working perfectly fine and I couldn’t risk breaking anything in the perfectly working system.</p><p>Third one is I’ve limited time. And whatever I do, I have to do it in the remaining two days.</p><p>So, I’ve listed only the issue that I was confident to work on.</p><p>a. This was the first and most important issue that I’ve listed. The website contains multiple components such as dynamic listing, infinite scrolling, dynamic filters, etc. And I was rendering all these contents through API from frontend at the time of page load using Javascript. This is one of the factors that’s increasing the page load time.</p><p>b. In the current website, I am serving uncompressed styles and scripts, even though Laravel comes with Laravel Mix by default.</p><p>c. Some of the images that were used in the website are of high quality and comes in large size, that were resizing on frontend from CSS.</p><p>There were some other issues too, but these were the main issues among the ones that I remember.</p><p>Then I’ve started working on the second day.</p><p><strong>1) Reduced the usage of Javascript</strong></p><p>Logically this was the best thing to do. But honestly, many components are working dynamically front frontend. So, I couldn’t fully avoid the usage of Javascript.</p><p>So I did this. I’ve listed out the content that’s dynamically on page load, and rendered it from server-side. This way I’ve mostly avoided API calls, and rendering content using Javascript on page load event. Now the DOM will only get modified when something’s changed or the events get triggered.</p><p><strong>2) Building assets for production</strong></p><p>At that time, I am not familiar with things like webpack, mixing assets etc. So, even though Laravel comes with Laravel Mix, I’ve served assets normally from <em>/public</em> folder.</p><p>But after some digging, I’ve learned how to use Laravel Mix. Honestly, it was super easy and fun. I still use it as my default bundler for my projects, even though the repository is abandoned.</p><p>I’ve removed all inline and uncompressed styles and scripts, moved them into the <em>/resources </em>folder, centralized them properly, and ensured that only production-ready compiled assets were being served.</p><p>It might sound small, but this reduced unnecessary load and made the application clearer and more maintainable.</p><p><strong>3) Compressing Images</strong></p><p>This is where it got little trickier. For the website, the client provides the images. Normally the images are of high quality and heavy-weighted and too large. So, we are embedding the images using image tag and resizing using CSS on frontend.</p><p>After brainstorming a bit, I’ve decided to compress them and load the images with exact sizes to avoid the resizing from frontend. I’ve used <em>PHPIntervention </em>library to compress and resize images from server side.</p><p>I’ve created a new method something like this :</p><pre>function load_image($filename, $width, $height) {<br> $path = &quot;new folder for resized images&quot;;<br> $new_name = $width . &quot;_&quot; . $height . &quot;_&quot; . $filename;<br> if(!file_exists($path . &quot;/&quot; . $new_name)) {<br>  resize_image_using_intervention();<br>  return resized_image_path();<br> }<br><br> return resized_image_path();<br>}</pre><p>The role of this method is, it will check if the resized version of the given image is present in the file system and if not, it will compress and resize the image and store it in the file system. If exists, it will return the image URL as string.</p><p>I can use in blade template like below :</p><pre>&lt;img src=&quot;{{ load_image(&quot;image.png&quot;, 200, 100) }}&quot; alt=&quot;&quot; /&gt;</pre><p>And it will display the resized image. As it won’t touch the original image and create resized copies of it, I can use the same image with multiple sizes in multiple places.</p><p>This way, the browser don’t need to adjust the image sizes on frontend as the images already loading with correct dimensions.</p><p><strong>4) Rendering Minified HTML</strong></p><p>Well, this isn’t actually a problem, but an extra I’ve decided to do. And this was easy, there were many packages available for Laravel to minify the templates before rendering. Honestly, I just went with the flow for this one.</p><p><strong>5) Gzip Compression</strong></p><p>At that time, I don’t even know anything about Gzip compression. I’ve found it in some article, and after looking into it, I’ve decided to give it a try, since I only needed to modify <em>.htaccess </em>file and thats it. No code changes, nothing.</p><p>That’s it. This is all I did and I’ve managed to do it in the given timeframe. And to my surprise, the speed of the page loading increased more than before, even client acknowledged it.</p><p>Looking back now, compared to the optimization techniques and tools available today, what I did might seem small, or may be even basic.</p><p>But at that time, I was barely more than a beginner. I don’t know advanced scaling strategies or deep performance engineering. I simply did what I was capable of doing with the knowledge I had. And luckily, it worked better than I expected.</p><p>When I look back at that project, I also remember something else.</p><p>The application was fully server-size rendered. I initially used web components, but later I removed them during optimization.</p><p>Today, things feel very different.</p><p>We ship large amounts of Javascript by default. Rendering logic that could easily live on the server is being pushed to the client. Using complete frontend frameworks has almost become the norm.</p><p>There was even a time when I disliked PHP and SSR. I was drawn toward modern shiny frameworks like React and Vue, believing they were automatically better.</p><p>But think what, after working on real-world projects that relied heavily on them, I’ve actually started to like and appreciate PHP and SSR more.</p><p><strong>Conclusion</strong></p><p>Developers today are, in many cases, taking Javascript for granted.</p><p>Javascript is really powerful, but it should be used for what it’s meant to be used. Handling dynbamic client-size interactions, managing complex UI state, and enhancing user experience are prefect use cases. But rendering everything on the client by default isn’t always the smartest choice.</p><p>Forcing one language or one ecosystem into every layer of an application may look modern and clean, but we must consider what we are trading for it, bundle size, performance overhead, complexity, and long-term maintainability.</p><p>I don’t hate modern technologies. In fact, I’ve worked with them and learned from them. What I’ve come to understand is simple. What I’ve come to understand is simple. Choose your stack wisely. Let the problem decide the tools, not the trends.</p><p><em>Originally published at </em><a href="https://bhaswanth.com/blog/how-i-optimized-php-project-in-3-days"><em>https://bhaswanth.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8aaf633420c1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/freelancers-hub/how-i-optimized-php-project-in-3-days-8aaf633420c1">How I optimized PHP project in 3 days</a> was originally published in <a href="https://medium.com/freelancers-hub">Freelancer’s Hub</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why I love working with Legacy Codebases]]></title>
            <link>https://bhaswanth53.medium.com/why-i-love-working-with-legacy-codebases-1b4f41061109?source=rss-2c7ab2c9c5fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b4f41061109</guid>
            <category><![CDATA[legacy-systems]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Bhaswanth Chiruthanuru]]></dc:creator>
            <pubDate>Thu, 12 Feb 2026 08:40:06 GMT</pubDate>
            <atom:updated>2026-02-12T08:40:06.978Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4DvDgnN1wd6qsgs1.png" /></figure><p>Almost every developer must’ve worked on at least one legacy project in their career.</p><p>And the first reaction is almost always the same.</p><p>You open the codebase and think,</p><p>“Who wrote this code?”</p><p>“Why is this such a mess?”</p><p>“I can do a lot better than this”</p><p>… something like this.</p><p>I too thought the same. And this reaction is justified. Because the first look is rarely pleasant. Confusing structure, outdated patterns, and code that feels impossible to reason about.</p><p>When I was first assigned to a legacy project, I wasn’t excited at all.</p><p>It wasn’t new, it wasn’t shiny, and it definitely wasn’t something I could show off. The codebase was large, the logic was spread across files, and even a small change felt risky. I kept wondering how anyone managed to build and maintain something like this.</p><p>It was a scary experience. For every small change, I’ve spent most of the time navigating the code than actually writing it. A lot of syntax actually felt unfamiliar to me. There was no package managers, no third party libraries, no proper documentation. Everything was written from scratch.</p><p>For a modern programmer like me, who uses third party libraries and packages for everything like it is normal, it definitely was a scary experience.</p><p>At first, everything felt difficult. Progress was slow and mistakes felt expensive. At some point, I even wondered, why aren’t we migrating it to some new and shiny tech.</p><p>But as I spent more time navigating the codebase, reading, tracing, and understanding the processes, it started getting easier. I no longer felt lost every time I opened a file. I know where to look, which parts were fragile, and which ones could be changed safely. Debugging became faster, changes became more deliberate, and the fear of breaking things slowly faded away.</p><p>Working on legacy projects taught me many things. I no longer solely rely on third party libraries. I was realized package managers and libraries are good to have, but not necessarily needed. I got to know how systems actually work on ground level.</p><p>As I continued working on, I’ve started to admire the developers that built those systems decades ago, from scratch without any of the modern resources available to them. At first, I thought that the legacy developers only wrote messy code, but as time passes, I’ve started to appreciate the fact that they did their very best with the limited resources available to them amid tight deadlines and the effort they put into building everything from scratch.</p><p>Working on legacy projects made me a better programmer than I can imagine. It gave me the confidence to take up new challenges and work on new things. I am no longer afraid of working on things I don’t know, because I am confident that I can learn.</p><p>Whenever I am assigned to legacy projects, I’ve started to look at them not as obstacles, but opportunities. Opportunities to learn more about complex systems and get used to the code of programming languages.</p><p>I no longer advise on migrating legacy projects into new stack. In fact, I advise against it. Because I believe that legacy projects are more stable than most of the project that are developed with modern tech stack.</p><p>For everyone who are working on legacy projects, I want to share some things from my experience.</p><p>1. Legacy projects are not obstacles for your career, but great opportunities for you to learn and grow.</p><p>2. Legacy projects are not outdated. They are just simple, boring and stable.</p><p>3. Legacy projects often lack good documentation, so when you are navigating through code, make sure to take notes properly. So that it may help you in the future or others who work on it.</p><p>4. When you came across tasks that couldn’t be done using legacy stack, try to bridge that gap using modern stack. But don’t actually try to migrate entire working system into modern stack, just because it’s outdated.</p><p><strong>Conclusion :</strong></p><p>Legacy codebases changed the way I look at software engineering.</p><p>They taught me that good software isn’t always clean or modern, but it’s software that continues to deliver value overtime. More importantly, working on legacy stacks helped me become a better programmer and a better architect.</p><p>Understanding, maintaining, and improving systems that already exist is deeply rewarding. That’s why, today, I genuinely enjoy working with legacy code.</p><p><em>Originally published at </em><a href="https://bhaswanth.com/blog/why-i-love-working-with-legacy-codebases"><em>https://bhaswanth.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b4f41061109" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>