<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Praveen Kumar S</title>
    <description>The latest articles on Forem by Praveen Kumar S (@praveenkumar).</description>
    <link>https://forem.com/praveenkumar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F351899%2F738a4f6a-417c-4ae3-a344-6da1916d0ec9.png</url>
      <title>Forem: Praveen Kumar S</title>
      <link>https://forem.com/praveenkumar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/praveenkumar"/>
    <language>en</language>
    <item>
      <title>How to Scale an Existing Ruby on Rails Product from x to 10x</title>
      <dc:creator>Praveen Kumar S</dc:creator>
      <pubDate>Sun, 30 Jun 2024 04:32:00 +0000</pubDate>
      <link>https://forem.com/praveenkumar/how-to-scale-an-existing-ruby-on-rails-product-from-x-to-10x-24j7</link>
      <guid>https://forem.com/praveenkumar/how-to-scale-an-existing-ruby-on-rails-product-from-x-to-10x-24j7</guid>
      <description>&lt;p&gt;Scaling a Ruby on Rails product, especially one with a messy codebase, is a challenging yet rewarding journey. The key lies in methodically refactoring your codebase, implementing best practices, and optimizing performance. Here’s a roadmap to guide you through this transformation.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Identify and Address Code Smells&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;First, focus on the areas with the most significant performance issues and clean up code smells.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Setup Tools for Code Cleanup&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Brakeman&lt;/strong&gt;: A tool to find security vulnerabilities in your Rails application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rubycritic&lt;/strong&gt;: A tool that generates a report of code quality, identifying code smells and complexity.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Refactoring Plan&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Level 1 - Immediate Isolation&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Create new services to isolate code.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Level 2 - Function-Level Isolation&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Further clean up and isolate code at the function level.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Level 3 - Performance Enhancements&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Benchmark performance, fix issues, ensure database constraints, and apply necessary locks.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Example Scenario: Refactoring a Module&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Let’s consider refactoring a module, such as handling charts in your application. The same principles apply to other modules.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Assumptions&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The same APIs are being called in multiple places, leading to redundancy and potential failures.&lt;/li&gt;
&lt;li&gt;Many if-else conditions are used to handle different types within the same API, making the codebase hard to extend and maintain.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Problems with Current Code&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Using the same API in multiple places increases the risk of overriding and unnecessary failures.&lt;/li&gt;
&lt;li&gt;Excessive if-else conditions make the codebase hard to extend and maintain.&lt;/li&gt;
&lt;li&gt;Fat services reduce developer confidence due to the high risk of introducing bugs with small changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Suggested Improvements&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Write extendable and modular code.&lt;/li&gt;
&lt;li&gt;It’s okay to use meta-programming and create multiple smaller APIs.&lt;/li&gt;
&lt;li&gt;Prefer having more files over numerous conditions within a single file.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why This Approach is Helpful&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reduces Bugs&lt;/strong&gt;: Isolating code and reducing conditions helps in spotting and fixing issues quickly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Improves Readability&lt;/strong&gt;: Clear, modular code is easier to understand and maintain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Boosts Developer Confidence&lt;/strong&gt;: Developers can make changes without fearing widespread issues.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Implementation Steps&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create a Refactoring Plan&lt;/strong&gt;: Outline the areas needing immediate attention and plan the refactor in phases (Level 1, Level 2, Level 3).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Isolate Services&lt;/strong&gt;: Begin by isolating services and functionality, breaking down large services into smaller, manageable pieces.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reduce Conditions&lt;/strong&gt;: Minimize the use of if-else conditions by creating separate APIs or services for different functionalities.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Benchmark Performance&lt;/strong&gt;: Continuously measure performance to identify and address bottlenecks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ensure Robustness&lt;/strong&gt;: Implement database constraints and locks where necessary to ensure data integrity and application stability.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Example Approach for Chart Handling&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In a typical scenario, handling chart data might involve multiple APIs with various conditions. Instead of adding layers of conditions, separate the APIs based on functionality and context. For example, if you need charts for different departments or company-wide metrics, create dedicated APIs for each use case.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Advantages of This Approach&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Extendability&lt;/strong&gt;: Easily add custom behavior for specific contexts without affecting others.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Readability&lt;/strong&gt;: Clear separation of concerns improves code readability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reduced Complexity&lt;/strong&gt;: Isolated changes make it easier to manage and test the code.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Organizing Serializers&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Organize serializers using namespaces to maintain clarity and structure. For example, group serializers by their functionality and context and ensure each serializer handles a specific part of the data transformation.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Namespace Advantages&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Clarity&lt;/strong&gt;: A clear hierarchy and structure help in understanding the codebase.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintainability&lt;/strong&gt;: Easier to manage and extend serializers without affecting other parts of the application.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Steps to Improve and Scale&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Identify Code Smells and High-Impact Areas&lt;/strong&gt;: Use tools to find and prioritize areas that need attention.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Restructure and Plan Refactoring&lt;/strong&gt;: Create a phased plan to address these issues incrementally.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Partial Cleanup for Understandability&lt;/strong&gt;: Clean up code to make it more understandable before making significant changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Benchmark and Optimize Performance&lt;/strong&gt;: Continuously measure and optimize performance.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Scaling a messy Ruby on Rails product requires a focused and methodical approach. By isolating problematic areas, implementing coding conventions, and optimizing performance, you can transform your codebase into a scalable, maintainable system. Remember, it’s about taking incremental steps and continuously improving.&lt;/p&gt;

