<?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 Sathiesh Veera on Medium]]></title>
        <description><![CDATA[Stories by Sathiesh Veera on Medium]]></description>
        <link>https://medium.com/@sathyvsk?source=rss-5b91cdb64c37------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*izcZEiNukfmM3-pzBvlinA.jpeg</url>
            <title>Stories by Sathiesh Veera on Medium</title>
            <link>https://medium.com/@sathyvsk?source=rss-5b91cdb64c37------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 17:47:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sathyvsk/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[Your Java code is not a legal document ]]></title>
            <link>https://medium.com/@sathyvsk/your-java-code-is-not-a-legal-document-58544b0cf1c7?source=rss-5b91cdb64c37------2</link>
            <guid isPermaLink="false">https://medium.com/p/58544b0cf1c7</guid>
            <category><![CDATA[readable-code]]></category>
            <category><![CDATA[code-modularity]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[coding-education]]></category>
            <category><![CDATA[best-practice-programming]]></category>
            <dc:creator><![CDATA[Sathiesh Veera]]></dc:creator>
            <pubDate>Sat, 09 Nov 2024 01:17:58 GMT</pubDate>
            <atom:updated>2024-11-09T01:17:58.535Z</atom:updated>
            <content:encoded><![CDATA[<p>Alright, let’s clear something up: Java code is not supposed to read like a legal document. You know the ones — endless clauses, sub-clauses, footnotes, and the occasional “notwithstanding anything in the foregoing…” that you have to re-read three times to understand. Java code that goes on for hundreds of lines taking up your entire screen (and several scrolls), stuffed with every possible branch, utility call, and log statement, is just as painful. Its like someone’s writing the <em>Code Constitution</em>. 😅</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*kiqy285aVCom9qFq.gif" /></figure><p>So why do we keep doing this?</p><p>Whether it’s a method that grew beyond recognition, or someone’s decision to squeeze everything into one place for “efficiency,” massive methods are a nightmare for anyone who has to read, maintain, troubleshoot, or test them. It isn’t just bad — it’s <em>criminally</em> bad.</p><h3>Why Massive Methods Are a Bad Idea 🚨</h3><p>The problems with big, sprawling methods are plenty. For starters, readability goes out the window. When a method spans hundreds of lines, you can forget about quickly understanding what it’s supposed to do. Your eyes will be scanning up and down, back and forth, trying to figure out what conditions lead where, and why certain lines are even there in the first place. By the time you finish reading, you’re more confused than when you started. 😵‍💫</p><p>Troubleshooting? We can forget about it. Debugging a 500-line method is like looking for treasure in a swamp. Every line you wade through is another opportunity to get lost, misled, or stuck in the mud of nested if statements and for loops. Finding a bug in a massive method is an exercise in endurance and every tiny change risks affecting multiple parts of the method because everything is tangled together.</p><p>And then, of course, there are the variables. These sprawling methods often declare variables at the top like they’re planting flags, only to use them hundreds of lines later, leaving you wondering, “What was this for again?”. Or worse, they never get used at all, just lingering around like forgotten ideas.</p><p>As if that’s not enough, testing these behemoths is a whole other level of pain. Massive methods with multiple logical branches and conditions are nearly impossible to unit test effectively. Writing JUnit tests becomes a guessing game because there are so many edge cases, and every change threatens to break something unexpected.</p><p>And let’s be real: the original author might have had a clear idea of what they were doing (maybe), but for the next person? They’re left with a cryptic mess, trying to decipher decisions that made sense once but are now incomprehensible. That’s evil.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*9K82qcR6BJdt_UmY.gif" /></figure><h3>A Real-Life Example of the Madness 🧩</h3><p>Let’s look at a classic <em>example</em> of a method doing way too much (obviously this method is made up for this post). Here’s a method that’s supposed to handle a basic order process: calculate total and process payment. Simple, right? But… here’s what we get instead:</p><pre>public void processOrder(Order order) {<br>  // Variable declarations<br>  boolean discountApplied = false;<br>  BigDecimal total = BigDecimal.ZERO;<br>  // Validation <br>  if (order != null) {<br>    List&lt;Item&gt; items = order.getItems();<br>    // Stock check<br>    for (Item item : items) {<br>      if (!isItemInStock(item)) {<br>        log.warn(item.getName() + &quot; is out of stock.&quot;);<br>        throw new OutOfStockException(item.getName() + &quot; is out of stock.&quot;);<br>      }<br>    }<br>    log.info(&quot;Items are in stock, calculating total&quot;);<br>    // Calculate total with discount<br>    for (Item item : items) {<br>      total = total.add(item.getPrice());<br>      try {<br>        if (DiscountService.canApplyDiscount(item) &amp;&amp; !discountApplied) {<br>          total = total.multiply(new BigDecimal(&quot;0.9&quot;)); // Apply discount<br>          discountApplied = true;<br>        }<br>      } catch (DiscountException e) {<br>        log.error(&quot;Error applying discount to &quot; + item.getName(), e);<br>      }<br>      log.info(&quot;Processed item: &quot; + item.getName());<br>    }<br>    // Log total and process payment<br>    log.info(&quot;Order Total: &quot; + total);<br>    processPayment(total);<br>    log.info(&quot;Payment processed&quot;);<br>    // Further logic (but let&#39;s spare ourselves)<br>    // Hundreds of lines later…<br>  } else {<br>    throw new ValidationException(&quot;order is null&quot;);<br>  }<br>}</pre><p>What’s Wrong Here?</p><p>Where to begin? This method is the poster child for what not to do in Java.</p><p>This method started with just calculating total and processing payment, but ended up doing everything: This method is a one-stop-shop for stock checks, calculations, discount applications, error handling, logging, and payment processing.</p><p>Nested try-catch blocks mixed in with core logic: Exceptions are mixed into the main workflow, making it hard to separate functionality from error handling.</p><p>Variables declared but used randomly: Variables like discountApplied are declared early on, modified in different places, and used in multiple loops. It’s hard to keep track of them. Log statements and core logic are mashed together: Good luck finding the actual business logic here among the warning, error, and info logs.</p><p>This code is exhausting to read, harder to maintain, and a pain to troubleshoot.</p><h4>Modularization to the Rescue! 🦸‍♂️</h4><p>Let’s refactor this mess into smaller, modular methods. Each method will focus on a single responsibility, making the code easier to read, understand, and maintain.</p><pre>public void processOrder(Order order) {<br>  if (order != null) {<br>    checkStockAvailability(order);<br>    BigDecimal total = calculateTotal(order);<br>    processPayment(total);<br>    logOrderSummary(order, total);<br>  } else {<br>    throw new ValidationException(&quot;order is null&quot;);<br>  }<br>}<br><br>private void checkStockAvailability(Order order) {<br>  for (Item item : order.getItems()) {<br>    if (!isItemInStock(item)) {<br>      log.warn(item.getName() + &quot; is out of stock.&quot;);<br>      throw new OutOfStockException(item.getName() + &quot; is out of stock.&quot;);<br>    }<br>  }<br>}<br><br>private BigDecimal calculateTotal(Order order) {<br>  BigDecimal total = BigDecimal.ZERO;<br>  boolean discountApplied = false;<br>  for (Item item : order.getItems()) {<br>    total = total.add(item.getPrice());<br>    try {<br>      if (DiscountService.canApplyDiscount(item) &amp;&amp; !discountApplied) {<br>        total = total.multiply(new BigDecimal(&quot;0.9&quot;));<br>        discountApplied = true;<br>      }<br>    } catch (DiscountException e) {<br>      log.error(&quot;Error applying discount to &quot; + item.getName(), e);<br>    }<br>    log.info(&quot;Processed item: &quot; + item.getName());<br>  }<br>  return total;<br>}<br><br>private void processPayment(BigDecimal total) {<br>  log.info(&quot;Order Total: &quot; + total);<br>  // Payment processing logic<br>  log.info(&quot;Payment processed&quot;);<br>}<br><br>private void logOrderSummary(Order order, BigDecimal total) {<br>  log.info(&quot;Order Summary: Order ID = &quot; + order.getId() + &quot;, Total = &quot; + total);<br>}</pre><p>Now what do we get by doing this ?</p><ul><li><strong>Clarity:</strong> Each method now has a single job, so it’s clear what each part of the code is doing.</li><li><strong>Easy Troubleshooting:</strong> If there’s an issue with discounts, we go straight to calculateTotal() — no need to hunt through unrelated logic.</li><li><strong>Better Error Handling:</strong> Each method handles its own exceptions, making the main method flow uninterrupted.</li><li><strong>Logical Flow</strong>: The processOrder method now reads like a story: check stock, calculate total, process payment, log.</li></ul><p>And the code is readable. Easy to understand !!</p><h3>Tips for Keeping Code Sane (and Your Sanity Intact) 😌</h3><p>Here are a few practices that help keep code modular, readable, and maintainable:</p><ul><li><strong>One Task, One Method</strong>: Each method should perform one task and one task only. If a method is trying to do multiple things, split it up.</li><li><strong>Declare Variables Where You Need Them</strong>: There’s no prize for declaring all your variables at the top. Declare them close to where they’re used. This keeps the code cleaner and makes the purpose of each variable obvious.</li><li><strong>Extract Reusable Logic</strong>: If there’s code that’s repeated or can stand on its own, make it a separate method or utility. This reduces duplication and keeps your main logic flow uncluttered.</li><li><strong>Handle Exceptions Where They Make Sense</strong>: Don’t clutter your main method with error handling. Handle exceptions where they’re most relevant, so your main flow remains readable.</li><li><strong>Be Kind with Logging</strong>: Logs are essential but don’t sprinkle them everywhere. Place them where they add value, not where they make code unreadable.</li></ul><h3>Final Thoughts: Code That Tells a Story 🎬</h3><p>Good code should read like a well-crafted story — each method flowing into the next. Massive methods are the opposite of this. They bury essential code under layers of unrelated logic, making maintenance a headache and testing a nightmare. It’s confusing, exhausting, and by the end, no one knows what happened. 🥱</p><p>Remember, your Java code isn’t a legal document. It doesn’t have to be all things in one place. Break it up, keep it clean, and make life easier for you, your teammates, and the poor soul who inherits your code one day. Happy coding! 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58544b0cf1c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Art (and Pain) of Force-Fitting Technologies ️]]></title>
            <link>https://medium.com/@sathyvsk/the-art-and-pain-of-force-fitting-technologies-%EF%B8%8F-e6880e898bee?source=rss-5b91cdb64c37------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6880e898bee</guid>
            <category><![CDATA[force-fit-technology]]></category>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[bad-practices]]></category>
            <category><![CDATA[mistakes-to-avoid]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Sathiesh Veera]]></dc:creator>
            <pubDate>Sat, 02 Nov 2024 00:01:58 GMT</pubDate>
            <atom:updated>2024-11-02T15:22:24.984Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vFNio2sP30AKlDZm.jpg" /></figure><p>If there’s one thing tech companies love, it’s <em>shiny new tools</em>. And nothing says “we’re keeping up with trends” quite like a stack filled with microservices, NoSQL databases, Kafka streams, and distributed architectures. But sometimes, in our quest to stay on the cutting edge, we end up force-fitting technologies into places they simply don’t belong. You know, trying to hammer a square peg into a round hole and hoping for the best. 😉</p><p><strong>Why does this happen?</strong> Let’s face it, the reasons are plenty. Sometimes it’s about enterprise standards and architecture guidelines; other times it’s about the team’s skill set, familiarity, or even cost considerations. But while these decisions may sound reasonable on the surface, they often come with unseen problems, turning what should be a simple solution into an over-engineered, costly nightmare.</p><p>Let’s dive into a few case studies I’ve seen firsthand to illustrate why force-fitting tech is a recipe for trouble. And yes, I’m naming names. Prepare yourself for some tech truths. 🔥</p><h3>Case Study 1: NoSQL for Simple User Data (Or, DynamoDB Just Because)</h3><p>In one project, I joined a team tasked with creating a microservice to handle some basic user data — structured, predictable, and quite ordinary. The natural choice? A simple SQL RDS database, right? Wrong. The <em>“enterprise standard”</em> dictated that all new microservices use DynamoDB. Why? Because DynamoDB was considered easier to maintain and the team was well-versed with it.</p><p>But then reality hit. For a single, predictable table, we ended up creating four tables with two or three GSIs (Global Secondary Indexes) each, a collection of “creatively formatted” sort keys 😅, and a jungle of transact writes and reads to handle complex queries and relationships. With every new requirement, our meticulously planned table structure crumbled under the weight, leading to multiple queries for a single request, low overall performance, endless tweaks, and unnecessary complexity.</p><p>Lesson here? Sometimes, less is more. A simple SQL setup would have handled evolving requirements with straightforward indexes, without all the DynamoDB acrobatics.</p><h3>Case Study 2: Kafka For All! (Or, When Everyone Wants In)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1r1eWES-XWU5HK9U.jpg" /></figure><p>Once upon a time, my team implemented Kafka as part of a data analytics platform. It was perfect for our needs: we needed at-least-once semantics, high throughput, and didn’t care much about strict ordering. Kafka thrived here, delivering on its promises and enabling us to process and store data effectively.</p><p>But then… success struck. The buzz around Kafka spread, and soon enough, other teams wanted Kafka for their real-time messaging needs. Despite our warnings, they implemented Kafka, even for scenarios where SQS or RabbitMQ would have sufficed. They forced Kafka into exactly-once use cases (hello, headaches!), added metadata tables to guarantee message ordering, and faced Kafka’s infamous retry limitations, where it reprocesses all messages from an offset instead of just one.</p><p>After scaling and maintenance nightmares in production, the team realized Kafka wasn’t the magic bullet they hoped for and migrated back to RabbitMQ — a project that took another six months. Sometimes, just because it’s trending doesn’t mean it’s right.</p><h3>Case Study 3: Cassandra for a 3-Column Database 🤔</h3><p>And then there was the unique offer ID service, which sounded simple enough: a table with an ID, an offer, and a user association. But instead of using a humble SQL database, the team chose Cassandra, favoring its “scalability” and cost-effectiveness.</p><p>Initially, it worked. But when the product team asked for more fields — like tracking if offers were claimed or reminders for unclaimed offers — the single table turned into a three-table maze. Despite Cassandra’s performance, it wasn’t suited for this kind of relational data growth, and soon the team declared it “unscalable.” Enter V2 of the service, this time on Postgres in RDS. Cassandra’s high performance couldn’t make up for the mismatch in use case.</p><p>The takeaway? Know your tools. Cassandra’s great for massive, high-volume data, but a simple relational use case can lead to unnecessary complexity when forced into NoSQL.</p><h3>Final Thoughts: Don’t Force Fit — Right Fit!</h3><p>Force-fitting technologies into places they don’t belong rarely ends well. When engineers and architects bend to the pressures of enterprise standards, skillset limitations, or the appeal of the “next big thing,” it often leads to more workarounds than solutions. Instead, the focus should be on <em>right-fitting</em> technologies to match use cases.</p><p>There’s no shame in choosing simplicity when it makes sense. SQL databases still have their place, and not every messaging system needs Kafka. While operational constraints and standards are important, they shouldn’t blind us to simpler solutions that save time, cost, and complexity in the long run.</p><h3>A Word on Constants (Not Those Constants 😉)</h3><p>If you must have standards, keep them flexible. Enterprise-wide standards should support — not dictate — technology choices. The true challenge is finding the right tool for the job, even if it means going outside the enterprise box sometimes.</p><p>When tech is chosen based on business needs, not just trend or skillset, engineers can avoid the spiral of endless workarounds, overly complex designs, and rework. Let’s build with purpose, not just protocol.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6880e898bee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Over using constants in Java]]></title>
            <link>https://medium.com/@sathyvsk/over-using-constants-in-java-9bd4c65d6f59?source=rss-5b91cdb64c37------2</link>
            <guid isPermaLink="false">https://medium.com/p/9bd4c65d6f59</guid>
            <category><![CDATA[mistakes-to-avoid]]></category>
            <category><![CDATA[java-coding]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[java-coding-practices]]></category>
            <category><![CDATA[java-best-practices]]></category>
            <dc:creator><![CDATA[Sathiesh Veera]]></dc:creator>
            <pubDate>Fri, 25 Oct 2024 04:44:53 GMT</pubDate>
            <atom:updated>2024-10-25T17:35:07.871Z</atom:updated>
            <content:encoded><![CDATA[<p>In Java programming, constants are a common feature that allows developers to define values that remain unchanged throughout the lifecycle of an application. Constants are often used to avoid magic numbers and hard-coded values, improving readability and maintainability by reducing duplication.</p><p>We know this, don’t we? And that’s what we use them for. Right. But, do we stop there? Or do we overdo it?</p><p>Have you ever seen code like this?</p><pre>public static final String SUCCESS = &quot;Success&quot;;<br>public static final String FAILURE = &quot;Failed&quot;;</pre><p>Or</p><pre>public static final int DAY_IN_MS = 86400000;<br>public static final int HOUR_IN_MS = 3600000;</pre><p>These are classic examples of <strong>overusing constants</strong>. Or maybe I should even say <strong>misusing</strong> constants 😜. Let’s break down a few examples, and how we can be smarter about it.</p><h3>Example 1: Constants for Statuses (Success and Failure)</h3><p>Take the first example. This is a situation where you want to check the status of a request or an API call. It’s tempting to use constants to keep your values consistent. I mean, who wants to hunt down all the “<em>Success</em>” and “<em>Failed</em>” strings if you decide to rename them to “<em>SUCCESSFUL</em>” or “<em>UNFORTUNATE ENDING</em>”, right?</p><p>But wait a second. Is this really the best use of constants? Nope. This is actually a situation <strong>begging</strong> for an enum. Instead of using raw strings, an enum gives you both type safety and clarity. The compiler can warn you if you’re using an invalid status, and you can make your code cleaner and more expressive. Here’s how:</p><pre>public enum Status {<br>  SUCCESS,<br>  FAILURE;<br>}</pre><p>Now, you don’t have to wonder if the constant says “Failed” or “Failure” (we’ve all been there), and the enum can expand naturally when more statuses are needed. Plus, Java enums come with a ton of benefits like built-in methods for comparison, and they just look cooler. 👌</p><h3>Example 2: Time Constants (Milliseconds Overload)</h3><p>Now let’s tackle the second example — a classic situation where we need to check some unit of time in milliseconds. I’ll admit, it’s easy to feel pretty clever writing this:</p><pre>public static final int DAY_IN_MS = 86400000;<br>public static final int HOUR_IN_MS = 3600000;</pre><p>It feels organized, right? But what happens when you have to deal with more complex time conversions? Adding more constants? Please, don’t. Java has already solved this problem for you. Let me introduce you to our friend, <strong>Duration</strong>:</p><pre>Duration.of(1, ChronoUnit.DAYS).toMillis(); // 1 day to milliseconds.<br>Duration.of(4, ChronoUnit.HOURS).toMillis(); // 4 hours to milliseconds.<br>Duration.of(23, ChronoUnit.MINUTES).toMillis(); // 23 minutes to milliseconds.<br>Duration.of(96, ChronoUnit.SECONDS).toMillis(); // 96 seconds to milliseconds.</pre><p>Not only is this more readable, but it also avoids the awkwardness of hard coding large numbers, making it clear what you’re converting and reducing the chance for human error (like mistakenly typing 84600000 instead of 86400000 — yikes).</p><h3>Example 3: Constants for Configurable Values (a Trap!)</h3><p>Now, here’s another frequent misuse of constants — using them for things that should be <strong>configurable</strong>. Like, let’s say we define a retry interval for API calls like this:</p><pre>public static final int RETRY_INTERVAL_MS = 5000;</pre><p>It looks neat, but here’s the problem: what if the retry interval changes based on the environment? Maybe production needs 10 seconds, but staging needs 5. This is <strong>a trap</strong>, because the retry interval should be configurable — from an environment variable, config file, or properties file. Something like this:</p><pre>int retryIntervalMs = Integer.parseInt(System.getenv(&quot;RETRY_INTERVAL_MS&quot;));</pre><p>This way, you can change it per environment without touching your code. Constants for such values tie your hands when it comes to deployment flexibility, so save yourself the headache and externalize these configs!</p><h3>Example 4: The Never-Do Constants</h3><p>Alright, here’s a cringe-worthy category of constants that I’ve seen in the wild. Ready for this?</p><pre>public static final String COMMA = &quot;,&quot;;<br>public static final String SPACE = &quot; &quot;;<br>public static final String EMPTY = &quot;&quot;;</pre><p>Yes. I’m serious. This kind of constant usage actually existed in early versions of Java. Why? Well, back in the day, strings in Java were objects, and people used to think this would help reduce memory overhead. Except, spoiler alert: <strong>it didn’t</strong>. 😬 In fact, this practice often led to memory issues because each constant would occupy its own space, not sharing the values efficiently.</p><p>Fast forward to modern Java versions, and strings are interned, meaning they’re pooled for reuse. So every time you use “ ” or a “,” Java knows exactly what to do with it, and it won’t cause memory issues. More importantly, constants like these add <strong>zero</strong> to readability and maintenance. I mean, when was the last time you decided to change the value of COMMA to SEMICOLON globally? 😂</p><p>These constants don’t serve any real purpose, and their usage should be considered outdated at best, or just plain unnecessary. Java is smarter now — let it be.</p><p>While we are on this, lets also talk about another practice. The <strong>constants file</strong>.</p><h3>Constants Files — Blessing or Curse?</h3><p>Sounds like a good idea, right? Put all your constants in one place. Neat, organized, and easy to find. What could go wrong?</p><p>Well, everything. 🫣</p><p>Here’s the issue: as your project grows, the constants file becomes a dumping ground. Everyone throws their constants into this file, and soon, you’ll have multiple developers adding similar constants or duplicating existing ones because no one wants to scroll through a 500-line file just to see if “MAX_RETRIES” is already there. The result? A cluttered, hard-to-maintain file where things go to die.</p><p><strong>What’s the better approach?</strong> Keep constants in the <strong>relevant class files</strong>. If a constant is specific to a particular functionality, define it there. This keeps things <strong>contextual</strong> and prevents your project from becoming a sprawling mess. It’s easier to manage, maintain, and — importantly — find. It also helps the next developer know exactly where that constant belongs and why it exists.</p><p>When <strong>Should</strong> You Use Constants?</p><p>You’re probably thinking, “Well, what am I supposed to use constants for, then?” And that’s a fair question. Constants are still useful, but the key is using them <strong>appropriately</strong>. Constants should be for <strong>fixed, unchanging values</strong> that are not derived from computations, user inputs, or external factors. Think mathematical constants (Math.PI), or application-wide IDs that are genuinely static (USER_TYPE_ADMIN). If it’s something that might change based on context, avoid overloading constants.</p><p>To sum it up: constants are great, but like coffee, they’re best in moderation. ☕ Overusing or misusing them doesn’t just clutter your codebase — it can make your code rigid, harder to maintain, and even lead to unexpected errors.</p><p>So the next time you’re tempted to declare a constant for every number or string that pops into your head, stop and think: is there a better, more flexible way to achieve this? Because more often than not, there is. 😊</p><p>Happy Coding !!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9bd4c65d6f59" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>