<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by David Bayode on Medium]]></title>
        <description><![CDATA[Stories by David Bayode on Medium]]></description>
        <link>https://medium.com/@davidbayode?source=rss-31ac77a3c4ea------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Qo9qDCILlp7wyoiG97xb5w.jpeg</url>
            <title>Stories by David Bayode on Medium</title>
            <link>https://medium.com/@davidbayode?source=rss-31ac77a3c4ea------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 00:58:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@davidbayode/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Being Productive with Regular Expressions]]></title>
            <link>https://davidbayode.medium.com/being-productive-with-regular-expressions-bedba6932680?source=rss-31ac77a3c4ea------2</link>
            <guid isPermaLink="false">https://medium.com/p/bedba6932680</guid>
            <dc:creator><![CDATA[David Bayode]]></dc:creator>
            <pubDate>Sat, 11 Nov 2023 18:41:00 GMT</pubDate>
            <atom:updated>2023-11-11T19:44:56.623Z</atom:updated>
            <content:encoded><![CDATA[<h3>Get comfortable with Regular Expressions</h3><figure><img alt="A search logo" src="https://cdn-images-1.medium.com/max/750/0*54LKwbJgn8bmHiGS.jpg" /></figure><p>Regular Expressions , often shortened to “Regex” or “RegExp” are patterns that can be used to match, search or replace text.</p><p>This was one of the first things I learnt in my 1 year of self-taught Web Development(MERN) and I’d like to make it as interesting as I understood it, I’ll add some additional links for further learning below.</p><p>Regex are written with 2 backslashes and a character between, we then use a method (a.k.a function), in the case below the <strong>.test() </strong>method, this returns a true or false(boolean) value when <strong>“testing”</strong> the word variable.</p><p>Example:</p><pre>let words = &quot;Lets get started with Regex&quot;<br><br>let regex = /r/<br><br>console.log(regex.test(words)) // true</pre><p>That brief example matched the single letter “<strong>r</strong>” in “started” from our string “Lets get started with Regex”.</p><p>We can confirm this by using another method to create an array that has the value of the string we matched.</p><pre><br>let words = &quot;Lets get started with Regex&quot;<br><br>let regex = /r/<br><br>console.log(words.match(regex)) // [ &#39;r&#39;, index: 12, input: &#39;Lets get started with Regex&#39;, groups: undefined ]</pre><p>The <strong>.match()</strong> method “matches” the regex and return was what matched as an array and in our JavaScript playground also displays the exact index the string “<strong>r</strong>” was matched.</p><p>These two examples using the <strong>.match()</strong> and <strong>.test()</strong> methods are an example of a literal match, which is to say we are matching only the exact character of our regex, nothing else.</p><p>Lets examine what the .test() method does:</p><pre>//  The .test() method is used by prepending the regex and then passing<br>// the string you want to test<br><br>let string = &quot;documentary&quot;<br><br>let regex = /documentary/<br><br>regex.test(string) // true<br><br>// or<br><br>/documentary/.test(string) // true<br><br>// The second example is just to pass the message across</pre><p>So the .test() returns true for strings that match the regex.</p><p>Then we can take a look at the .match() method:</p><pre>// The .match() method accepts a regex as an argument and the string is<br>// prepended to it<br><br>let string = &quot;foxes&quot;<br><br>let regex = /foxes/<br><br>string.match(regex) // [ &#39;foxes&#39;, index: 0, input: &#39;foxes&#39;, groups: undefined ]</pre><p>A way to think about what we get from using the .match() method is that we converted the string into an array with the string inside it.</p><pre>// This is basically what the regex prints out when we use .match()<br><br>[&quot;foxes&quot;] // foxes will be found on index 0</pre><p>Regex can also be created by using the RegExp constructor, this is best used if you don’t know the value before hand.</p><pre>let name = &quot;David Bayode&quot; // variable holding a string<br><br>let davRegex = new RegExp(name, &quot;i&quot;) <br>// pass name variable and case-insensitive flag &quot;i&quot;<br><br>console.log(davRegex) // /David Bayode/i<br><br></pre><p>This is nice to know if you’re iterating by certain words and want to find a certain set of characters, but we’ll stick to creating manually for this article.</p><h3><strong>Matching Capitalized and Upper Case Letters</strong></h3><p>We can do more of these to understand how we can use regex to extract one or more texts in our strings.</p><pre><br>let alphabetG = &quot;G&quot; // A capital G<br><br>let named = &quot;David Bayode&quot; // My name in title case<br><br>let favoriteFlavor = &quot;Chocolate&quot; // Chocolate in title case<br><br>console.log(/g/.test(alphabetG)) // false<br><br>console.log(/david bayode/.test(named)) // false<br><br>console.log(/chocolate/.test(favoriteFlavor)) // false<br><br>console.log(alphabetG.match(/g/)) // null<br><br>console.log(named.match(/david bayode/)) // null<br><br>console.log(favoriteFlavor.match(/chocolate/)) // null</pre><p>We get false for the strings we’re testing with <strong>.test() </strong>and we get <strong>null</strong> for the characters we try to match with <strong>.match()</strong>, Why?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/0*il15tiHKsd5k75qL.jpg" /></figure><h3>Regular Expressions are Case Sensitive</h3><p>Yup, you heard it here first!(Jokingly I might add)</p><p>Remember what I wrote up there a few moments about <strong>“literal matches”</strong>, they match the exact characters we wrote, that means if we have a regex with the character <strong>“chocolate”</strong> then they wouldn’t match the string <strong>“Chocolate”</strong>, this applies to the example above. Another thing to keep in mind about regexes are:</p><h3>Regular Expressions match one thing a time</h3><p>Lets see what we get for the following strings:</p><pre>let sentence = &quot;The quick fox jumped over the lazy dog&quot;<br><br>let regex = /qui/<br><br>regex.test(sentence) // true<br><br>// matched &quot;qui&quot; from &quot;quick&quot;</pre><p>It matches exactly what we put into it so that means we can match letters and individual characters.</p><p>Also one thing to keep in mind we can match symbols and numbers so long as they’re strings.</p><pre>let num = &quot;4&quot;</pre><pre>let regex = /4/<br><br>regex.test(num) // true<br><br>// And symbols too<br><br>let symbol = &quot;@&quot;<br><br>let regex = /@/<br><br>regex.test(symbol) // true</pre><p>Nice, so now you should be familiar with matching upper case and lower case letters in strings.</p><h3>Matching Uppercase and Lowercase Characters</h3><p>We can match characters on any case using flags:</p><h4>Flags</h4><p>Flags are a way to extend our regex beyond the literal text we put inside of it, this is by adding a character after the regex, in this case an “i”.</p><h4>The Case-Insensitive Flag “i”</h4><pre>let string = &quot;Fifty&quot;<br><br>let regex = /fifty/i // appended an &quot;i&quot; for ignore-casing or <br>// case insensitive<br><br>console.log(regex.test(string)) // true</pre><p>The flag “i” will change the regex to match for both upper and lowercase changes. Take note, this also means we can return:</p><pre>let string = &quot;ChEEse&quot;<br><br>let regex = /cheese/i<br><br>console.log(regex.test(string)) // true</pre><p>Remember we are ignoring the casing when we adda the “i” flag and we are also matching the characters one after the other so we will return true for the jumbled text in the string variable.</p><p>Lets match a repeating string</p><h3>Repeating Strings</h3><figure><img alt="Repeating bananas" src="https://cdn-images-1.medium.com/max/450/0*GjS1Ty-eCYWstsh9.jpg" /></figure><p>What if we wanted to know how many times a certain word repeats itself in a string? We use the <strong>Global flag </strong>“g”.</p><h4>The Global Flag “g”</h4><p>The global flag “g” matches for repeats of the regex character, so we can use it to know if there is a repeating pattern that conforms to our regex.</p><pre>let string = &quot;this is a big misstep&quot;<br><br>let regex = /is/g<br><br>regex.test(string) // true<br>// the &quot;is&quot; repeats several times in the string variable,<br>// 1st the &quot;is&quot; in &quot;this&quot;, then the next &quot;is&quot; and finally,<br>// the &quot;is&quot; in &quot;misstep<br><br>console.log(string.match(regex)) // [&quot;is&quot;, &quot;is&quot;, &quot;is]</pre><p>We can use this to even find the number of times a string repeats.</p><pre>let repeatingString = &quot;This is an island&quot;<br><br>let repeatingRegex = /is/g<br><br>console.log(repeatingString.match(repeatingRegex).length) // 3</pre><p>We get back 3 for the number of times “is” repeats in the variable <strong>“repeatingString”</strong>.</p><p>Lets give a brief list of flags and what they match:</p><ol><li><strong>i</strong> - Case-Insensitive Matching: /abc/i matches <strong>&quot;ABC&quot;</strong>, <strong>&quot;abc&quot;</strong>, <strong>&quot;AbC&quot;</strong>, and so on, regardless of letter case.</li><li><strong>g</strong> - Global Matching: /abc/g matches all occurrences of <strong>&quot;abc&quot;</strong> in a string, not just the first one.</li><li><strong>m</strong> - Multi-Line Matching: /^abc/m matches <strong>&quot;abc&quot;</strong> when it appears at the start of a line within a multi-line string.</li><li><strong>s</strong> - Dot-all Mode (ES2018 and later): /a.b/s matches any character, including line terminators (newline characters), with the dot (.) metacharacter.</li><li><strong>u</strong> - Unicode Matching: /\p{Script=Hiragana}/u matches any character in the Hiragana script in a Unicode-aware way.</li><li><strong>y </strong>- Sticky Matching (ES2015 and later): /abc/y matches <strong>&quot;abc&quot;</strong> only at the start of the input string or at the index specified by the lastIndex property.</li><li><strong>d </strong>- Unicode Digit Matching (ES2018 and later): /\d/u matches any Unicode digit character.</li><li><strong>w </strong>- Unicode Word Matching (ES2018 and later): /\w/u matches any Unicode word character.</li><li><strong>A </strong>- Any Character (ES2018 and later): /./A matches any character, including newline characters.</li><li><strong>U </strong>- Ungreedy (Lazy) Matching (ES2018 and later): /a.*?b/ matches the shortest possible sequence between &quot;a&quot; and &quot;b.&quot;</li><li><strong>c </strong>- Constrained (Chaining) Matching (ES2022 and later): /\babc\b/c matches &quot;abc&quot; only as a whole word.</li><li><strong>n </strong>- Match Empty Strings (ES2022 and later): /a*n/ matches an empty string followed by &quot;n.&quot;</li></ol><p>There’s no need to cram or put in memory most of these, the important ones to know to be productive with I’ll try to cover them.</p><h3>Matching Repeating Letters</h3><p>Alright, so we’ve been able to match repeating words from strings and also case sensitive words, what about when we want to match against a word that repeats a certain letter?</p><p>Words like “<strong>goooooooaaal!</strong>” or “<strong>woooohooo</strong>”, how are we going to match the strings using regular expressions?</p><h4>The + Character</h4><p>The + Character is used after a character string in our regex to match one or more of that character, for example:</p><pre>let repeatingString = &quot;gooooooaaal&quot;<br><br>let repeatRegex = /go+a+l/<br><br>repeatRegex.test(repeatingString) // true<br><br>repeatingString.match(repeatRegex) // [&quot;gooooooaaal&quot;]</pre><p>As you see above, we match all repetitions of the characters <strong>“o”</strong> and <strong>“a”</strong> by adding a <strong>“+”</strong> character to the letters in our regex.</p><p>Note: The<strong> “+”</strong> character is used for matching letters that return at least once or more than. Lets take a few examples to understand this:</p><pre>let string = &quot;Helllooooo!&quot; // String we&#39;re trying to match<br><br>let regex = /hel+o/i // Regex that checks for the characters<br><br>regex.test(string) // true, we matched &quot;Hello&quot;</pre><p>We can observe two things in the above example, our string we want to test has repeating letters <strong>“l”</strong> and <strong>“o”</strong> while our Regex uses the case-insensitive flag to match for any capitals, in this case the letter <strong>“H”</strong> in our initial string.</p><p>The Regex created will match the letters “Hello” in our “Helllooooo!” because we are looking for a case-insensitive(upper or lower case) match for a character <strong>“h”</strong>, <strong>“e”</strong>, single or multiple character <strong>“l”</strong> and a single <strong>“o”</strong>, which means we matched <strong>“hello”(upper or lower case)</strong> which was present in our string variable.</p><p>Another example:</p><pre>let string = &quot;hoooorrray!&quot;<br><br>let regex = /ho+r+a+y!/ // Regex that matches all characters in the string<br><br>regex.test(string) // true</pre><p>We match all the letters in the string variable in this case, even the <strong>“!”</strong> character, if you’re wondering if we would keep having to include all individual characters the answer is no, we’ll cover cases that match words without having to know all the characters.</p><h4>The * Character</h4><p>The <strong>*</strong> Character is used to match letters that appear <strong>zero or more times</strong> as opposed to the <strong>+</strong> Character which checks for letters that appear atleast one or more times.</p><p>For instance:</p><pre>let string = &quot;fify&quot; // Incorrectly spelled string<br><br>let regex = /fift*y/ // Regex that checks for 0 or more of &quot;t&quot;<br><br>regex.test(string) // true, we get the match</pre><p>The string is <strong>“fify”</strong> not <strong>“fifty”</strong> and we were able to match the incorrectly spelled string by using the <strong>“*”</strong> Character to indicate the letter <strong>“t”</strong> may not be present in the string we’re testing for.</p><p>We can do more to try out cases where a letter may or may not be present.</p><p>Lets check for multiple words with the global flag <strong>“g”</strong> and case insensitive flag <strong>“i”</strong>:</p><pre>let string = &quot;Favor Favour&quot; // American and British spellings of favour<br><br>let regex = /favou*r/gi // Regex to look for case-insensitive favour with u appearing 0 or more times.<br><br>regex.test(string) // true</pre><p>In the above example, we matched the string for both cases because we used the <strong>*</strong> Character to check if there are <strong>0</strong> or more appearances of the letter <strong>“u”</strong> in the string. We can test this by getting a match on this:</p><pre>let string = &quot;Favor Favour&quot; // American and British spellings of favour<br><br>let regex = /favou*r/gi // global flag for multiple cases and case-insensitive for upper or lower case<br><br>string.match(regex) // [ &#39;Favor&#39;, &#39;Favour&#39; ]</pre><p>We get back the matches for both words!</p><p>What about if we only want to know if the letter appears or not? That-is<strong> 0 or 1</strong> time?</p><h4>The ? Character</h4><p>The <strong>?</strong> Character matches for letters that appear 0 or 1 times, this is fairly straightforward. Example:</p><pre>let string = &quot;Jon&quot; // Shortened form<br><br>let regex = /joh?n/i // Regex that checks if there is 0 or 1 character h<br><br>regex.test(string) // true, matches as there is 0 letter &quot;h&quot;</pre><p>We would get a match because we used the <strong>?</strong> Character to indicate the letter <strong>“h” </strong>may not be present.</p><p>You can play with this character to find if there’s a shortened, British or American word.</p><h4>The . Character</h4><p>The <strong>.</strong> Character is used to test for an unknown letter, let’s say we want to find a word but don’t know a particular letter that may be present, we would use the <strong>.</strong> Character to indicate that.</p><p>Note: Using a <strong>“.”</strong> character in your regex means you know the word definitely exists, unlike if you used the <strong>*</strong> sign which would mean the letter might not exist.</p><p>An Example:</p><pre>let string = &quot;John&quot; // John<br><br>let regex = /jo.n/i // Regex to match the word jo and an unknown letter, then n.<br><br>regex.test(string) // true</pre><p>In the example above we get back true, as we matched all characters and an unknown character using <strong>“.”</strong> which the Regex matched as the <strong>“h”</strong> in the string <strong>“John”</strong>.</p><p>We could also combine our Characters from before.</p><pre>let string = &quot;Johhhhhn&quot; // &quot;Johhhhhn&quot;<br><br>let regex = /jo.+n/i // Regex to match &quot;jo&quot; and then a repeating unknown character that appears one or more times, then n<br><br>regex.test(string) // true</pre><p>In the example above, we use a case-insensitive regex(with <strong>“i”</strong> flag) to look for the characters <strong>“jo”</strong> then an unknown character(<strong>“.”</strong>) that appears one or more times(<strong>“+”</strong>) then finally an <strong>“n”</strong> to match the string <strong>“Johhhhhn”</strong>.</p><h3>Matching multiple words with Character Classes</h3><p>Here, we’ll be matching multiple words with <strong>Character Classes</strong>, first off, what are <strong>Character Classes</strong>?</p><p><strong>Character Classes</strong> allow you to define a group of characters you want your Regex to look for in the string. Example:</p><pre>let string = &quot;hit hat hot&quot; // Three strings beginning and ending with the same letter<br><br>let regex = /h[aio]t/g // Regex that matches all three<br><br>regex.test(string) // true<br><br>string.match(regex) // [ &#39;hit&#39;, &#39;hat&#39;, &#39;hot&#39; ]</pre><p>We will get true and return all matched strings when we used the Character Class <strong>“[aio]”</strong> in the regex as <strong>“/h[aio]t/g”</strong>, this is because we first match with the letter “h” then we read the Character class as the second letter either being an <strong>“a”</strong>, <strong>“i”</strong> or <strong>“o”</strong> this means whatever string matches those characters at the first index(second letter) then we end the Regex with a <strong>“t”</strong>, we also specify a global flag to return multiple matches else we only return the first match <strong>“hit”</strong>.</p><p>Lets see another example:</p><pre>let string = &quot;fit fat faith&quot; // 2 three letter words and a third 5 letter word<br><br>let regex = /f[aioth]t/g // Regex that you might think would match all.<br><br>regex.test(string) // true<br><br>string.match(regex) // only matches [ &#39;fit&#39;, &#39;fat&#39; ]</pre><p>So we might think we can use a Character class Regex of <strong>“/f[aioth]t/g”</strong> to match <strong>“fit”</strong>, <strong>“fat”</strong> and <strong>“faith”</strong> but the reality is that we are actually looking for a 3 letter word with the regex and since <strong>“faith”</strong> is a 5 letter word that does not match the 2nd letter we don’t match <strong>“faith”</strong>, it even returns false if we use the <strong>“.test()”</strong> method with it alone:</p><pre>let string = &quot;faith&quot;<br><br>let regex = /f[aioth]h/g<br><br>regex.test(string) // false<br><br>string.match(regex) // null</pre><p>We return false from trying to test it with the .test() method and there are no matches when we use the .match() method. This tells us we’re actually looking for the strings <strong>“fah”</strong>, <strong>“fih”</strong>, <strong>“foh”</strong>, <strong>“fth”</strong> and <strong>“fhh”</strong> not any combination of the letters in the Character Class itself.</p><h4><strong>Negating Character Classes</strong></h4><p>What if we wanted to match everything except some letters, we use the ^ sign with the Character Class.</p><p>Example:</p><pre>let string = &quot;fought taught&quot; // 2 words that are almost spelled the same<br><br>let regex = /.[^a]ught/ // Our regex<br><br>regex.test(string) // true<br><br>string.match(regex) // [&#39;fought&#39;]</pre><p>Our regex <strong>“/.[^a]ught/”</strong> first uses the “.” to match either <strong>“f”</strong> or <strong>“t”</strong> in <strong>“fought”</strong> and <strong>“taught”</strong> then we use a negated character class <strong>“[^a]”</strong> to indicate we don’t want the letter <strong>“a”</strong>(anything but the letter a), then continue the regex with <strong>“ught”</strong>, this makes us to match and test for only <strong>“fought”.</strong></p><h4><strong>Matching a wide range of letters with “-”</strong></h4><p>What if we have a situation where we want to match a whole range of letters, let’s say from “a” to “o”?</p><p>Lets tweak the previous example:</p><pre>let string = &quot;fought taught&quot; // Words that are spelt almost alike<br><br>let regex = /.[a-o]ught/g // Regex that checks for the range of letters from &quot;a&quot; to &quot;o&quot; in the string<br><br>regex.test(string) // true<br><br>string.match(regex) // [&#39;fought&#39;], [&#39;taught&#39;]</pre><p>We would match both strings <strong>“fought”</strong> and <strong>“taught”</strong> because we are looking for <strong>“.”</strong> any character first, followed by a Character Class of letters <strong>“a”</strong> to <strong>“z”</strong> then following it up with the literal rest of the letters <strong>“ught”</strong> with a global flag to match more than one string that passes the regex.</p><h3>Matching all alphanumeric characters</h3><p>We can match all alphanumeric characters by using the “-” character that we just learnt in the following examples:</p><pre>let string = &quot;The quick brown fox jumped over the lazy dog!&quot;<br><br>let regex = /[a-zA-Z0-9]/g // Regex that matches all letters<br><br>regex.test(string) // true<br><br>string.match(regex) // [ &#39;T&#39;, &#39;h&#39;, &#39;e&#39;, &#39;q&#39;, &#39;u&#39;, &#39;i&#39;, &#39;c&#39;, &#39;k&#39;, &#39;b&#39;, &#39;r&#39;, &#39;o&#39;, &#39;w&#39;, &#39;n&#39;, &#39;f&#39;, &#39;o&#39;, &#39;x&#39;, &#39;j&#39;, &#39;u&#39;, &#39;m&#39;, &#39;p&#39;, &#39;e&#39;, &#39;d&#39;, &#39;o&#39;, &#39;v&#39;, &#39;e&#39;, &#39;r&#39;, &#39;t&#39;, &#39;h&#39;, &#39;e&#39;, &#39;l&#39;, &#39;a&#39;, &#39;z&#39;, &#39;y&#39;, &#39;d&#39;, &#39;o&#39;, &#39;g&#39; ]</pre><p>We would match all the letters in the string except the character <strong>“!”</strong> and except the spaces or whitespace between the words.</p><p>Note: We are able to match all characters because we used the global flag <strong>“g”</strong> to match multiple cases, so that’s why we return each individual letter in the word.</p><h4>Shorthand to match all alphanumeric characters</h4><p>We can use a shorthand to match all alphanumeric characters, using the <strong>/\w/</strong> regex.</p><p>Lets see an example:</p><pre>let string = &quot;A boy and his dog_&quot; // A phrase with the character &quot;_&quot; at the end<br><br>let regex = /\w+/g // Shorthand regex for all alphanumeric characters and the underscore _ at the end<br><br>regex.test(string) // true<br><br>string.match(regex) // [ &#39;A&#39;, &#39;boy&#39;, &#39;and&#39;, &#39;his&#39;, &#39;dog_&#39; ]</pre><p>In the above example, we are going to match all the words(we aren’t using character classes which match per letter) and also an underscore(<strong>“_”</strong>).</p><p>Let’s see an example with numbers:</p><pre>let string = &quot;200 bags of rice&quot;<br><br>let regex = /\w+/g // Regex to match all alphanumeric characters including an underscore(_)<br><br>regex.test(string) // true<br><br>string.match(regex) // [ &#39;200&#39;, &#39;bags&#39;, &#39;of&#39;, &#39;rice&#39; ]</pre><p>Note: Take note that we are actually using the <strong>“+”</strong> quantifier character and global flag <strong>“g”</strong> to match whole words, if we were to use the word character class by itself(<strong>/\w/</strong>) we would only match a single letter of number(or underscore)</p><pre>let string = &quot;200 bags of rice&quot;<br><br>let regex = /\w/ // single alphanumeric character regex<br><br>regex.test(string) // true<br><br>string.match(regex) [&#39;2&#39;]</pre><p>But if we wanted all letters or numbers of the first word or character:</p><pre>let string = &quot;200 bags of rice&quot;<br><br>let regex = /\w+/ // regex to match a continuous single alphanumeric character<br><br>regex.test(string) // true<br><br>string.match(regex) // [&#39;200&#39;]</pre><p>In the above we match with one or more alphanumeric characters, this ends at the first word because we didn’t use the global flag <strong>“g”</strong> to check for multiple cases of this.</p><p>If we do, we get:</p><pre>let string = &quot;200 bags of rice&quot;<br><br>let regex = /\w+/g // Regex for multiple alphanumeric characters<br><br>regex.test(string) // true<br><br>string.match(regex) // [ &#39;200&#39;, &#39;bags&#39;, &#39;of&#39;, &#39;rice&#39; ]</pre><h4>Shorthand to match all numeric characters</h4><p>We also have a shorthand for matching only numeric characters, let’s see an example:</p><pre>let numberString = &quot;1245443&quot;<br><br>let regex = /\d/<br><br>regex.test(numberString) // true<br><br>numberString.match(regex) // [&#39;1&#39;]</pre><p>As you saw previously, without the “+” quantifier and global flag <strong>“g”</strong>, we would only get back an individual number as we only checked for a single number.</p><p>Let’s add the <strong>“+”</strong> quantifier:</p><pre>let numberString = &quot;1245443&quot;<br><br>let regex = /\d+/ // Regex for multiple numbers(one or more numbers with no spaces)<br><br>regex.test(numberString) // true<br><br>numberString.match(regex) // [&#39;1245443&#39;]</pre><p>What if we mixed some letters into the Regex?</p><pre>let numberString = &quot;12d4d5f44f3&quot;<br><br>let regex = /\d+/<br><br>regex.test(numberString) // true<br><br>numberString.match(regex) // [&#39;12&#39;]</pre><p>Here, the letter <strong>“d”</strong> disrupts the numbers in the string and our regex is only looking for a single or repeating set of numbers using the <strong>“+”</strong> quantifier.</p><p>Let’s add the global flag:</p><pre>let numberString = &quot;12d4d5f44f3&quot;<br><br>let regex = /\d+/g<br><br>regex.test(numberString) // true<br><br>numberString.match(regex) // [ &#39;12&#39;, &#39;4&#39;, &#39;5&#39;, &#39;44&#39;, &#39;3&#39; ]</pre><p>Now that we use the global flag <strong>“g”</strong> we continue matching any character that fits our regular expression excluding the alphabets present.</p><h3>Matching non-alphanumeric characters</h3><p>We use the <strong>/\W/</strong> regex to match all non-alphanumeric characters:</p><pre>let charString= &quot;!@#$%^&amp;*()_-+=~`` &quot;<br><br>let regex = /\W+/g // Regex for all non-alphanumeric characters<br><br>regex.test(charString) // true<br><br>charString.match(regex) // [ &#39;!@#$%^&amp;*()&#39;, &#39;-+=~`` &#39; ]</pre><p>We get back only character symbols and spaces or whitespace. With this shorthand regex we don’t get back alphabets or numbers or underscore( remember that the regular <strong>/\w/</strong> matches with an underscore).</p><p>We can get back the same results with:</p><pre>let charString = &quot;!@#$%^&amp;*()_-+=~`` &quot;<br><br>let regex = /[^a-zA-Z0-9_]+/g<br><br>regex.test(charString) // true<br><br>charString.match(regex) // [ &#39;!@#$%^&amp;*()&#39;, &#39;-+=~`` &#39; ]</pre><p>I also added an underscore to the regex to get the same behavior as the non-alphanumeric regex(<strong>/\W+/g</strong>).</p><h3>Matching non-numeric characters</h3><p>We can match all non-numeric characters using <strong>/\D/</strong>:</p><pre>let numberString = &quot;1dfdf24d5f44dfdfff3&quot; // mixed numbers and letters<br><br>let regex = /\D+/g // Regex for multiple non-numeric characters<br><br>regex.test(numberString) // true<br><br>numberString.match(regex) // [ &#39;dfdf&#39;, &#39;d&#39;, &#39;f&#39;, &#39;dfdfff&#39; ]</pre><p>We get back all the non-numeric characters, remember in the example we use the global flag <strong>“g”</strong> and the <strong>“+”</strong> quantifier, we can also match symbols.</p><pre>let numberString = &quot;1d!@$%$^%^fdf24d5f44dfdfff3&quot;<br><br>let regex = /\D+/g<br><br>regex.test(numberString) // true<br><br>numberString.match(regex)// [ &#39;d!@$%$^%^fdf&#39;, &#39;d&#39;, &#39;f&#39;, &#39;dfdfff&#39; ]</pre><h3>Find the beginning or ending of a word</h3><p>We can find the beginning and end of a word(or group of characters) with the <strong>“^”</strong> quantifier and <strong>“$”</strong> quantifier.</p><p>Let’s match the beginning of a word</p><pre>let string = &quot;Over the moon&quot;<br><br>let regex = /^o/i <br><br>regex.test(string) // true<br><br>string.match(regex) // [ &#39;O&#39; ]</pre><p>we get back the first letter of the string using the <strong>“^”</strong> quantifier.</p><p>Though this example doesn’t show us how powerful the <strong>“^”</strong> quantifier is, let’s try another one.</p><pre>let string = &quot;Over the moon&quot;<br><br>let regex = /^\w+/i <br><br>regex.test(string) // true<br><br>string.match(regex) // [&#39;Over&#39;]</pre><p>This time we get back the entire word, this is because we used the regex shorthand for alphanumeric characters and the <strong>“+”</strong> quantifier to get back one or more of the beginning string that match as an alphanumeric character(except spaces but including an underscore)</p><p>Let’s see how the <strong>“$”</strong> quantifier works.</p><p>Example:</p><pre>let string= &quot;I will solve 5 leet code problems a day&quot;<br><br>let regex = /day$/g // Regex to match the last letter of the string ending in y and beginning in d and a<br><br>regex.test(string) // true<br><br>string.match(regex) // [ &#39;day&#39; ]</pre><p>In the example above, the regex that was set up will match the string that ends in the letter <strong>“y”</strong> and has <strong>“da”</strong> starting it.</p><p>You might be confused as to why I’ve explained it this way but we can test this statement by simply adding a space at the end of the <strong>“y”</strong> letter in <strong>“day”</strong> at the end of the string.</p><pre>let string = &quot;I will solve 5 leet code problems a day &quot;<br><br>let regex = /day$/g // Regex to find last string &quot;y&quot; starting with &quot;da&quot;<br><br>regex.test(string) // false<br><br>string.match(regex) // null</pre><p>The above regex will not match the string anymore as we aren’t looking for a space that begins with <strong>“day”</strong>, if we did:</p><pre>let string = &quot;I will solve 5 leet code problems a day &quot;<br><br>let regex = /day $/g // Regex to find last string &quot; &quot; starting with &quot;day&quot;<br><br>regex.test(string) // true<br><br>string.match(regex) // [ &#39;day &#39; ]</pre><p>We’d get a match.</p><h4>Matching spaces using the /\s/ shorthand</h4><p>We can match spaces using a shorthand too, lets try to match the last space from the previous example:</p><pre>let string = &quot;I will solve 5 leet code problems a day &quot;<br><br>let regex = /\s$/g // Regex to find last string &quot;y&quot; starting with &quot;da&quot;<br><br>regex.test(string) // true<br><br>string.match(regex) // [&#39; &#39;]</pre><p>We get back an empty array string because we matched the last empty space with both the whitespace shorthand regex and the “$” quantifier for matching the last character or letter.</p><h4>Matching non-whitespace characters with a shorthand</h4><p>There’s also a regex for matching non-whitespace characters(<strong>/\S/</strong>):</p><pre>let string = &quot;Just a random set of strings with white-spaces&quot;<br><br>let regex = /\S+/g // Regex to match all non-whitespace characters<br><br>regex.test(string) // true<br><br>string.match(regex) // [ &#39;Just&#39;, &#39;a&#39;, &#39;random&#39;, &#39;set&#39;, &#39;of&#39;, &#39;strings&#39;, &#39;with&#39;, &#39;white-spaces&#39; ]</pre><p>We get back all the non-whitespace characters.</p><h3>Matching an exact number of characters</h3><p>There is a way to write a regex for an exact number of characters. using {n,} quantifier, n being a number.</p><p>Example:</p><pre>let string = &quot;The weather is so ccccoooollld!&quot;<br><br>let regex = /c{1,4}o{1,}l+d/g // Regex for a &quot;c&quot; appearing from 1 to 4 times, to an &quot;o&quot; appearing atleast once or more, one or more &quot;l&quot; and a &quot;d&quot;<br><br>regex.test(string) // true<br><br>string.match(regex) // [&#39;ccccoooollld&#39;]</pre><p>We used previous quantifiers to create the regex above but also demonstrated matching an exact number of characters with the letter c in our regex having the quantifier <strong>{1,4}</strong> which means we want the string that has <strong>1 to 4 c’s</strong> and then another shorthand quantifier for checking for atleast one or more letter <strong>o’s</strong> with <strong>{1,}.</strong></p><h3>Matching one or another set of characters</h3><p>What if we wanted to match a big range of characters that we cannot set a Character Class for?</p><p>We’d use a capture group “()”</p><pre>let string = &quot;You could say Caroline or Carolin&quot;<br><br>let regex = /c(arolin)e?/gi // Regex for both<br><br>regex.test(string) // true<br><br>string.match(regex) // [ &#39;Caroline&#39;, &#39;Carolin&#39; ]</pre><p>We’d get the multiple cases.</p><h4>Using a “|” to look for one or another</h4><p>We can use the “|” character to look for different strings.</p><p>Example:</p><pre>let string = &quot;yes or no&quot;<br><br>let regex = /(yes|no)/g // Regex with global flag &quot;g&quot; to match more than one set of characters in the capture group<br><br>regex.test(string) // true<br><br>string.match(regex) // [ &#39;yes&#39;, &#39;no&#39; ]</pre><h3>Congratulations</h3><p>Congratulations, you should be somewhat familiar with basic Regex with this knowledge, there are more things to know so I’ll be dropping a reference to learn more about them.</p><p><strong>Regexr</strong></p><p><a href="https://javascript.info/regexp-methods"><strong>JavaScript.info</strong></a></p><p><a href="https://www.javatpoint.com/regex"><strong>Javapoint</strong></a></p><p><a href="https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/regular-expressions/using-the-test-method"><strong>freeCodeCamp</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bedba6932680" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Importance of a Developer Community.]]></title>
            <link>https://davidbayode.medium.com/importance-of-a-developer-community-569ac4bdda47?source=rss-31ac77a3c4ea------2</link>
            <guid isPermaLink="false">https://medium.com/p/569ac4bdda47</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[frontend]]></category>
            <dc:creator><![CDATA[David Bayode]]></dc:creator>
            <pubDate>Tue, 21 Feb 2023 04:05:13 GMT</pubDate>
            <atom:updated>2023-02-21T04:56:00.897Z</atom:updated>
            <content:encoded><![CDATA[<p>As a developer, you will run into problems, face a challenge you’ve never seen before and may need to learn more about a technology you can’t find enough resources for.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*oIf0ihWPlt3M5TLwDdss-w.png" /></figure><p>This is where an active Developer Community comes in. Communities like StackOverflow, GitHub, Slack, Reddit r/learnprogramming etc.</p><figure><img alt="Programming Community" src="https://cdn-images-1.medium.com/max/800/1*62N8udOdz33GYwrZi80eqw.png" /></figure><p>A month ago, I joined Frontend Mentor. This was to accelerate my learning in the context of working like a developer. At the time, I was not familiar with Git(version control system), the command line, intermediate DOM manipulation and was only good with HTML, CSS(and preprocessors like sass) and barebones jQuery.</p><p>The first project that I chose was the <a href="https://www.frontendmentor.io/solutions/qr-code-component-KSA9HHgLmC">QR-Code Component</a>, it was an HTML &amp; CSS project which was not a challenge in my 4 months of learning at the time, the challenge came from my ignorance of Git and the command line. Frontend Mentor requires you to track your projects with Git on your local machine and push commits to a remote repository like GitHub. This gave me incentive to learn Git, GitHub and the command line. I was unaware of the slack community available to Frontend Mentor users at the time so I looked to <a href="http://reddit.com/r/learnprogramming">Reddit</a> for answers, I posted a question along the lines of “How do I learn Git?”, I received a lot of answers but one stood out to me, a visual guide to learning Git, <a href="https://learngitbranching.js.org/">Learngitbranchin</a>g.</p><figure><img alt="Learn Git branching demo" src="https://cdn-images-1.medium.com/max/720/1*ngfQnvZWnw9Np6VL_AtQEQ.png" /></figure><p>After taking the visual guide to Git commands using the provided command line, I downloaded Git Bash and practiced the commands I had learnt.</p><p>Learning Git as a developer is a standard today in the workplace, there are no shortcuts(that I know of) about it, thankfully I had crossed that line. I quickly created a remote repository on GitHub, connected it to my local machine.</p><p>Had I not been part of the r/learnprogramming reddit community I would probably have taken longer to learn Git and procastinated on further.</p><p>Several more Frontend Mentor projects later I came across a different problem, my SCSS file was not responding to media queries. I searched through the sass official docs, posted my question on StackOverflow and Reddit but could not get any answer as to why my scss file was not responding to media queries.</p><p>Getting on the Frontend Mentor Slack community, I was given an answer quickly, my nested had created an oddly high specificity, so my media query could not modify it. After removing the nested selectors I got my layout working responsively for both mobile and desktop screens.</p><figure><img alt="Two states of programmer meme" src="https://cdn-images-1.medium.com/max/1024/1*rBts5s7iAfhpvP4U8rlf-g.png" /></figure><p>You will accelerate your learning participating in communities. You’ll help fellow developers see new and interesting ways of doing things that you may have learnt, which would reinforce your skills and give you greater confidence in them.</p><p>Here are a few things I’ve learnt from joining a lot of developer communities:</p><ol><li>All developers are human.</li><li>Participating in a community is part of learning.</li><li>You debug your code better.</li><li>You gain access to people like you who’re starting.</li></ol><p>Mistakes would be made in your journey and walls would be met, it helps if you have a community to pass through those hurdles and make you an overall better developer.</p><p>Checkout the project that gave me so much trouble:</p><p><a href="https://dreamy-llama-fcda3a.netlify.app/">Live Site here</a>.</p><p><a href="https://github.com/David4bay/Frontend-Mentor-Preview-Card-Solution">Repo here</a>.</p><p>Thanks for reading this short post. What are your experiences with programming/web development communities?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=569ac4bdda47" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Frontend Development : A New Journey.]]></title>
            <link>https://davidbayode.medium.com/frontend-development-a-new-journey-28ebde7951f0?source=rss-31ac77a3c4ea------2</link>
            <guid isPermaLink="false">https://medium.com/p/28ebde7951f0</guid>
            <category><![CDATA[junior-developer]]></category>
            <category><![CDATA[self-taught-developer]]></category>
            <category><![CDATA[frontend-development]]></category>
            <category><![CDATA[self-taught]]></category>
            <category><![CDATA[journey-of-life]]></category>
            <dc:creator><![CDATA[David Bayode]]></dc:creator>
            <pubDate>Tue, 24 Jan 2023 15:57:39 GMT</pubDate>
            <atom:updated>2023-01-24T15:57:39.160Z</atom:updated>
            <content:encoded><![CDATA[<h3>Frontend Development : A New Journey.</h3><p>The journey of a thousand miles they say, begins with a single step. Being aware of that saying, it can feel all too real the depth of your ignorance venturing into tech.</p><figure><img alt="Mountain range and mountaineer." src="https://cdn-images-1.medium.com/max/1024/1*Ou0toLpuqLkYJm74MyOWMQ.jpeg" /><figcaption>The Journey</figcaption></figure><p>Hi, I’m David Bayode. A Nigerian, transitioning into the tech industry, following a self-taught route to achieve my goal.</p><p>Which leads to the question, why Frontend Development?</p><figure><img alt="Question." src="https://cdn-images-1.medium.com/max/640/1*vuLDNcOWxPv_f5TWvzcapw.jpeg" /><figcaption>The Why</figcaption></figure><p>To answer this, I want you avid reader(you are now buddy), to picture growing up in the early 90’s, watching so many new tech products being released each year and tinkering with it as much as you could(in Nigeria, this can be limited).</p><figure><img alt="Nigerian Sub-urbs." src="https://cdn-images-1.medium.com/max/640/1*MQGsKvhMqRAmFEUjovKBOg.jpeg" /><figcaption>Sub-Urban West Nigeria</figcaption></figure><p>From toys to computers, tearing it apart(you know what your Nigerian parents would do to you if it broke and you couldn’t fix it, haha) and piecing it back together while tinkering with it to see the results.</p><p>This fascination led to me using cgi-bin “hacks” to browse for free on the MTN Network at the time.</p><figure><img alt="Jigsaw puzzle." src="https://cdn-images-1.medium.com/max/640/1*CmCNTWIEudygLFlENYCDng.jpeg" /><figcaption>Figuring things out</figcaption></figure><p>It was fun and simple back then because your mind bottled the complexity into, just try this now and see what happens to, wow! I can do this with what I just pieced together.</p><p>Ofcourse with school, chores and the keeping up with grades one could not stick to the hobby and so over the years the amount of tinkering behind the gears of software changed and even when the interest was there in the university the time was not, sadly.</p><p>The little last bits of tech I touched was crypto in 2014 or so where I mined Bitcoin using the now defunct website “moonbitcoin/moonbtc” for a few months, only to get access to my BTC account around 2020 to see it had accrued to an impressive amount.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*SDuH-Kc6X5L4uAVNfZQ-WA.jpeg" /></figure><p>Long story short my bout into crypto made me financially obligated to investigate that space which reaped good benefits but grew dissatisfied with the rampant scams, rugpulls and hacks in the space.</p><p>For a Nigerian I can tell you it hits different being rugpulled as you may have just lost years of income(feasibly even a decades worth).</p><p>Thankfully, this was not the case for me and so I chose to explore Web Development and grow into understanding the various tech that powers the web(pssst, it’s mostly JavaScript :) ).</p><p>Wait! What even is the Frontend Development anyway?</p><p>“Front-end web development is the development of the graphical user interface of a website, through the use of HTML, CSS, and JavaScript, so that users can view and interact with that website.”</p><p>—<a href="https://en.wikipedia.org/wiki/Front-end_web_development"> wikipedia</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*M36QdaDMwKnJUOP_1ytkKg.png" /></figure><p>So, the front-facing interface you interact with on a daily basis is the result of combining more or less these three technologies(HTML, CSS &amp; JavaScript).</p><p>The logic behind how information is read, updated, created and deleted has to do with the Backend(no, seriously it’s called that). I hope to learn this on my journey a bit enough to know the full picture while focusing on the front stack I’ve invested into.</p><p>So I say, see you soon and give you updates on how much I’ve learnt during my four/five months studying, practicing and building for the frontend. Thank you for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28ebde7951f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Categories of Cryptocurrencies and their uses.]]></title>
            <link>https://davidbayode.medium.com/categories-of-cryptocurrencies-and-their-uses-ad5ddd24120c?source=rss-31ac77a3c4ea------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad5ddd24120c</guid>
            <dc:creator><![CDATA[David Bayode]]></dc:creator>
            <pubDate>Fri, 24 Sep 2021 18:58:19 GMT</pubDate>
            <atom:updated>2021-09-24T18:58:19.879Z</atom:updated>
            <content:encoded><![CDATA[<p>In the previous post, I explained what cryptocurrencies are and why they’re valuable. Now I’d like to provide brief examples of the different categories of cryptocurrencies and their use-cases. Starting from;</p><p>Stablecoins.</p><p>Smart Contract Cryptos.</p><p>Decentralized Finance(DeFi).</p><p>Gaming.</p><p>and much more.</p><h3><strong>Stablecoins</strong></h3><p><strong>What is a stablecoin?</strong> Stablecoin is a cryptocurrency that is designed to minimize volatility by pegging to a more stable asset. Fiat currency digital asset is the most popular use case for stablecoins. It typically tracks popular national currencies such as the US Dollar, Euro, and the British Pound. Benefit of this includes being able to take advantage of blockchain technology and peer-to-peer value transfer while not being exposed to high volatility such as bitcoin, ethereum, or other cryptocurrencies. Stablecoins are relatively new kind of technology and each of them comes with different implementations, liquidity, risks, and acceptance.</p><p><a href="https://www.coingecko.com/en/categories/stablecoins">Top Stablecoins by Market Capitalization - CoinGecko</a></p><p>In Nigeria, Nigerians who trade cryptocurrencies are mostly exposed to USDT(USD Tether pegged to $1), BUSD(Binance USD also pegged to $1) and DAI as funding options through peer-to-peer services of Binance(after the ban of directing funding through ATM’s by the Central Bank of Nigeria.</p><p>Stablecoins keeps your capital in the cryptocurrency market without the worry of flunctuating prices as they’re stable and can be seemlessly used to buy the crypto of your choosing.</p><p>Nigerians often trade using USDT as that is the stablecoin they’re accostumed to as of this writing.</p><h3><strong>Smart Contract Cryptos</strong></h3><p>“A smart contract is an agreement between two people in the form of computer code. They run on the blockchain, so they are stored on a public database and cannot be changed.</p><p>The transactions that happen in a smart contract are processed by the blockchain, which means they can be sent automatically without a third party. <em>This means there is no one to rely on!</em></p><p>The transactions only happen when the conditions in the agreement are met — there is no third party, so there are no issues with trust.</p><p>Let’s imagine that John wants to buy Mike’s house. This agreement is formed on the Ethereum blockchain using a smart contract. This smart contract contains an agreement between John and Mike.</p><p>In the simplest terms, the agreement will look like this: <em>WHEN John pays Mike 300 Ether, THEN John will receive ownership of the house</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/0*M_ky7jm5ivrQeGnE.jpg" /></figure><p>Once this smart contract agreement has been put into place, it cannot be changed — meaning John can feel safe to pay Mike 300 Ether for the house.</p><p>Without the use of a smart contract in this scenario, Mike and John would have to pay lots of fees to third-party companies. Including the bank, a lawyer and a house broker.”</p><p><a href="https://www.bitdegree.org/crypto/tutorials/what-is-a-smart-contract">What is a Smart Contract and How do Smart Contracts Work</a></p><p><strong>How?</strong></p><p>“As mentioned before, we have the blockchain to thank. Because of blockchain technology, we are able to <a href="https://en.wikipedia.org/wiki/Decentralization"><em>decentralize</em></a> smart contracts so that they are fair and trustless. By decentralizing, I mean that they are not controlled by one central party (<em>like a bank, broker, or government, etc.).</em></p><p>The blockchain is a shared database run by many computers (<em>called</em> ‘<em>nodes’</em>) belonging to many different people. Because of this, not one single person or company has control of it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/0*UTVKjEgMFxdvbqhQ.jpg" /></figure><p>It means it’s near impossible to hack it — the hacker would need to hack more than half of the nodes if they wanted to attack the blockchain or the smart contracts that run on it.”</p><p><a href="https://www.bitdegree.org/crypto/tutorials/what-is-a-smart-contract">What is a Smart Contract and How do Smart Contracts Work</a></p><h3><strong>Decentralized Finance(DeFi)</strong></h3><p>“DeFi is a collective term for financial products and services that are accessible to anyone who can use Ethereum — anyone with an internet connection. With DeFi, the markets are always open and there are no centralized authorities who can block payments or deny you access to anything. Services that were previously slow and at risk of human error are automatic and safer now that they’re handled by code that anyone can inspect and scrutinize.</p><p>There’s a booming crypto economy out there, where you can lend, borrow, long/short, earn interest, and more. Crypto-savvy Argentinians have used DeFi to escape crippling inflation. Companies have started streaming their employees their wages in real time. Some folks have even taken out and paid off loans worth millions of dollars without the need for any personal identification.” <a href="https://ethereum.org/en/defi/">https://ethereum.org/en/defi/</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FH-O3r2YMWJ4&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DH-O3r2YMWJ4&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2FH-O3r2YMWJ4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/81c2ef745adbcb7558a3f2afd24c7bfb/href">https://medium.com/media/81c2ef745adbcb7558a3f2afd24c7bfb/href</a></iframe><h3>DeFi vs traditional finance</h3><p>“One of the best ways to see the potential of DeFi is to understand the problems that exist today.</p><ul><li>Some people aren’t granted access to set up a bank account or use financial services.</li><li>Lack of access to financial services can prevent people from being employable.</li><li>Financial services can block you from getting paid.</li><li>A hidden charge of financial services is your personal data.</li><li>Governments and centralized institutions can close down markets at will.</li><li>Trading hours often limited to business hours of specific time zone.</li><li>Money transfers can take days due to internal human processes.</li><li>There’s a premium to financial services because intermediary institutions need their cut.”</li></ul><p><a href="https://ethereum.org/en/defi/">Decentralized finance (DeFi) | ethereum.org</a></p><h3><strong>Gaming</strong></h3><p>“Traditional games are centralized. In other words, the characters, skins, weapons and all coding that is done for a game cannot be used for other games. Whereas, crypto gaming allows everyone associated with the game to own a part of the game. When implied to games, characters and other resources might work with other games. Users will be able to transfer their rewards and purchases that are made in-game to other games as well.</p><p>Crypto games can implement blockchain technology for two purposes. The developers can either create the whole game on a blockchain or they can simply use it for the in-game currency. In the former case, every interaction within the game is verified and stored in the form of new blocks in the blockchain. For the second case, non-fungible tokens or NFTs can be used for in-game digital assets.</p><p>Crypto gaming is a decentralized form of gaming where players can own unique in-game assets and sell them for real-world money to anyone who is interested. In other words, digital assets can be traded for cryptocurrency, which can then be exchanged for real-world money. In nutshell, crypto games are made by using a complete or partial blockchain system to store information about unique assets which are completely owned by players. This is how users make money from crypto gaming.”</p><p><a href="https://www.republicworld.com/technology-news/other-tech-news/crypto-games-what-is-crypto-gaming-how-its-used-to-make-money-check-details.html">Crypto Games: What is Crypto Gaming? How it&#39;s used to make money? Check details</a></p><p>More categories of crypto can be found in the link below.</p><p><a href="https://www.coingecko.com/en/categories">Top Crypto Categories by Market Cap | CoinGecko</a></p><p>This was all that was covered today on Dave’s Free Crypto Tutorial group on Telegram. This blog is an attempt to post in tandem to the group and on the same topics. Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad5ddd24120c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Cryptocurrencies are :]]></title>
            <link>https://davidbayode.medium.com/what-cryptocurrencies-are-7cae2516f75c?source=rss-31ac77a3c4ea------2</link>
            <guid isPermaLink="false">https://medium.com/p/7cae2516f75c</guid>
            <dc:creator><![CDATA[David Bayode]]></dc:creator>
            <pubDate>Thu, 23 Sep 2021 14:30:20 GMT</pubDate>
            <atom:updated>2021-09-24T17:47:15.929Z</atom:updated>
            <content:encoded><![CDATA[<h3>What Cryptocurrencies are</h3><p>“A cryptocurrency is a digital or virtual currency that is secured by cryptography, which makes it nearly impossible to counterfeit or double-spend.”</p><p><a href="https://www.investopedia.com/terms/c/cryptocurrency.asp">Cryptocurrency Explained With Pros and Cons for Investment</a></p><p>Every financial system has to have some sort of currency, cryptocurrency as a proof of concept was pioneered by an unknown individual or group of individuals going by the name Satoshi Nakamoto.</p><p>Using cryptography, which are methods one converts plain text to unintelligible data backed by mathematics he/she/they built the first digital cryptocurrency, Bitcoin.</p><p>Bitcoin is the first cryptocurrency created and also the first cryptocurrency blockchain.</p><h3><strong>What is a Blockchain?</strong></h3><p>“Blockchain is a system of recording information in a way that makes it difficult or impossible to change, hack, or cheat the system.</p><p>A blockchain is essentially a digital ledger of transactions that is duplicated and distributed across the entire network of computer systems on the blockchain.</p><p>Each block in the chain contains a number of transactions, and every time a new transaction occurs on the blockchain, a record of that transaction is added to every participant’s ledger. -</p><p>The decentralised database managed by multiple participants is known as Distributed Ledger Technology (DLT).”</p><p><a href="https://www.euromoney.com/learning/blockchain-explained/what-is-blockchain">https://www.euromoney.com/learning/blockchain-explained/what-is-blockchain</a>)</p><p>Basically once a secure digital asset like cryptocurrencies exist, they need to be stored in a way where each transaction is safe from being changed from its original state, this is ensured by the blockchain(an online ledger of transactions) that records and spreads all the information around all computer nodes running the blockchain.</p><p>These operators who run the network can fall under several categories based on the type of work they do to secure the network.</p><p>They mostly depend on what they do to secure the network.</p><p>These are mostly divided into ;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*0aDhJjC4THE7fGGuaV27Vw.png" /></figure><p>Proof of work participants are called miners, they offer up their computational power to mine(create and maintain blocks for the Blockchain) the crypto. These miners gain crypto each time they succeed in mining a new block before anyone else.</p><p>“The proof of stake was created as an alternative to the proof of work (PoW) concept, to tackle inherent issues in the latter.</p><p>Currently, only altcoins use the proof of stake concept.</p><p>When a transaction is initiated, the transaction data is fitted into a block with a maximum capacity of 1 megabyte, and then duplicated across multiple computers or nodes on the network.</p><p>The nodes are the administrative body of the blockchain and verify the legitimacy of the transactions in each block.”</p><p><a href="https://www.investopedia.com/terms/p/proof-stake-pos.asp">What Does Proof-of-Stake (PoS) Mean in Crypto?</a></p><p>Both methods of confirming transactions on the blockchain are known as “consensus mechanisms”. As a regular trader/investor of cryptocurrency you do not need to run the whole network for rewards as most cryptocurrencies require specialized equipment to mine. Most users opt to stake or act as delegators who do not need to run a computer node but stake their crypto for rewards.</p><p>Here are various sources that go in-depth :</p><ul><li><a href="https://www.investopedia.com/terms/c/consensus-mechanism-cryptocurrency.asp">Consensus Mechanism (Cryptocurrency)</a></li><li><a href="https://ethereum.org/en/developers/docs/consensus-mechanisms/">Consensus mechanisms | ethereum.org</a></li></ul><p>Now we’ve learnt what cryptocurrencies are, why they’re secure and the technologies behind them. You can do further reading on the provided links.</p><h3>Functions of Cryptocurrency</h3><p>Since cryptocurrencies provide a greater security than the traditional banking system they allow individuals to act autonomously and anonymously with their money.</p><p>This creates new financial markets and use-cases that cryptocurrencies can perform.</p><p>Examples of these are : DeFi(Decentralized Finance), NFT’s(Non-Fungible Tokens), Gaming(Play-to-earn), Gambling, Storage(IPFS technology), Smart Contract Protocols(Ethereum, Cardano, Tron, etc)</p><p>Seemless and affordable means to transfer money with less fees than traditional banking.</p><p>Ownership and authenticity of digital assets as NFTs(unlike regular cryptocurrencies which users identity are hidden and only transactional history may be found), NFTs provide proof of authenticity of artworks and other digital items which can’t be replicated and can always be proven.</p><p>Granting financial access to the unbanked, most nations individuals have mobile phones but no bank accounts, either to avoid fees or the lack of know-how, access to mobile phones with internet access instantly grants the individual all the banking sector has to offer without ever needing to step in a bank as long as he/she can offer value through peer-to-peer systems.</p><p>and more..</p><p>Now we will go into the use cases of cryptocurrencies.</p><p>Note that a blockchain hosts whatever cryptocurrency that was created in it’s network and can also host other cryptos who are not created under itself but pegged to the network.</p><p>Most of you will be familiar in the coming days/weeks on how to send cryptocurrencies safely but before that be aware that cryptocurrencies fall under whatever blockchain/network that hosts them and sending crypto to the wrong address/network essentially means that crypto is lost forever.</p><p>Cryptocurrency networks will list in the following formats ;</p><p>ERC20(For Ethereum)</p><p>BEP20(For Binance Smart Chain)</p><p>TRC20(For the Tron Blockchain)</p><p>CSC20(For the Coinex SmartChain)</p><p>etc…</p><p>On the use-cases of cryptocurrencies(Take note as this is what gives some value over others).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L1yecP_t32IKajB61--ocQ.png" /></figure><p>We will touch cryptocurrency categories in the upcoming tutorials, I hoped you’ve learnt a bit.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7cae2516f75c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>