<?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: Yani A.</title>
    <description>The latest articles on DEV Community by Yani A. (@yani82).</description>
    <link>https://dev.to/yani82</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%2F692000%2F2b5964ea-48eb-4a63-91ab-3f744a1a8a59.png</url>
      <title>DEV Community: Yani A.</title>
      <link>https://dev.to/yani82</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yani82"/>
    <language>en</language>
    <item>
      <title>Implement a Payment Solution Provider</title>
      <dc:creator>Yani A.</dc:creator>
      <pubDate>Sat, 26 Mar 2022 03:55:28 +0000</pubDate>
      <link>https://dev.to/yani82/implement-payment-methods-51eh</link>
      <guid>https://dev.to/yani82/implement-payment-methods-51eh</guid>
      <description>&lt;h3&gt;
  
  
  When do you need to implement a payment system? Which payment solution provider is the best to use? In this blog, I attempt to figure out which payment solution provider to implement onto your app or website, and why.
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/l0MYDoN32puQXNmx2/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/l0MYDoN32puQXNmx2/giphy.gif" alt="How the heck do I pay?" width="600" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  When Do We Use a Payment System
&lt;/h4&gt;

&lt;p&gt;I was inspired to write about this topic after meeting with a founder of a start-up I'm really interested in freelancing for. He wanted to convert his websites written in PHP on WordPress natively and he wanted to implement &lt;a href="https://stripe.com/"&gt;Stripe&lt;/a&gt; as a payment system. As a practice, I decided I'd try my hand at building an app that gave me an opportunity to practice how to implement the usage of Stripe. I chose to refer to JavaScript Mastery's "ECommerce Web Shop - Build &amp;amp; Deploy an Amazing App | React.js, Commerce.js, Stripe" &lt;a href="https://youtu.be/377AQ0y6LPA"&gt;video&lt;/a&gt;, which was extremely helpful. It also gave me the chance to try out &lt;a href="https://commercejs.com/"&gt;Commerce.js&lt;/a&gt;. In addition, it was developed responsively.  &lt;/p&gt;

&lt;p&gt;As mentioned above, when do we need to use a payment system in our apps or websites? Usually, we would need to incorporate this essential function of being able to make a payment for an item or service when it's an e-commerce app or website. This functionality allows users to conveniently make a payment for any items or services that they choose to purchase. In some cases, a transaction needs to be made when it involves investing funds or online banking; not necessarily to purchase anything. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/10Qc9DdLbcSKuk/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/10Qc9DdLbcSKuk/giphy.gif" alt="There are so many ways to pay" width="500" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Types of Payment Solution Providers
&lt;/h4&gt;

&lt;p&gt;The most common payment solution provider that has been a catalyst in the scene is PayPal. PayPal used to be so advanced back in the day, but from exprience, they've now fell short with their cyber security and customer service; they seem to side with the seller in most cases, making it difficult to claim for items that were not received or when receiving damaged goods. &lt;/p&gt;

&lt;p&gt;Today, more and more payment solution providers have sprouted making it hard to select which one to use. You could also opt to use multiple payment solutions, so the user can have the liberty to select which one is the most convenient. According to Kilpatrick, S. of &lt;a href="https://www.bigcommerce.com/blog/ecommerce-payment-processing/#7-examples-of-ecommerce-payment-solutions"&gt;BigCommerce&lt;/a&gt;, the 7 examples of e-commerce payment solutions (besides PayPal) are: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stripe&lt;/li&gt;
&lt;li&gt;Square &lt;/li&gt;
&lt;li&gt;BlueSnap &lt;/li&gt;
&lt;li&gt;Amazon Pay &lt;/li&gt;
&lt;li&gt;Klarna &lt;/li&gt;
&lt;li&gt;Sezzle
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/NxT7L0g2xY2waymXxB/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/NxT7L0g2xY2waymXxB/giphy.gif" alt="Thumbs up wallet" width="512" height="512"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;To summarize, whichever payment solution you end up using on your app or website really depends on what you and your users' needs are. Therefore, there really isn't a wrong choice. &lt;/p&gt;

</description>
      <category>stripe</category>
      <category>payments</category>
      <category>commercejs</category>
      <category>ecommerce</category>
    </item>
    <item>
      <title>Things I Wish I Knew Before I Enrolled in a Coding Bootcamp</title>
      <dc:creator>Yani A.</dc:creator>
      <pubDate>Fri, 18 Mar 2022 05:34:15 +0000</pubDate>
      <link>https://dev.to/yani82/things-i-wish-i-knew-before-i-enrolled-in-a-coding-bootcamp-1m9o</link>
      <guid>https://dev.to/yani82/things-i-wish-i-knew-before-i-enrolled-in-a-coding-bootcamp-1m9o</guid>
      <description>&lt;p&gt;For the longest time, I’ve always wanted to learn how to code. I never had the time nor the funds. When I got furloughed at the peak of the pandemic, I thought it was the perfect time to enroll in a part-time Software Engineering bootcamp.&lt;/p&gt;