&lt;p&gt;Ready to scale your Rails app? Start today, stay focused, and embrace the journey. Let’s build, learn, and grow together. Follow my journey &lt;a href="https://twitter.com/PraveenInPublic"&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>rails</category>
      <category>coderefactoring</category>
      <category>scalability</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to Learn Any New Skill with Ease?</title>
      <dc:creator>Praveen Kumar S</dc:creator>
      <pubDate>Sun, 30 Jun 2024 04:11:22 +0000</pubDate>
      <link>https://forem.com/praveenkumar/how-to-learn-any-new-skill-with-ease-34al</link>
      <guid>https://forem.com/praveenkumar/how-to-learn-any-new-skill-with-ease-34al</guid>
      <description>&lt;p&gt;Ever felt that burning desire to create something but were stuck, unsure of where to start? I've been there too, overwhelmed by the vastness of what I didn't know. Today, I'm sharing my journey from a place of curiosity to launching a product with 10,000 users. These lessons, learned over a decade ago, still hold true today.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Daunting Start
&lt;/h3&gt;

&lt;p&gt;Starting a new skill isn't easy. The initial hurdles are many: staying consistent, sifting through a sea of resources, and finding the right tutorials and courses. It's easy to feel lost, especially at the beginning.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Power of Active Learning
&lt;/h3&gt;

&lt;p&gt;In my quest for knowledge, I watched countless videos, sometimes even at 4x speed, trying to grasp the core ideas. But I realized something crucial: passive learning wasn't enough. Just watching or mimicking others' work wouldn't cut it. To really understand, I had to build, apply, and yes, make mistakes.&lt;/p&gt;

&lt;p&gt;Think about it—you can't learn to swim by watching others or reading about it. At some point, you have to dive into the water.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Leap of Faith
&lt;/h3&gt;

&lt;p&gt;With this realization, I took a bold step. I built my product and launched it, bugs and all. Why? Because launching was the only way to truly learn and grow. It was a hands-on approach that taught me the intricacies of creation and problem-solving.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Path to Mastery
&lt;/h3&gt;

&lt;p&gt;Mastering a skill isn't just about passive consumption but active participation. It's about launching, gathering feedback, iterating, and refining. It's about accountability, consistency, and continuous growth. Here’s my approach:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Dive in Headfirst&lt;/strong&gt;: Start by building what you want to learn.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Launch Early&lt;/strong&gt;: It instills discipline and a sense of responsibility.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Engage with Your Audience&lt;/strong&gt;: Their feedback is invaluable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stay Accountable&lt;/strong&gt;: Make your plans public. It keeps you motivated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Celebrate Every Milestone&lt;/strong&gt;: No achievement is too small. Every step forward counts.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Reflections from a Decade Ago
&lt;/h3&gt;

&lt;p&gt;My journey began 10 years ago. Today, I build, scale, and innovate. It's not just about learning; it's about applying, iterating, and scaling. If I could do it a decade ago, standing at the crossroads of uncertainty, so can you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Join Me on This Adventure
&lt;/h3&gt;

&lt;p&gt;If my story resonates with you or if you're looking for tips on learning new skills, building from scratch, scaling applications, or strategically refactoring existing ones, join me on this exciting adventure. Let’s learn, build, and grow together. Follow my journey here.&lt;/p&gt;

