<?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>Forem: Oladimeji Momoh</title>
    <description>The latest articles on Forem by Oladimeji Momoh (@oladee).</description>
    <link>https://forem.com/oladee</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%2F1699733%2Fc9ee0bcc-7ed7-4e98-b195-799b893bcd65.jpeg</url>
      <title>Forem: Oladimeji Momoh</title>
      <link>https://forem.com/oladee</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/oladee"/>
    <language>en</language>
    <item>
      <title>Debugging My Demons : Console.log(Story Untold)</title>
      <dc:creator>Oladimeji Momoh</dc:creator>
      <pubDate>Sat, 29 Jun 2024 13:33:41 +0000</pubDate>
      <link>https://forem.com/oladee/debugging-my-demons-consolelogstory-untold-2oak</link>
      <guid>https://forem.com/oladee/debugging-my-demons-consolelogstory-untold-2oak</guid>
      <description>&lt;p&gt;Hey everyone, Devdee here! As a software engineer, my days are filled with griming exciting challenges and the constant thrill of the unknown. Recently, I encountered a particularly nasty backend bug that had me pulling my hair out (figuratively, of course). Today, I want to share my battle with data inconsistency and the steps I took to slay that gremlin.&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Missing User Data
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
It all started with the front-end dev team reports of missing data. Login credentials were correct, yet the system displayed empty profiles. Panic started to set in –  a wrong code setup? System crash? My initial investigation revealed no errors in the database itself. The data was there, but somehow wasn't being retrieved for specific users.&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  The Log Analysis
&lt;/h2&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;p&gt;My first line of defense was analyzing server logs. Hours of combing through lines of code yielded a clue: Errors here and there, it wasn't really making sense, but at least I was able to identify where it was coming from. CONSOLE.LOG to the rescue!&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Isolating the Problem - Code Review
&lt;/h2&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;p&gt;Armed with this knowledge, I dove into the specific code responsible for user data retrieval. After scrutinizing the logic, I found the culprit – a missing synchronization mechanism. Without proper locking, the user data was not retrieved before the front-end application received the response.&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Fortifying the Code
&lt;/h2&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;p&gt;The solution? Implementing the function as an async identity and using the await instance. This ensures that during the database fetch the code waits for response to the Promise enabled line. The fix was relatively simple to implement, but the debugging process was a real head-scratcher.&lt;/p&gt;

&lt;h1&gt;
  
  
  Embarking on the HNG Internship
&lt;/h1&gt;

&lt;p&gt;Speaking of challenges, I'm thrilled to announce that I'll be starting my journey with the HNG Internship program! This opportunity is incredibly exciting for several reasons. Firstly, the program's focus on innovation and building impactful projects perfectly aligns with my passion for creating solutions that make a difference. Secondly, the chance to collaborate with a talented community of developers is invaluable for learning and growth.&lt;br&gt;
You also have a chance to be part of this enriching development check out &lt;a href="https://hng.tech/internship"&gt;https://hng.tech/internship&lt;/a&gt; or &lt;a href="https://hng.tech/premium"&gt;https://hng.tech/premium&lt;/a&gt;. Hopefully i get to see you there as well!&lt;/p&gt;

&lt;p&gt;As I head into this new adventure, I'm confident that the problem-solving skills honed through battles like the data inconsistency demon will serve me well. Here's to continuous learning, building amazing things, and (hopefully) encountering fewer gremlins along the way! Stay tuned for future updates on my HNG Internship experience!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Styled Components vs TailwindCss (UIs Showdown)</title>
      <dc:creator>Oladimeji Momoh</dc:creator>
      <pubDate>Fri, 28 Jun 2024 16:09:58 +0000</pubDate>
      <link>https://forem.com/oladee/styled-components-vs-tailwindcss-uis-showdown-2jho</link>
      <guid>https://forem.com/oladee/styled-components-vs-tailwindcss-uis-showdown-2jho</guid>
      <description>&lt;p&gt;As a front-end developer, when it comes to styling user interfaces, two popular options always come to mind: Styled Components and Tailwind CSS. Both offer distinct approaches, and the "better" choice depends on your project's specific needs, although I have my preferred option of the two, but lets take on a journey to understand what both styling frameworks have to offer and leave the picking to you!&lt;/p&gt;