&lt;p&gt;This blog is going to speak to those who are thinking of doing the same thing. I hope this better prepares you for the bootcamp, that would in turn, better prepare you for the job hunt that follows. This is only the tip of the iceberg my friends.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/3o72F7RrTPW6jymXew/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/3o72F7RrTPW6jymXew/giphy.gif" alt="Is this real?" width="480" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Top 11 Things I Wish I Knew
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Do ALL of the pre-work&lt;/strong&gt;&lt;br&gt;
The bootcamp that I went to requires you to complete a pre-work course before starting the real course. Doing the pre-work in advance gives you the much needed familiarization, and practice to make you better prepared to take on the intense learning that's to come.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Concentrate&lt;/strong&gt;&lt;br&gt;
Fully focus on the course and don’t try to take another course at the same time. During the peak of the pandemic there were so many free courses available, so I jumped at taking a pre-course on Digital Literacy, too. Although, it wasn’t as difficult as coding, the assignments required a lot of time which took from the time I could’ve been more immersed in the bootcamp.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. No Cheating&lt;/strong&gt; &lt;br&gt;
Do not look at any solutions until you’ve tried solving a problem on your own for at least 20 minutes (as advised by instructors). Exhaust all resources before succumbing to looking at the solution (ie documentation, Stack Overflow, pair programming). Your mind will better grasp the concepts and the process of getting to where you need to be.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Don't Be Afraid or Shy to Ask Questions&lt;/strong&gt;&lt;br&gt;
Ask as many questions as you want to to your instructor and tech support team. No question is a stupid question. It is difficult to build the courage to ask, but soon you'll be a natural at it. Always remember your goal is to learn as much as possible in a short duration of time. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Take Advantage of All the Resources Provided&lt;/strong&gt; &lt;br&gt;
Schedule as many 1:1s as you can with your instructor. That's what they're there for. Utilize all the resources that are given to you. My fellow cohort mate also reminded me, "to make your money's worth!" Even though we had only 10-20 minutes at the most, you can that extra attention to ask something specific or help to unblock you from an error. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Be a Few Steps Ahead&lt;/strong&gt;&lt;br&gt;
Try to cover two labs in advance of that particular week's curriculum. Our curriculum actually gave a lot of hints as to how to better understand the previous labs. Additionally, start with your project conceptualizing from the beginning of the module and implement them as you go along, so you really understand what each lesson in the lab is used for. In turn, it will be faster to complete. Plus, you’ll be able to talk about your project during your assessments with ease. This will give you ample time to meet not only all the minimum requirements, but fix any bugs and make your project more polished.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. No Screen Time&lt;/strong&gt; &lt;br&gt;
Sacrifice your screen time, be it social media or watching any shows or movies. It can wait. I'm still trying to kick the habit and be better with my screen time management.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. Read&lt;/strong&gt; &lt;br&gt;
Take at least 15 minutes of your day to read any programming books like You Don’t Know JavaScript or The Ruby Programming Language. Supplementing your knowledge outside of the bootcamp will give you that extra boost to stay on track with the fast paced course. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9. Data Structures &amp;amp; Algorithms&lt;/strong&gt;&lt;br&gt;
Start studying data structures and algorithms for fun, way before your job hunt. Join all the study groups that work with your schedule and be consistent with attending them. Even exposing yourself to the thought process of others, will give you a head start on how to engrain the patterns in your brain for tech interviews. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;10. Network, Network, Network&lt;/strong&gt; &lt;br&gt;
Start networking and join as many communities out there either on Slack, Discord, LinkedIn or whatever else you feel comfortable with.  I know a few alumnus who weren't the networking type and opened a LinkedIn just for the sole purpose of finding a job. As for me, I love meeting new people and making connections so it came naturally to me, but that can also be borderline distracting because I feel obligated to check every channel on Slack, and check every message. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;11. Prioritize&lt;/strong&gt; &lt;br&gt;
Be as helpful as you can, but don't forget to prioritize on your needs first. Perhaps what you can do is you can help others only after you've completed your labs and projects. &lt;/p&gt;

&lt;h3&gt;
  
  
  Reality Check
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/ihT0SRV0Yg5lTIqOfD/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/ihT0SRV0Yg5lTIqOfD/giphy.gif" alt="Reality Check" width="480" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Of course, this is all easier said than done. Some of us are parents, caregivers, veterans with PTSD, have learning disabilities and other personal issues. I had cohort mates that caught Covid-19 so that took a huge chunk out of their productivity. Life happens and anything can happen at the most unexpected of times. &lt;/p&gt;

&lt;p&gt;As for me, I had to resit my JavaScript module due to a sudden change of instructors and that threw me off. I also gave birth to my second child just as I was passing my JavaScript assessment, so I of course had to take a leave of absence for a month before continuing on with my last module. &lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/RCLujBaGZW5CtxvoFG/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/RCLujBaGZW5CtxvoFG/giphy.gif" alt="Coding is Therapeutic and Life Changing" width="480" height="288"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We all have different reasons why we want to sign up for a coding bootcamp. Be it to learn Software Engineering, Data Analytics, Data Science, or UI/UX. Maybe to be able to create apps, a career change, provide a better life for your family or to pivot from an existing tech job. We equally come from different circumstances and have our own struggles that will effect our productivity and it can be beyond our control. I learned that you can’t expect people to understand, but always be kind regardless because you can never compare what you’re going through with what other people are going through. Try to empathize, listen and sincerely help whenever you can because that is you paying it forward for all the times someone was there for you. Enrolling in a coding bootcamp is not an easy path to take, but it sure is a rewarding one! I wish you all the best! &lt;/p&gt;