</description>
      <category>learning</category>
      <category>mvp</category>
      <category>startup</category>
      <category>skilldevelopment</category>
    </item>
    <item>
      <title>From Idea to Launch: My 30-Day MVP Journey</title>
      <dc:creator>Praveen Kumar S</dc:creator>
      <pubDate>Sun, 30 Jun 2024 04:04:54 +0000</pubDate>
      <link>https://forem.com/praveenkumar/from-idea-to-launch-my-30-day-mvp-journey-2635</link>
      <guid>https://forem.com/praveenkumar/from-idea-to-launch-my-30-day-mvp-journey-2635</guid>
      <description>&lt;p&gt;In the fast-paced world of tech startups, turning an idea into a working product is a wild ride, filled with hurdles and uncertainties. As the CTO of Storya, I faced the challenge of transforming a simple no-code prototype into a solid MVP in just 30 days. This journey wasn’t just about coding; it was about strategic planning, teamwork, and a relentless drive for excellence. Let me take you through this exhilarating journey and share the insights that made it all possible.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Challenge: 30 Days to a Robust MVP
&lt;/h3&gt;

&lt;p&gt;When I joined Storya as the CTO, I was immediately hit with a big challenge. The existing MVP, built using Adalo, was more of a prototype than a product. We needed something more robust and scalable, and we needed it quickly. With a tight budget and a ticking clock, the mission was clear: build a functional MVP in just 30 days.&lt;/p&gt;

&lt;h3&gt;
  
  
  Strategic Planning: Laying the Foundation
&lt;/h3&gt;

&lt;p&gt;Time was short, but jumping in without a plan would have been a disaster. My team and I started by carefully mapping out user journeys. Storya is all about storytelling, so we focused on both creators and readers. This dual approach was key to ensuring our MVP met the needs of our core users. During planning, two tools stood out: Hasura GraphQL and Clean Code Architecture for Flutter. These, combined with our Flutter developers’ expertise, set a strong foundation for our MVP.&lt;/p&gt;

&lt;h3&gt;
  
  
  Execution: The Power of Collaboration and Expertise
&lt;/h3&gt;

&lt;p&gt;Our success hinged on the team. When you’re racing against time, every second counts. We couldn't afford long onboarding processes or steep learning curves. Thankfully, I had a team of seasoned pros. Their expertise, along with our strategic tool choices, allowed us to work efficiently. We utilized open-source tools and platforms like AWS ECS, ensuring our setup was both smooth and scalable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reflections and Advice
&lt;/h3&gt;

&lt;p&gt;Looking back, those 30 days were intense, but the lessons were invaluable. If you’re aiming to achieve something similar, remember: the team’s mindset is crucial. At Storya, our shared passion for storytelling kept us going and boosted our productivity. When time is tight, bring in professionals who know their stuff. And don’t underestimate the power of choosing the right tools. Spend time researching and experimenting—it pays off in the end.&lt;/p&gt;

&lt;h3&gt;
  
  
  In Conclusion
&lt;/h3&gt;

&lt;p&gt;Building an MVP in 30 days is no easy feat. It requires determination, strategic planning, and a clear vision. But my journey at Storya shows that with the right resources and mindset, it’s not only achievable but a testament to what focused dedication can accomplish.&lt;/p&gt;

&lt;p&gt;Thanks for joining me on this journey. If you’re on a similar path, stay focused, plan well, and never underestimate the power of a great team and the right tools. Happy building!&lt;/p&gt;

</description>
      <category>hasura</category>
      <category>flutter</category>
      <category>cto</category>
      <category>mvp</category>
    </item>
    <item>
      <title>My 2 cents for beginners working remotely</title>
      <dc:creator>Praveen Kumar S</dc:creator>
      <pubDate>Mon, 23 Mar 2020 16:51:45 +0000</pubDate>
      <link>https://forem.com/praveenkumar/my-2-cents-for-beginners-working-remotely-536e</link>
      <guid>https://forem.com/praveenkumar/my-2-cents-for-beginners-working-remotely-536e</guid>
      <description>&lt;p&gt;Although remote work has been trending for quite some time, it is going to be a new norm because of the current situation of the earth with coronavirus, where everyone is expected to work from home.&lt;/p&gt;

&lt;p&gt;I am one of the early adopters of remote work, been working remotely from the past 3 years, I have faced a lot of issues along the way. I have tried to improve myself in every way and failed many times. But each time I failed, I earned experiences on how to make myself better, keep myself productive, be motivated and separate work from life.&lt;/p&gt;

