<?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: Juma Evans</title>
    <description>The latest articles on DEV Community by Juma Evans (@juma_evans_34e389ef539266).</description>
    <link>https://dev.to/juma_evans_34e389ef539266</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%2F3732908%2F19cec6b2-04a4-4223-b322-6ee75277321f.png</url>
      <title>DEV Community: Juma Evans</title>
      <link>https://dev.to/juma_evans_34e389ef539266</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/juma_evans_34e389ef539266"/>
    <language>en</language>
    <item>
      <title>Regulalar Expression</title>
      <dc:creator>Juma Evans</dc:creator>
      <pubDate>Wed, 13 May 2026 01:47:34 +0000</pubDate>
      <link>https://dev.to/juma_evans_34e389ef539266/regulalar-expression-1e8p</link>
      <guid>https://dev.to/juma_evans_34e389ef539266/regulalar-expression-1e8p</guid>
      <description>&lt;h2&gt;
  
  
  Mastering Regular Expressions in JavaScript: From Basics to Real-World Validation
&lt;/h2&gt;

&lt;p&gt;At first glance, a regex pattern looks like a cat walked across your keyboard,a chaotic string of slashes, brackets, and symbols. However, once you decode the syntax, it becomes one of the most powerful tools in your developer toolkit.&lt;br&gt;
Below is the break down of how regex works in JavaScript and build a robust pattern to validate something we use every day: &lt;strong&gt;email addresses&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is a Regular Expression anyways?
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;Regular Expression&lt;/strong&gt; is an object that describes a pattern of characters. In JavaScript, you can create them in two ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Literal Notation:&lt;/strong&gt; /pattern/flags&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Constructor:&lt;/strong&gt; new RegExp('pattern', 'flags')
### The Core Building Blocks
Before we tackle the email login, we need to understand the "alphabet" of regex:&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Character Classes:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;\d: Matches any digit (0-9).&lt;/li&gt;
&lt;li&gt;\w: Matches any alphanumeric character (letters, numbers, and underscores).&lt;/li&gt;
&lt;li&gt;\s: Matches whitespace (spaces, tabs).&lt;/li&gt;
&lt;li&gt;.: The wildcard—matches any character except a newline.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quantifiers:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;+: Matches 1 or more of the preceding element.&lt;/li&gt;
&lt;li&gt;*: Matches 0 or more.&lt;/li&gt;
&lt;li&gt;{n,m}: Matches between n and m times.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anchors:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;^: Forces the match to start at the beginning of the string.&lt;/li&gt;
&lt;li&gt;$: Forces the match to end at the end of the string.
### Deep Dive: Validating an Email Address
When we log in to a platform, the first line of defense is ensuring the input actually looks like an email. Let’s build a regex for a standard email like &lt;a href="mailto:zone01.recode@company.co.ke"&gt;zone01.recode@company.co.ke&lt;/a&gt;.
#### 1. The Local Part (zone01 .recode)
We want to allow letters, numbers, dots, and underscores.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pattern:&lt;/strong&gt; ^[a-zA-Z0-9._%+-]+&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explanation:&lt;/strong&gt; We start at the beginning (^) and allow a set of characters inside the square brackets. The + ensures there is at least one character.
#### 2. The "@" Symbol
We just need the literal character.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pattern:&lt;/strong&gt; @
#### 3. The Domain (company)
Similar to the local part, but usually without the special symbols.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pattern:&lt;/strong&gt; [a-zA-Z0-9.-]+
#### 4. The TLD (.co.ke or .com)
We need a literal dot, followed by letters. Since a dot . is a wildcard in regex, we must &lt;strong&gt;escape&lt;/strong&gt; it with a backslash ..&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pattern:&lt;/strong&gt; .[a-zA-Z]{2,}$&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explanation:&lt;/strong&gt; This looks for a dot and at least two letters at the very end of the string ($).
#### Putting it all together:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;emailRegex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sr"&gt;/^&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;a-zA-Z0-9._%+-&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;+@&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;a-zA-Z0-9.-&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;+&lt;/span&gt;&lt;span class="se"&gt;\.[&lt;/span&gt;&lt;span class="sr"&gt;a-zA-Z&lt;/span&gt;&lt;span class="se"&gt;]{2,}&lt;/span&gt;&lt;span class="sr"&gt;$/&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;testEmail&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dev_user123@zone01.edu&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;emailRegex&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;testEmail&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;// Output: true&lt;/span&gt;

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  Common Use Cases in Web Apps
&lt;/h3&gt;

&lt;p&gt;Beyond login forms, regex is used everywhere in full-stack development:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Password Strength:&lt;/strong&gt; Checking for at least one capital letter, one number, and one special character.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;URL Parsing:&lt;/strong&gt; Extracting slugs or IDs from a browser's address bar.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Scrubbing:&lt;/strong&gt; Removing formatting from phone numbers (e.g., changing +254 712-345-678 to 254712345678).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Search and Replace:&lt;/strong&gt; Swapping specific words across a whole document using the global /g flag.
### Helpful Methods in JavaScript
To use your patterns, you’ll mostly use these two methods:&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;regex.test(string)&lt;/strong&gt;: Returns true or false. Perfect for form validation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;string.match(regex)&lt;/strong&gt;: Returns an array of matches. Great for extracting information from a large block of text.
&amp;gt; &lt;strong&gt;Pro Tip:&lt;/strong&gt; Use tools like &lt;strong&gt;RegEx101&lt;/strong&gt; to test your patterns in real-time before putting them into your code. It provides a "flavor" setting—make sure to select &lt;strong&gt;ECMAScript (JavaScript)&lt;/strong&gt;.
&amp;gt; 
### Conclusion
Regex might feel like a steep climb, but it is a "learn once, use everywhere" skill. Whether you are working on a Go backend or a JavaScript frontend, the logic remains largely the same. Keep practicing by trying to validate other common inputs like phone numbers or postal codes!&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Docker Unlocked: What I Wish I Knew earlier.</title>
      <dc:creator>Juma Evans</dc:creator>
      <pubDate>Wed, 18 Feb 2026 20:20:02 +0000</pubDate>
      <link>https://dev.to/juma_evans_34e389ef539266/docker-unlocked-what-i-wish-i-knew-earlier-143f</link>
      <guid>https://dev.to/juma_evans_34e389ef539266/docker-unlocked-what-i-wish-i-knew-earlier-143f</guid>
      <description>&lt;p&gt;When I first heard about Docker, I thought it was something extremely complex that only senior developers used.&lt;/p&gt;