&lt;p&gt;*&lt;em&gt;I hope to be starting my first job soon and would be open to help. Please feel free to get in touch with me on &lt;a href="https://www.linkedin.com/in/yani-asari/"&gt;LinkedIn&lt;/a&gt; if you need help with anything or have any questions that can make this transition easier.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>codingbootcamp</category>
      <category>codenewbie</category>
      <category>beginners</category>
      <category>productivity</category>
    </item>
    <item>
      <title>What in the CRUD?</title>
      <dc:creator>Yani A.</dc:creator>
      <pubDate>Sat, 12 Mar 2022 03:18:45 +0000</pubDate>
      <link>https://dev.to/yani82/what-in-the-crud-2ihf</link>
      <guid>https://dev.to/yani82/what-in-the-crud-2ihf</guid>
      <description>&lt;p&gt;The title is also what I would be swearing under my breath when I couldn’t get a CRUD function to work.&lt;/p&gt;

&lt;p&gt;What are CRUD functions? When do we utilize them? How do we make them work? &lt;/p&gt;

&lt;p&gt;In this blog, I go back to the basics and try to answer all these questions about what CRUD is. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/l3V0mgFspVuDAJK9y/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/l3V0mgFspVuDAJK9y/giphy.gif" alt="Oh CRUD!" width="500" height="281"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  So, what is CRUD?
&lt;/h3&gt;

&lt;p&gt;CRUD stands for: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create&lt;/li&gt;
&lt;li&gt;Read &lt;/li&gt;
&lt;li&gt;Update&lt;/li&gt;
&lt;li&gt;Delete &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;According to &lt;a href="https://www.sumologic.com/glossary/crud/"&gt;Sumologic&lt;/a&gt;'s glossary, CRUD refers to an acronym that refers to the four functions mentioned above, that are necessary to implement a persistent storage application. &lt;/p&gt;

&lt;p&gt;Referring to the example in Altvater, A.'s article in &lt;a href="https://stackify.com/what-are-crud-operations/"&gt;Stackify by Netreo&lt;/a&gt;, &lt;strong&gt;Create&lt;/strong&gt; performs the &lt;code&gt;INSERT&lt;/code&gt; statement to create a new record. While &lt;strong&gt;Read&lt;/strong&gt;, &lt;code&gt;SELECT&lt;/code&gt;s the table's records based on the primary keynoted within the input parameter. &lt;strong&gt;Update&lt;/strong&gt; executes an &lt;code&gt;UPDATE&lt;/code&gt; statement on the table based on the specified primary key for a record within the &lt;code&gt;WHERE&lt;/code&gt; clause of the statement. &lt;strong&gt;DELETE&lt;/strong&gt;, &lt;code&gt;DELETE&lt;/code&gt;s a specified row in the &lt;code&gt;WHERE&lt;/code&gt; clause. &lt;/p&gt;

&lt;p&gt;In addition, each letter in CRUD can also be mapped to an HTTP protocol method, where: &lt;br&gt;
CREATE = POST&lt;br&gt;
READ = GET&lt;br&gt;
UPDATE = PUT &lt;br&gt;
DELETE = DELETE &lt;/p&gt;

&lt;h3&gt;
  
  
  Why is CRUD important?
&lt;/h3&gt;

&lt;p&gt;Can you recall any of these functions you used in your projects? Did you need all of them, or just one? What's the significance of each depending on what you want to do in your app? Just in case you need a refresher, here's a quick tutorial by Johnson, J. of BudiBase on "&lt;a href="https://www.youtube.com/watch?v=DsBudu6Kzls"&gt;How to Build a CRUD Application&lt;/a&gt;". &lt;/p&gt;

&lt;p&gt;CRUD operations are essential for both developers and end-users as it provides security control, for one. With this in mind, it is more performant versus SQL statements. Unquestionably, it's tried and tested, as it's a recognized pattern and recognizable by most developers. &lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;I hope this was a comprehensive resource to better understand what CRUD is, and you can better implement it in your future projects!  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/Dk57URqjqjHjNGHeMV/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/Dk57URqjqjHjNGHeMV/giphy.gif" alt="Get set, get ready, CODE!" width="498" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>rails</category>
      <category>mvc</category>
      <category>beginners</category>
      <category>database</category>
    </item>
    <item>
      <title>String Manipulation Methods to Memorize</title>
      <dc:creator>Yani A.</dc:creator>
      <pubDate>Sat, 05 Mar 2022 04:38:32 +0000</pubDate>
      <link>https://dev.to/yani82/string-manipulation-methods-to-memorize-49e0</link>
      <guid>https://dev.to/yani82/string-manipulation-methods-to-memorize-49e0</guid>
      <description>&lt;p&gt;A common tech interview question I’ve received a lot is on &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String"&gt;string&lt;/a&gt; manipulation. This involves a request to return a desired value out of a given string.&lt;/p&gt;

&lt;p&gt;In this blog, I list down the most common string manipulation methods to memorize so you can easily answer such questions when asked in tech interviews. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/J1XPgsiD4QQ4WsVyKG/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/J1XPgsiD4QQ4WsVyKG/giphy.gif" alt="strings" width="250" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Stringing Along
&lt;/h3&gt;

