<?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>DEV Community: BiKodes</title>
    <description>The latest articles on DEV Community by BiKodes (@bikodes).</description>
    <link>https://dev.to/bikodes</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%2F831616%2F9f097aef-83fa-4652-8e31-9cc5e62aff25.jpeg</url>
      <title>DEV Community: BiKodes</title>
      <link>https://dev.to/bikodes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bikodes"/>
    <language>en</language>
    <item>
      <title>How Pseudocode Programming Process Leveled Up My Software Engineering Skills</title>
      <dc:creator>BiKodes</dc:creator>
      <pubDate>Sat, 02 Aug 2025 14:44:49 +0000</pubDate>
      <link>https://dev.to/bikodes/how-pseudocode-programming-process-leveled-up-my-software-engineering-skills-ob3</link>
      <guid>https://dev.to/bikodes/how-pseudocode-programming-process-leveled-up-my-software-engineering-skills-ob3</guid>
      <description>&lt;p&gt;As I continue my journey to become a better software craftsman, two insights from &lt;strong&gt;Martin Fowler&lt;/strong&gt; and &lt;strong&gt;Uncle Bob&lt;/strong&gt; stand out:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Martin Fowler (Refactoring)&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Code is a shared language. Polishing interfaces, refining layout, and writing clear comments make our intent obvious and our logic approachable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Uncle Bob (Clean Code)&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"The only valid measurement of code quality is how easily it can be understood and changed.&lt;/em&gt;"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Clean code isn’t just functional, it’s adaptable. Applying PPP, auditing variables, and keeping routines focused all strengthen a codebase.&lt;/p&gt;

&lt;p&gt;Their principles echo McConnell’s advice, writing code is half the job; crafting clear, human-friendly software is what makes us true craftsmen.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy4f6z2o8d7xa5tu0arvh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy4f6z2o8d7xa5tu0arvh.jpg" alt="peer-programming" width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In 2023, shortly after joining &lt;a href="https://www.savannahinformatics.com/" rel="noopener noreferrer"&gt;Savannah Informatics&lt;/a&gt;, I had one of those pivotal moments in my software engineering journey. We were in a review session where an RFC &lt;strong&gt;Stephen Mwangi&lt;/strong&gt;, my tech lead at the time, and I had worked on, and arguably the best I’ve ever had, was being examined by &lt;strong&gt;Dr. Ngure Nyanga&lt;/strong&gt;. During the review, &lt;strong&gt;Dr. Ngure&lt;/strong&gt; mentioned the importance of applying the Pseudocode Programming Process (PPP) in our workflow.&lt;/p&gt;

&lt;p&gt;I remember sitting there, nodding along, but deep down, I had to admit, I didn’t know what &lt;strong&gt;PPP&lt;/strong&gt; meant in practice. This was surprising even to me because I had read &lt;strong&gt;"Code Complete"&lt;/strong&gt; by Steve McConnell, a book hailed as a software development classic. That review was the spark I needed. Determined to understand it better, I revisited the book with fresh eyes.&lt;/p&gt;

&lt;p&gt;Fast forward a few years into my engineering career, with more real-world experience under my belt, I read &lt;strong&gt;"Code Complete"&lt;/strong&gt; again. This time, the insights felt even sharper, almost pristine, as if &lt;strong&gt;McConnell&lt;/strong&gt; had written them specifically for the problems I was facing in day-to-day development.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F65wdfomk2n0kxbkyhjdo.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F65wdfomk2n0kxbkyhjdo.jpg" alt="coding-laptop" width="750" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Beauty of Cleaning Up Code "Leftovers"
&lt;/h3&gt;

&lt;p&gt;One concept that stuck with me is McConnell’s section on &lt;strong&gt;"Cleaning Up Leftovers."&lt;/strong&gt; He explains that finishing a feature or routine isn’t just about making it work; it’s about polishing it so it meets the highest standards of quality. He outlines a series of checks that serve as a final pass over your code, almost like a craftsman sanding and refining their work until it gleams.&lt;/p&gt;

&lt;p&gt;Here are the key takeaways, simplified and rephrased:&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Validate the Routine’s Interface
&lt;/h4&gt;

&lt;p&gt;Make sure your routine handles all expected inputs and outputs correctly. Every parameter should serve a purpose. Nothing unused should sneak in, and nothing vital should be missing. It’s amazing how often overlooked parameters become silent bugs waiting to happen.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Confirm Design Quality
&lt;/h4&gt;

&lt;p&gt;Ask yourself:&lt;/p&gt;

&lt;p&gt;(a) Does this routine do one thing and do it well?&lt;/p&gt;

&lt;p&gt;(b) Is it loosely coupled to the rest of the codebase?&lt;/p&gt;

&lt;p&gt;(c) Is it built defensively, ready to handle edge cases gracefully?&lt;/p&gt;

&lt;p&gt;If the answer isn’t a clear “yes,” it’s time to refactor.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Audit Your Variables
&lt;/h4&gt;

&lt;p&gt;Look closely at variable names. Are they clear and descriptive, or cryptic and misleading? Check for unused objects, improper initialization, or anything that might confuse the next person (or future you). Clean variable hygiene leads to maintainable code.&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Scrutinize Logic and Flow
&lt;/h4&gt;

&lt;p&gt;This is where you catch the tricky stuff, off-by-one errors, infinite loops, improper nesting, or resource leaks. These logical gremlins often hide in plain sight until you zoom in on the structure.&lt;/p&gt;

&lt;h4&gt;
  
  
  5. Refine Layout and Readability
&lt;/h4&gt;

&lt;p&gt;White space isn’t wasted space; it’s a tool. Well-placed line breaks and clear formatting make your code instantly more approachable. A properly laid-out routine guides the reader naturally through its flow.&lt;/p&gt;

&lt;h4&gt;
  
  
  6. Align Comments with Reality
&lt;/h4&gt;

&lt;p&gt;Code evolves, and comments can become outdated. &lt;strong&gt;McConnell&lt;/strong&gt; suggests reviewing the pseudocode (or design comments) that guided the implementation. Are they still accurate? Do they clearly explain why a block of code exists, not just what it does?&lt;/p&gt;

&lt;p&gt;And here’s the kicker, if a comment simply repeats what the code says in plain sight, delete it. Redundant comments add clutter rather than clarity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F41ibsqwikmne7v0zug2i.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F41ibsqwikmne7v0zug2i.jpg" alt="peer-programming" width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why This Still Matters Today
&lt;/h3&gt;

&lt;p&gt;Re-reading this section years later reminded me that writing code is only half the job. The other half is communication with our future selves, our teammates, and even the systems we build upon. The &lt;strong&gt;Pseudocode Programming Process&lt;/strong&gt; (PPP) emphasizes thinking before coding, structuring logic in plain language first, and then translating it into clean, expressive code.&lt;/p&gt;

&lt;p&gt;This approach not only prevents messy logic but also forces you to think about clarity from the very start. It’s a mindset shift, from &lt;strong&gt;“get it done”&lt;/strong&gt; to &lt;strong&gt;“get it done right.”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In hindsight, that review session with &lt;strong&gt;Dr. Ngure&lt;/strong&gt; was more than just feedback on an &lt;strong&gt;RFC&lt;/strong&gt;; it was a reminder of what separates good engineers from great ones. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Great engineers don’t just write code that works; they leave behind code that’s readable, maintainable, and self-explanatory.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The next time you finish coding a feature, don’t stop at &lt;strong&gt;“it runs.”&lt;/strong&gt; Walk through McConnell’s cleanup steps. Check your interfaces, audit your variables, refine your layout, and align your comments. You’ll be surprised how often that final polish transforms good code into truly excellent code.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>coding</category>
      <category>softwaredevelopment</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Essential Bash/Shell Commands for Beginners</title>
      <dc:creator>BiKodes</dc:creator>
      <pubDate>Sat, 14 Jun 2025 14:15:50 +0000</pubDate>
      <link>https://dev.to/bikodes/essential-bashshell-commands-for-beginners-9dk</link>
      <guid>https://dev.to/bikodes/essential-bashshell-commands-for-beginners-9dk</guid>
      <description>&lt;p&gt;Whether you're a developer, a student, or just curious about the command line, these basic &lt;strong&gt;Bash&lt;/strong&gt; and &lt;strong&gt;Shell commands&lt;/strong&gt; will help you navigate and manage files more efficiently.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F286ey51l573pnq42c2vv.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F286ey51l573pnq42c2vv.jpg" alt="bshell" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  TIPS
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;1. It’s recommended to add a space between commands and symbols, e.g.,&lt;code&gt;cd .., not cd...&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;2. Some commands might not work in Windows PowerShell but will function in the Git Bash terminal, and vice versa. Always test in your preferred setup terminal.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  File and Directory Navigation
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ls
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Lists all files and folders in the current directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ls &amp;lt;folder_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Displays all contents inside a specific folder.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd ..
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Moves up to the parent directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd &amp;lt;folder_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Navigates to a specific folder. Use quotes if the folder name contains spaces, e.g.,  cd "My Documents".&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pwd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Prints the current working directory path.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;start . (Windows) or open . (Mac)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Opens the current folder in your default file explorer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating Files and Folders
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir &amp;lt;folder_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Creates a new folder.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;touch &amp;lt;file_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Creates a new file (with or without an extension), e.g., touch notes.txt.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deleting Files and Folders
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rm &amp;lt;file_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Deletes a file permanently (use with caution!).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rmdir &amp;lt;folder_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Deletes an empty folder.&lt;/p&gt;

