<?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: Uzoma Nwanne</title>
    <description>The latest articles on DEV Community by Uzoma Nwanne (@uzomanwanne).</description>
    <link>https://dev.to/uzomanwanne</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%2F938642%2Ffad7330b-e8e7-45da-a75d-53888cdeb68f.jpeg</url>
      <title>DEV Community: Uzoma Nwanne</title>
      <link>https://dev.to/uzomanwanne</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/uzomanwanne"/>
    <language>en</language>
    <item>
      <title>How to resolve 'yaml: found character that cannot start any token'</title>
      <dc:creator>Uzoma Nwanne</dc:creator>
      <pubDate>Fri, 25 Oct 2024 16:22:02 +0000</pubDate>
      <link>https://dev.to/uzomanwanne/how-to-resolve-yaml-found-character-that-cannot-start-any-token-2818</link>
      <guid>https://dev.to/uzomanwanne/how-to-resolve-yaml-found-character-that-cannot-start-any-token-2818</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ycbukes91mpirml0qz3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ycbukes91mpirml0qz3.png" alt="Image description" width="297" height="169"&gt;&lt;/a&gt;&lt;br&gt;
Today, I was trying to run serverless, an npm package that allows us to run AWS serverless function on our local machine. After setting it up and executing the command, it started successfully but ended up showing the error message &lt;em&gt;'yaml: found character that cannot start any token'.&lt;/em&gt;&lt;br&gt;
I did a lot of things to resolve this issue. However, all was to no avail until I had a look at the .yml file associated with serverless. The file was serverless.yml in my case.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SOLUTION&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I now had to remove all the indentations to be sure they were not indentated using tabs and this fixed the issue in my case.&lt;br&gt;
In case, you see this error, checking the .yml file and ensuring the indentation is done using space characters might be the fix you are looking for.&lt;/p&gt;

&lt;p&gt;Happy coding.&lt;/p&gt;

</description>
      <category>yaml</category>
      <category>node</category>
      <category>serverless</category>
      <category>lambda</category>
    </item>
    <item>
      <title>What I learnt creating a custom File Upload Button</title>
      <dc:creator>Uzoma Nwanne</dc:creator>
      <pubDate>Sat, 01 Jul 2023 15:57:50 +0000</pubDate>
      <link>https://dev.to/uzomanwanne/what-i-learnt-creating-a-custom-file-upload-button-5a5k</link>
      <guid>https://dev.to/uzomanwanne/what-i-learnt-creating-a-custom-file-upload-button-5a5k</guid>
      <description>&lt;p&gt;In handling your form, not all the data will be in the form of a string. You might need to send data such as images in various file formats and even multimedia files to the backend and that is where the file upload button comes in handy.&lt;br&gt;
The regular file upload button does the job but the challenge is that it tends to disconnect from the UI and this can be a quite a challenge.&lt;br&gt;
The code snippet shows a typical file upload button styled with tailwindCSS&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div className="border w-full border-[#ADADAD] rounded-lg"&amp;gt;
        &amp;lt;input
            type="file"
            placeholder="choose image"
            className="w-full h-full"
            onChange={handleImage}
            accept="image/png, image/jpg, image/gif, image/jpeg"
          /&amp;gt;
        &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gT3nVBb5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qi1xjgxxvyno1h00d2kc.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gT3nVBb5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qi1xjgxxvyno1h00d2kc.jpg" alt="Image description" width="800" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the image, the file upload button is just bland and does not go with the theme of the UI.&lt;/p&gt;