&lt;p&gt;I was recently asked this coding challenge in an interview which was fairly easy if I wasn't so nervous and had only studied data structures and algorithms the week before.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Write a function called "abbreviate" that outputs a string.  
// Given a string, keep the first and last letter and replace the letters in between by the length. 
// e.g. internationalization =&amp;gt; i18n, localization =&amp;gt; l10n
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It took me longer than usual to remember what methods to use to achieve the output desired. Of course, using the handy &lt;code&gt;console.log&lt;/code&gt;, I was able to test out some possible methods, but I still had to search for specific ones online before getting the solution. Below was what I came up with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const abbreviate = (input) =&amp;gt; {
    return input.length &amp;lt; 3 ? input : [input[0], input.length - 2, input[input.length-1]].join(''); 
};

const result = abbreviate("internationalization");

console.log(result);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This in turn made me reevaluate ways to etch these common string manipulation methods in my head. As a result, I'm compiling the cheat list below to assist with that. &lt;/p&gt;

&lt;h3&gt;
  
  
  Common String Manipulation Methods
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/5zkDXMbwJ7OiUT9vyn/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/5zkDXMbwJ7OiUT9vyn/giphy.gif" alt="violin strings break" width="350" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  str.length
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;returns the length of the string
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let str = "zen"; 
console.log(str.length); // outputs 3 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  charAt(index)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;treats the string as an array of characters &lt;/li&gt;
&lt;li&gt;retrieves the character at the index provided &lt;/li&gt;
&lt;li&gt;used to check string for consistency &lt;/li&gt;
&lt;li&gt;the last index is &lt;code&gt;string.length - 1&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let str = 'Strings';
console.log(str.chatAt(3)); // outputs i 
console.log(str.charAt(6)); // outputs s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  concat(string)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;concatenate two string together into one &lt;/li&gt;
&lt;li&gt;used to append to a string or combine them
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const str1 = 'purple';
const str2 = 'balloon'; 
console.log(str1.concat(str2)); // outputs 'purple balloon' 

// or by inserting string variables into another string to achieve cleaner code 

const str1 = 'purple';
const str2 = 'balloon';
const sampleStr = `${purple} ${balloon}`; 
console.log(sampleStr); // outputs purple balloon 

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

&lt;/div&gt;



&lt;h4&gt;
  
  
  includes(string)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;check whether or not a string contains a substring
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const str = 'what up';
console.log(str.includes('what')); // true
console.log(str.includes('down')); // false 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  match(regex string)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;checks if a string matches a regular expression
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const firstName = "Matt";
const badFirstName = "Matthew4";
const nameRegex = /^[a-zA-Z]+$/ 

console.log(firstName.match(nameRegex)); // true
console.log(badFirstName.match(nameRegex)); // false 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  replace(stringToBeReplaced, stringToAdd)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;takes an occurence of a character in a string and replaces it with another character
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const userInput = '917 716 4543'; 
console.log(userInput.replace(' ', '-')); // 917-716-4543
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  split(string)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;return an array of substrings when needing to split a string
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const seeyou = "See You"; 

