<?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: Moses-Morris</title>
    <description>The latest articles on DEV Community by Moses-Morris (@mosesmorris).</description>
    <link>https://dev.to/mosesmorris</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%2F305196%2Ffce541d7-6f32-4873-919f-197930cadbad.jpg</url>
      <title>DEV Community: Moses-Morris</title>
      <link>https://dev.to/mosesmorris</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mosesmorris"/>
    <language>en</language>
    <item>
      <title>DATABASE REPLICATION.</title>
      <dc:creator>Moses-Morris</dc:creator>
      <pubDate>Fri, 20 Mar 2026 10:38:02 +0000</pubDate>
      <link>https://dev.to/mosesmorris/database-replication-2oae</link>
      <guid>https://dev.to/mosesmorris/database-replication-2oae</guid>
      <description>&lt;h2&gt;
  
  
  Your database will crash. It's not a matter of if it will crash, it's when. So here's my question: is your system designed to survive it?
&lt;/h2&gt;

&lt;p&gt;*&lt;em&gt;One database. One crash. Total downtime. *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That's the risk you take without replication. &lt;br&gt;
Here's how serious systems avoid it: a single Primary absorbs all writes while multiple Replicas serve reads in parallel. The result is faster performance, fault tolerance, and no single point of failure. When the primary goes down, a replica steps up automatically, users never feel a thing. &lt;br&gt;
This is the backbone of every 24/7 application you've ever used. If backend or system designs are in your future, get comfortable with this concept now.&lt;/p&gt;

&lt;p&gt;The tricky part is &lt;strong&gt;replication lag.&lt;/strong&gt; Since syncing happens asynchronously, a replica might be milliseconds (or more) behind the primary database. If a user writes something and immediately reads it back from a replica, they might not see their own write yet. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Synchronous replication&lt;/strong&gt; guarantees zero data loss but slows down every write. Asynchronous replication is fast but risks losing data on failover. Your startup is scaling fast and can't afford either problem. How do you architect your way out of this? I would love to hear from you.&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/Database%2520replication%2520for%2520an%2520e-commerce%2520store" 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/Database%2520replication%2520for%2520an%2520e-commerce%2520store" alt="Uploading image" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>backend</category>
      <category>database</category>
      <category>systemdesign</category>
    </item>
    <item>
      <title>TYPES OF AUTHENTICATION</title>
      <dc:creator>Moses-Morris</dc:creator>
      <pubDate>Wed, 11 Mar 2026 07:17:17 +0000</pubDate>
      <link>https://dev.to/mosesmorris/types-of-authentication-37e7</link>
      <guid>https://dev.to/mosesmorris/types-of-authentication-37e7</guid>
      <description>&lt;h2&gt;
  
  
  How do users prove their Identity, Earn Trust, and get managed on various platforms and APIs?
&lt;/h2&gt;

&lt;p&gt;Having a way to protect your system or platform is everything. Imagine building a family house and not setting up a door. Or,  setting up a backdoor where everyone who wants to breach can easily do it and come into your house. This puts you at risk with your family. &lt;br&gt;
Having controlled access and verifying if someone has permission to access your platform is important. That is where Authentication(identity verification) comes in. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Authentication&lt;/strong&gt; - the security process of verifying the identity of a user, device, or system to ensure they are who they claim to be before granting access to resources. &lt;/p&gt;

&lt;p&gt;Let us look at the way to do this when designing and implementing the logic of your system or application. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here are some types of authentication and architecture patterns you use to verify if someone has access to your system.&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Basic Authentication&lt;/strong&gt; - This type of authentication relies on sending a username and password, encoded in various ways, like base64, which converts binary data into a safe, printable ASCII string format while transmitting data.  It encodes and decodes the data. It is mainly used for internal tools, testing, and a simple API. Requires HTTPS for safer data transfer and requests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Session-Based Authentication&lt;/strong&gt; - After login, a session is created with a session ID. It is stored in a secure session cookie. This session is maintained and cached in memory, Redis or in a database. Browsers store cookies that are validated each time the application is accessed. It is mainly used for traditional applications, admin dashboards, and server-rendered applications.  It is harder to scale since there must be a database and caching.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Token-based authentication&lt;/strong&gt; - When a user logs in, the server returns a token to the client. So each time the client makes a request, the client must include a bearer token in the Authorization header. If not, no reply will be returned. Mostly used with REST APIs, mobile apps, and Microservices architecture(This helps the client move around different services without having to be authenticated for each service they need or access). The server does not store any client context or session data across requests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Json Web Token (JWT)&lt;/strong&gt; - This is a self-contained token contained in encoded user data and signature(signed by the server/issuer). It contains credentials and user data in one string token. It can sometimes be risky. It can be read by anyone who gets it. It is encoded but not encrypted. It has a header, payload, and signature. It is also considered fast since it will not keep on querying sessions. Mainly used for API’s, microservices, server to server connection. Tip: Setting up expiration dates can help reduce attacks and maintain stateless authentication.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;*&lt;em&gt;OAuth *&lt;/em&gt; - These are 3rd party applications being used as gateways to your applications. These are like hired security personnel. When a user accesses your platform or app, they are routed to your provider. They are then authenticated by your provider, then released and sent back to your app with permission and an access token. Example: Login with Google, Login with Apple, Login with Facebook, Auth2.0, AuthHero, Firebase, Supabase. Some companies provide services, and you just need to integrate with your service, API, or system. Mainly used by external developers, quick login and authentication setups, and third party servers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;API keys&lt;/strong&gt; - These are static keys assigned to each client application. The client needs that key to access the application or server. Servers use an architecture off ssh keys. They link and authenticate each other with these keys. API keys are good for internal services, server-to-server communication, and applications with usage limits(with rate limiting). They have no ownership or identity, so it can violate applications if stolen. They don't carry any user data or credentials to identify a client. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multi-Factor Authentication(MFA)&lt;/strong&gt; - This is an additional step to a login authentication. It is very important because it prevents phishing attacks. It block unauthorized login attempts. It uses SMS or Email codes, authenticator apps, and hardware security codes/keys. Social media platforms rely on this as 2nd Factor authentications to confirm your account has not been attacked/ hijacked or hacked. You can allow a user to log in, but for them to perform an action or access a resource, they have to pass through the MFA.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Biometric Authentication&lt;/strong&gt; - It uses the client's physical traits. This is because they are immutable and are stored as digital templates. It relies on Fingerprint ID, Face ID, Retina/Iris Scan ID, Voice ID, Palm ID, and sometimes even behavioral patterns. A client can be locked out in case of physical changes. But, with new advanced AI, they can authenticate using ML patterns or well-identified scans. It is mainly used for device protection, service access authentication, financial apps verification, server access, application. They do serve as an additional authentication process.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Bonus&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Single sign-on (SSO)&lt;/em&gt;&lt;/strong&gt; - used for multiple access services. - They let you authenticate once and access all services. Some technologies are like OpenIDConnect,  SAML(Security Assertion Markup Language), Kerberos(Used for Enterprises), and mTLS(Mutual TLS). &lt;br&gt;
&lt;strong&gt;&lt;em&gt;Passwordless Authentication&lt;/em&gt;&lt;/strong&gt; - used for secure access with cryptographic access key pairs. Very secure since no one can access the key or password, as it is not accessible. They follow a standard called FIDO2/WebAuthn. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Using more than one authentication type/Method is secure, scalable, and gives a client a very great experience. Building a secure system requires a well-designed authentication architecture. You can have more than one authentication architecture.&lt;/p&gt;

&lt;p&gt;🔗 Follow Me on Socials and Let us link Up:&lt;br&gt;
GitHub: &lt;a href="https://github.com/Moses-Morris" rel="noopener noreferrer"&gt;@mosesmorrisdev&lt;/a&gt;.&lt;br&gt;
LinkedIn: &lt;a href="https://www.linkedin.com/in/moses-njuguna-m/" rel="noopener noreferrer"&gt;Moses-Morris&lt;/a&gt;.&lt;br&gt;
Twitter: &lt;a href="https://x.com/Moses_Morrisdev" rel="noopener noreferrer"&gt;@Moses_Morrisdev&lt;/a&gt;.&lt;br&gt;
Facebook: &lt;a href="https://web.facebook.com/profile.php?id=100093033233404&amp;amp;_rdc=1&amp;amp;_rdr#" rel="noopener noreferrer"&gt;Moses Dev&lt;/a&gt;.&lt;br&gt;
portfolio : &lt;a href="https://moses-morris-portfolio.onrender.com/" rel="noopener noreferrer"&gt;mosesmorrisdev&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>security</category>
      <category>authentication</category>
    </item>
    <item>
      <title>Rate Limiting vs Throttling.</title>
      <dc:creator>Moses-Morris</dc:creator>
      <pubDate>Thu, 26 Feb 2026 07:55:09 +0000</pubDate>
      <link>https://dev.to/mosesmorris/rate-limiting-vs-throttling-4p8d</link>
      <guid>https://dev.to/mosesmorris/rate-limiting-vs-throttling-4p8d</guid>
      <description>&lt;p&gt;Ever wondered why some apps block you instantly while others just slow down?&lt;/p&gt;

&lt;p&gt;Both rate limiting and throttling control traffic, but they solve different problems.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Why are these two important for your API implementation?&lt;/li&gt;
&lt;li&gt;Which is the best concept to use while designing your API?&lt;/li&gt;
&lt;li&gt;What are the limitations?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let Us Find Out.&lt;/p&gt;

&lt;p&gt;Traffic control is not just about blocking requests. It is about protecting system health and user experience.&lt;br&gt;
Rate limiting and throttling are often confused, but they serve different architectural goals.&lt;/p&gt;

&lt;p&gt;Rate limiting defines a hard cap. Once a client exceeds the allowed number of requests within a time window, further requests are rejected. This is critical for preventing brute force attacks, scraping, and API abuse.&lt;br&gt;
Throttling, on the other hand, slows down traffic instead of cutting it off completely. It allows systems to remain responsive during peak loads while discouraging aggressive request patterns.&lt;/p&gt;

&lt;p&gt;In practice, high performing backend systems use both:&lt;br&gt;
 • Throttling to handle bursts and peak traffic.&lt;br&gt;
 • Rate limiting to block malicious behavior.&lt;/p&gt;

&lt;p&gt;In system design, a strong implementation is not just designing them, but understanding when and why you combine them.&lt;/p&gt;

&lt;p&gt;Rate limiting enforces fairness.&lt;br&gt;
Throttling ensures stability.&lt;/p&gt;

&lt;p&gt;🔗 Follow Me on Socials and Let us link Up:&lt;br&gt;
GitHub:&lt;a href="https://github.com/Moses-Morris" rel="noopener noreferrer"&gt; @mosesmorrisdev.&lt;/a&gt;&lt;br&gt;
LinkedIn: &lt;a href="https://www.linkedin.com/in/moses-njuguna-m/" rel="noopener noreferrer"&gt;Moses-Morris&lt;/a&gt;.&lt;br&gt;
Twitter: &lt;a href="https://x.com/Moses_Morrisdev" rel="noopener noreferrer"&gt;@Moses_Morrisdev&lt;/a&gt;.&lt;br&gt;
Facebook: &lt;a href="https://web.facebook.com/profile.php?id=100093033233404&amp;amp;_rdc=1&amp;amp;_rdr#" rel="noopener noreferrer"&gt;Moses Dev&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>data</category>
      <category>api</category>
    </item>
    <item>
      <title>API DOCUMENTATION BEST PRACTICES</title>
      <dc:creator>Moses-Morris</dc:creator>
      <pubDate>Wed, 28 Jan 2026 15:36:33 +0000</pubDate>
      <link>https://dev.to/mosesmorris/api-documentation-best-practices-5265</link>
      <guid>https://dev.to/mosesmorris/api-documentation-best-practices-5265</guid>
      <description>&lt;h2&gt;
  
  
  API Documentation Is Not Optional It Is the Product