&lt;p&gt;To design a custom file upload button we need to do the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Make the container div tag of the file upload component to have a relative positioning. The essence of this is so that we can apply absolute positioning to the file upload button with reference to its containing div.&lt;/li&gt;
&lt;li&gt;Apply an absolute positioning to the file upload button.&lt;/li&gt;
&lt;li&gt;Style the file upload button by adjusting its width and height to covers the entire div component.&lt;/li&gt;
&lt;li&gt;Add an opacity of 0 to the file upload button so that the file is not visible but is present on the UI.
5.Add a span tag and a regular button with the appropriate styling you need. This is what is now visible on your UI.&lt;/li&gt;
&lt;li&gt;So this creates an illusion to the user that the styled button is what is doing the file upload work whereas in the real sense, the traditional file upload button is still doing its work.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The image below shows how the new file upload UI will look like&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--V9HqJGnL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ckhuspm9r0kl9imy9is6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--V9HqJGnL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ckhuspm9r0kl9imy9is6.jpg" alt="Image description" width="800" height="255"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The code snippet below shows the code for the custom file upload UI.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div className="relative border w-full border-[#ADADAD] rounded-lg  mt-3 mb-6 h-12"&amp;gt;
          &amp;lt;input
            type="file"
            placeholder="choose image"
            className="opacity-0 absolute top-0 left-0 w-full h-full"
            onChange={handleImage}
            accept="image/png, image/jpg, image/gif, image/jpeg"
          /&amp;gt;
          &amp;lt;span
            className=" text-center w-[70%] inline-block"
            name="file-text"
            id="file-text"
          &amp;gt;
            {fileName}
          &amp;lt;/span&amp;gt;
          &amp;lt;button
            type="button"
            name="attach-button"
            id="attach-button"
            className="w-[30%] h-full border bg-[#2F63AA] text-white cursor-pointer font-roboto sm:text-[18px]"
          &amp;gt;
            Attach File
          &amp;lt;/button&amp;gt;
        &amp;lt;/div&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One interesting experience I had is that an element with absolute positioning always stays on top no matter the z-index value of the elements around it. I also did not discuss the react code responsible for making the file upload button interactive as I wish to restrict myself to the Html and CSS.&lt;/p&gt;

&lt;p&gt;Congrats, you now have a custom file upload button.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>The Broken Window Theory</title>
      <dc:creator>Uzoma Nwanne</dc:creator>
      <pubDate>Tue, 06 Dec 2022 11:12:08 +0000</pubDate>
      <link>https://dev.to/uzomanwanne/the-broken-window-theory-1jm4</link>
      <guid>https://dev.to/uzomanwanne/the-broken-window-theory-1jm4</guid>
      <description>&lt;p&gt;The Broken Window Theory suggests that neglected urban alleys encourage crimes. Most dilapidated buildings in urban alleys start with a small neglect which encourages other persons to gradually and unknowingly aid in vandalizing the building because the owners have given the impression that they do not care.&lt;/p&gt;

&lt;p&gt;As developers, this theory is applicable to our work. Small neglects that you should have corrected initially encourage further neglects from you and your team members and before you know it, you have a heap of messed up code that should have been avoided.&lt;/p&gt;

&lt;p&gt;So as you code, make conscious efforts from the beginning to comment on your code, and use proper naming conventions that make sense. If you find yourself copying a segment of code more than twice, you should consider refactoring that code. Ensure that your classes are not tightly coupled.&lt;/p&gt;

&lt;p&gt;What other practices can we adopt to ensure we have quality code? I look forward to getting more suggestions.&lt;/p&gt;

</description>
      <category>security</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Crown Clothing Web Store</title>
      <dc:creator>Uzoma Nwanne</dc:creator>
      <pubDate>Fri, 07 Oct 2022 10:02:16 +0000</pubDate>
      <link>https://dev.to/uzomanwanne/crown-clothing-web-store-fng</link>
      <guid>https://dev.to/uzomanwanne/crown-clothing-web-store-fng</guid>
      <description>&lt;p&gt;Hey, I created this &lt;a href="https://peppy-marshmallow-6cffa5.netlify.app/"&gt;frontend for an ecommerce shop&lt;/a&gt; using React JS.&lt;/p&gt;

&lt;p&gt;Being able to create and deploy this web application on Netlify is quite a milestone for me. This is because I was used to working in Java and PHP and learnt React quite recently.&lt;/p&gt;

&lt;p&gt;I made use of function components, styled-components and sass, contexts, reducers, React Routes and several other React Hooks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LgV5eWhw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ta9xs3ir8nf0u76n25ui.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LgV5eWhw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ta9xs3ir8nf0u76n25ui.jpg" alt="Shopping Experience on Crown Store" width="880" height="358"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;For the authentication, Google Firebase was used while firestore was used as the NoSQL database.&lt;/p&gt;

&lt;p&gt;In the coming weeks, I hope to add a Node Backend for orders and payment processing and then consume them using my Front End Application.&lt;/p&gt;

&lt;p&gt;I also hope to add another Frontend Web Application for store administration.&lt;/p&gt;

&lt;p&gt;You can view the application &lt;a href="https://peppy-marshmallow-6cffa5.netlify.app/"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I would sincerely love to get your feedbacks on this project.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