const seeYouSplit = see.split(' '); 
console.log(seeYouSplit); // ["See", "You"]; 
console.log(seeYouSplit[0]); // "See"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  substring(index, index)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;when needing to split a string at a certain index or range of indices, you pass this function in the index of the element you want to start at, as well as the index in the string you want the substring to end at
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const goodbye = 'Goodbye Friend'; 
console.log(goodbye.substring(1, 4); // ood
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  toLowercase()/toUppercase()
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;used to make sure the string isn't case-sensitive
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const firstName = "Yani"; 
console.log(firstName.toUpperCase()); // YANI
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  trim()
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;removes whitespace from any string
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const strWithSpace = 'Yani '; 
console.log(strWithSpace.trim()); // outputs 'Yani' 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;The main take away from this blog is that it's always smart to strengthen your foundational knowledge first before embarking on more complex topics like data structures and algorithms. I hope this blog was helpful! &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>strings</category>
      <category>methods</category>
      <category>techinterviews</category>
    </item>
    <item>
      <title>Top 10 Handy JavaScript Tips To Know </title>
      <dc:creator>Yani A.</dc:creator>
      <pubDate>Wed, 23 Feb 2022 00:19:06 +0000</pubDate>
      <link>https://dev.to/yani82/top-10-handy-javascript-tips-to-know-1092</link>
      <guid>https://dev.to/yani82/top-10-handy-javascript-tips-to-know-1092</guid>
      <description>&lt;p&gt;This blog was inspired by &lt;a href="https://twitter.com/devarias_/status/1495446577879658499?s=20&amp;amp;t=jE8yIjDBzf8tyclPjlU_vg"&gt;David Arias Fuentes&lt;/a&gt;' tweet: "15 Magical JavaScript Tips for Every Web Developer". I loved it so much, I had to share it with my network. I had DM'ed him beforehand before publishing this post. Please follow him for more helpful posts! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/clEONqsy81tAMluJUA/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/clEONqsy81tAMluJUA/giphy.gif" alt="How handy!" width="480" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Flatten the array of the array&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This tip will help you to flatten a deeply nested array of arrays by using Infinity in flat.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RB7JhOgv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/od2s7tyrnbfr926ahc99.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RB7JhOgv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/od2s7tyrnbfr926ahc99.png" alt="Flatten the array" width="689" height="175"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Easy Exchange Variables&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You probably swap the two variables using a third variable temp. But this tip will show you a new way to exchange variables using destructuring.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kT8XHDEp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kqzxw1ndz7rltgw7qhr6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kT8XHDEp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kqzxw1ndz7rltgw7qhr6.png" alt="Easy Exchages" width="184" height="172"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Sort Alphabetically&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sorting is a common problem in programming, and this tip will save your valuable time by writing a long code to sort a string alphabetically.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NXQ975m3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ayp7g6fd54n24jpii6dq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NXQ975m3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ayp7g6fd54n24jpii6dq.png" alt="Sort Alphabetically" width="450" height="212"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Generate Range of Numbers&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Suppose you want to generate a number between a specific range. The first approach you will use is the loop. But this tip will save you valuable time by doing it the easy way.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--V3R0zp9k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iff8szxxlqzktmnp5gzf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--V3R0zp9k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iff8szxxlqzktmnp5gzf.png" alt="Range of Numbers" width="539" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Shorten the Console log&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Tired of writing console.log() again and again? This tip will show how to shorter your console log and speed up your coding.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1gJZSKl5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jvvf05v8ft5e4i71pg0x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1gJZSKl5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jvvf05v8ft5e4i71pg0x.png" alt="Shorten console.log" width="340" height="139"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Shortening an Array in an easy way&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is an awesome tip for web developers to shorten an array in an easy way. You just need to use the length method by passing a number that denotes the new size of your array.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bWoSBbxw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rcm79hu1mm5p97l5uu5s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bWoSBbxw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rcm79hu1mm5p97l5uu5s.png" alt="Shorten array" width="404" height="155"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Use isNumber&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This tip will show how to check whether a value or variable holding a number ( integer, float and etc ) or not.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6mD7T4mT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/50qyw54aiwu332y95xfv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6mD7T4mT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/50qyw54aiwu332y95xfv.png" alt="isNumber" width="438" height="196"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. Use isString&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This useful tip will show you how to check whether a value or data is in string format or not. This comes in handy when you request data from the server and want to check the data type.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---ETgza9u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e0no14fp04phko5dd9w5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---ETgza9u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e0no14fp04phko5dd9w5.png" alt="isString" width="484" height="179"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9. Check Null&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In Programming, sometimes we need to check whether a result or data is null.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--k8kLd709--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4fxf99dxk9weap9mm51k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k8kLd709--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4fxf99dxk9weap9mm51k.png" alt="Null" width="587" height="176"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;10. Merge Array into One&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This tip will be useful when you need to combine the two arrays of any size into one. You need to use the JavaScript concate method for this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ybpzKo3F--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bqkoq7q003axdbkz4yzh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ybpzKo3F--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bqkoq7q003axdbkz4yzh.png" alt="Merge Array" width="517" height="210"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Cover photo: Caspar Camille Rubin @casparrubin&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/26u3Zl2MQWJl2hf2g/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/26u3Zl2MQWJl2hf2g/giphy.gif" alt="Ok, bye!" width="480" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
      <category>arrays</category>
    </item>
    <item>
      <title>Single Responsibility vs Separation of Concerns</title>
      <dc:creator>Yani A.</dc:creator>
      <pubDate>Sat, 19 Feb 2022 00:33:28 +0000</pubDate>
      <link>https://dev.to/yani82/single-responsibility-vs-separation-of-concerns-5amh</link>
      <guid>https://dev.to/yani82/single-responsibility-vs-separation-of-concerns-5amh</guid>
      <description>&lt;p&gt;I was thinking out loud the other day and was wondering what the difference between single responsibility and separation of concerns is. Are they similar at all? &lt;/p&gt;

&lt;p&gt;Let's go back to the basics and try to review both of what these two major principles stand for. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/4CIxi99kPL9ss/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/4CIxi99kPL9ss/giphy.gif" alt="Daria's responsible now"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Single Responsibility
&lt;/h3&gt;

&lt;p&gt;Single responsibility principle (S.R.P.) is one of the five principles of object oriented programming (O.O.P.). Does &lt;a href="https://www.digitalocean.com/community/conceptual_articles/s-o-l-i-d-the-first-five-principles-of-object-oriented-design" rel="noopener noreferrer"&gt;S.O.L.I.D.&lt;/a&gt; ring a bell? Well, it stands for the "S" in S.O.L.I.D. It's an extremely useful thing to remember for early stage developers like myself. The end goal is always striving for maintainable code. &lt;/p&gt;

&lt;p&gt;How does S.R.P. do this, you ask? It gives a function in a class only ONE reason to change, which is the sole responsibility that that function has. This in turn makes your code more modular. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/8Bl2XnoHsCZZ81BaOe/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/8Bl2XnoHsCZZ81BaOe/giphy.gif" alt="Separate!!!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Separation of Concerns
&lt;/h3&gt;

&lt;p&gt;Separation of Concerns (SoC) also known as Aspect-Oriented Programming &lt;a href="https://en.wikipedia.org/wiki/Separation_of_concerns#:~:text=In%20computer%20science%2C%20separation%20of,code%20of%20a%20computer%20program.&amp;amp;text=A%20program%20that%20embodies%20SoC%20well%20is%20called%20a%20modular%20program." rel="noopener noreferrer"&gt;is a design principle for separating programming into distinctive sections so each section addresses a specific concern.&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Visualize a Model View Controller (MVC) pattern, if you will. Each section is divided by modules, and each module should be in charge of a task. With each module focusing on just one task, this makes the flow of data more efficient and again easy to maintain. This quick &lt;a href="https://www.youtube.com/watch?v=Fv9_udQJTzM" rel="noopener noreferrer"&gt;video&lt;/a&gt; gives you a better idea of what this actually means.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fc4etudepbco85z5w78cx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fc4etudepbco85z5w78cx.png" alt="Diagram of MVC that visualizes modules"&gt;&lt;/a&gt;   &lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;In a nutshell, the main difference between Single Responsibility Principle and Separation of Concerns is that SRP is isolated in a class in the form of one function, where as SoC is more spread out to how an MVC is structured. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/1l1JSNcnhW28n7Odtt/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/1l1JSNcnhW28n7Odtt/giphy.gif" alt="Hope that gave you some clarity"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>solid</category>
      <category>oop</category>
      <category>principles</category>
      <category>soc</category>
    </item>
    <item>
      <title>Can You Git It?</title>
      <dc:creator>Yani A.</dc:creator>
      <pubDate>Sat, 12 Feb 2022 04:29:59 +0000</pubDate>
      <link>https://dev.to/yani82/can-you-git-it-400i</link>
      <guid>https://dev.to/yani82/can-you-git-it-400i</guid>
      <description>&lt;p&gt;What is Git? Why do you always face issues when trying your hand at Git commands? This blog tries to make it, make sense. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/kH6CqYiquZawmU1HI6/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/kH6CqYiquZawmU1HI6/giphy.gif" alt="Git logo" width="480" height="220"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Not to be mistaken with &lt;a href="https://en.wikipedia.org/wiki/GitHub"&gt;GitHub&lt;/a&gt;, a host for software development and version control using Git.&lt;a href="https://www.atlassian.com/git/tutorials/what-is-git"&gt;Git&lt;/a&gt; is the most popular modern version control system used by developers today.&lt;/p&gt;

&lt;p&gt;Developed in 2005 by Linus Torvalds, Git is actually an actively maintained open source project. Why does that name ring a bell? Well, Torvalds is the creator of the well-known operating system kernel, Linux.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hard to Git
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/cnhpl4IeYgU7MCBdV2/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/cnhpl4IeYgU7MCBdV2/giphy.gif" alt="Developer dances out Git commands" width="272" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, what would you say are the most &lt;a href="https://www.geeksforgeeks.org/common-git-problems-and-their-fixes/"&gt;common issues&lt;/a&gt; you face when using Git are? &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clean local commits &lt;/li&gt;
&lt;li&gt;Undo local commits&lt;/li&gt;
&lt;li&gt;Remove a file from Git without removing from the file system&lt;/li&gt;
&lt;li&gt;Reverting pushed commits &lt;/li&gt;
&lt;li&gt;Avoid repeated merge conflicts &lt;/li&gt;
&lt;li&gt;Find a commit that broke something after a merge &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/cFkiFMDg3iFoI/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/cFkiFMDg3iFoI/giphy.gif" alt="Two sides at war clashes with each other personifying Git merge" width="400" height="224"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I came across this helpful cheat sheet from a &lt;em&gt;Slack&lt;/em&gt; channel which I've been meaning to print out and stick on the side of laptop until I memorize it. Also, if anybody knows the source of where it came from, please let me know: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5jwYlz0O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cab5j23ajvq532ji1zte.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5jwYlz0O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cab5j23ajvq532ji1zte.jpg" alt="Git Cheat Sheet" width="880" height="959"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A few commands not mentioned on the list are (not the greatest list in retrospect). Let's remake a personalized cheat sheet of what commands you would use often: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.atlassian.com/git/tutorials/inspecting-a-repository#:~:text=The%20git%20status%20command%20displays,regarding%20the%20committed%20project%20history."&gt;&lt;code&gt;git status&lt;/code&gt;&lt;/a&gt;: Displays the state of the working directory and the staging area&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://careerkarma.com/blog/git-log/#:~:text=The%20git%20log%20command%20displays,message%2C%20and%20other%20commit%20metadata."&gt;&lt;code&gt;git log&lt;/code&gt;&lt;/a&gt;: Displays a record of the commits in a Git repository (add log # to list out specific log, press the "D" button to scroll down) &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.atlassian.com/git/tutorials/saving-changes/git-diff#:~:text=git%20diff%20is%20a%20multi,%2C%20branches%2C%20files%20and%20more.&amp;amp;text=The%20git%20diff%20command%20is,state%20of%20a%20Git%20repo."&gt;&lt;code&gt;git diff&lt;/code&gt;&lt;/a&gt;: A multi-use Git command that when executed runs a diff function on Git data sources (add log # to access that specific log) &lt;/li&gt;
&lt;li&gt;You can add &lt;code&gt;relative path just public&lt;/code&gt; to the command for example, to locate a file or folder on a file system starting from the current directory&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;git stash&lt;/code&gt;](&lt;a href="https://www.atlassian.com/git/tutorials/saving-changes/git-stash#:%7E:text=git%20stash%20temporarily%20shelves%20(or,re%2Dapply%20them%20later%20on.):"&gt;https://www.atlassian.com/git/tutorials/saving-changes/git-stash#:~:text=git%20stash%20temporarily%20shelves%20(or,re%2Dapply%20them%20later%20on.):&lt;/a&gt; Temporarily shelves (or stashes) changes you've made to your working copy so you can work on something else &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check out other handy Git commands that we might not know of &lt;a href="https://www.youtube.com/watch?v=wnYL4yUd-z0"&gt;here&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Clearly, we all need a Git refresher course, and thanks to FreeCodeCamp &lt;a href="https://www.freecodecamp.org/news/git-for-professionals/"&gt;this&lt;/a&gt; is comprehensive one. &lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/hs1wBxNGuR7z2LyzHT/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/hs1wBxNGuR7z2LyzHT/giphy.gif" alt="Jimmy Fallon goes country" width="500" height="281"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As they say, the best way to get better at something is by practicing. Until then, I hope this can be a form of reference whenever you forget what Git command to use. &lt;/p&gt;

</description>
      <category>git</category>
      <category>versioncontrol</category>
      <category>ide</category>
      <category>development</category>
    </item>
    <item>
      <title>MeXiCaN WaVe </title>
      <dc:creator>Yani A.</dc:creator>
      <pubDate>Sat, 29 Jan 2022 09:21:18 +0000</pubDate>
      <link>https://dev.to/yani82/mexican-wave-3oo7</link>
      <guid>https://dev.to/yani82/mexican-wave-3oo7</guid>
      <description>&lt;p&gt;After a week of declaring my job search, I was fortunate enough to be getting a couple of phone screenings and even a back-to-back double tech interview just last week. It was my first EVER tech interview(s) and I could have been better prepared. Plus, the nerves did not help whatsoever. It was two 1-hour long interviews with a half-hour to recollect myself. I will try to attempt to do similar code challenges to the ones I failed horribly in my tech interview in future posts (which I will eventually link here) to redeem myself from the turmoil of that day. I guess it's a right of passage!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/l2Je3r4PwyjBTKTkI/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/l2Je3r4PwyjBTKTkI/giphy.gif" alt="Homer going in fetal position depicting inner turmoil" width="480" height="362"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One was converting USD to a denomination or something to that effect, and the second one was returning the frequency of sequential characters. The closest challenges that I could find to them are &lt;a href="https://leetcode.com/discuss/interview-question/483660/google-phone-currency-conversion"&gt;this&lt;/a&gt; (the original one was much more complex) and &lt;a href="https://practice.geeksforgeeks.org/problems/easy-string2212/1/"&gt;this&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's do the challenge!
&lt;/h2&gt;

&lt;p&gt;Anyway, today I'm giving myself a little bit of a mental break by trying my hand at doing a fun, simpler code challenge taken from &lt;a href="https://www.codewars.com/kata/58f5c63f1e26ecda7e000029/train/ruby"&gt;Codewars&lt;/a&gt;. There's nothing like a code challenge that I can do to build up my self-esteem again.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/HS5h2pK4V7gRi/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/HS5h2pK4V7gRi/giphy.gif" alt="One guy tries to initiate a Mexican wave at a game, but nobody joins in" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Task
&lt;/h3&gt;

&lt;p&gt;In this simple Kata your task is to create a function that turns a string into a Mexican Wave. You will be passed a string and you must return that string in an array where an uppercase letter is a person standing up.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rules
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;The input string will always be the lower case but may be empty.&lt;/li&gt;
&lt;li&gt;If the character in the string is whitespace then pass over it
as if it was an empty seat&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wave("hello") =&amp;gt; ["Hello", "hEllo", "heLlo", "helLo", "hellO"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I'm trying to be better at jotting down what my thought process is before trying to code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# input = str
# use input size to determine how many iterations needed
# capitalize letter in first position, append that to new arr
# output is an arr of strs with each character capitalized by position
# algo: create a range from 0 to string.size
# call 'map' on that range with 'index' as a parameter
# use str element reference and concatenations to convert character at index position into uppercase
# next if str[index] == ''
# str[0...index] + str[index].upcase + str[index + 1..-1]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I wrote this code in Ruby because it felt like forever since I was so caught up with JavaScript, React, and TailwindCSS. First off, test out any possible methods that can be used in &lt;code&gt;irb&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1IlpgOIH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3irfqc329pp6xd15lqsu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1IlpgOIH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3irfqc329pp6xd15lqsu.png" alt="Code snippet of irb" width="880" height="232"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Set &lt;code&gt;string = "hello"&lt;/code&gt; in the console:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BDjRuuqb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h2e2q4w7k2z9wzjbtppw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BDjRuuqb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h2e2q4w7k2z9wzjbtppw.png" alt="Code snippet of irb" width="880" height="237"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now let's write it out. Don't forget to test it to make sure it's doing what it's supposed to:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zWIGJwJ7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uhmcbwo7lsut5zu6wqz8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zWIGJwJ7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uhmcbwo7lsut5zu6wqz8.png" alt="Code snippet of irb" width="562" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--U7XAHDwC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lr2bhto0y2u97g3j8yfu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--U7XAHDwC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lr2bhto0y2u97g3j8yfu.png" alt="Code snippet of irb" width="138" height="572"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I ended up using &lt;code&gt;.each&lt;/code&gt; instead of &lt;code&gt;.map&lt;/code&gt;, since I'm not transforming anymore and used a &lt;code&gt;next if&lt;/code&gt;, so it skips that particular number.&lt;/p&gt;

&lt;p&gt;And ta-dah! It returned &lt;code&gt;true&lt;/code&gt;. How did you do? What could have be done better?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def wave(str)
result = []

(0...str.size).each do |index|
next if str[index] == ' '
result &amp;lt;&amp;lt; str[0...index] + str[index].upcase + str[index + 1..-1]
end
result
end

p wave("hello") =&amp;gt; ["Hello", "hEllo", "heLlo", "helLo", "hellO"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>mexicanwave</category>
      <category>codechallenge</category>
      <category>codekata</category>
      <category>solution</category>
    </item>
    <item>
      <title>Redux Paradox </title>
      <dc:creator>Yani A.</dc:creator>
      <pubDate>Sun, 31 Oct 2021 03:45:02 +0000</pubDate>
      <link>https://dev.to/yani82/redux-paradox-52lg</link>
      <guid>https://dev.to/yani82/redux-paradox-52lg</guid>
      <description>&lt;p&gt;Coming to the end of my part-time software engineering course with Flatiron School I was met with a challenge of incorporating Redux in my final project using React and JavaScript on the frontend and Ruby on Rails for the backend. &lt;/p&gt;

&lt;p&gt;Redux is a state management tool that is compatible with JavaScript applications. It is supposed to make it easier for when you need the same state to be shared between multiple components and reflected in different parts of the application. It also comes in handy when the application states change frequently and different components can initiate changes simultaneously. &lt;/p&gt;

&lt;p&gt;Seeing that &lt;a href="https://github.com/yani82/malaysian-creation-fe"&gt;my application&lt;/a&gt; is far from having a medium-to-large codebase with several developers working on it, it was an added step that I needed to make, that kind of defeated the whole purpose of Redux being a tool that improves the developer's experience. It was good to know how it works with React though.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--er0QBXLr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://3.bp.blogspot.com/-5sQdvwcF0rM/WX1oHSL2bbI/AAAAAAAAnPU/HbW8W9iRSJ06nVBDDss8wiAPjWLdGg0MQCLcBGAs/s640/Actions%252B%2525283%252529.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--er0QBXLr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://3.bp.blogspot.com/-5sQdvwcF0rM/WX1oHSL2bbI/AAAAAAAAnPU/HbW8W9iRSJ06nVBDDss8wiAPjWLdGg0MQCLcBGAs/s640/Actions%252B%2525283%252529.png" alt="" width="640" height="480"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;In my final project, I am aiming to build an ecommerce application that is promoting Malaysian made handicrafts and products to help support micro businesses in rural areas in the country. I want it to help build the overall nation's economy and help increase job opportunities for locals. I had used Redux specifically for five cases:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;FETCH_CATEGORIES&lt;/li&gt;
&lt;li&gt;ADD_CATEGORY&lt;/li&gt;
&lt;li&gt;ADD_ITEM&lt;/li&gt;
&lt;li&gt;DELETE_ITEM&lt;/li&gt;
&lt;li&gt;EDIT_CATEGORY&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;First  install  Redux:&lt;/p&gt;

&lt;h1&gt;
  
  
  Redux + Plain JS template
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;npx create-react-app my-app --template redux&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Redux + TypeScript template
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;npx create-react-app my-app --template redux-typescript&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;OR install it as a package on NPM or in a Node application:&lt;/p&gt;

&lt;h1&gt;
  
  
  NPM
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;npm install redux react-redux&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Yarn
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;yarn add redux&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In your &lt;code&gt;index.js&lt;/code&gt; file is where all the "action" happens. This is where you import {createStore} from 'redux'. Then, set up your Redux store by declaring store assigned to createStore(). To enable React to associate with the Redux store is by using the React-Redux package by importing {Provider}. It will wrap the &lt;code&gt;&amp;lt;App/&amp;gt;&lt;/code&gt; and pass in the store as a property.  &lt;/p&gt;

&lt;p&gt;Next create a reducers and actions folder, where you will create say a rootReducer file and an action creator file. In the rootReducer you would need to declare it passing in a state and an action&lt;br&gt;
as arguments, returning the state. Then you would need to define an  initial state. Lastly, at the bottom of the file, write export default rootReducer. Not forgetting to import the rootReducer in the index.js. You can then pass in the rootReducer in the createStore function. Following this, you're able to {connect} to components. &lt;/p&gt;

&lt;p&gt;Other things I grew to like while building this project was client side routing and presentational components. The longer I learn how to code the more I’m veering towards front-end development. Perhaps I owe it to all those years in the media as an editorial assistant and writer, where I was fixated on the perfect magazine cover, photo shoots spread and layouts for our articles. Over a decade and some change, I’ve gone full circle and back to obsessing over presentation. Queue, the “presentation component”. Being mostly stateless, they’re simple and beautiful in doing what they do best - receiving props from their parent components and rendering! There’s just that satisfaction of having it all “work” for a change. With that said, let's hope we're able to leverage on using React and Redux in our near futures.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resources and citation on REDUX:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;item 1 &lt;a href="https://redux-observable.js.org/docs/basics/SettingUpTheMiddleware.html"&gt;Setting Up The Middleware&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;item 2 &lt;a href="https://www.youtube.com/watch?v=f87wPQMgF4c&amp;amp;t=41s"&gt;Complete React Tutorial (&amp;amp; Redux) #39 - Setting up Redux in React by The Net Ninja&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;item 3 &lt;a href="http://thewebstop.blogspot.com/2017/07/learning-basics-reactjs-and-redux.html"&gt;Learning the basics - ReactJS and Redux&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;item 4 &lt;a href="https://proxify.io/articles/using-redux-with-react"&gt;Using Redux in React apps: When and why you need Redux&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;item 5 &lt;a href="https://react-redux.js.org/introduction/why-use-react-redux"&gt;Why Use React Redux?&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>redux</category>
      <category>react</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