&lt;/h2&gt;

&lt;p&gt;Building an API is one thing, writing documentation is another thing(The real thing). They go hand in hand.&lt;/p&gt;

&lt;p&gt;Having a tool that can not benefit its users is like building a gadget without having a technical manual on how to use it or how it works.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You can have the best and well-engineered car, but if the driver can not drive it, it is just another waste of time.&lt;br&gt;
In this AI era and tech era, there are a lot of products being released daily with different use cases. Having a well-structured and designed API documentation is the best thing you can add to your product, service, or API.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What is an API?
&lt;/h2&gt;

&lt;p&gt;An API(Application Programming Interface) is a point or interface to help developers understand how to use a product. The product can be a saas, software, or a web product. It defines how software components interact.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is documentation needed as part of design in API’s?
&lt;/h2&gt;

&lt;p&gt;Documentations help you provide services to end users without you having to intervene. They help your users find their way into using your products or services. It is more of a self-help service.&lt;br&gt;
This documentation can be for end users or for developers themselves.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best API Documentation practices.
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Use clear words and not jargon — Well-documented APIs have very clear and concise language. It makes it easier for users and developers to focus on the task at hand and not their vocabulary and grammar issues. Simple non-technical words are used for the documentation. Not everyone who visits the documentation is technical. Also, have a good professional tone.&lt;br&gt;
Note: If technical terms are needed, they are clarified and explained very well.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Follow a clear, consistent guide — A poorly structured documentation is like a book without a preface or guideline. Putting a clear guide in place saves the users and developers time. They are able to check the right place for their needs. The approach gives the documentation a good flow in order to use the documented API.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use media to communicate — Visual communication is the best thing you can do. It helps users know what they are doing visually. Coming up with images, flowcharts, graphs, and videos to explain further what the API does is very important. It also saves users a lot of time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Good UI — Before documenting an API, have a very good design with good contrast. Have colors communicate things to the users. For example, green is associated with success while red is associated with errors. This makes the user know what is important or what needs to be read or done first while using the api. It also creates a “Please Note” approach that improves the productivity of the documentation. A good UI also has accessibility options, such as for the deaf or visually impaired.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use code samples — When documenting an API, make sure your users have an idea of what you are doing or documenting, in case there is no clearer approach to the reason for documentation. This makes your users align with what they expect and what the API does. Have practical examples with requests and responses to the paths and requests made by the developers and users. This would also call for test cases with the API dummy data provided in the documentation.&lt;br&gt;
&lt;em&gt;Have potential errors and issues documented as samples.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create Interactive elements in your docs. — allow users to interact with your documentation. Allow them to use buttons and links to open things they need and close elements they don’t need. This gives them the power to have what they need and make the documentation lively.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unbloated content — Have straight to the point language and points. This helps in reviewing the use of the API, building momentum, and summarizing according to their basic needs. Also, keep the API documentation regularly up to date and reviewed each time. Technology keeps changing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Security and quality — Good API documentation is a great opportunity to make things work for your API, but no matter how good it is, it needs to be secure. The documentation should be well-maintained to prevent security exposure and maintain the quality of the API. The quality of the API can only be ensured through its correct usage. Helping users have authentication as well while using or editing the documentation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Search functionality — this seems like a lightweight practice, but it is the most important among them all. This helps users find things much faster without having to scroll endlessly to get what they want.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;A well-documented API has security, consistency, and quality. All these 3 can only be achieved by having good documentation for your API.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;These practices prevent :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;API exploits while referencing the API.&lt;/li&gt;
&lt;li&gt;Standard mistakes through reviewing and having a consistent guideline.&lt;/li&gt;
&lt;li&gt;Frustrated end users who do not like working with unclear documentation.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here are some companies to look at: — &lt;a href="https://platform.openai.com/docs/api-reference/introduction" rel="noopener noreferrer"&gt;OpenAI&lt;/a&gt;, &lt;a href="https://www.twilio.com/docs" rel="noopener noreferrer"&gt;Twilio&lt;/a&gt;, &lt;a href="https://docs.stripe.com/api" rel="noopener noreferrer"&gt;Stripe&lt;/a&gt;, &lt;a href="https://developers.google.com/workspace/docs/api/reference/rest" rel="noopener noreferrer"&gt;Google&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;Remember to design fast how your documentation will look. It gives you an open idea strategy on what your readers or users of the documentation need the most compared to others. This will help, especially if you have multiple services. It gives you the information to document first.&lt;/p&gt;

</description>
      <category>api</category>
      <category>documentation</category>
      <category>software</category>
      <category>data</category>
    </item>
    <item>
      <title>Unlocking IIFE in Python - Write It, Run It, Forget It.</title>
      <dc:creator>Moses-Morris</dc:creator>
      <pubDate>Wed, 01 Oct 2025 11:31:19 +0000</pubDate>
      <link>https://dev.to/mosesmorris/unlocking-iife-in-python-write-it-run-it-forget-it-1bc5</link>
      <guid>https://dev.to/mosesmorris/unlocking-iife-in-python-write-it-run-it-forget-it-1bc5</guid>
      <description>&lt;p&gt;&lt;strong&gt;From JavaScript to Python: Why IIFE Still Matters.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is IIFE?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;An Immediately Invoked Function Expression&lt;/em&gt;&lt;/strong&gt; (IIFE) is a function that is created and executed immediately after its declaration. It’s essentially a function you invoke right away without calling it later.&lt;/p&gt;

&lt;p&gt;When it comes to double nesting, Python may start complaining about unexpected indentations or create warnings.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Why IIFE?
&lt;/h3&gt;

&lt;p&gt;It is a &lt;strong&gt;create-once&lt;/strong&gt;, &lt;strong&gt;use-once&lt;/strong&gt; function. The result can be reused in the whole script without changing (it can be treated as a variable in your code since the result value remains constant even when accessed later).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“I first saw the IIFE concept in JavaScript. I thought it was outdated until I found it in my Python code. That’s when I knew I needed to study it. Invoked curiosity.”&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  Why is this concept an effective choice and important?
&lt;/h2&gt;

&lt;p&gt;When you want to avoid repeatedly calling a function later, you can implement this concept as a solution. Nesting multiple functions or classes can complicate your code. This might cause chaos and create bottlenecks in the future.&lt;/p&gt;

&lt;p&gt;With IIFE, you are able to create a function that you only need once. It also improves clarity, especially in asynchronous (async/await) code.&lt;/p&gt;


&lt;h2&gt;
  
  
  Is it found in other languages?
&lt;/h2&gt;

&lt;p&gt;Yes, it is. If Python is not your first language, don’t worry—the concept is also widely used in JavaScript (to prevent polluting the global scope) and PHP. &lt;br&gt;
You can also check your preferred language to see how it supports this concept.&lt;/p&gt;


&lt;h2&gt;
  
  
  Top Python IIFE Approaches.
&lt;/h2&gt;

&lt;p&gt;In Python, you can use different approaches to implement IIFE:&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;1.&lt;/strong&gt; &lt;strong&gt;Use of a decorator.&lt;/strong&gt;&lt;/u&gt;&lt;br&gt;
Decorators come with specific attributes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- @lambda _:_()
- @invoke(1, 2, 3)

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Tip&lt;/strong&gt;: You can also create your own custom decorator.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;2. Use of a lambda function.&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(lambda x: x * 2)(5)
# Output: 10

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

&lt;/div&gt;



&lt;p&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;&lt;u&gt;3. Define and immediately call a function.&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#example 1
(lambda: print("IIFE in action"))()

#example 2
def add(x,y):
    print(x+y)

add(3, 4)

#example 3
result = (lambda x,y: x+y)(2,5)
print(result) #here we don't approach like this result(2,5) because we have already set the values.



#example 4
(lambda x,y: print (x+y))(8,5)

#example 5
numbers = [4, 2, 6, 8]
squared_numbers = list(map(lambda x: x * x, numbers))
print(squared_numbers)  

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

&lt;/div&gt;



&lt;p&gt;Very effective when logging out Realtime data.&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;strong&gt;&lt;u&gt;4. Use a library.&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;&lt;br&gt;
pip install invoke-iife&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Note&lt;/strong&gt;: This library runs on Python 3.0 and higher.&lt;/p&gt;




&lt;h2&gt;
  
  
  When is this concept most effective?
&lt;/h2&gt;

&lt;p&gt;This concept is most effective when you want to execute a function just once and not reuse the code again. Sometimes we need to trick the code into thinking it is a function, but it is merely an empty definition with executions. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;For example:&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Server scripts → IIFE helps in logging responses and actions.&lt;/li&gt;
&lt;li&gt;Security logging → Logs without compromising sensitive data.&lt;/li&gt;
&lt;li&gt;High-performance sectors (banking, healthcare, critical business apps) → Helps avoid code noise, reduces vulnerabilities, and ensures reliability.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;They help you log and maintain a history of crashes or performance.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  Why Python IIFE?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Reduce naming conflicts → Maintains variable scope. &lt;/li&gt;
&lt;li&gt;Clarity → Separates main functions from one-off helpers.&lt;/li&gt;
&lt;li&gt;Encapsulation → Keeps logic scoped to a single function.&lt;/li&gt;
&lt;li&gt;Security → Protects global variables and supports anonymous variables.&lt;/li&gt;
&lt;li&gt;Break redundancy → Use once, get the result, and move on.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;⚠️ Note: Code can become complex if the concept is not well-defined.&lt;/p&gt;


&lt;h2&gt;
  
  
  How to implement the concept?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Define the values.&lt;/li&gt;
&lt;li&gt;Decide if you will use a lambda, a library, a decorator, or a direct function call.&lt;/li&gt;
&lt;li&gt;Place the function and invoke it immediately.&lt;/li&gt;
&lt;li&gt;Use the result as a variable.&lt;/li&gt;
&lt;/ol&gt;


&lt;h2&gt;
  
  
  Advanced use of the concept.
&lt;/h2&gt;

&lt;p&gt;We can define a class or function and immediately run it to test if it is functional.&lt;/p&gt;

&lt;p&gt;It’s not meant to work as a controller, middleware, or utility. Instead, it is more of a “write, test, and see for yourself” technique.&lt;br&gt;
&lt;strong&gt;Test this code.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#This is what the code does Pseudocode step by step
#1. Check your files in your directory, 
#2. Make a list.
#3. Count the number of lines.
#4. Give the summary of what you found after checking t=current directory.

import os
from datetime import datetime