&lt;h2&gt;
  
  
  STYLED COMPONENTS
&lt;/h2&gt;

&lt;p&gt;Talking about the reuse-ability of components style of thinking and approach, Styled Components embraces a component-centric approach. Styles are encapsulated within JavaScript components, promoting code   maintainability. With styled components, css code is specific to the component it is being used for, as this allows for component-specific styling and helps to reduce the problem of unused styling when a component isn't rendered or in use &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv2nkq62sg2nnn7szggg3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv2nkq62sg2nnn7szggg3.png" alt="An Example of styled component usage" width="467" height="542"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  TAILWINDCSS
&lt;/h2&gt;

&lt;p&gt;Tailwind tends to lean to the ideology of utility first. Utility first just boils down to styling that does a specific thing, ranging from padding, colour, e.t.c. Tailwind provides a vast amount of predefined utility classes that users could apply directly to their components and dumb the hassle of write css code from scratch.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj3bv6rs8zq8ljrwskq5h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj3bv6rs8zq8ljrwskq5h.png" alt="Tailwind, react ui" width="800" height="209"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here are some key points that seek to delve into the strengths and difference of these frameworks&lt;/p&gt;

&lt;h2&gt;
  
  
  Theming
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Styled Components:&lt;/strong&gt; &lt;br&gt;
Offers built-in theming capabilities. You can define themes with variables and easily apply them to styled components for consistent UI styles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Tailwindcss&lt;/strong&gt; :&lt;br&gt;
Requires customisation of its default theme through configuration files. While effective, it might not be as intuitive as Styled Components' theming approach.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  PERFORMANCE
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Styled Components:&lt;/strong&gt; &lt;br&gt;
Might have a slight overhead due to the runtime manipulation of styles. However, this is generally negligible for most modern web applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Tailwind CSS:&lt;/strong&gt; &lt;br&gt;
Generally considered performant due to its reliance on pre-defined utility classes. However, excessive class usage can lead to larger CSS payloads.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is great to know, but when really is the best time to choose either of the framework seeing they both offer different approach to solving major styling issues.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;You're working on a large-scale React project with a focus on reusability and maintainability.( Styled Component preferably)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You prefer a utility-first approach with fine-grained control over styles. (Tailwind all the way)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You value clear separation of concerns and keeping styles encapsulated within components. (Styled Component)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You prioritize a component-based approach to UI development.&lt;br&gt;
(Styled Component)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You need a rapid prototyping tool for quick UI development.&lt;br&gt;
(Tailwind)&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;Both Styled Components and Tailwind CSS are excellent tools. The best choice depends on your project's specific requirements and team preferences.&lt;/p&gt;

&lt;p&gt;Consider Styled Components if you prioritize component-based development, maintainability, and theming in React projects.&lt;/p&gt;

&lt;p&gt;Opt for Tailwind CSS if you value rapid prototyping, utility-first styling, and a gentler learning curve, especially for teams with traditional CSS experience.&lt;/p&gt;

&lt;p&gt;If you are asking about my preferred option, then it will be Tailwindcss, due to its simplicity and straightforwardness. During my time interning at HNG, i am looking towards using it to build worthwhile projects. Kindly find out more about this using &lt;a href="https://hng.tech/internship"&gt;https://hng.tech/internship&lt;/a&gt; or &lt;a href="https://hng.tech/premium"&gt;https://hng.tech/premium&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;This should be fun at its best. Thanks for taking out time to read&lt;/p&gt;

</description>
      <category>react</category>
      <category>css</category>
    </item>
  </channel>
</rss>