&lt;p&gt;Until recently, that is. When I finally started learning Docker, I found out how amazing it is, and I want to share what I've learned.&lt;br&gt;
If you're just starting out, this is for you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So…&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;1. What Is Docker?&lt;/strong&gt;&lt;br&gt;
Docker is a tool that lets you package your application with everything it needs to run:-dependencies, libraries, system tools, and your code;into something called a &lt;strong&gt;container&lt;/strong&gt;.&lt;br&gt;
&lt;strong&gt;2. What Problem Does Docker Solve?&lt;/strong&gt;&lt;br&gt;
Think of it like this:&lt;br&gt;
"It works on my machine" stops being an excuse.&lt;br&gt;
With Docker, if it works inside the container, it works everywhere. &lt;br&gt;
Before Docker, this is what used to happen:&lt;br&gt;
Developer X runs the application successfully.&lt;br&gt;
Developer Y tries to run it, and it breaks.&lt;/p&gt;

&lt;p&gt;Developer X tells Developer Y: “But it works on my machine!”&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why?&lt;/strong&gt;&lt;br&gt;
Different environments:&lt;/p&gt;

&lt;p&gt;° Different operating systems&lt;br&gt;
° Different versions of NODE or Go or Python&lt;br&gt;
° Different installed dependencies&lt;/p&gt;

&lt;p&gt;Docker solves this by creating a consistent environment that travels with your application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. What Is a Container?&lt;/strong&gt;&lt;br&gt;
A container is like a lightweight, portable box for your application.&lt;br&gt;
But unlike a full virtual machine:&lt;/p&gt;

&lt;p&gt;° It starts fast—usually in seconds&lt;br&gt;
° It uses fewer resources&lt;br&gt;
° It's easy to share and move around&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How It Works:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You define how your application should run in a file called a Dockerfile (a blueprint for your environment).&lt;/li&gt;
&lt;li&gt;Docker uses that file to build an image (a snapshot of your app and everything it needs).&lt;/li&gt;
&lt;li&gt;Then that image runs as a container (the live, running version of your application).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When I first installed Docker, created my Dockerfile, built an image, and it actually worked…&lt;br&gt;
I felt like I unlocked a new level in development 😂.&lt;br&gt;
That was the moment I realized:&lt;br&gt;
This is how real-world applications are deployed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Every Beginner Should Learn Docker&lt;/strong&gt;&lt;br&gt;
Here is why I believe Docker is worth learning early:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It Makes You Think Like a Backend Engineer
You begin to understand:
° Ports and how applications communicate
° Services and how they connect
° Environment configurations
° How production setups differ from local development&lt;/li&gt;
&lt;li&gt;It Improves Your Project Structure
You naturally start organizing your apps better when you know they'll run in containers.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;🛠 Things That Confused Me at First&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;To be honest&lt;/em&gt;:&lt;br&gt;
° Images vs. Containers: I couldn't keep them straight. (Think of an image as a recipe and a container as the actual cooked meal.)&lt;br&gt;
° Dockerfile syntax: It looked scary at first glance.&lt;br&gt;
° Ports: Mapping ports from the container to my computer didn't make sense initially.&lt;/p&gt;

&lt;p&gt;But after building just one simple container for a Go app, everything started connecting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Next?&lt;/strong&gt;&lt;br&gt;
Now that I understand the basics, I plan to:&lt;/p&gt;

&lt;p&gt;° Containerize my Go projects&lt;br&gt;
° Learn Docker Compose (for running multiple containers)&lt;br&gt;
° Understand how containers are used in production&lt;/p&gt;

&lt;p&gt;One step at a time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;br&gt;
Imagine you bake a cake 🍰 at home.&lt;br&gt;
You pack:&lt;br&gt;
°The cake&lt;br&gt;
°The ingredients list&lt;br&gt;
°The exact oven settings&lt;br&gt;
°The instructions&lt;/p&gt;

&lt;p&gt;Then you put everything inside one box.&lt;br&gt;
Now, no matter where that box goes, Nairobi, Kisumu, or New York, anyone can open it and get the exact same cake.&lt;br&gt;
That is exactly what Docker does.&lt;/p&gt;

&lt;p&gt;It puts:&lt;br&gt;
. Your app&lt;br&gt;
. The tools it needs&lt;br&gt;
. The correct settings&lt;br&gt;
Inside one “box” called a container.&lt;br&gt;
So instead of saying:&lt;br&gt;
“It works on my machine.”&lt;br&gt;
You can confidently say:&lt;br&gt;
“It works everywhere.”&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