class fileChecker:
    def __init__(self, path="."):
        self.path = path
        self.filedata = {}
        self.run()

    def listFiles(self):
        return [f for f in os.listdir(self.path) if f.endswith(".py") and os.path.isfile(os.path.join(self.path, f))]

    def count_lines(self, filename):
        full_path = os.path.join(self.path, filename)
        with open(full_path, 'r', encoding='utf-8') as file:
            return len(file.readlines())

    def summarize(self):
        print("\n🧾 File Summary:")
        for file, lines in self.filedata.items():
            print(f"- {file}: {lines} lines")
        print(f"\n✅ Done at {datetime.now()}\n")

    def run(self):
        print(f"📁 Inspecting: {os.path.abspath(self.path)}")
        files = self.listFiles()
        for file in files:
            self.filedata[file] = self.count_lines(file)
        self.summarize()

## IIFE-style: define &amp;amp; immediately run
fileChecker()

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

&lt;/div&gt;





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

&lt;p&gt;IIFE is a powerful but sometimes overlooked concept in Python. It helps improve scope handling, reduce redundancy, and maintain clean, secure code. Used wisely, it can simplify your work and prevent future issues in complex systems.&lt;/p&gt;

&lt;p&gt;🔗 Follow Me on Socials and Let us link Up:&lt;br&gt;
GitHub: &lt;a href="https://github.com/Moses-Morris" rel="noopener noreferrer"&gt;@mosesmorrisdev&lt;/a&gt;.&lt;br&gt;
LinkedIn: &lt;a href="https://www.linkedin.com/in/moses-njuguna-m/" rel="noopener noreferrer"&gt;Moses-Morris&lt;/a&gt;.&lt;br&gt;
Twitter:&lt;a href="https://x.com/Moses_Morrisdev" rel="noopener noreferrer"&gt; @Moses_Morrisdev&lt;/a&gt;.&lt;br&gt;
Facebook: &lt;a href="https://www.facebook.com/profile.php?id=100093033233404" rel="noopener noreferrer"&gt;Moses Dev&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>python</category>
      <category>softwaredevelopment</category>
      <category>ai</category>
      <category>iife</category>
    </item>
    <item>
      <title>Oops... I Locked Myself Out with UFW - Here's How I Fixed It</title>
      <dc:creator>Moses-Morris</dc:creator>
      <pubDate>Wed, 03 Sep 2025 10:43:28 +0000</pubDate>
      <link>https://dev.to/mosesmorris/oops-i-locked-myself-out-with-ufw-heres-how-i-fixed-it-5bk2</link>
      <guid>https://dev.to/mosesmorris/oops-i-locked-myself-out-with-ufw-heres-how-i-fixed-it-5bk2</guid>
      <description>&lt;p&gt;Does “F” in ufw stand for &lt;strong&gt;Fired&lt;/strong&gt;?&lt;br&gt;
Let us find out:&lt;/p&gt;
&lt;h2&gt;
  
  
  WHAT IS UFW?
&lt;/h2&gt;

&lt;p&gt;UFW firewall utility is used to set up rules and configurations for a server firewall. It uses IP tables to perform the setup. People primarily use it in Linux distros. &lt;br&gt;
UFW stands for &lt;strong&gt;Uncomplicated Firewall&lt;/strong&gt;&lt;br&gt;
UFW is a common type of firewall used to configure firewalls on a server. The server could be a web server, a network server, etc.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The server network can be a home network, corporate, e-commerce or business, service provision network, or any type of dedicated server. This helps you configure certain services to specific ports, regulating access and also controlling how users/clients interact with your server resources.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;You create the rules, and others follow them.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Why a UFW firewall?
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;This firewall helps you with your security.&lt;/li&gt;
&lt;li&gt;Anyone can easily set up and manage the UFW firewall because it is simple. - It uses IPv4 or IPv6 (helping in access control and traffic control).&lt;/li&gt;
&lt;li&gt;Prevent intruders and limit breaches in your server.&lt;/li&gt;
&lt;li&gt;Helps in Logging accessed and blocked operations.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  How to set up the UFW firewall.
&lt;/h2&gt;

&lt;p&gt;Some Linux distributions, like Ubuntu and CentOS, come pre-installed.&lt;br&gt;
Check if UFW is installed using this commands:&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 install ufw
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo yum install ufw // for CentOS
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also preview the basic UFW settings:&lt;br&gt;
&lt;code&gt;vi /etc/default/ufw or cat /etc/default/ufw&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Get access to more details about the UFW utility.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;





&lt;h2&gt;
  
  
  Locked out ???
&lt;/h2&gt;

&lt;p&gt;Check if you have any setup rules before running the firewall to prevent being locked out.&lt;br&gt;
Check the status rules.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw status verbose
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also show the reports and the active listening ports:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw show raw
sudo ufw show listening

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

&lt;/div&gt;



&lt;p&gt;I recently got locked out after not considering that I was using a dynamic IP from my network provider. I set up a rule to only let access from the current IP, which I checked at &lt;a href="//whatismyip.com"&gt;whatismyip.com&lt;/a&gt;. &lt;br&gt;
After a change of network and the release of my IP configurations on my local machine, I tried to connect via SSH and well…, I was in total disbelief. The system didn’t allow my newly assigned IP in. I am now an intruder. &lt;br&gt;
How I had set up my SSH connection rule:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw  limit from 192.168.1.1 to any port 22
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;LIMIT&lt;/strong&gt; - &lt;em&gt;It is used to protect from brute-force attacks (e.g., it will rate-limit repeated connections). This limits one user per server connection with the same IP.&lt;/em&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  UFW Default Policies-&amp;gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Control incoming and outgoing access requests to the server.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw default deny incoming
sudo ufw default allow outgoing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Verify that applications are functioning properly and accessing the server according to the established rules and configurations.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw app list
sudo ufw allow 'OpenSSH' //  allows incoming connections to the OpenSSH service, by name.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;These applications or services are stored in “/etc/ufw/applications.d”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Here are Some advanced UFW firewall rules and Tips.
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;It is advisable to set up from scratch by resetting the rules. This disrupts any of the rules. When done, now set up manually.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw reset
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;If you do not want to start the firewall on startup, you should always disable the rules before exiting your machine. You can easily do this by stopping the firewall process from running:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw disable
sudo systemctl stop ufw (sets and stops the service processes of ufw)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Set the rules first, then activate.&lt;/em&gt;&lt;/strong&gt; .&lt;/p&gt;



&lt;h3&gt;
  
  
  The most common example rules and commands used for UFW firewall.
&lt;/h3&gt;

&lt;p&gt;The system stores the default configurations at &lt;code&gt;/etc/default/ufw&lt;/code&gt;.&lt;br&gt;
&lt;em&gt;Here are sample rules:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;1. Allow requests like HTTP, SSH, ftp, https.&lt;/u&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 ufw allow ssh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;You can also use their daemon ports for this configuration, like for SSH.&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw allow 22
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;u&gt;2. Allow IP access or Block access.&lt;/u&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 ufw allow from 123.08.01.01 to any port  443
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;You can block access of a certain user to certain services&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw deny from 123.08.01.01 to any port  22 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Allow using subnets&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw allow from 123.08.01.01/24
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Allow an IP using a certain protocol&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw allow from 192.168.0.4 to any port 22 proto tcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;u&gt;3. Delete rules.&lt;/u&gt;&lt;br&gt;
First, list the rules.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw status numbered
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then delete the rule by indexing it with its number;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw delete rule 8   //(8 is the number of the rule.)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also delete using this approach.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw delete allow 22
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;u&gt;4. Permit Logging.&lt;/u&gt;&lt;br&gt;
Enable logging:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw logging on
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Disable Logging:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw logging off
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;u&gt;5. Setup the Rules.&lt;/u&gt;&lt;br&gt;
When done setting up,&lt;br&gt;
Start the ufw firewall.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl start ufw
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, start the services and implement the firewall rules.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw enable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fdpq1rup9x47feahe1f38.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%2Fdpq1rup9x47feahe1f38.png" alt="UFW Firewall Basic Setup" width="800" height="684"&gt;&lt;/a&gt;&lt;br&gt;
Alternatively, you can reload without starting or exiting the firewall.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw reload
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  How to fix being locked out of UFW firewall.
&lt;/h4&gt;

&lt;p&gt;This involves resetting the firewall. How do you reset a firewall if you have no access to it?&lt;br&gt;
let us look at this concept first from the server architecture.&lt;br&gt;
A server has a default port of access. That is port 22. When there is no permission to access, you can no longer ping the server or communicate with it. &lt;br&gt;
&lt;strong&gt;&lt;em&gt;Here is how to gain access depending on the various states of your server and services.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;1. &lt;strong&gt;Console access.&lt;/strong&gt;&lt;/u&gt; - Cloud service providers have a serial console, which is mostly web-based. It helps you log in to your server without SSH. They offer even server management tools for use. Look for direct access to the server.&lt;br&gt;
When logged in, update your SSH rule.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw allow ssh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also list the rules and then delete the rule number.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;2. &lt;strong&gt;Rescue mode.&lt;/strong&gt;&lt;/u&gt; -  Some cloud service providers and VPS service providers have a rescue mode that helps you boot into your OS. &lt;br&gt;
In technical terms, there is a “safe mode” in some OS platforms that helps you gain root access to the minimal setup of your OS.&lt;br&gt;
The service providers offer you safe credentials for you to SSH into your secure rescue OS.&lt;br&gt;
You then mount your real disk and access your server system as root.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir /mnt/server
mount /dev/sda1 /mnt/server 
chroot /mnt/server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;When this fails or breaks, contact your service provider with your server details. Different companies have different ways of letting you access the server as root.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;u&gt;3. &lt;strong&gt;Reboot.&lt;/strong&gt;&lt;/u&gt; - This applies to local servers where one can gain physical access.&lt;br&gt;
Reboot, uses a keyboard or a mouse to log in. When logged in, access the terminal and change the rules.&lt;/p&gt;

&lt;p&gt;When all the processes above are done, don’t forget to reload.&lt;br&gt;
Reload UFW :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw reload
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;NB:&lt;/strong&gt; &lt;em&gt;Before setting up and proceeding to activate a firewall, review your settings.&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;ufw show added
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  *&lt;em&gt;UFW TIP *&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;If you like using graphical user interfaces, you can use the GUFW (Graphical Uncomplicated Firewall). Especially if you are a beginner.&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 install gufw
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;UFW is an uncomplicated firewall interface for managing iptables rules. Serving as a gatekeeper, it is a crucial security feature in Linux. It works alongside the services being provided by our servers. It serves as an alternative to Firewalld(A dynamic firewall management tool), NFtables(supports IPv4 and IPv6 filtering), and IPTables(Mostly for network traffic with IPv4).&lt;/p&gt;



&lt;br&gt;&lt;br&gt;
🔗 Follow Me on Socials and Let us link Up:&lt;br&gt;
GitHub: &lt;a href="https://github.com/Moses-Morris" rel="noopener noreferrer"&gt;@mosesmorrisdev&lt;/a&gt;

&lt;p&gt;LinkedIn: &lt;a href="https://www.linkedin.com/in/moses-njuguna-m/" rel="noopener noreferrer"&gt;Moses-Morris&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Twitter: &lt;a href="https://x.com/Moses_Morrisdev" rel="noopener noreferrer"&gt;@Moses_Morrisdev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Facebook: &lt;a href="https://web.facebook.com/profile.php?id=100093033233404" rel="noopener noreferrer"&gt;Moses Dev&lt;/a&gt;&lt;/p&gt;