&lt;p&gt;⚠️ To delete a folder with contents, use &lt;code&gt;rm -r &amp;lt;folder_name&amp;gt;.&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  System Operations
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;drive_letter&amp;gt;: (Windows only)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Switches to a different disk drive, e.g., E: or D:.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ren &amp;lt;old_name&amp;gt; &amp;lt;new_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Renames a file or folder.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;systeminfo (Windows only)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Displays detailed system information.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;shutdown /s (Windows only)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Shuts down the system after a set time or immediately.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;shutdown /l (Windows only)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Logs out of the current user session.&lt;/p&gt;

&lt;h3&gt;
  
  
  Command Management
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;command1 &amp;amp; command2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Runs multiple commands sequentially.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cls (Windows) or clear (Unix/Linux/macOS)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Clears the terminal screen.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;exit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Closes the terminal session.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2vhagjatly72vh16nsak.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2vhagjatly72vh16nsak.png" alt="bshell" width="383" height="132"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Tips
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Begin your journey by reading &lt;a href="https://www.amazon.com/Linux-Beginners-Introduction-Operating-Command/dp/1496145097" rel="noopener noreferrer"&gt;Linux for Beginners: An Introduction to the Linux Operating System and Command Line&lt;/a&gt;, a great starting point for anyone new to Linux and the command line.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Practice these commands in a &lt;strong&gt;Git Bash&lt;/strong&gt; terminal or &lt;strong&gt;Linux&lt;/strong&gt; shell to get comfortable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Always double-check before using destructive commands, such as &lt;code&gt;rm&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Got questions or want to explore advanced Bash scripting? Let us know in the comments or reach out on &lt;a href="https://github.com/BiKodes" rel="noopener noreferrer"&gt;&lt;strong&gt;GitHub&lt;/strong&gt;&lt;/a&gt;! &lt;strong&gt;Happy hacking!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>bash</category>
      <category>beginners</category>
      <category>linux</category>
    </item>
    <item>
      <title>How to Optimize SQL Queries for Speed and Efficiency</title>
      <dc:creator>BiKodes</dc:creator>
      <pubDate>Mon, 31 Mar 2025 19:29:35 +0000</pubDate>
      <link>https://dev.to/bikodes/how-to-optimize-sql-queries-for-speed-and-efficiency-5hd7</link>
      <guid>https://dev.to/bikodes/how-to-optimize-sql-queries-for-speed-and-efficiency-5hd7</guid>
      <description>&lt;p&gt;&lt;em&gt;Efficient SQL performance is essential for fast data retrieval and reducing system load. The following tips provide practical strategies, from proper indexing to analyzing execution plans to optimize your queries and boost overall performance.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F594zbbyqe3yqq25wu326.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F594zbbyqe3yqq25wu326.png" alt="sql queries" width="800" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here are a few simple things you should know before reading this article.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Basic SQL Skills&lt;/strong&gt;&lt;br&gt;
You should know how to write basic &lt;strong&gt;SQL&lt;/strong&gt; commands like &lt;strong&gt;SELECT, WHERE,&lt;/strong&gt; and &lt;strong&gt;JOIN.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Database Basics&lt;/strong&gt;&lt;br&gt;
Understand &lt;strong&gt;what a database is&lt;/strong&gt;, how data is stored in tables, and what indexes and keys do.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Common Performance Issues&lt;/strong&gt;&lt;br&gt;
Be aware that slow queries can happen because of full table scans, bad joins, or heavy sorting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Reading Query Plans&lt;/strong&gt;&lt;br&gt;
It helps if you know how to use tools like **EXPLAIN **to check how your queries run and find bottlenecks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Interest in Faster Queries&lt;/strong&gt;&lt;br&gt;
If you want to learn how to make your SQL queries run faster and use fewer resources, &lt;em&gt;this article will be very useful.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It's important to remember that while the basics of SQL are similar across different databases, the way each one processes queries can be different. Databases like &lt;strong&gt;MySQL, PostgreSQL, SQL Server,&lt;/strong&gt; and &lt;strong&gt;Oracle&lt;/strong&gt; each use their query optimizers to determine the best way to run queries. These optimizers are built to match the unique design and features of each system. Because of this, the tips shared in this article might not work the same way on every database.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1923xpoipivgs6yii3vq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1923xpoipivgs6yii3vq.png" alt="sql queries" width="800" height="455"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Proper Indexing&lt;/strong&gt;&lt;br&gt;
One key to speeding up SQL queries is proper indexing. Ensure that indexes are created on columns frequently used in &lt;strong&gt;WHERE&lt;/strong&gt; clauses or JOIN conditions. This can drastically reduce data retrieval time, especially in large tables.&lt;/p&gt;