&lt;p&gt;It might seem really easy at the beginning, breathing the fresh air of freedom to working from home, avoiding traveling in traffic for 2 hours a day. The boon turns into a curse if we are not serious enough. The worst enemies are laziness and procrastination. When these 2 sit on your workstation, it is really hard to throw them away. You fall into a bad routine, waking up at 10 AM or even 11 AM sometimes although you slept really early at 10 PM. Even after waking up so late, you will feel like doing your work later because you have a whole day to complete your tasks, sometimes you might even think you can complete all your tasks sitting 1 night. Spoilers: You are wrong.&lt;/p&gt;

&lt;p&gt;I won't say I have perfected working from home, but I am forming a routine and really wanted to stick to it, whatever happens. I do sometimes skip a few things from my routine by sleeping late watching some movie late night and wake up really late because of that, to reset my messed up sleep cycle because of watching moving, It sometimes took a week to fix my sleep cycle back to normal and get back to my daily routine.&lt;/p&gt;

&lt;p&gt;Well, let me cut to my routine, maybe you can pick 1 or 2 or all the points if you think you are slacking, but it's good to pick up a few even if you think you doing well, but you don't have a routine set already.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Have all the tasks that you wanted to do tomorrow.&lt;/strong&gt; &lt;br&gt;
Obviously, you won't have all the tasks noted, there might be some unforeseen things, but it's ok.&lt;br&gt;
I simply manage my todo's in google keep or sometimes Trello.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Always wake up at the same time&lt;/strong&gt;&lt;br&gt;
Even if you have slept really late, wake up at the same time. If you don't, waking up late becomes your new habit. Do not break your old habit of waking up early, just because you work from home. Always wake up at the same time as you were waking up while going to the office, or a bit early.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keep your workplace separate from the living room or bedroom&lt;/strong&gt;&lt;br&gt;
The worst place to work is from your bedroom, even if you have your desk set up there. The moment I used to see my bed, I suddenly start to feel an urge to sleep. I used to finish 1 small task and go to sleep for hour and get a warning from my client for not completing my tasks at said time.&lt;br&gt;
I really struggled to break this habit. I failed a lot of times until I moved to a new place with an extra room. If you don't have such privileges, I would suggest you turn away from your bed while working.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When you feel lazy, sleep or feel like you can do it later&lt;/strong&gt;&lt;br&gt;
Pick up a small task which doesn't require a lot of brainpower, do a small bug fix or maybe some redundant task which just needs a copy-paste. If you don't have any such thing, don't distract yourself with Youtube or Facebook. Get up, have some water, coffee or go for a short walk. Just stay away from the bed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Make sure to check all your toxic media before work&lt;/strong&gt;&lt;br&gt;
Check your personal emails, Facebook, Instagram, and other toxic media before starting your work, do not open it again until you have accomplished your daily tasks.&lt;br&gt;
(Exceptions: work email, slack and, anything related to work)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keep a playlist of comfortable music, the music that you enjoy&lt;/strong&gt;&lt;br&gt;
Obviously not the sad or sleepy ones. You don't have to doze off or start to feel about some bad situation or your break up which happened a few years ago.&lt;br&gt;
I suggest, the music to be progressive, even if it's classical. The nature of progressive music gives you a boost in energy. But, you decide your taste.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Set the timing for your work&lt;/strong&gt;&lt;br&gt;
You are doing your office work, so set a schedule just like your office work timings. Keep your family informed so they don't disturb you while you are working. All those snacks can be delivered to you when you get out of your office room for a break. Until then, help them read the "Danger 440 volts, mad dev working, Keep away" board has written on your door, if it's not there already, write that down and hang it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Make sure you have an end of day ritual&lt;/strong&gt; &lt;br&gt;
Let it be a fake yawn or you can shout "I'm done for the day" or silently shut down your laptop/desktop. This indicates that you have achieved what you had to do this day. The rest of the day is for yourself and your family. But don't forget to add a list of items to your todo for the next day before that. Also, go to bed on time.&lt;/p&gt;




&lt;p&gt;It took me almost 3 years to compile and follow these points as much as possible, but even now I miss few of it, but I jump back to the routine or these rules that I set for myself when I go off track.&lt;/p&gt;

&lt;p&gt;I was a strong believer that routines are useless, being free will give me new ideas and new ways to build ideas. But, I slowly started to realize that routines of our own are very much required to stay productive, motivated and to stay sane by not getting into the depression mode.&lt;/p&gt;

&lt;p&gt;Stay in routine, stay blessed, stay alive.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>work</category>
      <category>remote</category>
      <category>motivation</category>
    </item>
  </channel>
</rss>