</description>
      <category>software</category>
      <category>security</category>
      <category>serverless</category>
      <category>programming</category>
    </item>
    <item>
      <title>Mastering SQL for Data Engineering: Advanced Queries, Optimization, and Data Modeling Best Practices</title>
      <dc:creator>Moses-Morris</dc:creator>
      <pubDate>Wed, 16 Apr 2025 09:50:03 +0000</pubDate>
      <link>https://dev.to/mosesmorris/mastering-sql-for-data-engineering-advanced-queries-optimization-and-data-modeling-best-practices-2p5a</link>
      <guid>https://dev.to/mosesmorris/mastering-sql-for-data-engineering-advanced-queries-optimization-and-data-modeling-best-practices-2p5a</guid>
      <description>&lt;h2&gt;
  
  
  Advanced SQL for Data Engineering
&lt;/h2&gt;

&lt;p&gt;Querying a database should be at your fingertips. This helps you perform ETL and EDA processes as a data engineer, analyst, or scientist. Data comes in various shapes,  structures, and features, but it has to be transformed to be meaningful and important to use the data. Various concepts come in handy during the Data modelling phase. A data engineer can perform CRUD operations and tailor the data according to specified needs in a certain domain. Some of these concepts of operations include understanding joins, SQL functions, SQL methods,  formulas, and many more.&lt;/p&gt;

&lt;h2&gt;
  
  
  We can not ignore how we query because...
&lt;/h2&gt;

&lt;p&gt;All these remain a starting point for best practices when performing SQL queries. However, some operations, when not optimized, cause a lot of lag(slow/poor performance), complexity, failures, inaccuracy and are vulnerable to injection attacks when using the Data. Data engineers support data analysts and automate ETL workflow for them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why do we need to master SQL for Data Engineering?
&lt;/h3&gt;

&lt;p&gt;How we query the database is very important. This will help with visualization and information delivery. We often rely on data-building tools to perform DML, DDL, TCL, and  DCL operations. This risks the understanding of what is happening and what data we need for the data engineering process. Sometimes we even rely on ORM(Object Relational Model) and DBT(Data Build Tools) tools to query.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;These are the advantages of being an SQL master.&lt;/strong&gt;    &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. &lt;u&gt;Avoiding redundancy.&lt;/u&gt;&lt;/strong&gt; - Helps avoid extracting or exploring similar data with repetitive tasks. We can query solid data and get data results that are not redundant. We often rely on indexing and creating keys(PRIMARY AND FOREIGN KEYS) that create a unique identity.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Indexing also improves Lookup speed. Formulas can be easily created to enhance good code. This prevents the repetition of SQL queries that may render your code complicated.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The use of Normalization Forms also minimizes redundancy. You can achieve this by separating a column that appears in many tables by creating a table for it.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
-- Create Index
CREATE INDEX customerID 
ON orders(customer_id);
-- Create Primary Key
CREATE TABLE customer (
    customerID INT PRIMARY KEY,
    name VARCHAR(100)
);

-- Normalization and Foreign Keys
CREATE TABLE cities (
    cityID INT PRIMARY KEY,
    city_name VARCHAR(100)
);