&lt;p&gt;Indexing allows the database to locate and retrieve data quickly without scanning the entire table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Example&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
If you frequently filter or join on the &lt;strong&gt;&lt;em&gt;last_name&lt;/em&gt;&lt;/strong&gt; column in a &lt;strong&gt;&lt;em&gt;customer's&lt;/em&gt;&lt;/strong&gt; table, create an index.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Create an index on last_name&lt;/span&gt;
&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;INDEX&lt;/span&gt; &lt;span class="n"&gt;idx_customers_last_name&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;customers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;last_name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;-- Query that benefits from the index&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;customers&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;last_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'Bikodes'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Select Only the Columns You Need&lt;/strong&gt;&lt;br&gt;
Instead of using &lt;strong&gt;SELECT&lt;/strong&gt; *, explicitly list only the required columns. This reduces the amount of data processed and improves performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Bad Practice (fetches unnecessary data)&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;department_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Good Practice(fetches only what's needed)&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;employee_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;first_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;last_name&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;department_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Avoid Using the HAVING Clause When Possible&lt;/strong&gt;&lt;br&gt;
Use the &lt;strong&gt;WHERE&lt;/strong&gt; clause to filter rows before aggregation. The &lt;strong&gt;HAVING&lt;/strong&gt; clause should be used only for filtering grouped data, as it adds unnecessary computation if misused.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Bad Practice&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;department_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;COUNT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt;
&lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;department_id&lt;/span&gt;
&lt;span class="k"&gt;HAVING&lt;/span&gt; &lt;span class="n"&gt;department_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Good Practice&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;department_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;COUNT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;department_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
&lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;department_id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Eliminate Unnecessary DISTINCT Conditions&lt;/strong&gt;&lt;br&gt;
The &lt;strong&gt;DISTINCT&lt;/strong&gt; keyword forces the database engine to perform extra sorting and comparisons. Use it only when you need to remove duplicates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Bad Practice&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;DISTINCT&lt;/span&gt; &lt;span class="n"&gt;customer_id&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'processed'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Good Practice (if customer_id is already unique for this condition)&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;customer_id&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'processed'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Un-nest Subqueries&lt;/strong&gt;&lt;br&gt;
Replace nested subqueries with &lt;strong&gt;JOIN&lt;/strong&gt; or Common Table Expressions &lt;strong&gt;(CTEs)&lt;/strong&gt; to prevent repeated execution of the same query logic, reducing the processing load.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Bad Practice(subquery)&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;customer_name&lt;/span&gt; 
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;customers&lt;/span&gt; 
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;customer_id&lt;/span&gt; &lt;span class="k"&gt;IN&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;customer_id&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'pending'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Good Practice (using JOIN)&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;DISTINCT&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_name&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;customers&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;
&lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'pending'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Use IN Predicates on Indexed Columns&lt;/strong&gt;&lt;br&gt;
When filtering against multiple values, use the IN predicate on indexed columns to take advantage of efficient index lookups.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Example&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;products&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;category_id&lt;/span&gt; &lt;span class="k"&gt;IN&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;If &lt;strong&gt;category_id&lt;/strong&gt; is indexed, this query will run faster.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prefer EXISTS Over DISTINCT in One-to-Many Joins&lt;/strong&gt;&lt;br&gt;
In scenarios involving one-to-many relationships, using &lt;strong&gt;EXISTS&lt;/strong&gt; can be more efficient than &lt;strong&gt;DISTINCT&lt;/strong&gt; because &lt;strong&gt;EXISTS&lt;/strong&gt; stops evaluating once a match is found.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Bad Practice (using DISTINCT)&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;DISTINCT&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt; 
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;customers&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;
&lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Good Practice (using EXISTS)&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt; 
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;customers&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="k"&gt;EXISTS&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Use UNION ALL Instead of UNION&lt;/strong&gt;&lt;br&gt;
If duplicate elimination is not required, use &lt;strong&gt;UNION ALL&lt;/strong&gt; instead of &lt;strong&gt;UNION&lt;/strong&gt;. &lt;strong&gt;UNION&lt;/strong&gt; forces the database to sort and remove duplicates, which can be costly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Example&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;customer_id&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;customers_kenya&lt;/span&gt;
&lt;span class="k"&gt;UNION&lt;/span&gt; &lt;span class="k"&gt;ALL&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;customer_id&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;customers_tanzania&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Avoid Using OR in Join Conditions&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;OR&lt;/strong&gt; Conditions in joins can prevent indexes from being used efficiently. Consider refactoring your query or breaking it into multiple queries combined &lt;strong&gt;UNION&lt;/strong&gt; for better performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Bad Practice&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;
&lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;departments&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dept_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="k"&gt;OR&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;manager_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;manager_id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Good Practice&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;
&lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;departments&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dept_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;
&lt;span class="k"&gt;UNION&lt;/span&gt; &lt;span class="k"&gt;ALL&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;
&lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;departments&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;manager_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;manager_id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Avoid Functions on the Right-Hand Side of Comparisons&lt;/strong&gt;&lt;br&gt;
Applying functions to columns in the &lt;strong&gt;WHERE&lt;/strong&gt; clause can prevent index usage. Instead, restructure your query so that the indexed columns remain untouched.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Bad Practice&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="nb"&gt;YEAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order_date&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2024&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Good Practice&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; 
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;order_date&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="s1"&gt;'2024-01-01'&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;order_date&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="s1"&gt;'2025-01-01'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Eliminate Redundant Mathematical Operations&lt;/strong&gt;&lt;br&gt;
Remove unnecessary calculations from your queries. Precompute values when possible to reduce computational overhead during query execution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Bad Practice&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;invoices&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;18&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Good Practice&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;invoices&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Learn to Read Query Execution Plans&lt;/strong&gt;&lt;br&gt;
One of the most effective ways to optimize queries is by analyzing execution plans. Understanding query plans helps you identify slow operations, such as full table scans, expensive sorts, or improper indexing, allowing you to make data-driven optimizations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Example&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can use &lt;strong&gt;EXPLAIN&lt;/strong&gt; or &lt;strong&gt;EXPLAIN ANALYZE&lt;/strong&gt; to understand how queries are executed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;EXPLAIN&lt;/span&gt; &lt;span class="k"&gt;ANALYZE&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;customer_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1001&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you run a query with &lt;strong&gt;EXPLAIN&lt;/strong&gt; (or &lt;strong&gt;EXPLAIN ANALYZE&lt;/strong&gt;), the database shows you &lt;strong&gt;how&lt;/strong&gt; it plans to execute the query. When a developer or a database administrator understands the &lt;strong&gt;steps&lt;/strong&gt; involved, it helps them to spot performance issues and optimize them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;A developer or database administrator should look for the following in execution plans.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Seq Scan (Sequential Scan)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This means the database reads &lt;strong&gt;every row&lt;/strong&gt; in a table to find the rows that match your query condition. &lt;em&gt;Seq scan&lt;/em&gt; is &lt;strong&gt;inefficient&lt;/strong&gt; for large tables because it doesn't use indexes. This often suggests &lt;strong&gt;missing or unused indexes&lt;/strong&gt; on the filtered column.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;Seq&lt;/span&gt; &lt;span class="n"&gt;Scan&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt;  &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cost&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;00&lt;/span&gt;&lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="mi"&gt;431&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;00&lt;/span&gt; &lt;span class="k"&gt;rows&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt; &lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Index Scan (or Index Seek in some databases)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This means the database &lt;strong&gt;uses an index&lt;/strong&gt; to find rows, making data retrieval &lt;strong&gt;faster&lt;/strong&gt;. It only looks at relevant rows instead of scanning the whole table. &lt;strong&gt;This is typically optimal,&lt;/strong&gt; especially for &lt;strong&gt;highly selective queries&lt;/strong&gt;(queries that return a small subset of data).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;Index&lt;/span&gt; &lt;span class="n"&gt;Scan&lt;/span&gt; &lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="n"&gt;idx_orders_customer_id&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt;  &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cost&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;44&lt;/span&gt; &lt;span class="k"&gt;rows&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;...)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;High-cost operations (Sort, Hash Join, etc.)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you execute a query, certain operations in your query plan can be &lt;strong&gt;expensive&lt;/strong&gt;, slowing down query performance. It would be great to look for them and assess if they can be avoided or optimized&lt;/p&gt;

&lt;p&gt;These optimization techniques can significantly improve your SQL performance. For further insights, please refer to the research paper:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://andrewrgoss.com/pdf/sql_query_optimization_techniques.pdf" rel="noopener noreferrer"&gt;&lt;strong&gt;Query Optimization Techniques Tips For Writing Efficient And Faster SQL Queries&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>sql</category>
      <category>sqlserver</category>
      <category>database</category>
      <category>dataengineering</category>
    </item>
    <item>
      <title>Software Testing Basics</title>
      <dc:creator>BiKodes</dc:creator>
      <pubDate>Sun, 10 Mar 2024 16:11:10 +0000</pubDate>
      <link>https://dev.to/bikodes/software-testing-basics-11mn</link>
      <guid>https://dev.to/bikodes/software-testing-basics-11mn</guid>
      <description>&lt;p&gt;Testing is crucial in software development to verify applications &lt;em&gt;operate as&lt;/em&gt; &lt;em&gt;expected, meet requirements,&lt;/em&gt; and &lt;em&gt;run reliably&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The key testing methods are:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;These approaches play a crucial role in ensuring the quality and reliability of various systems and applications. Understanding and implementing these methods is essential for developers, quality assurance teams, and anyone involved in the software development lifecycle. &lt;/p&gt;

&lt;p&gt;Each testing method serves a unique purpose, contributing to the overall goal of delivering high-performance, error-free software products. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Unit Testing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It validates individual code components in isolation to ensure they function properly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8iy54uhq6km6ughhm3p7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8iy54uhq6km6ughhm3p7.png" alt="unit-testing" width="800" height="523"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Integration Testing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It verifies that different system components and modules interconnect and interact correctly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9m4qekm6gemln6gnqm1p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9m4qekm6gemln6gnqm1p.png" alt="integration-testing" width="800" height="328"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. System Testing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It evaluates the complete system against business and technical requirements. Confirms overall system functionality.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs7mud5c6fw05tr5aeb0w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs7mud5c6fw05tr5aeb0w.png" alt="system-testing" width="800" height="566"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Load Testing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It examines system performance under anticipated peak usage levels to uncover bottlenecks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz2ermzaxwgkc4rmye3f3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz2ermzaxwgkc4rmye3f3.jpg" alt="load-testing" width="800" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Error Testing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It deliberately inputs invalid data to verify appropriate error handling and recovery.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzhfda99d8g0hkhrykhw6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzhfda99d8g0hkhrykhw6.png" alt="error-testing" width="537" height="168"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Test Automation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It uses scripts to automate execution of test suites. Improves efficiency, consistency, and coverage.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxuravecbs9yrdv03dfhu.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxuravecbs9yrdv03dfhu.jpg" alt="test-automation" width="800" height="742"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It's your turn:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;- How do you test your software functionality?.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;- Do you highlight specific testing methods or areas of focus?.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>softwareengineering</category>
      <category>testing</category>
      <category>cleancode</category>
      <category>software</category>
    </item>
    <item>
      <title>How To Uninstall Docker and Docker Compose On Linux Mint</title>
      <dc:creator>BiKodes</dc:creator>
      <pubDate>Sun, 03 Mar 2024 14:16:43 +0000</pubDate>
      <link>https://dev.to/bikodes/how-to-uninstall-docker-and-docker-compose-on-linux-mint-24oo</link>
      <guid>https://dev.to/bikodes/how-to-uninstall-docker-and-docker-compose-on-linux-mint-24oo</guid>
      <description>&lt;p&gt;&lt;strong&gt;Step 1: Remove Docker Packages&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Open a terminal and run the following command to list all installed Docker packages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ dpkg -l | grep -i docker

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will show you a list of Docker-related packages installed on your system. Thereafter you can use the following command to remove those packages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo apt-get purge -y docker-engine docker docker.io docker-ce docker-ce-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2: Remove Docker Images, Containers, and Volumes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You must comprehend that removing &lt;strong&gt;&lt;em&gt;Docker packages&lt;/em&gt;&lt;/strong&gt; doesn't remove your &lt;em&gt;Docker images, containers, and volumes.&lt;/em&gt; Therefore if you want to completely remove Docker, including all its data, run the following commands:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Caution:&lt;/strong&gt; &lt;em&gt;This will delete all your Docker data, including containers, images, and volumes. Make sure you have backed up any necessary data.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo rm -rf /var/lib/docker
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3: Remove Docker Compose&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you have Docker Compose installed, you may want to remove it as well. Use the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo rm /usr/local/bin/docker-compose
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 4: Remove Docker Group&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;By default, Docker adds your user to the &lt;strong&gt;&lt;em&gt;"docker" group&lt;/em&gt;&lt;/strong&gt;. If you want to remove this group, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo groupdel docker
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 5: Verify Uninstallation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can check if Docker has been completely removed by running the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ docker --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If Docker has been successfully uninstalled, this command should return a &lt;strong&gt;&lt;em&gt;"command not found"&lt;/em&gt;&lt;/strong&gt; or &lt;strong&gt;&lt;em&gt;No such file or directory&lt;/em&gt;&lt;/strong&gt; message.&lt;/p&gt;

&lt;p&gt;That's it! Docker should now be uninstalled from your Linux Mint system.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>linux</category>
      <category>developer</category>
      <category>devops</category>
    </item>
    <item>
      <title>How To Improve API Performance</title>
      <dc:creator>BiKodes</dc:creator>
      <pubDate>Wed, 28 Feb 2024 08:33:57 +0000</pubDate>
      <link>https://dev.to/bikodes/how-to-improve-api-performance-5440</link>
      <guid>https://dev.to/bikodes/how-to-improve-api-performance-5440</guid>
      <description>&lt;p&gt;In the current rapidly evolving realm of software development, optimizing APIs &lt;strong&gt;(Application Programming Interfaces)&lt;/strong&gt; performance is a critical endeavor to ensure seamless interactions between applications and systems. As digital ecosystems expand and user expectations evolve, the efficiency of Application Programming Interfaces (APIs) becomes essential for delivering exceptional user experiences and maintaining competitive edge in today's dynamic market.&lt;/p&gt;

&lt;p&gt;Derived from my practical experience, the following outlines several methods that a software developer can employ to enhance the performance of their APIs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Pagination&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Pagination is a common optimization technique when result sets are large. By streaming results back to the client in pages, service responsiveness can be improved.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fskwwss5vdne047p8cmkd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fskwwss5vdne047p8cmkd.png" alt="pagination" width="404" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Asynchronous Logging&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Synchronous logging&lt;/em&gt;&lt;/strong&gt; writes to disk on every API call, slowing down the system. However, &lt;strong&gt;&lt;em&gt;asynchronous logging&lt;/em&gt;&lt;/strong&gt; logs are first sent to a lock-free buffer and control is immediately returned. The buffer contents are then flushed periodically to disk, significantly reducing I/O overhead.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fltic5yju8guz9t0ucj1y.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fltic5yju8guz9t0ucj1y.jpg" alt="logging" width="700" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Caching&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Frequently accessed data can be cached for fast retrieval. Clients can query the cache first instead of hitting the database directly every time. For cache misses, the database can be queried as a fallback. In-memory caches like Redis provide faster data access compared to databases.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9678ty5nqffxy3pvcjxe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9678ty5nqffxy3pvcjxe.png" alt="cache" width="274" height="184"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Payload Compression&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Compressing API payloads can improve an application's performance and reduce bandwidth consumption by sending and receiving smaller payloads.&lt;/p&gt;

&lt;p&gt;Request and response payloads can be compressed using algorithms such as &lt;strong&gt;_gzip _&lt;/strong&gt;to reduce transmitted data volume. This speeds up upload and download times.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpcdnq9302z0weymzi1xz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpcdnq9302z0weymzi1xz.jpg" alt="payload-compression" width="400" height="284"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Connection Pooling&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Database connection pooling is a method used to keep database connections open so they can be reused by others.&lt;/p&gt;

&lt;p&gt;Typically, opening a database connection is an expensive operation or rather has a significant overhead, especially if the database is remote. This is due to the fact that you have to open up network sessions, authenticate, have authorization checked, and so on. &lt;/p&gt;

&lt;p&gt;Pooling keeps the connections active so that, when a connection is later requested, one of the active ones is used in preference to having to create another one. The connection pool manages &lt;strong&gt;&lt;em&gt;lifecycle events&lt;/em&gt;&lt;/strong&gt; internally.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9xunzebhdnyqs1uci6l2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9xunzebhdnyqs1uci6l2.png" alt="connection-=pooling" width="800" height="640"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Minimize Network Round Trips&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Round trip time (RTT)&lt;/em&gt;&lt;/strong&gt; measures the time it takes for the data to leave a starting point &lt;strong&gt;&lt;em&gt;(the browser)&lt;/em&gt;&lt;/strong&gt; and return to that very same point in milliseconds. This is a key metric used to measure network latency, page loading times, and the overall quality of a network.&lt;/p&gt;

&lt;p&gt;Minimization of network round trips can be achieved by batching requests whenever possible. It reduces latency and improves overall API performance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb7cq85we4mcp875d0qqw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb7cq85we4mcp875d0qqw.png" alt="rtt" width="800" height="611"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For every query issued by the application, time is needed to reach the SQL Server and then the time needed for results to get back to the application. As all communication between an application and SQL Server goes via some network (LAN or WAN), network performance could be a critical factor affecting overall &lt;strong&gt;API performance&lt;/strong&gt;. Two factors affect network performance: &lt;strong&gt;&lt;em&gt;latency and throughput.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The latency or so-called SQL Server round-trip time (RTT) is something that is often overlooked by DBAs and database developers, but excessive round-trip time can severely affect performance.&lt;/p&gt;

&lt;p&gt;Nevertheless, there is a bone of contention regarding pagination among some software developers. They argue that, instead of employing traditional paging techniques, it is more efficient to send an initial set of results, typically denoted as n, and indicate the presence of additional results. This approach is favored because counting all results can be time-consuming. Furthermore, proponents of this method assert that end users seldom navigate beyond the first page, providing rationale for their stance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;What other performance optimization tricks have you found useful for APIs?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>api</category>
      <category>softwaredevelopment</category>
      <category>webdev</category>
      <category>architecture</category>
    </item>
    <item>
      <title>What’s the most important part of Event-Driven Architecture?</title>
      <dc:creator>BiKodes</dc:creator>
      <pubDate>Wed, 21 Feb 2024 06:25:26 +0000</pubDate>
      <link>https://dev.to/bikodes/whats-the-most-important-part-of-event-driven-architecture-m2a</link>
      <guid>https://dev.to/bikodes/whats-the-most-important-part-of-event-driven-architecture-m2a</guid>
      <description>&lt;p&gt;Events are the most important part of &lt;strong&gt;Event Driven Architecture&lt;/strong&gt;&lt;em&gt;(EDA).&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In application that has the implementation &lt;strong&gt;EDA,&lt;/strong&gt; different components communicate by &lt;em&gt;sending&lt;/em&gt; and &lt;em&gt;receiving events.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But what exactly is an event?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In simple terms this is something that has occurred.&lt;/p&gt;

&lt;p&gt;However, in detail it is a significant &lt;strong&gt;&lt;em&gt;occurrence&lt;/em&gt;&lt;/strong&gt; or &lt;strong&gt;&lt;em&gt;happening&lt;/em&gt;&lt;/strong&gt; within a system or a domain that is of interest to the participants in the system. Moreover, events can represent a wide range of activities, changes, or notifications that have an impact on the &lt;strong&gt;state&lt;/strong&gt; of the system. These events are often used to &lt;strong&gt;&lt;em&gt;trigger&lt;/em&gt;&lt;/strong&gt; or &lt;strong&gt;&lt;em&gt;communicate&lt;/em&gt;&lt;/strong&gt; between different components or services in a decoupled and asynchronous manner.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftwfrums6rnmrcelrhhe7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftwfrums6rnmrcelrhhe7.png" alt="eda-pic" width="800" height="318"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A customer signing up for your application&lt;/li&gt;
&lt;li&gt;A payment is received for an order&lt;/li&gt;
&lt;li&gt;A failed authentication attempt&lt;/li&gt;
&lt;li&gt;A transaction completed&lt;/li&gt;
&lt;li&gt;Account balance updated&lt;/li&gt;
&lt;li&gt;A user logged in&lt;/li&gt;
&lt;li&gt;A post published&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are mainly three different patterns I have come across while dealing with events.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;- Event Notifications&lt;/li&gt;
&lt;li&gt;- Event-Based State Transfer&lt;/li&gt;
&lt;li&gt;- Event Sourcing&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;[1] Event Notifications&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this case, the event just notifies that something has occurred.&lt;/p&gt;

&lt;p&gt;The event carries the absolute minimum state. For example, just the ID of an entity like a new order. Minimal data is sent over the network.&lt;/p&gt;

&lt;p&gt;In some cases, the receiving components may record the information for auditing purposes. But others may call the source component to fetch additional information about the event.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Notification-type events&lt;/em&gt;&lt;/strong&gt; are general-purpose in nature and suitable for broadcasting requirements.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fug0pmxa1vrr40sax0jz2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fug0pmxa1vrr40sax0jz2.png" alt="event-notification" width="800" height="518"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[2] Event-Based State Transfer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is more like the asynchronous relative of REST.&lt;/p&gt;

&lt;p&gt;Instead of REST’s on-demand &lt;em&gt;&lt;strong&gt;pull&lt;/strong&gt;&lt;/em&gt; model, event-based state transfer follows a &lt;strong&gt;&lt;em&gt;push&lt;/em&gt;&lt;/strong&gt; approach.&lt;/p&gt;

&lt;p&gt;Data (id + information) is sent out to be consumed by any components. Some components may create their own local cached copies of the data while others may take some other action based on the data received.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;The advantage is that the consumer need not call back the source component for additional information.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The entire information is right there in the event payload.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fje68j7wgfd4l8daochqu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fje68j7wgfd4l8daochqu.png" alt="event-based-state-transfer" width="800" height="232"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[3] Event Sourcing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is pattern not about event transmission but event storage.&lt;/p&gt;

&lt;p&gt;The state of an application is determined by a sequence of events rather than by the current state of the data. In other words, instead of storing the current state of an entity, you store a series of events that represent state transitions. These events are then used to reconstruct the current state whenever needed.&lt;/p&gt;

&lt;p&gt;According to &lt;strong&gt;Martin Fowler,&lt;/strong&gt; &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The fundamental idea of Event Sourcing is that of ensuring every change to the state of an application is captured in an event object, and that these event objects are themselves stored in the sequence they were applied for the same lifetime as the application state itself.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Changes to an entity are not captured as irreversible modifications but are stored as events in an event store.&lt;/p&gt;

&lt;p&gt;These changes can be read and processed to recreate the final state of an entity whenever required.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6d7muztb5ghqtd44yuz6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6d7muztb5ghqtd44yuz6.png" alt="event-sourcing" width="800" height="551"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In conclusion, event driven architecture &lt;strong&gt;(EDA)&lt;/strong&gt; offers diverse communication patterns like event notifications, state transfer, and event sourcing. As of this, each serve distinct needs in data transmission and storage. More-significantly, selecting the right pattern depends on system complexity and scalability.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>eventdriven</category>
      <category>systemdesign</category>
      <category>programming</category>
    </item>
    <item>
      <title>REST API Vs GraphQL</title>
      <dc:creator>BiKodes</dc:creator>
      <pubDate>Wed, 14 Feb 2024 14:07:56 +0000</pubDate>
      <link>https://dev.to/bikodes/rest-vs-graphql-api-afg</link>
      <guid>https://dev.to/bikodes/rest-vs-graphql-api-afg</guid>
      <description>&lt;p&gt;Choosing between &lt;strong&gt;REST&lt;/strong&gt; and &lt;strong&gt;GraphQL&lt;/strong&gt; depends on your specific use case and development requirements.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzztwtja0npmngciu6qcq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzztwtja0npmngciu6qcq.png" alt="restapi-graphql" width="290" height="174"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;REST&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The following are worthy knowing about REST:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It relies on standard HTTP methods like &lt;strong&gt;&lt;em&gt;GET, POST, PUT, DELETE&lt;/em&gt;&lt;/strong&gt; to perform CRUD operations.&lt;/li&gt;
&lt;li&gt;It is excellent for simple, uniform interfaces between separate services or applications.&lt;/li&gt;
&lt;li&gt;Caching strategies are straightforward to implement.&lt;/li&gt;
&lt;li&gt;It can require multiple API calls to fetch related data, leading to chatty interfaces.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;GraphQL&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The following are to be consider worthy knowing about GraphQL:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It provides a single endpoint and lets consumers precisely query for the data they need.&lt;/li&gt;
&lt;li&gt;The clients specify the exact fields required in nested queries, and the server returns optimized payloads containing just those fields.&lt;/li&gt;
&lt;li&gt;It supports &lt;strong&gt;_Mutations _&lt;/strong&gt;for modifying data and subscriptions for real-time notifications.&lt;/li&gt;
&lt;li&gt;It is great for aggregating data from multiple sources and works well with complex frontends that have rapidly changing data needs.&lt;/li&gt;
&lt;li&gt;It shifts complexity to clients and can enable abusive and expensive queries without proper safeguards.&lt;/li&gt;
&lt;li&gt;Caching strategies are less straightforward compared to REST.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Nevertheless, the best choice depends on the application architecture and team preferences.** GraphQL** fits better for fluid or intricate frontend requirements, while &lt;strong&gt;REST&lt;/strong&gt; suits applications needing simple consistent interfaces.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz2brd2fjq4lhmjsazlx3.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz2brd2fjq4lhmjsazlx3.jpeg" alt="restapi-graphql-architecture" width="800" height="934"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Rest for:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Simple and consistent interfaces&lt;/li&gt;
&lt;li&gt;Caching Simplicity&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Use GraphQL for:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Flexible frontend reuirements&lt;/li&gt;
&lt;li&gt;Aggregating Data from multiple sources&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Conclusively, neither one is a silver bullet but evaluating tradeoffs and limitations is of great significance. Both &lt;strong&gt;REEST&lt;/strong&gt; and &lt;strong&gt;GraphQL&lt;/strong&gt; are solid options for exposing data and powering modern applications.&lt;/p&gt;

&lt;p&gt;Carefully analyzing requirements rather than defaulting to one or the other is key to picking the right API approach. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6co7rdieqtpclp55wwjx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6co7rdieqtpclp55wwjx.png" alt="restapi-graphql-payload" width="800" height="559"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>graphql</category>
      <category>restapi</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>Abstraction in Object Oriented Programming(OOP) For Beginners</title>
      <dc:creator>BiKodes</dc:creator>
      <pubDate>Fri, 17 Nov 2023 14:46:27 +0000</pubDate>
      <link>https://dev.to/bikodes/abstraction-in-object-oriented-programmingoop-for-beginners-2o33</link>
      <guid>https://dev.to/bikodes/abstraction-in-object-oriented-programmingoop-for-beginners-2o33</guid>
      <description>&lt;p&gt;&lt;strong&gt;Abstraction&lt;/strong&gt; is a crucial concept of Object Oriented Programming &lt;strong&gt;(OOP)&lt;/strong&gt; in the field of computer science that is used to make code more &lt;em&gt;manageable, secure, and efficient.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It is a technique that involves &lt;strong&gt;&lt;em&gt;hiding the implementation details of a class and only exposing the essential features of the class to the user.&lt;/em&gt;&lt;/strong&gt;This allows the user to work with objects of the class without having to worry about the details of how the class works.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In the most simplest way abstraction is hiding the unnecessary details of an object while exposing only the relevant aspects. In a snapshot, it is a process where the programmer hides all but the relevant data about an object in order to reduce complexity and increase efficiency.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Abstraction helps a software developer to define &lt;strong&gt;abstract data types&lt;/strong&gt;. These are classes representing real-world entities, their properties &lt;strong&gt;(attributes)&lt;/strong&gt;, and their actions &lt;strong&gt;(methods)&lt;/strong&gt;. They also allow us to hide the internal complexities and implementation details of an object from the outside world.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example One:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s say you have a class called &lt;strong&gt;Car&lt;/strong&gt; that has methods such as &lt;strong&gt;start_engine()&lt;/strong&gt;, &lt;strong&gt;accelerate()&lt;/strong&gt;, and &lt;strong&gt;brake()&lt;/strong&gt;. The user only needs to know that they can &lt;em&gt;start the engine, accelerate, and brake the car&lt;/em&gt;, but they don't need to know how these methods are implemented. &lt;/p&gt;

&lt;p&gt;Here's what the code would look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Car:
    def start_engine(self):
        # Implementation details hidden
        print("Engine started")

    def accelerate(self):
        # Implementation details hidden
        print("Accelerating")

    def brake(self):
        # Implementation details hidden
        print("Braking")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the example above, the user can use the &lt;strong&gt;Car&lt;/strong&gt; class in a straightforward way, without having to worry about the implementation details. Someone else worried about that, and a &lt;strong&gt;car&lt;/strong&gt; now acts as an abstraction and hides these details. The user just interacts with a simple interface that doesn't require any knowledge about the internal implementation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of abstraction&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Reduces complexity&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Increase re-usability&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Increases security&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Loose coupling&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Avoids code duplication&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Manageable code&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Code efficiency&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are two types of abstraction in OOP:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Data abstraction&lt;/li&gt;
&lt;li&gt;Process abstraction&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Data abstraction (Object Properties)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Data abstraction&lt;/strong&gt;&lt;/em&gt; is like looking at a car from the outside. You don't need to know how the engine works but you only see the essential things such as its color, model, and speed.&lt;/p&gt;

&lt;p&gt;In programming, it's about creating a clear and simple &lt;em&gt;&lt;strong&gt;"container"&lt;/strong&gt;&lt;/em&gt; for information about something, like a person, a car, a house et cetera.&lt;/p&gt;

&lt;p&gt;The container hides the complicated stuff and gives you easy ways to see and change the significant information.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think of  a &lt;strong&gt;Person&lt;/strong&gt; class in a program. It could have attributes like &lt;em&gt;name, age, and address.&lt;/em&gt; These attributes are like the simple, visible parts of a person.&lt;/p&gt;

&lt;p&gt;Data abstraction makes sure that a developer can get and set these attributes without worrying about how they are stored or processed inside the program.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Procedural Abstraction(Actons/Functions)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Procedural abstraction&lt;/em&gt;&lt;/strong&gt; is like a magic button. When you press it, you don't need to know how the magic happens, you just know it will do something you want.&lt;/p&gt;

&lt;p&gt;In programming, it is about creating easy-to-use &lt;em&gt;magic buttons (functions or methods)&lt;/em&gt; that do specific tasks without showing you the complicated steps they take.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think of a &lt;strong&gt;calculate_are&lt;/strong&gt; function. The user gives it the size of a shape, and it magically tells you the area without you having to know the math behind it.&lt;/p&gt;

&lt;p&gt;Procedural abstraction hides the complexity and lets you use these functions without understanding how they work internally.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example Two:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The following code demonstrates abstraction by defining an abstract class &lt;strong&gt;Shape&lt;/strong&gt; with abstract methods &lt;strong&gt;&lt;code&gt;area()&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;perimeter()&lt;/code&gt;&lt;/strong&gt;. The &lt;strong&gt;Circle&lt;/strong&gt; and &lt;strong&gt;Square&lt;/strong&gt; classes inherit from the &lt;strong&gt;Shape&lt;/strong&gt; class and provide their own implementations for the abstract methods. &lt;/p&gt;

&lt;p&gt;This way, the abstract class &lt;strong&gt;Shape&lt;/strong&gt; defines a blueprint for shapes, enforcing that any class inheriting from it must implement these methods, ensuring a level of &lt;em&gt;&lt;strong&gt;abstraction&lt;/strong&gt;&lt;/em&gt; and structure in the design.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from abc import ABC, abstractmethod

# Abstract class
class Shape(ABC):
    def __init__(self, name):
        self.name = name

    @abstractmethod
    def area(self):
        pass

    @abstractmethod
    def perimeter(self):
        pass

# Concrete classes implementing Shape
class Circle(Shape):
    def __init__(self, name, radius):
        super().__init__(name)
        self.radius = radius

    def area(self):
        return 3.14 * self.radius * self.radius

    def perimeter(self):
        return 2 * 3.14 * self.radius

class Square(Shape):
    def __init__(self, name, side):
        super().__init__(name)
        self.side = side

    def area(self):
        return self.side * self.side

    def perimeter(self):
        return 4 * self.side

# Creating objects and using abstraction
circle = Circle("Circle", 5)
square = Square("Square", 4)

print(f"Area of {circle.name}: {circle.area()}")
print(f"Perimeter of {circle.name}: {circle.perimeter()}")

print(f"Area of {square.name}: {square.area()}")
print(f"Perimeter of {square.name}: {square.perimeter()}")

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Abstraction&lt;/strong&gt; is one of the &lt;strong&gt;core concepts&lt;/strong&gt; of object-oriented programming &lt;strong&gt;(OOP)&lt;/strong&gt; languages. Its main goal is to handle complexity by hiding unnecessary details from the user. That enables the user to implement more complex logic on top of the provided abstraction without understanding or even thinking about all the hidden complexity.&lt;/p&gt;

&lt;p&gt;Both types of abstraction simplify programming by focusing on what's important &lt;strong&gt;(the data or the actions)&lt;/strong&gt; and hiding the rest &lt;strong&gt;(the details).&lt;/strong&gt; This makes your code easier to understand, maintain, and reuse.Above all they make it a lot easier to handle complexity by splitting them into smaller parts.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>oop</category>
      <category>python</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The Tempestuous Tale of Docker</title>
      <dc:creator>BiKodes</dc:creator>
      <pubDate>Sat, 15 Apr 2023 14:09:46 +0000</pubDate>
      <link>https://dev.to/bikodes/the-tempestuous-tale-of-docker-a-sea-change-in-the-realm-of-computing-2i2d</link>
      <guid>https://dev.to/bikodes/the-tempestuous-tale-of-docker-a-sea-change-in-the-realm-of-computing-2i2d</guid>
      <description>&lt;p&gt;Have you ever faced the issue where code works in this environment but doesn't work in the other environment?. What of the code works in a developer environment but the same code doesn't work in the testing or production environment?.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker&lt;/strong&gt; is a tool that helps developers build lightweight and portable software containers that simplify application development, testing, and deployment.&lt;/p&gt;

&lt;p&gt;In a nutshell, it is a configuration management tool which is used to automate the deployment of software in lightweight containers. These containers help applications to work efficiently in different environments.&lt;/p&gt;

&lt;p&gt;Basically, Docker resolves this issue of an application working in one environment and not working in the other environment. Noticeably, Docker makes it easier than ever for developers to package their software to &lt;strong&gt;“build once and run anywhere.”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In software development lifecycle - &lt;strong&gt;SDLC&lt;/strong&gt;(Plan, Design, Development, Testing/Release, Deployment &amp;amp; Maintenance), docker comes into the picture at the deployment stage.&lt;br&gt;
It makes the process of application deployment very easy and efficient and resolves a lot of issues related to deploying applications.&lt;/p&gt;

&lt;p&gt;It is the world's leading software container platform. A software a application is made up of &lt;strong&gt;&lt;em&gt;frontend components, Backend workers, Databases environment and libraries dependencies,&lt;/em&gt;&lt;/strong&gt; and we have to ensure all this components work on all different and wide range of platforms.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;i.e&lt;/em&gt;&lt;/strong&gt; In the shipping business, a container is used to ship a variety of products such as cars, cookers, liquid gas, oil etc revolutionizing the shipping industry.&lt;/p&gt;

&lt;p&gt;Docker is a tool designed to make it easier to deploy and run applications by using containers. Containers allow a developer to package up an application with all the parts it needs, such as libraries and other dependencies, and ship it all out as one package.&lt;/p&gt;

&lt;h2&gt;
  
  
  General workflow of docker
&lt;/h2&gt;

&lt;p&gt;A developer describes all the application dependencies and requirements in a file called &lt;strong&gt;dockerfile.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;This dockerfile describes steps to create a Docker image. It's like a recipe with all ingredients and steps necessary in making your dish. You will have all the applications requirements and it's dependencies in the image, and when you run the image one gets a docker container.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker container&lt;/strong&gt; in a nutshell is the run time instance of the &lt;strong&gt;docker image.&lt;/strong&gt;It will have application with all its &lt;br&gt;
dependencies.&lt;/p&gt;

&lt;p&gt;According to &lt;strong&gt;Hykes&lt;/strong&gt; at PyCon talk, containers are,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;“self-contained units of software you can deliver from a server over there to a server over there, from your laptop to EC2 to a bare-metal giant server, and it will run in the same way because it is isolated at the process level and has its own file system.”&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The docker image can be stored on an online cloud repository called Docker Hub. One can also store their docker image in their own repository or version control system. This images can be pulled to create containers in any environment &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;i.e&lt;/em&gt;&lt;/strong&gt; Staging environment and local environment. This resolves the issue of app working on one platform and not on another.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa9b4paioupg3p3qeom3s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa9b4paioupg3p3qeom3s.png" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Virtualization Vs Containerization
&lt;/h2&gt;

&lt;p&gt;In &lt;strong&gt;virtualization,&lt;/strong&gt; there's a software called &lt;strong&gt;Hypervisor,&lt;/strong&gt; it is used to create and run virtual machines. We can create multiple virtual machines  on a host operating system using Hypervisor.&lt;/p&gt;

&lt;p&gt;The VM's(Virtual Machines) have there own OS kernel(Operating System) and doesn't use the &lt;strong&gt;HOST OS  kernel,&lt;/strong&gt; this results to overheads on the host platform. Also, in case of VM's , we have to allocate fixed resources to every virtual machine &lt;br&gt;
and which don't change as per application needs leading to a lot of wastage on memory and space.&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;Containerization,&lt;/strong&gt; there's a &lt;strong&gt;&lt;em&gt;container&lt;/em&gt;&lt;/strong&gt; engine and a single OS(Operating System). We have multiple containers with there respective applications and dependencies which use the host's operating system(OS). Here the resources are not fixed as they are taken as per the needs of the application hence zero overheads, very lightweight and fast.&lt;/p&gt;

&lt;p&gt;However, the need of having a VM on the host OS and then having containers at time arises is some cases such as a need to run a &lt;strong&gt;Windows OS on a Linux OS&lt;/strong&gt;. In such cases we need to have a virtual machine first which will have our windows OS. &lt;/p&gt;

&lt;p&gt;The container engine is a docker engine.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh5.googleusercontent.com%2FBoQs81_Lkh7ebcKUqIPAaBfXSScdLu_dEmKTldeViYECmkm2NtbRIP9NYBNgG3pD2noekDx5Wz5gMpQ9I83NHnDgNmixx7XvDIR9OjMBvHWuHkEyWZdQFG_EHg1U4ZfMHpOgcXdTksMLZxKzfAPqnw" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flh5.googleusercontent.com%2FBoQs81_Lkh7ebcKUqIPAaBfXSScdLu_dEmKTldeViYECmkm2NtbRIP9NYBNgG3pD2noekDx5Wz5gMpQ9I83NHnDgNmixx7XvDIR9OjMBvHWuHkEyWZdQFG_EHg1U4ZfMHpOgcXdTksMLZxKzfAPqnw" width="1600" height="1080"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Docker Architecture
&lt;/h2&gt;

&lt;p&gt;Docker is a novel way to package the tools required to build and launch a container in a more streamlined and simplified way than was previously possible. It comprises Dockerfile, container images, the Docker run utility, Docker Hub, Docker Engine, Docker Compose, and Docker Desktop.&lt;/p&gt;

&lt;p&gt;The core of Docker is &lt;strong&gt;Docker Engine.&lt;/strong&gt; This is the underlying client-server technology that creates and runs the containers. &lt;/p&gt;

&lt;p&gt;Docker has &lt;strong&gt;a client-server architecture.&lt;/strong&gt; The command line(CL) is the client and the docker daemon is the server which contains docker containers.&lt;/p&gt;

&lt;p&gt;The Docker Engine includes a long-running &lt;strong&gt;daemon&lt;/strong&gt; process called &lt;strong&gt;dockerd&lt;/strong&gt; for managing containers, APIs that allow programs to communicate with the Docker daemon, and a command-line interface.&lt;/p&gt;

&lt;p&gt;The docker server receives commands from the docker client in the form of API request(s). All the components of docker client and docker server form the &lt;strong&gt;DOCKER ENGINE.&lt;/strong&gt; The daemon(server) receives the commands from the Docker client through &lt;strong&gt;&lt;em&gt;CLI or REST API's.&lt;/em&gt;&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Docker client and daemon can be present on the same host(machine) or different hosts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwv1pl02fak3n00valr5s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwv1pl02fak3n00valr5s.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Advantages of Docker
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Build an application only once&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An application inside a container can run on any system that has Docker installed. So there is no need to build and configure app multiple times on different platforms. Hence, Resolves the problem of the code working on one system and not working on another system.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Less worry&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With Docker you test your application inside a  container and ship it inside a container. This means the environment in which you test is identical to the one on    which the app will run in production.Docker image can be pulled and used on any environment to create a container that hosts the application.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Ease orchestration and scaling&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Give that docker containers are lightweight, developers can launch lots of them for better scaling of services. These clusters of containers do then need to be orchestrated.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Portability&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Docker containers can run on any platform. It can run on your local system, Amazon ec2, Google Cloud Platform, Rack-space server, VirtualBox etc. A container running on AWS can easily be ported to VirtualBox.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Version Control&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Like Git, Docker has in-built version control system. Docker containers work just like GIT repositories, allowing you to commit changes to your Docker images and version control them.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Isolation&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With Docker every application works in isolation in its own container and does not interfere with other applications running on the same system. So multiple containers can run on same system without interference. For removal also you can simply delete the container and it will not leave behind any files or traces on the system.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Productivity&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Docker allows faster and more efficient deployments without worrying about running your app on different platforms. It increases productivity many folds.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Composability&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Docker containers make it easier for developers to compose the building blocks of an application into a modular unit with easily interchangeable parts, which can speed up development cycles, feature releases, and bug fixes.&lt;/p&gt;

&lt;p&gt;You can &lt;a href="https://labs.play-with-docker.com/ooc" rel="noopener noreferrer"&gt;sign-up on&lt;/a&gt; for practice.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>devops</category>
      <category>docker</category>
      <category>deployment</category>
    </item>
    <item>
      <title>The Mechanical Intellect (A Treatise on ChatGPT)</title>
      <dc:creator>BiKodes</dc:creator>
      <pubDate>Mon, 20 Mar 2023 12:23:14 +0000</pubDate>
      <link>https://dev.to/bikodes/the-mechanical-intellect-a-treatise-on-chatgpt-99n</link>
      <guid>https://dev.to/bikodes/the-mechanical-intellect-a-treatise-on-chatgpt-99n</guid>
      <description>&lt;p&gt;&lt;strong&gt;ChatGPT&lt;/strong&gt; is a variant of the original GPT &lt;strong&gt;(Generative Pre-training Transformer)&lt;/strong&gt; language model developed by OpenAI. Generative artificial intelligence describes algorithms such as ChatGPT that can be used to create new content.This falls under machine learning.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ChatGPT&lt;/strong&gt; is designed to generate human-like text by predicting the next word in a given sequence based on the context of the previous words. The goal of ChatGPT is to enable the creation of &lt;em&gt;more natural and human-like text-based conversations&lt;/em&gt;. It's a free chatbot that can generate an answer to almost any question it's asked. It is a tool driven by artificial intelligence.&lt;/p&gt;

&lt;p&gt;The first machine learning models to work with text were &lt;em&gt;trained by humans&lt;/em&gt; to classify various inputs according to labels set by researchers i.e A model trained to label an accounting entry as a &lt;strong&gt;DEBIT&lt;/strong&gt; OR a &lt;strong&gt;CREDIT&lt;/strong&gt;. This is called &lt;strong&gt;&lt;em&gt;supervised training&lt;/em&gt;&lt;/strong&gt; as a human is in charge of "teaching" the model what to do.&lt;/p&gt;

&lt;p&gt;The following generation of text-based machine learning models rely on what's known as &lt;em&gt;**self-supervised learning.&lt;/em&gt;* This training involves feeding the model a lot of text for it to become able to generate predictions i.e ChatGPT.&lt;/p&gt;

&lt;p&gt;Like the original GPT, ChatGPT is trained on a large dataset of text and is able to generate human-like responses to prompts and questions. However, Chat GPT has been specifically fine-tuned to excel at generating conversational responses. This means that it is able to maintain coherence and context across multiple turns in a conversation, and can even generate responses that include appropriate emojis and other chat-specific elements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;One unique feature of ChatGPT is its ability to incorporate user input in real-time.&lt;/em&gt;&lt;/strong&gt; This allows it to generate responses that are tailored to the specific conversation that it is having, rather than relying on pre-determined responses.&lt;/p&gt;

&lt;p&gt;Overall, Chat GPT represents an exciting advancement in the field of natural language processing and has the potential to revolutionize the way we interact with text-based conversational agents. &lt;/p&gt;

&lt;p&gt;It has already been used in a variety of applications, including &lt;em&gt;chatbots&lt;/em&gt;, &lt;em&gt;virtual assistants&lt;/em&gt;, and even &lt;em&gt;social media bots&lt;/em&gt;.  By using GPT to generate responses to user input, chatbots and virtual assistants can have more natural and human-like conversations with users. This can be especially useful in &lt;strong&gt;&lt;em&gt;customer service or support contexts,&lt;/em&gt;&lt;/strong&gt; where the goal is to provide helpful and accurate information to users in a timely manner.&lt;/p&gt;

&lt;p&gt;GPT has also been used in creative applications, such as generating poetry or fiction. By feeding the model a prompt or theme, it can generate original text that adheres to the given theme or style. This can be a useful tool for writers or artists looking for inspiration or for generating content for social media or other platforms.&lt;/p&gt;

&lt;p&gt;This nifty form of machine learning empowers the computer to generate all sorts of new and exciting content. You should exploit the amazing power of generative AI and be amazed by mind blowing creations you can come up with.&lt;/p&gt;

&lt;p&gt;However, ChatGPT seems to have issues with counting, solving basic algebra problems, overcoming sexistic and racistic bias that lurks in the undercurrents of the society. This algorithms requires elephantic data to be trained.Nevertheless, ChatGPT will inform you, &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"&lt;em&gt;I am not perfect and may not always have the correct answer to every question. Additionally, the information I provide is only as accurate as the data I have been trained on, which has a fixed cutoff date. This means that I may not be able to provide information on recent events or developments that have occurred since the training data was collected.&lt;/em&gt;"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;ChatGPT is a well of succinct answers.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As the technology continues to develop and improve, it is likely that Chat GPT will become an increasingly important tool for businesses, researchers, and individuals looking to create more natural and engaging text-based conversations.&lt;/p&gt;

&lt;p&gt;Are you curious to experience the power of AI-powered conversations?. Try ChatGPT, a language model trained on the latest GPT-3.5 architecture. You can &lt;a href="https://chat.openai.com/chat" rel="noopener noreferrer"&gt;SIGN UP&lt;/a&gt; here to engage in interesting and informative conversations on a variety of topics.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The impact of Artificial Intelligence has left a profound question unanswered:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are workers at the median falling behind in the race against machines and automation?.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>chatgpt</category>
      <category>machinelearning</category>
      <category>ai</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>How To Eat A Tech Frog</title>
      <dc:creator>BiKodes</dc:creator>
      <pubDate>Sat, 16 Jul 2022 08:21:12 +0000</pubDate>
      <link>https://dev.to/bikodes/how-to-eat-a-tech-frog-18h1</link>
      <guid>https://dev.to/bikodes/how-to-eat-a-tech-frog-18h1</guid>
      <description>&lt;p&gt;It's not that I'm something special, super experienced, or an extraordinary coder, but I earn my living being a self-taught Software Engineer. You have to sacrifice a lot, manage your time well and always be willing to learn.&lt;/p&gt;

&lt;p&gt;There are a lot of underwater rocks, but don’t waste a single neuron on the train of thought that begins &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;“I ain’t smart enough for this”&lt;/em&gt;&lt;/strong&gt; &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;because quite clearly nothing is impossible.&lt;/p&gt;

&lt;p&gt;This is my personal power list on how to push the Tech Frog down your gut.&lt;/p&gt;

&lt;h2&gt;
  
  
  Decide Your Language
&lt;/h2&gt;

&lt;p&gt;Beginners are very tempted to start learning everything at once. Today you're making games in Unity, tomorrow you're designing web applications, and at the weekend you're developing iOS apps in Swift or learning Machine Learning. &lt;/p&gt;

&lt;p&gt;No matter how much you want to, you won't be able to learn it all. It's important to focus on one thing right from the start. Always remember that programming languages are just tools to choose from depending on your goals.&lt;/p&gt;

&lt;h2&gt;
  
  
  Be Yourself
&lt;/h2&gt;

&lt;p&gt;Technical knowledge is important, but great Tech leaders  look for the personality of the person to figure out if he/she would fit in with their team dynamics.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enjoy
&lt;/h2&gt;

&lt;p&gt;Have fun building the products you work on. If you aren't, it's probably time to switch your team, job, or better yet, build your own company.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stay Curious
&lt;/h2&gt;

&lt;p&gt;The opposite of dogma is curiosity. So, instead of avoiding tools because of what you read online, check them out if they look like they might be useful.&lt;/p&gt;

&lt;p&gt;Every tool was made to solve specific problem(s). But that doesn’t mean it’s a good tool. Maybe its designer fixed a problem you don’t care about or maybe that very solution is flawed yet someone took the time to create it. It might be worth playing around with it a little.&lt;/p&gt;

&lt;p&gt;Don’t limit your curiosity to tools. Learn about the problems you’re solving. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;“Look past the list of requirements you’ve been given and learn about your customer’s problems. I can’t stress this enough: True mastery comes from understanding the problem you are solving with your code.”&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Stay Fit
&lt;/h2&gt;

&lt;p&gt;You'll always have enough work, but do not work overly long hours.Distress when you need to. Go on a vacation. Find a fitness hobby - go to the gym, join a dancing club or play your favorite sport.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep Practicing Problems
&lt;/h2&gt;

&lt;p&gt;Keep practicing solving programming problems on your favorite platforms i.e leetcode. It makes your thinking sharp and keeps you prepared for the next opportunity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Have A Side Project
&lt;/h2&gt;

&lt;p&gt;Build something - anything you love on the side and maybe build it in public. It keeps your creative muscles working and the small entrepreneur in you alive. Such products can bring in unimaginable opportunities if used right. But ensure you complete the project(s).&lt;/p&gt;

&lt;h2&gt;
  
  
  Network
&lt;/h2&gt;

&lt;p&gt;You'll meet amazing people at work. Network and connect with them. You never know what doors a connection might open for you next. Join tech communities, be professional with your approach.&lt;/p&gt;

&lt;p&gt;On LinkedIn, I reached out to Mr. Ali Kassim Hussein a host of &lt;a href="https://www.youtube.com/channel/UCxh_prN6kZ-aNnWcmVc_Zxw" rel="noopener noreferrer"&gt;Ali Talks Tech&lt;/a&gt; who told me this, &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;“always payback kindness with kindness.”&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Learn, Adapt, Repeat
&lt;/h2&gt;

&lt;p&gt;Practice the LAR principle due to the fact that technology changes very fast. Never stop learning new stuff. J Query was a popular choice just 10 years ago while Vue.js and Typescript had no existence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Don’t Be Afraid To Make Mistakes
&lt;/h2&gt;

&lt;p&gt;If you’re curious, experimenting or making mistakes, it is OK. And it’s not only OK but it’s inevitable. Don’t be afraid.&lt;/p&gt;

&lt;p&gt;This isn’t a license to be a &lt;strong&gt;“Cyborg.”&lt;/strong&gt; Measure twice, so you only need to cut once. Pay attention to what you’re doing. &lt;/p&gt;

&lt;p&gt;Learn how to use testing to catch mistakes before they happen. Try to test your theories in low-stakes(staging) environments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Watch Your Personal Time
&lt;/h2&gt;

&lt;p&gt;Programming can be a demanding career. But it’s very rewarding in terms of both personal satisfaction and financial remuneration. This doesn’t write-off the fact that it can also eat your life.&lt;/p&gt;

&lt;p&gt;Guard your personal time and make sure you don’t spend too much of it on taking your work home.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;“Make sure you don’t spend too much of it on taking your work home. The personal rewards of coding make it easy to blur the line. Get away from the keyboard and get out and see the world. Your sanity will thank you for it, and your career will benefit from broader horizons.”&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Don’t Over-Practice
&lt;/h2&gt;

&lt;p&gt;Take regular breaks, rest and you should also keep an eye on your health.When coding, it’s hard to keep a sense of time. &lt;/p&gt;

&lt;p&gt;And most of the time you don’t want to be bothered so you spend extensive hours sitting in front of your computer, eating things that are easy/quick, unhealthy and drinking coffee or energy drinks to stay awake and keep momentum. &lt;/p&gt;

&lt;p&gt;Eat healthily and drink plenty of water, I know you heard it somewhere, but it’s the truth.&lt;br&gt;
More significantly, if your computer does not have this feature already, make sure you install &lt;a href="https://justgetflux.com/" rel="noopener noreferrer"&gt;f.lux&lt;/a&gt; in order to protect your eyes from blue light exposure emitted from your screen.&lt;/p&gt;

&lt;h2&gt;
  
  
  Don’t Compare Yourself To Others
&lt;/h2&gt;

&lt;p&gt;There are kids who are born coding and then there is you and me. Don’t let the progress of others discourage you. It’s not a race, even if it were, you know how quickly things can change. Treat your growth like a marathon not a sprint.&lt;/p&gt;

&lt;p&gt;But this is an ongoing process, you’re never too old to start and you’re never done learning. You don’t have to have it all figured out and let me emphasize this one, you don’t need a CS degree. &lt;/p&gt;

&lt;p&gt;In fact, a lot of people quit their stable jobs and careers to become self-taught developers.&lt;/p&gt;

&lt;p&gt;There isn’t a straight path or a right path to anything. If it’s smooth sailing for you, take a step back and analyze where and why you stopped challenging yourself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do Not Worry About Your Age
&lt;/h2&gt;

&lt;p&gt;You can start programming at any age. A talented and hardworking professional, even if he/she is already over 40, will be accepted by any company. &lt;/p&gt;

&lt;p&gt;Modern advanced startups employ both young people and people of age. You have a high chance of getting your position. But for this, you need working project(s).&lt;/p&gt;

&lt;h2&gt;
  
  
  Program Every Day
&lt;/h2&gt;

&lt;p&gt;Once you have written a certain number of lines of code, make a note in your diary or use habit trackers for smartphones. You can also keep a track of your personal commits either by using version control.&lt;/p&gt;

&lt;p&gt;It is important that programming becomes your daily routine as taking a morning shower or a meal.&lt;/p&gt;

&lt;p&gt;You don't have to create a website or an app every day. Your job is to get used to programming and coding for at least 2 hours or 4 hours a day. Even a little progress is always better than no progress at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Avoid  Tutorial Hell
&lt;/h2&gt;

&lt;p&gt;Don't get stuck watching too many tutorials known as tutorial hell. They're useful but start working on your own, you will learn a lot more that way. You learn more from your mistakes than your successes (this is the solid truth true in this industry).&lt;/p&gt;

&lt;h2&gt;
  
  
  Read Docs &amp;amp; Ask Questions
&lt;/h2&gt;

&lt;p&gt;Learn how to read docs and ask good questions, and don't be afraid to ask for help.&lt;br&gt;
Don't believe everyone on the internet, hype is a thing, don't get caught by it. Learn the basics first, then advance to learning frameworks or more complex topics. &lt;/p&gt;

&lt;p&gt;People will tell you you must learn the new super cool ultra invincible framework, don't believe them it's usually just BS. Adopt frameworks and tools that have been used for a while and have a big community behind.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;These are recommendations from my personal experience and everyone can have a slightly different one. You must know one thing, you can do it! It’s not easy, it may take some time, but you can do it!&lt;/p&gt;

&lt;p&gt;The most important thing I would recommend is what my mentor &lt;a href="https://www.linkedin.com/in/josephat-macharia-a5643553/" rel="noopener noreferrer"&gt;Mr. Josephat Macharia&lt;/a&gt; always tells me,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;""It's impossible to know everything, you just need to know that it can be done, then when you need it you can research and make use of it.""&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>webdev</category>
      <category>techtalks</category>
      <category>motivation</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