CREATE TABLE customers (
    customerID INT PRIMARY KEY,
    name VARCHAR(100),
    cityID INT,
    FOREIGN KEY (cityID) REFERENCES cities(cityID)
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. &lt;u&gt;Security Enhancement.&lt;/u&gt;&lt;/strong&gt; - This helps prevent tampering with the results or actual data, reducing compromised responses. Sometimes, this comes in handy with the use of VIEWS in SQL querying. This also helps prevent injections by protecting our SQL queries. We foster the idea of using sub-queries within a query. This abstracts data that is private for use by the pipeline. &lt;br&gt;
We can also create temporary result sets using the WITH clause. - This also helps in common table expressions for modular SQL. This is most efficient in ETL Pipelines&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Some cloud platforms double-check nested queries, store logs and the history of queries. They even encourage the Data engineer to partition data.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-- Create Views for Abstraction
CREATE VIEW active_users AS
SELECT customerID, name, 
FROM users
WHERE status = ‘Active’;
// You can CREATE VIEWS, MODIFY VIEWS, and DROP VIEWS

-- Use of WITH
WITH Total AS (
    SELECT customerID, SUM(amount) AS total_spent
    FROM sales
    GROUP BY customerID
)
SELECT c.name, s.total_spent
FROM customers c
JOIN Totals ON c.customerID = s.customerID
WHERE s.total_spent &amp;gt; 10000;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;3. &lt;u&gt;Optimization of Queries.&lt;/u&gt;&lt;/strong&gt; - We can optimize the SQL queries we are making, thus reducing Lag. We can also make the queries efficient and accurate with the needed results. We also use the EXPLAIN function to understand and improve the query’s execution. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The use of a specified query is also very important. Do not use "SELECT * " but "SELECT name, age, etc." the rows you need. You can also specify using the WHERE or HAVING clause in your query.&lt;br&gt;
&lt;em&gt;Please note that you can also avoid sub-queries by using RANK functions: when data modeling:&lt;/em&gt; RANK(), DENSE_RANK(), and ROW_NUMBER(). These help in pivoting and un-pivoting operations. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can also use LEAD AND LAG to create dynamic SQL functions, creating room for recursive functions.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-- Use of EXPLAIN
EXPLAIN
SELECT customerID, name, status
FROM customers
WHERE city = ‘UK’;

-- Use of HAVING
SELECT   age, date   
COUNT(*) AS customerAges
FROM customers GROUP BY date
HAVING COUNT(*) &amp;gt; 3;


-- Use of RANK()
WITH ranking AS (  
SELECT     
DENSE_RANK() OVER(ORDER BY amount DESC,date) AS rank,     
orderID,     amount   
FROM orders 
) 
SELECT * FROM ranking WHERE rank &amp;lt; 4;
//We want top 3 orders 
//We would like them to be ranked according to the amount -the higher the amount, the bigger the order. Then, check the date. - The oldest order is ranked higher than the recent order.


-- Use ROW_NUMBER() //to rank customers by amount within each order
SELECT customerID, name, OrderID, amount,
       ROW_NUMBER() OVER (PARTITION BY OrderID ORDER BY amount DESC) AS rank
FROM customers;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;Using indexing in your SQL queries also saves you a lot of optimization bottlenecks.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;4. &lt;u&gt;Data Accuracy.&lt;/u&gt;&lt;/strong&gt; - We have Precise data, but we also need meaningful data. Sometimes SQL basic queries don’t give meaningful data as responses. This is a high risk when making multiple queries in a crucial app. Apps that need to be fast and reliable with real-time information. The use of LIMIT and DISTINCT in SQL helps solve this accuracy problem and reduce latency within large-scale apps. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When working with APIS or unending datasets, you look at this as pagination or memory saving. The lesser the limit of the query load, the accurate the data query.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-- Use of LIMIT
SELECT name FROM customers_large_table
ORDER BY date DESC
LIMIT 50 OFFSET 100;
//This also helps with performance boost

-- Use of DISTINCT
SELECT DISTINCT * FROM customers_large_table
ORDER BY date DESC
LIMIT 50 OFFSET 100;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;While working with some applications, there is a use of WHERE clause with keywords like “IN”, “NOT IN”, and “BETWEEN” to show specific data queried.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;5. &lt;u&gt;Integrity of the Data.&lt;/u&gt;&lt;/strong&gt; -  This helps in maintaining the integrity of our SQL query. This preserves data integrity via logging and tracking of all SQL operations. We usually normalize data before querying it. We can also use this to remove unnecessary data from the query results.&lt;br&gt;
The use of clauses like ORDER BY and GROUP BY helps maintain the integrity of the visual representation of data.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-- Use of ORDER BY
SELECT orderID, customerID, amount, date
FROM orders
ORDER BY date ASC;

-- Use of GROUP BY
SELECT orderID, customerID, amount, date
FROM orders
ORDER BY amount DESC;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Another way of ensuring integrity in SQL is the use of the ADD CONSTRAINT clause&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-- Use of ADD CONSTRAINT

ALTER TABLE orders
ADD CONSTRAINT CustomerID
FOREIGN KEY (customerID) REFERENCES customers(customerID);
//The creation of all orders in our database requires our customer to use a Foreign key. 
//If we don’t have a customer ID, no order details are being made or created.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;When working with SQL Querying, you can GRANT and REVOKE various permissions given to the data engineer to perform on the data. This authorizes operations towards the Database.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;6. &lt;u&gt;Performance of Your Queries.&lt;/u&gt;&lt;/strong&gt; - The increase of performance by only the data needed, especially when working with large sets of data. A data engineer who has mastered this is aware of methods, set operations, and functions(aggregate functions and window functions) used for operations like limiting, distinguishing, and partitioning the SQL query responses. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The use of SQL functions also helps limit slow performance.&lt;br&gt;
&lt;em&gt;You can also look at the WITH clause functions in *&lt;/em&gt;&lt;em&gt;Optimization of queries&lt;/em&gt;*&lt;em&gt;..&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We can have a look at numeric functions like SUM, AVG, and COUNT other than writing expressions and having operations in your SQL query. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Using string, date, and time functions to work on SQL queried data: functions like CONCAT, LENGTH, SUBSTRING, REPLACE, UPPER, LOWER, DATE, TIMESTAMP, DATEADD, DATEPART, and TIME.&lt;br&gt;
**We have looked at some clause functions in the above queries.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-- Use of SUM
SELECT SUM(amount) AS total
FROM orders;

-- Use of AVG
SELECT AVG(amount)
FROM orders
WHERE customerID=1;
//Get the average of the amount where a certain customer has ordered


-- Use of AVG
SELECT Count(*)
FROM orders
WHERE customerID=1;
//Get the number of orders made by a customer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Part of performance tuning best practices, is avoiding subqueries as much as possible. Also, the use of WHERE speeds filtering compared to HAVING.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;7. &lt;u&gt;Relationships within your Queries.&lt;/u&gt;&lt;/strong&gt; - When you are mastering SQL queries, it is easy to create variable and reference points for your data project, often referred to as Entity Relationships Modelling. This helps you create relationships in your data modeling process that help you make well-informed SQL queries that increase not only performance but also security.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The use of JOINS helps structure relevant SQL query responses. They allow data to move in a flowchart kind of manner.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; -- Use of JOINS
SELECT *
FROM customers e
JOIN orders d ON e.customerID = d.customerID;
//selecting customer details of customers that have orders


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

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Remember that there are several types of JOINS, namely LEFT JOIN, RIGHT JOIN, INNER JOIN, etc.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;8. &lt;u&gt;Scalability in SQL queries implementation.&lt;/u&gt;&lt;/strong&gt; - Working with advanced SQL querying techniques saves you a lot of time. Good SQL queries create an excellent platform for growth. Large scaling apps need a good mastery of SQL. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Scalable solutions help a data engineer to focus on the most important things. This gives room for expandable SQL queries. You do not have to write other code if you are building another unit in the same system. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We design reusable SQL pipelines by modularizing logic. For efficient processing, many engines use parallelism under the hood. Additionally, we can use PARTITION BY in window functions to logically group data and compute metrics within each group.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-- Partition orders by order date
CREATE TABLE orders (
    orderID INT,
    date DATE,
    amount DECIMAL(8, 2)
)
PARTITION BY RANGE (YEAR(date)) (
    PARTITION p2024 VALUES LESS THAN (2024),
    PARTITION p2025 VALUES LESS THAN (2025)
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Bonus:&lt;/strong&gt;&lt;br&gt;
Sometimes, when working with enormous sets of data, a data engineer needs to focus on writing reusable code. Why is this? This improves the flow of data. The engineer understands this by brainstorming which data should frequently be used within the data pipeline. This also helps maintain a good SQL query flow. &lt;br&gt;
A good schema is created to prevent bottlenecks in the data pipelines created alongside various processes (EDA - Exploratory Data Analysis, ETL - Extract, Transform and Load). This schema can also have logging processes to help troubleshoot SQL failures within the application.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;What is a data model? And why do we use our SQL mastery to achieve the best results when data modeling?&lt;/em&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A data model is a visual representation of data interacting with the system. Data modelling is the process of interaction within the system. It involves defining and organizing data in a way that structures data to support the system’s functionality.&lt;br&gt;
It plays a significant role to a data engineer since it ensures accuracy, consistency, and efficiency.&lt;br&gt;
A model is developed to show relationships and how data moves across the system. UML diagrams and ER diagrams provide a visual representation of this.&lt;br&gt;
Here is an example.&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%2Fdx1ek5q08gtn6i384kf8.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%2Fdx1ek5q08gtn6i384kf8.png" alt="A UML diagram or flowchart diagram to show an entity relationship." width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
A UML diagram to show how Data interacts within a data model.&lt;/p&gt;

&lt;p&gt;A data model helps you write schema for the SQL. It lets you know which data interacts with which data and how each data flows in the system without compromising the integrity. &lt;br&gt;
&lt;strong&gt;&lt;em&gt;Data governance&lt;/em&gt;&lt;/strong&gt; is maintained at the highest level. It also gives control, regulation, authorization, and access methods that preserve data in the right state. &lt;br&gt;
Data is compromised if the source of the data is altered and hence can not be trusted. This provides unreliable insights.&lt;br&gt;
Some tools are like Microsoft Power BI,  Tableau, Qlik Sense, and Looker used for visualization, reports and interactive dashboards.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Valuable concepts and practices for data engineers that help in advanced querying, optimizing and data modeling in SQL&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here are some concepts that make building, implementing, maintaining, and deploying pipelines a more masterly way: &lt;br&gt;
These are advanced SQL practices with examples.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. &lt;u&gt;_ Creating user-defined functions(UDF)_&lt;/u&gt;&lt;/strong&gt; - these are functions added in complex pipelines. These functions are created by the user depending on the domain of expertise the user is in. &lt;br&gt;
The data engineer documents the function and then uses it to make queries. They define the business logic and break complex queries into understandable tasks.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`-- Create reusable functions
CREATE FUNCTION calculateTax(amount DECIMAL)
RETURNS DECIMAL
BEGIN
  RETURN amount * 0.16;
END;`.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. &lt;u&gt;&lt;em&gt;Creating Logging and Auditing for Queries&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt; - some queries create permanent changes to the database. Having a way to log or store action history is important. &lt;br&gt;
This helps the data engineer for trailing mistakes or progress made while querying. This helps in compliance in different domain expertise.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`-- Create a logging table
CREATE TABLE customerLog (
    logID INT AUTO_INCREMENT PRIMARY KEY,
    customerID INT,
    action VARCHAR(50),
    timestamp DATETIME DEFAULT CURRENT_TIMESTAMP
    FOREIGN KEY (customerID) REFERENCES customers(customerID);
);
//On the Database end, you can also create event triggers on the Database used`.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. &lt;u&gt;&lt;em&gt;Transaction Handling&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt; - A transaction is a query process that has to be completed to proceed to make changes within the SQL operation. These are Transaction Isolation Levels&lt;br&gt;
&lt;em&gt;A COMMIT&lt;/em&gt; marks a successful end of a transaction, saving all changes made during the transaction permanently to the database.&lt;br&gt;&lt;br&gt;
&lt;em&gt;A ROLLBACK&lt;/em&gt; cancels the transaction and undoes all changes made after the transaction began or up to a specified SAVEPOINT.&lt;br&gt;&lt;br&gt;
&lt;em&gt;A BEGIN (or START TRANSACTION)&lt;/em&gt; indicates the beginning of a transaction block, allowing you to group multiple SQL statements as one atomic operation.&lt;br&gt;&lt;br&gt;
&lt;em&gt;A SAVEPOINT&lt;/em&gt; creates a labeled point within a transaction to which you can later roll back without affecting the entire transaction. Ensures Atomicity and is used for critical data operations.&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;This can be used as a trick to only allow a complete transaction to make changes. This is where if an error occurs while a Query is running, the transaction is considered incomplete, hence a rollback (ROLLBACK). If no error occurs, the query can be completed and committed(COMMIT).
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-- Create a Process that ensures ATOMICITY and Rollback safety.
BEGIN;
UPDATE orders SET amount = amount - 100 WHERE customerID = 1;
SAVEPOINT service_amount;
UPDATE orders SET  amount = amount + 100 WHERE customerID = 7;
-- Suppose something goes wrong with the second update
ROLLBACK TO service_amount;
-- Only the first update remains
COMMIT;

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

&lt;/div&gt;



&lt;p&gt;These concepts help the data engineer do data wrangling, reporting, and analyzing dashboards effectively and efficiently while maintaining quality data pipelines.&lt;/p&gt;

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

&lt;p&gt;Mastering SQL is important to a data engineer. These are just a few concepts that will get you running as a master in SQL. In this data-driven world, this is to make sure you harness the superpower of being an SQL guru when working with data in your day-to-day operations. It makes your work more efficient, secure, and impactful. You can solve complex querying problems by having the above as a cheat sheet.&lt;/p&gt;

&lt;p&gt;Link Up For More:&lt;br&gt;
&lt;a href="https://x.com/Moses_Morrisdev" rel="noopener noreferrer"&gt;twitter/x.&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/moses-njuguna-m/" rel="noopener noreferrer"&gt;linkedIn.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;😊I would be glad if you Dropped a comment!!!&lt;/p&gt;

</description>
      <category>eventdriven</category>
      <category>sql</category>
      <category>dataengineering</category>
      <category>etl</category>
    </item>
    <item>
      <title>What is a Dry Run Test ?</title>
      <dc:creator>Moses-Morris</dc:creator>
      <pubDate>Thu, 14 Mar 2024 07:41:07 +0000</pubDate>
      <link>https://dev.to/mosesmorris/what-is-a-dry-run-test--3d82</link>
      <guid>https://dev.to/mosesmorris/what-is-a-dry-run-test--3d82</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;What is a Dry Run Test in Software Engineering?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A DRY run test helps us know if the software developed fulfills the intended purpose and if lines of code perform the intended task before code deployment.&lt;/p&gt;

&lt;p&gt;It is in the testing phase of SDLC(A framework or process that helps to develop high quality software.).&lt;/p&gt;

&lt;p&gt;Dry run testing is part of a series of tests, here are other tests done while programming and developing software: walkthrough testing, white box testing, integration testing, alpha testing, blackbox testing, beta testing, stub testing, resources testing, unit testing, smoke testing, acceptance testing, and other testing procedures.&lt;br&gt;
These tests save you the risk of malfunction of the software before, after, and during deployment.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Dry run test is like reading aloud your code to spot mistakes and bugs encountered when writing the code. In other niches other than Software Engineering, They refer to it as practice run tests.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Why it is called a DRY run test ?&lt;/strong&gt;&lt;br&gt;
According to reports, the term dry run originated among US fire departments. The firefighters would carry out fire brigade dispatches without pumping water for practice. A wet run was referred to as one that had real fire and water. The term dry run has since spread to other areas including military, aviation, and other fields. It is used to describe a rehearsal or practice without the real consequences of the event. Dry runs are an important part of preparing for the real thing.&lt;br&gt;
The dry run test helps developers implement features and updates when running. This procedure helps us trace and follow up on values and variables in our code. Reduces repetition and helps us maintain a good control flow of our code and software process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why do we need it? Benefits of conducting the Dry run Test.&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;To avoid repetition. - Helps implement the DRY principle(Don't repeat yourself).&lt;/li&gt;
&lt;li&gt;Avoid potential bugs during production. - Unprecedented code behaviors.&lt;/li&gt;
&lt;li&gt;Review code quality and performance. - This helps increase the quality of the software.&lt;/li&gt;
&lt;li&gt;Pave way for more product testing. - It is important to initially direct the coder/programmer to productive testing.&lt;/li&gt;
&lt;li&gt;Remove unnecessary code breakages. - The test helps counter bottlenecks that may arise during code execution.&lt;/li&gt;
&lt;li&gt;Ensure Functionality - This test helps in discovering underlying issues before selling or deploying the software. This is crucial with critically important systems. This acts as a rehearsal.&lt;/li&gt;
&lt;li&gt;Save time - This test mitigates potential errors and modifications in the future.&lt;/li&gt;
&lt;li&gt;Uncover potential errors - Errors that may be imminent - logical errors, syntax errors, conditional errors, loop errors, typographical errors, etc.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;Sometimes the developer can print the code to check on logic, and execution errors that may arise during the execution of code or deployment of the software. It helps validate logic and syntax.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Dry Run Test Examples in Software Engineering&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Rsync - This is a utility for transferring and synchronizing data between networked computers or storage drives. It has a dry-run option.&lt;/li&gt;
&lt;li&gt;Algorithm Scan- this is a mental walk-through of code and algorithm to confirm if it is logically valid.&lt;/li&gt;
&lt;/ol&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%2Fv5f98hpsf04glp49qycl.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%2Fv5f98hpsf04glp49qycl.jpg" alt="performing a dry run test image" width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;How to perform a dry run test.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here are ways way to perform a dry run test,&lt;br&gt;
&lt;em&gt;&lt;strong&gt;Here are some tips to make it successful.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Read the code aloud - go line by line commenting and write the pseudo-code.&lt;/li&gt;
&lt;li&gt;Use trace tables - check the value of a variable from line to line and record instances when it changes.&lt;/li&gt;
&lt;li&gt;Use friends or teams to debug and dry run.&lt;/li&gt;
&lt;li&gt;Logging out all the values and issues. You can print out the errors.&lt;/li&gt;
&lt;li&gt;Use comments and descriptions on expressions and functions.&lt;/li&gt;
&lt;li&gt;Use a test case to simulate possible outcomes by using dummy data.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Let's use a Trace Table:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Here is a sample code.&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%2Fr9hh8f5us681vwac4lty.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%2Fr9hh8f5us681vwac4lty.png" alt="Dry Run Test Sample Code" width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Here is the Trace table tracking a variable and showcasing the right expected outcome.&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%2F3tjwbqbtlek3bw3eg177.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%2F3tjwbqbtlek3bw3eg177.png" alt="dry run test trace table" width="800" height="363"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can verify/Validate the variables. If there was an error, you could have easily spotted the location the error occurred by printing out the variable after each modification.&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%2Fccv4ylg8cy2m26hh4gbz.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%2Fccv4ylg8cy2m26hh4gbz.png" alt="Trace table verification and validation" width="800" height="74"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can easily track any modifications and changes the variable undergoes. This means that our code has passed the dry run test. &lt;br&gt;
In large projects, developers develop a framework and system that helps them test the project as a whole.&lt;br&gt;
Programming languages have their testing frameworks and systems for efficiency.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where and when you should consider implementing a dry run testing:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;When performing version control operations&lt;/strong&gt; - you can always use &lt;u&gt;git diff&lt;/u&gt; before merging to highlight any conflicts that may arise while merging.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;When Using Configuration Management and Build Tools&lt;/strong&gt; -  This helps you to avoid software crashing and malfunctions. Some CGM tools offer testing or simulating spaces to view how the deployment will look like.
Most build tools offer a deployment stage for dry running a test for the application before production. They have a dry run mode or plugins that help you do the dry run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;When Doing database migrations&lt;/strong&gt; -  This helps you know any occurrences that might be made before making any crucial database changes.
&lt;em&gt;NB:&lt;/em&gt; in the Django Rest framework, there is a  &lt;u&gt;makemigrations&lt;/u&gt; command that highlights possible changes made, and the set query made to the database.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python manage.py makemigrations
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Dry run testing Limitations.&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It is not easy to implement for large-scale projects. &lt;/li&gt;
&lt;li&gt;It is time-consuming since the tester has to review line-by-line tracking of a variable.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
The dry-run testing methodology of testing is very efficient. It ensures developers become effective in understanding the logic behind the product. It helps answer the question, "Is the product doing the intended task or solving the intended purpose?"&lt;/p&gt;

&lt;p&gt;It makes zero-day vulnerabilities a new vocabulary when developing and deploying software products. Every single developer should consider using a dry run test to increase productivity and prepare them for the next phases of testing. &lt;/p&gt;

&lt;p&gt;&lt;u&gt;Link Up For More:&lt;/u&gt;&lt;br&gt;
&lt;a href="https://twitter.com/Moses_Morrisdev" rel="noopener noreferrer"&gt;twitter/x&lt;/a&gt;.&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/moses-njuguna-m/" rel="noopener noreferrer"&gt;linkedIn&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;😊I would be glad if you Dropped a comment!!! &lt;/p&gt;

</description>
      <category>python</category>
      <category>testing</category>
      <category>software</category>
      <category>code</category>
    </item>
    <item>
      <title>Unveiling the Power of CodiumAI's PR-Agent: A Comprehensive Comparison with GitHub Copilot.</title>
      <dc:creator>Moses-Morris</dc:creator>
      <pubDate>Wed, 20 Dec 2023 15:00:31 +0000</pubDate>
      <link>https://dev.to/mosesmorris/unveiling-the-power-of-codiumais-pr-agent-a-comprehensive-comparison-with-github-copilot-4eo</link>
      <guid>https://dev.to/mosesmorris/unveiling-the-power-of-codiumais-pr-agent-a-comprehensive-comparison-with-github-copilot-4eo</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;The AI Revolution&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;AI now looks like a movement and is rapidly influencing our daily ways of working. The wave is increasing productivity in every place and niche it sets foot on. Having good skills and being productive is being boosted by what AI can do.&lt;/p&gt;

&lt;p&gt;When looking at software development, a lot has evolved and we can now integrate some of the most basic and advanced features into our software development environments. Life couldn’t get any easier. AI helps software developers write code more efficiently.&lt;/p&gt;

&lt;p&gt;Looking at the benefits of AI, I would like to introduce you to my best AI Detective(“Detective”: from the phrase, Being the detective in a crime movie where you are also the murderer.)&lt;br&gt;
Codium AI is a great companion when it comes to coding. It has immense features that improve software quality and production.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;The Features of Codium AI.&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Codium Chat.&lt;/li&gt;
&lt;li&gt;PR bot.(PR-Agent)&lt;/li&gt;
&lt;li&gt;The testing suite.&lt;/li&gt;
&lt;li&gt;Integrity agents.&lt;/li&gt;
&lt;li&gt;Codium Autocomplete.&lt;/li&gt;
&lt;li&gt;Alpha Coding - future release.&lt;/li&gt;
&lt;li&gt;Codium AI API - future release.&lt;/li&gt;
&lt;li&gt;Review other products here: &lt;a href="https://www.codium.ai/" rel="noopener noreferrer"&gt;CodiumAi Products&lt;/a&gt;.
The company provides many features and products. The PR-Agent of CodiumAI increases code quality and streamlines the development process.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Introduction to Codium AI PR-Agent.&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;When looking at the features of Codium AI, focusing on productivity and Pull Requests, we review the best tool as released for Pull Request Assistance.&lt;/p&gt;

&lt;p&gt;The tool is CodiumAI PR-Agent. Codium AI PR-Agent helps with analysis, reviews, commit messages, descriptions, and many more when handling pull requests. &lt;br&gt;
It increases productivity and helps developers write more efficient code without leaving their Git environment, platforms, and IDE environments for software development.&lt;br&gt;
One amazing aspect of CodiumAI PR-Agent is its open-source. It has a developers community that reviews and updates its features as they advance.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Why use a PR Agent for a Pull Request?&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;It helps you generate Pull Request Descriptions - these are commit messages and titles.&lt;/li&gt;
&lt;li&gt;It helps Generate Pull Request Reviews and gives Some Suggestions - it helps by suggesting changes and refining git diff for maximum performance.&lt;/li&gt;
&lt;li&gt;It helps generate changelogs and update documents. - It simplifies updating and writing descriptions.&lt;/li&gt;
&lt;li&gt;It helps enhance security - by suggesting security measures in the code while bug fixing.&lt;/li&gt;
&lt;li&gt;Helps increase performance - helps the developer create efficient code by suggesting best practices.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Codium AI PR-Agent helps in increasing productivity code quality and performance on an overall basis. The tool is quite a saver when mitigating pull request approval processes. This tool hugely benefits developers.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Platforms that can be Used with CodiumAI PR-Agent.&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;CodiumAI PR-Agent supports over 70 programming languages.&lt;br&gt;
Codium has extensions that can be used with multiple IDEs like VS Code, Jetbrains, Etc.&lt;br&gt;
CodiumAI PR-Agent can be used on many platforms and IDEs. This is because it is open source thus giving access to contributions from a wide range of developers using various tools and programming languages.&lt;br&gt;
Some of the platforms are Github, GitLab, Beanstalk, Bitbucket, Mercurial, etc. &lt;br&gt;
Review your platform or IDE here: &lt;a href="https://www.codium.ai/install/" rel="noopener noreferrer"&gt;Integrations&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Features of the CodiumAI PR-Agent.&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;/describe&lt;/strong&gt; - the command or tool scans the Pull Request Changes and automatically generates the description which includes the type, summary labels, title, and walkthrough.
More features can be viewed here about the tool.&lt;a href="https://github.com/Codium-ai/pr-agent/blob/main/docs/DESCRIBE.md" rel="noopener noreferrer"&gt;More about /describe&lt;/a&gt;.
&amp;gt; Can be invoked manually by commenting &lt;code&gt;@CodiumAI-Agent /describe&lt;/code&gt;.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;/review&lt;/strong&gt; - the tool scans the Pull Request Code changes and automatically generates a Pull Request Review. More features like “/review -i” can be viewed here about the tool &lt;a href="https://github.com/Codium-ai/pr-agent/blob/main/docs/REVIEW.md" rel="noopener noreferrer"&gt;more about review&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;/improve&lt;/strong&gt; - the tool scans the Pull Request Changes and automatically generates committable suggestions for improving the PR Code.
More features like “/improve --extended” can be viewed here about the tool &lt;a href="https://github.com/Codium-ai/pr-agent/blob/main/docs/IMPROVE.md" rel="noopener noreferrer"&gt;extended /improve&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;/ask&lt;/strong&gt; - this tool or feature allows developers to ask questions about Pull Request code changes. It is triggered by typing “/ask “...put your question here…”.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;/similar_issue&lt;/strong&gt; - this tool checks the most similar issues of the Pull Requests and matches them to the current issue. It scans for earlier or previous issues.
Here is a more detailed overview of the tool: &lt;a href="https://github.com/Codium-ai/pr-agent/blob/main/docs/SIMILAR_ISSUE.md" rel="noopener noreferrer"&gt;More about /Similar_issue&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;/update_changelog&lt;/strong&gt; - this tool automatically updates the CHANGELOG.md file with the Pull Request changes. It automatically detects and makes the changes. The tool can also be configured with various options. Here is a detailed overview. - &lt;a href="https://github.com/Codium-ai/pr-agent/blob/main/docs/UPDATE_CHANGELOG.md" rel="noopener noreferrer"&gt;How to configure&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;/add_docs&lt;/strong&gt; - this tool scans the code changes in the Pull Requests and automatically suggests documentation for undocumented changes in the code. It checks code components. It is an additional documentation tool.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;/generate_labels&lt;/strong&gt; - the tool scans for Pull Request code changes and it automatically suggests labels that match Pull Request changes.
The tool is configured before use. You can configure it via the CLI (command line interface), repository configuration file (pr_agent.toml), and manual handling on the repository page.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;These features provide feedback to the developer. They review PR, suggest code, answer questions, and describe pull requests. Most of the features can be automatically triggered using GitHub actions. Some tools require configuration for custom benefits and results.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Major achievements when using CodiumAI PR-Agent Features and tools.&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Helps write secure code.&lt;/li&gt;
&lt;li&gt;Helps write efficient and quality code.&lt;/li&gt;
&lt;li&gt;Increase productivity and consistency.&lt;/li&gt;
&lt;li&gt;Helps write better code.&lt;/li&gt;
&lt;li&gt;Save time by avoiding manual work with PRs.&lt;/li&gt;
&lt;li&gt;It fixes problems and bugs in your code.&lt;/li&gt;
&lt;li&gt;Helps you get effective feedback.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Comparison between Github Copilot for Pull requests and Codium PR Agent.&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;What makes Codium the best choice when it comes to Pull Request Assistance in comparison to Tabnine, Replit, GitHub Copilot, and many more... &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Github Copilot&lt;/strong&gt; is a pull request reviewer AI tool. It was developed on GitHub. It has had a ton of limitations hence the introduction and creation of Codium AI's PR-Agent. Let us compare the benefits of using Codium AI PR_Agent over GitHub’s copilot.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Price.&lt;/strong&gt;&lt;br&gt;
Github Copilot is not a free AI tool. Subscription fees are required to continue using it. It does not have a free mode. &lt;br&gt;
An individual developer can use the free mode of Codium AI PR Agent. One can upgrade when working with teams. They also provide a free trial when working with teams which downgrades when not added to a team for use.&lt;br&gt;
Codium AI PR-Agent currently imposes no restrictions on the number of calls/tokens or repositories accessible by their users.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;IDE support.&lt;/strong&gt;&lt;br&gt;
Github's Copilot version has limited support for IDEs. This limits developers from accessing the AI tool without specified IDEs.&lt;br&gt;
Codium AI PR Agent has more than 10 supported IDE’s. You can review supported extensions and integrations here - &lt;a href="https://www.codium.ai/install/" rel="noopener noreferrer"&gt;Supported Integrations&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Functionality.&lt;/strong&gt;&lt;br&gt;
In addition to unlimited and multiline commands, CodiumAI PR-Agent supports more than 8 commands. This is quite safe for developers because they can describe the issue and task at hand without being limited. Developers actively chat and search on the go without limitations.&lt;br&gt;
When it comes to chat support, Github Copilot has limited capabilities. It relies on only a single command which limits flexibility.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;They both perform single and multiline code generation.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Platform support.&lt;/strong&gt;&lt;br&gt;
Codium AI PR-Agent is open source and built for many version control platforms/systems. This allows developers to easily navigate and comprehensively learn how to use the PR Agent without worrying about the platform of use.&lt;br&gt;
GitHub copilot for pull requests is built only for Git Hub. This limits developers' freedom to use the tool on other platforms. It can only be used on the Git platform.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Supported Languages.&lt;/strong&gt;&lt;br&gt;
Github's Copilot only supports a few languages according to the last release.&lt;br&gt;
Codium AI PR-Agent has support for almost all programming languages relevant today. The number of languages supported by Codium's AI PR-Agent is more than 70 programming languages.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This is contributed to due to it being open source. Developers can customize it to their specific needs.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Suggestions and latency.&lt;/strong&gt;&lt;br&gt;
Developers who have been using CodiumAI PR-Agent have been applauding the responses given by the PR-agent models. The company relies on public models for training its AI. This has improved the responses and help given by the PR Agent when reviewing Pull requests.&lt;br&gt;
This showcases the latency to be an average of 9/10. This is superb 😄 .&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Markers and features&lt;/strong&gt;&lt;br&gt;
The Github Co-pilot relies on 4 markers or features to provide Pull Request Assistance. It has 4 markers : copilot: all, summary, walkthrough, and poem.&lt;br&gt;
CodiumAI PR-Agent has more than 4 tools/features. The features list is documented above in the article. Refer to: Features of the CodiumAI PR-Agent.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;To advance and learn more about the benefits I would urge you to join the Discord community for more benefits and learning. &lt;a href="https://discord.com/invite/SgSxuQ65GF" rel="noopener noreferrer"&gt;Join Discord channel&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;How to use it and increase your productivity?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;I will use GitHub for the demo on how to increase productivity.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Installation guides:&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You can find installation guides on several ways to install the Codium AI PR-Agent here: &lt;a href="https://github.com/Codium-ai/pr-agent/blob/main/INSTALL.md" rel="noopener noreferrer"&gt;Install CodiumAI PR-Agent&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Choose the most preferred way according to your Project Needs&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I preferred installing through GitHub Actions so that I could run it via GitHub Actions.&lt;a href="https://github.com/Codium-ai/pr-agent/blob/main/INSTALL.md#run-as-a-github-action" rel="noopener noreferrer"&gt;Install and Run Via Github Actions&lt;/a&gt;. &lt;br&gt;
You can also install the Git Plugin From Here :&lt;a href="https://www.codium.ai/products/git-plugin/" rel="noopener noreferrer"&gt;Git Plugin&lt;/a&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%2F7b2u72ooine1xy2xajfk.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%2F7b2u72ooine1xy2xajfk.png" alt="PR-Agent For VS Code" width="800" height="406"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When working with pull requests, you might not have all the time to keep on reviewing all the code. This is when the practicality of CodiumAI PR-Agent as an AI assistant chips in. It will help you write and review given Pull Requests. Some features extend their functionality towards productivity and streamline the development process…&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;em&gt;Let us preview some commands in use.&lt;/em&gt;
&lt;/h4&gt;

&lt;p&gt;I am working on a team project. There are multiple pull request codes. They have to be reviewed each time.&lt;br&gt;
Let us review each pull request. -&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/review&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;We do so by commenting on the pull request: &lt;em&gt;&lt;u&gt;&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;@CodiumAI-Agent /review&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 &lt;/u&gt;&lt;/em&gt; - This is to review the changes to the pull request code. We see the added files and we can give feedback on the same. Here is an example.&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%2Fqayityghrhwiekvw37hz.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%2Fqayityghrhwiekvw37hz.png" alt="Github /review Command by PR-Agent" width="800" height="290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The request for review follows up with a response to the review requested. A complete analysis of the pull request code review is given. It contains descriptions, summaries, and suggestions for changes to the code.&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%2Fd3ius296f9owrmaoyze1.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%2Fd3ius296f9owrmaoyze1.png" alt="Code Analysis by CodiumAI's PR-Agent" width="800" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;A lot of information is given back to the developer.&lt;br&gt;
I can review the Code while focusing on the productivity of the tool and there is a lot that this Pull Request Assistant can do. There are a lot of benefits and a lot that can be done and accomplished with this tool.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;Having an assistant who is always there to engage with your daily software development jobs is a great win. CodiumAI PR-Agent serves as the best AI Pull Request Assistant for increasing development productivity. There are no limits when it comes to CodiumAI's PR Agent. &lt;br&gt;
Github Copilot is looking forward to providing more tools in their Beta by requesting people to nominate organizations and enterprises for the Github Copilot Enterprise waitlist form.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Leveraging the power of AI Pull Request Assistance brings productivity and streamlines the software development process.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can learn more about CodiumAI PR-Agent here: &lt;a href="https://github.com/Codium-ai/pr-agent" rel="noopener noreferrer"&gt;Learn More&lt;/a&gt;.&lt;br&gt;
you can also view the website here: &lt;a href="https://www.codium.ai/products/ide-plugin/" rel="noopener noreferrer"&gt;CodiumAI PR-Agent&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>testing</category>
      <category>codium</category>
      <category>ai</category>
    </item>
    <item>
      <title>Exploratory Data Analysis using Data Visualization Techniques.</title>
      <dc:creator>Moses-Morris</dc:creator>
      <pubDate>Mon, 09 Oct 2023 14:48:04 +0000</pubDate>
      <link>https://dev.to/mosesmorris/exploratory-data-analysis-using-data-visualization-techniques-eoi</link>
      <guid>https://dev.to/mosesmorris/exploratory-data-analysis-using-data-visualization-techniques-eoi</guid>
      <description>&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%2Fc45va9yax9e1bmkiu56b.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%2Fc45va9yax9e1bmkiu56b.jpg" alt="Exploring Data Image" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is EDA?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Exploratory Data Analysis is the process of analyzing and investigating a data set to discover patterns, characteristics, trends, anomalies, and relationships. This critical process relies on data visualization methods to accomplish its roles. &lt;br&gt;
The process involves data cleaning, data exploration, feature engineering, and data visualization. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Why do We need Exploratory Data Analysis?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;A Variable&lt;/strong&gt;&lt;/u&gt; - a characteristic that can be measured and that can assume different values. Height, age, income, province, etc.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Missing values treatment&lt;/strong&gt; - This is a method of analysis that involves identifying and treating missing values and null values in a dataset. The approach involves deleting some rows and columns and implementing filling techniques to insert data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Outlier Treatment&lt;/strong&gt; - Treatment of outliers involves handling extreme values or values above or below the average. It is possible to get poor results if you have outliers. The majority of outliers are removed because they could be the result of an error.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Variable Transformation&lt;/strong&gt; - Data is transformed using variable transformations to ensure their normality, linearity, and stability. It involves functions to create data usable by changing the state or the form of the data variables. The data variables are either numerical or categorical.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feature Engineering&lt;/strong&gt; - This is a method of analysis that involves creating new features based on existing ones. It involves identifying and extracting features from a dataset.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Correlation Analysis&lt;/strong&gt; - This method of analysis involves discovering data variable patterns and their magnitude. This drives the actions of that relationship between the variables.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Types of EDA:&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Univariate EDA - Involves looking at a single variable at a time.&lt;/li&gt;
&lt;li&gt;Bivariate EDA - involves looking at two variables at a time.&lt;/li&gt;
&lt;li&gt;Multivariate EDA - Involves looking at three or more variables at a time.&lt;/li&gt;
&lt;/ol&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%2F00u2y18rnbfag0ezkcuw.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%2F00u2y18rnbfag0ezkcuw.jpg" alt="Data Visualization using Graphs, charts, etc" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is Data Visualization?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This is the representation of data using a graphical interface. This involves the use of charts, graphs, plots, infographics, animations, and many other visual techniques.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Why do we need data visualization?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The need for data visualization helps us discover trends, features, data point patterns, and more outlying business parameters.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Data Visualization Techniques:&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Charts&lt;/strong&gt; - line charts, Pie charts, Column charts, Bar charts, Fusion charts, high charts, pictogram charts, histogram charts, waterfall charts, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plots&lt;/strong&gt; - Line plots, Bar plots, Box and whisker plots, scatter plots, bubble plots, violin plots, distribution plots, cartograms, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maps&lt;/strong&gt; - Heat maps, Treemaps, Choropleth Map, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Diagrams and Matrices&lt;/strong&gt; - correlation matrix, network diagram, word cloud, Choropleth Map, bullet graphs, highlight table, timeline, etc&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;These techniques use various tools and technologies to implement visualizations. These tools depend on the domain being used and have different uses and purposes. E.g. Tableau.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How to explore data using visualization techniques.&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Let's now explore our data. We mostly use ...&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Charts&lt;/strong&gt; - for&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;&lt;strong&gt;Comparison&lt;/strong&gt;&lt;/em&gt; - comparing variables and values in a dataset.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;&lt;strong&gt;Distributions&lt;/strong&gt;&lt;/em&gt; - checking the distribution of variables in a dataset.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;&lt;strong&gt;Proportions&lt;/strong&gt;&lt;/em&gt; - checking the proportionality of the distribution of variables in a dataset.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Plots&lt;/strong&gt; - for&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;&lt;strong&gt;Trends&lt;/strong&gt;&lt;/em&gt; - Viewing upcoming behaviors in the variables in a dataset.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;&lt;strong&gt;Relationships&lt;/strong&gt;&lt;/em&gt; - View the correlations between different variables in a dataset.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;&lt;strong&gt;Outliers&lt;/strong&gt;&lt;/em&gt; - checks for possible variables that are not in range or are above the expected range.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Maps&lt;/strong&gt; - for&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;&lt;strong&gt;Patterns&lt;/strong&gt;&lt;/em&gt; - used to identify special and regular patterns in the dataset variables.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;&lt;strong&gt;Structures&lt;/strong&gt;&lt;/em&gt; - they identify the hierarchy of data and the composition of different variables in a dataset.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;&lt;strong&gt;Intensity&lt;/strong&gt;&lt;/em&gt; - Helps identify the extremeness of variables in a dataset.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;&lt;strong&gt;Density&lt;/strong&gt;&lt;/em&gt; - helps identify the amount of concentration of values and variables in a dataset.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Diagrams and Matrices&lt;/strong&gt; -  for&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;&lt;strong&gt;Connections&lt;/strong&gt;&lt;/em&gt; - diagrams show entity relations between variables in a dataset.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;&lt;strong&gt;Summaries&lt;/strong&gt;&lt;/em&gt; - they showcase summaries of data in a dataset. Help identify key performance indicators and quick insights into the data.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;&lt;strong&gt;Comparison&lt;/strong&gt;&lt;/em&gt; - using keys to identify differences and compare variables in a dataset.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How to explore data using visualization techniques.&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Understand the Data&lt;/em&gt;&lt;/strong&gt; - know if your data is numerical, categorical, or timely data. This prepares you for the transformation of the data into the appropriate data type and range of data values.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Identify the problem or question&lt;/em&gt;&lt;/strong&gt; - Know the purpose and expectations of your data and the idea and hypothesis of the EDA.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Choose the most appropriate visualization techniques to implement&lt;/em&gt;&lt;/strong&gt; - Having known and understood the data, you can identify the best techniques to use for visualization. You will understand if the data is numerical, categorical, time-based, or geographical.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Visualize the Data&lt;/em&gt;&lt;/strong&gt; - Use the appropriate tools to visualize your data. Like matplotlib, tableau, seaborn, plotly, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Interpret the data&lt;/em&gt;&lt;/strong&gt; - look for patterns, features, trends, outliers, correlations, and relationships to understand.
At this point, you can reiterate and refine the data if expectations are unclear and errors are spotted. Feedback generated drives if the process needs to be refined and re-iteration is needed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Communication of findings&lt;/em&gt;&lt;/strong&gt; - present and describe insights gained. Use visuals and reports to communicate findings.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;Different exploratory data analysis methods require different Data Visualization techniques. There needs to be consideration of the domain and purpose.&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;p&gt;EDA involves various processes to prepare and craft datasets used by models. If EDA fails or is not well crafted, the data visualization techniques used also fail to discover patterns and trends in the datasets. These two processes are dependable on each other. Being an expert in this field depends on which tools to use for certain domain knowledge.&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>analytics</category>
      <category>data</category>
      <category>visual</category>
    </item>
    <item>
      <title>Data Science for Beginners: 2023 - 2024 Complete Roadmap</title>
      <dc:creator>Moses-Morris</dc:creator>
      <pubDate>Sun, 01 Oct 2023 19:51:56 +0000</pubDate>
      <link>https://dev.to/mosesmorris/data-science-for-beginners-2023-2024-complete-roadmap-16mb</link>
      <guid>https://dev.to/mosesmorris/data-science-for-beginners-2023-2024-complete-roadmap-16mb</guid>
      <description>&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%2F83lctvyr5jvv3252niwb.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%2F83lctvyr5jvv3252niwb.jpg" alt="Data Science Roadmap" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is Data Science?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Data Science is the art of intelligence that involves extracting meaningful information to gain insights. The process consists of gathering, storing, analyzing, and plotting data. &lt;/p&gt;

&lt;p&gt;&lt;u&gt;Who are Data Scientists?&lt;/u&gt;  These are data experts who perform and apply statistics, machine learning, and analytical approaches to answer critical business questions. Data scientists utilize various techniques, such as visualization, to interpret and present their findings and results. They help forecast the future based on the patterns and findings that have been discovered. &lt;/p&gt;

&lt;h3&gt;
  
  
  Other Different Roles in Data.
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Data Analysis&lt;/u&gt;&lt;/strong&gt; - This is a method of querying, processing, providing reports, summarizing, and visualizing data to derive information to influence decision-making. &lt;br&gt;
&lt;strong&gt;Data analysts&lt;/strong&gt; understand cleaning, visualizing, and exploratory data analysis which helps companies or organizations make informed and better decisions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Data Engineering&lt;/u&gt;&lt;/strong&gt; - This is an intelligence that involves designing systems and building systems used for storing, analyzing, and collecting data. &lt;br&gt;
To collect and organize data, &lt;strong&gt;data engineers&lt;/strong&gt; are responsible for constructing and operating data pipelines. It is their responsibility to make sure that quality data is accessible and available. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Data Science Pillars:&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Statistics&lt;/strong&gt; - This is a type of math that teaches how to collect and analyze data to answer critical questions to influence decisions. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Domain knowledge&lt;/strong&gt; - This is expertise in the business problem. This helps in collaboration and prowess in navigation in the field of research and in that industry. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Computer Science&lt;/strong&gt; - This entails knowledge of how computers work. As a result, it is also necessary to understand programming.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Communicating and visualizing&lt;/strong&gt; - The delivery of messages is essential in this process. Due to the importance of message delivery to the interpretation of data, it is important to consider it. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collaboration&lt;/strong&gt; - DataScience relies on other departments for extraction, transformation, and loading of data. This requires effective teamwork in the field. &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Tools of a Data Scientist.&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Programming tools&lt;/strong&gt; - These are languages and tools used for programming - Python and its data frames (Numpy, Pandas, PyTorch, Scipy), R, Scala, Java., Jupyter, MongoDB, SQL, Julia, D3.js, Apache Spark.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Machine Learning Tools&lt;/strong&gt; - These are software tools used for Machine Learning. They are used according to various roles implemented - Scikit Learn, Accord.Net, Apache Mahout, TensorFlow, Weka, KNIME, Colab, Accors.Net, Shogun, Keras.io, Rapid Miner, DataRobot, NLTK (Natural language toolkit).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visualization tools&lt;/strong&gt; - These tools help data scientists present data by use of an easy human-understandable format. They rely on graphs, tables, dashboards, graphics, and many more.
Seabon, Matplotlib, Gplot2, Lattice, Bokeh, Shinny, Power BI, Tableau, Infogram, Plotly, Matlab, MS Excel, Sisense, fusion charts, Qliqsense, DOMO, LookerVi, board, data wrapper (CSV)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud-Based Tools&lt;/strong&gt; - These are tools available for easy access and real-time collection and usage of data. - BigML, Google Analytics, AWS, Terraform.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;These are just to mention a few. You can look out for more according to the niche of your project. Some tools are more effective in various fields of use.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Important skills for a data scientist.&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Technical Skills are:&lt;/strong&gt;&lt;/u&gt; &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Statistics and Mathematics&lt;/strong&gt; - Probability, Linear Algebra, Calculus.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Machine Learning and Deep Learning&lt;/strong&gt; - Able to train models, evaluate, and deploy them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Wrangling&lt;/strong&gt; - The ability to convert raw data into usable and meaningful form.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Programming&lt;/strong&gt; - A data scientist can program in search of maximum querying. They Can learn Java, Python, R, and Scala. Choosing the most effective for the project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Visualization&lt;/strong&gt; - A proficient data scientist knows how to present insights found. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Management and Governance&lt;/strong&gt; - Implement security, availability, usability, and integrity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Web Scraping&lt;/strong&gt; - This involves extracting data from websites.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Database management and querying&lt;/strong&gt; - Querying and managing databases in use. SQL, MongoDB, Couch, file storage, Excel file storage,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DSA&lt;/strong&gt; - (Data Structures and Algorithms) - These help with maximum productivity while approaching a problem.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Version control&lt;/strong&gt; - Git, Git Lab, Bit bucket.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cloud computing&lt;/strong&gt; - The access to resources from anywhere by authorized users.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DevOps&lt;/strong&gt; - The demand for real-time data is rising. The use of the CI/CD cycle is important to deliver real-time live results.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Operating Systems&lt;/strong&gt; - Linux, Windows, server OS, and other platforms of use.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Extraction&lt;/strong&gt;, &lt;strong&gt;Transformation&lt;/strong&gt;, &lt;strong&gt;cleaning&lt;/strong&gt;, and preparation for loading.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Automation&lt;/strong&gt; - using scripts to perform regular and repetitive tasks.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Soft skills are:&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Communication.&lt;/li&gt;
&lt;li&gt;Problem solving.&lt;/li&gt;
&lt;li&gt;Critical thinking.&lt;/li&gt;
&lt;li&gt;Decision making.&lt;/li&gt;
&lt;li&gt;Creative thinking.&lt;/li&gt;
&lt;li&gt;Business intelligence.&lt;/li&gt;
&lt;li&gt;Storytelling.&lt;/li&gt;
&lt;li&gt;Attention to detail.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Data Science Methodology&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This is a lifecycle that involves the approach of a Data Science project.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Business problem understanding&lt;/strong&gt; - understand owners' needs and their internals. This identifies expectations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data collection and storage.&lt;/strong&gt; - Data acquisition plays a crucial role in helping understand what datasets are important.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Preparation and Understandin&lt;/strong&gt;g - this involves understanding the dataset you are working on and the structure of the data (structured or unstructured). It also involves duplication, transforming, and handling missing values. Identifying the data variables is discovered here.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Modeling and evaluation&lt;/strong&gt; - Trends and insights are evaluated in this phase. The tools used in this phase include R, Python, Matlab, and SAS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Diagnostics and mining&lt;/strong&gt; of data are executed here to produce a quality evaluation outcome. Prediction and description help us know the hits and misses of the models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment&lt;/strong&gt; - feedback is derived from this phase to test the capabilities of the models. Maintenance and monitoring help in recommending the way forward using reports, summaries, and experience.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Data science applications.&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Machine learning - teaching machines to interpret the right data for use.&lt;/li&gt;
&lt;li&gt;Internet searching - provides better results and is accurate for queries.&lt;/li&gt;
&lt;li&gt;Voice assistance - training in dialects and sounds.&lt;/li&gt;
&lt;li&gt;Health care - prioritization of surgery and effective treatment.&lt;/li&gt;
&lt;li&gt;Robotics and IoT - manufacturing and prediction of outcomes and responses.&lt;/li&gt;
&lt;li&gt;Marketing and E-commerce - increasing purchases and client conversion rates, recommending products, competitively advancing business.&lt;/li&gt;
&lt;li&gt;Education - providing insights into the performance of students' study behaviors.&lt;/li&gt;
&lt;li&gt;Weather prediction and calamity prediction like earthquakes and fires.&lt;/li&gt;
&lt;li&gt;Finance - data science provides insights into what is expected when it comes to the economy and expenditure. Helps analyze losses and income and expenditure maintenance.&lt;/li&gt;
&lt;li&gt;Technology - Data science has improved technology with very steep growth. Technology and big data are now working parallel to each other to provide a better experience.&lt;/li&gt;
&lt;li&gt;Travel - helps with recommendations for shorter routes.&lt;/li&gt;
&lt;li&gt;Crime - helps analyze crime rates, sources, and areas of crime for easy detection and prediction.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Benefits of data science.&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;A Data Scientist is an asset to the company.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A Data Scientist...&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Empowers the management to make better-informed decisions.&lt;/li&gt;
&lt;li&gt;Provides insights into KPIs (key performance indicators).&lt;/li&gt;
&lt;li&gt;Helps identify the underlying opportunities.&lt;/li&gt;
&lt;li&gt;Helps identify loopholes and areas of improvement in the business.&lt;/li&gt;
&lt;li&gt;Helps refine the target audience and maintain the audience.&lt;/li&gt;
&lt;li&gt;Enables a drive for better results.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Trends in Data Science.&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Cognitive computing - Artificial intelligence in cybersecurity relies on ML algorithms.&lt;/li&gt;
&lt;li&gt;Augmented reality - a great experience is enhanced due to the use of Big Data.&lt;/li&gt;
&lt;li&gt;Automation - Machine learning is helping automate very crucial activities. Data collected is being used to accelerate automation.&lt;/li&gt;
&lt;li&gt;Cloud data ecosystems- many companies are now migrating to cloud warehouses for faster clustering and access to data.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion:&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The world we are in now is already data-driven. It relies heavily on data to predict, describe, diagnose, and prescribe the best solutions to the problem at hand. The demand for data scientists will not glide downwards anytime soon.&lt;/p&gt;

&lt;p&gt;The impact of data science is clear and the demand for knowledge is skyrocketing. Looking at the future, data will fuel everyday lives in how we eat, socialize, learn, and live. It is part of the existing environment.&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>machinelearning</category>
      <category>data</category>
      <category>python</category>
    </item>
  </channel>
</rss>
