<?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: Kirubel.A</title>
    <description>The latest articles on DEV Community by Kirubel.A (@code_japi).</description>
    <link>https://dev.to/code_japi</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%2F1672052%2F70a950d1-da64-49ea-9399-58711e9a47f5.png</url>
      <title>DEV Community: Kirubel.A</title>
      <link>https://dev.to/code_japi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/code_japi"/>
    <language>en</language>
    <item>
      <title>SpecZone: A Central Hub for Device Specifications and Reviews</title>
      <dc:creator>Kirubel.A</dc:creator>
      <pubDate>Tue, 17 Sep 2024 11:58:10 +0000</pubDate>
      <link>https://dev.to/code_japi/speczone-a-central-hub-for-device-specifications-and-reviews-22pm</link>
      <guid>https://dev.to/code_japi/speczone-a-central-hub-for-device-specifications-and-reviews-22pm</guid>
      <description>&lt;p&gt;Welcome to SpecZone, a web application designed to help users discover and compare the latest tech devices. Whether you're looking for smartphones, laptops, or wearables, SpecZone is here to provide comprehensive information at your fingertips. We aimed to create an intuitive and responsive platform that caters to tech enthusiasts and casual shoppers alike. Our team consisted of two dedicated developers, each with a focus on different aspects of the project. I, Kirubel, led the development of the backend, database management API integration and performance optimization. while Robel Amsalu worked on Frontend and performance optimization. Over a span of 3 weeks, we collaborated to turn SpecZone into a user-friendly and feature-rich website.&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%2Fcp2iurn7cpvir4kt3b5e.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%2Fcp2iurn7cpvir4kt3b5e.png" alt="Image description" width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Our target users are tech-savvy individuals who want to make informed decisions about the devices they purchase. From reviews to detailed specifications, SpecZone ensures users have the data they need to compare products side-by-side. My personal focus was on creating efficient and scalable API endpoints and ensuring that our MongoDB-based backend could handle large volumes of data without compromising performance.&lt;/p&gt;

&lt;h3&gt;
  
  
  My Story: Why This Project Resonates with Me
&lt;/h3&gt;

&lt;p&gt;Growing up, I always had a passion for technology, but access to the latest gadgets was limited in my area. The only way to learn about the newest devices was by reading reviews in tech magazines or relying on recommendations from friends and family. Fast forward to today, I’ve been fortunate to work in software development, where I can now create tools that help people find reliable information on the devices they need. My love for technology combined with my skills in programming inspired me to build SpecZone with my team. I wanted to provide a platform where people could easily access information on tech products, just like I once wished I had.&lt;/p&gt;

&lt;h3&gt;
  
  
  Project Accomplishments
&lt;/h3&gt;

&lt;p&gt;Our project resulted in a fully responsive, fast, and user-friendly web app that displays detailed information about various devices. &lt;/p&gt;

&lt;p&gt;For the frontend, we used React to provide a dynamic user interface, while the backend was built with Node.js, Express, and MongoDB. We chose these technologies because of their scalability and ease of integration with APIs. Additionally, MongoDB’s flexible schema allowed us to store varying data models for different devices, making it ideal for our project.&lt;/p&gt;

&lt;h4&gt;
  
  
  Key Features:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;User Authentication&lt;/strong&gt;: Users can register and log in to save their favorite devices and leave reviews.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Device Search and Filters&lt;/strong&gt;: Users can search for devices by category, price range, or specifications.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Device Comparison&lt;/strong&gt;: Users can compare up to three devices side-by-side based on features, price, and reviews.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Overcoming Challenges: Implementing Efficient API Queries
&lt;/h3&gt;

&lt;p&gt;The most challenging technical hurdle we faced was optimizing the API queries for device search and filtering. Initially, the search functionality was slow, especially when querying large datasets. The situation was critical because fast searches were essential to providing a smooth user experience. My task was to analyze our MongoDB queries and optimize them.&lt;/p&gt;

&lt;p&gt;I began by profiling the queries and discovered that some unnecessary fields were being retrieved in our search results, slowing down response times. To solve this, I adjusted the queries to only fetch the required fields using MongoDB’s projection feature. Additionally, I indexed specific fields that were frequently searched, such as device names and categories. As a result, search query times decreased by 70%, making the application much more responsive. This was a critical improvement as it ensured a smooth user experience, even with a growing dataset of devices.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I Learned
&lt;/h3&gt;

&lt;p&gt;This project taught me valuable lessons about working with large databases and optimizing performance. I learned the importance of analyzing and profiling queries to ensure efficiency. In hindsight, I would have designed the database schema with indexing in mind from the start, as it would have saved time during optimization later.&lt;/p&gt;

&lt;p&gt;On a personal level, I realized how much I enjoy backend development and database management. This project has confirmed my interest in specializing in these areas as I move forward in my engineering career.&lt;/p&gt;

&lt;h3&gt;
  
  
  About Me
&lt;/h3&gt;

&lt;p&gt;I am Kirubel, a passionate software developer with a focus on backend development and database management. I enjoy building efficient, scalable applications and solving complex technical problems. You can view the code for SpecZone on my &lt;a href="https://github.com/kirubel-web/SpecZone" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, check out the live project &lt;a href="https://spec-zone-client.vercel.app/" rel="noopener noreferrer"&gt;here&lt;/a&gt;, and connect with me on &lt;a href="https://www.linkedin.com/in/kirubel-alemu--" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>javascript</category>
      <category>database</category>
    </item>
    <item>
      <title>The Power of Documentation: How Reading Transformed My Experience with Redux on JamSphere</title>
      <dc:creator>Kirubel.A</dc:creator>
      <pubDate>Fri, 30 Aug 2024 14:31:22 +0000</pubDate>
      <link>https://dev.to/code_japi/the-power-of-documentation-how-reading-transformed-my-experience-with-redux-on-jamsphere-3j67</link>
      <guid>https://dev.to/code_japi/the-power-of-documentation-how-reading-transformed-my-experience-with-redux-on-jamsphere-3j67</guid>
      <description>&lt;p&gt;As developers, we often find ourselves diving headfirst into a new library or framework, eager to bring our ideas to life. The temptation to skip the documentation and jump straight into coding is strong—after all, how hard could it be? But as I’ve learned through my experience building JamSphere, a music management platform, skipping this crucial step can turn a smooth journey into a challenging uphill battle.&lt;/p&gt;

&lt;h4&gt;
  
  
  The Allure of Skipping Documentation
&lt;/h4&gt;

&lt;p&gt;When I started working on JamSphere, I was excited to bring the client’s vision to life. The platform needed to allow users to add, edit, and delete songs and artists, with seamless functionality and a user-friendly interface. I chose Redux to manage the application state because of its powerful and predictable state management capabilities. I hadn't used Redux briefly before, so I felt not confident enough to dive in without spending much time on the documentation.&lt;/p&gt;

&lt;h4&gt;
  
  
  Hitting the Wall:
&lt;/h4&gt;

&lt;p&gt;The initial setup of Redux seemed straightforward enough. I configured the store, created some reducers, and connected everything to my React components. But as the project grew in complexity, so did my issues. I ran into state management problems that I couldn’t easily solve:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;State Not Updating Properly:&lt;/strong&gt; I struggled with Redux not updating the state as expected when users added or edited songs and artists. Despite trying various debugging methods, I couldn’t pinpoint the issue.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Asynchronous Actions Confusion:&lt;/strong&gt; Managing asynchronous actions like fetching data from the server or handling user input became a nightmare. My components were re-rendering unexpectedly, leading to a disjointed user experience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Boilerplate Overload:&lt;/strong&gt; Redux’s boilerplate code quickly became overwhelming. Action creators, reducers, middleware—it was hard to keep track of everything, and I found myself duplicating code or making simple mistakes.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At this point, I realized that my lack of understanding of Redux was slowing me down. I knew I needed to go back to the basics—specifically, the Redux documentation.&lt;/p&gt;

&lt;h4&gt;
  
  
  Turning Point: Diving into Redux Documentation
&lt;/h4&gt;

&lt;p&gt;Taking a step back, I committed myself to thoroughly reading the Redux documentation. It was a game-changer.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Clarifying Concepts:&lt;/strong&gt; The documentation helped me understand core concepts like the Redux flow, immutability, and why it’s essential to keep state updates pure. It clarified how actions, reducers, and the store interact with each other, which I previously took for granted.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Simplifying Asynchronous Actions:&lt;/strong&gt; I learned about &lt;code&gt;redux-thunk&lt;/code&gt;, a middleware that allows writing action creators that return a function instead of an action. This was exactly what I needed to handle asynchronous logic cleanly. With this newfound knowledge, I could fetch and update the state without causing unexpected re-renders.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Effective Debugging:&lt;/strong&gt; I discovered the Redux DevTools, an indispensable tool for tracking state changes and actions in real-time. This significantly reduced the time I spent debugging and gave me better insights into how my application was behaving.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  The Result: A Functional and User-Friendly JamSphere
&lt;/h4&gt;

&lt;p&gt;With a deeper understanding of Redux, I was able to overcome the challenges that had been holding me back. JamSphere now functions smoothly, allowing users to effortlessly add, edit, and delete songs and artists. The Redux store manages the application state predictably, and the user experience is seamless. What started as a frustrating experience turned into a rewarding journey of learning and improvement, all thanks to taking the time to read the documentation.&lt;/p&gt;

&lt;h4&gt;
  
  
  Conclusion: The Importance of Documentation
&lt;/h4&gt;

&lt;p&gt;My experience with Redux on JamSphere taught me a valuable lesson: documentation is not just a resource; it’s a roadmap. Skipping it can lead to unnecessary challenges and wasted time, while embracing it can provide clarity and solutions that you might not have discovered otherwise.&lt;/p&gt;

&lt;p&gt;If you’re starting with a new library or framework, take the time to read the documentation. It might seem tedious at first, but the insights you gain will make your development process smoother and your projects more successful. In the end, the time you invest upfront will save you countless hours of frustration later on.&lt;/p&gt;

&lt;p&gt;So the next time you’re tempted to jump straight into coding, remember my experience with JamSphere—read the documentation, and set yourself up for success.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>redux</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Day 1 of Machine Learing</title>
      <dc:creator>Kirubel.A</dc:creator>
      <pubDate>Tue, 06 Aug 2024 22:16:25 +0000</pubDate>
      <link>https://dev.to/code_japi/day-1-of-machine-learing-3n09</link>
      <guid>https://dev.to/code_japi/day-1-of-machine-learing-3n09</guid>
      <description>&lt;h3&gt;
  
  
  Pandas 101: A Fun Dive into Data Magic 🐼✨
&lt;/h3&gt;

&lt;p&gt;Welcome, data enthusiasts! Today, we're embarking on an exciting journey into the world of Pandas, a powerful library in Python for data manipulation and analysis. Whether you're a beginner or just looking to refresh your skills, this blog post will guide you through the essentials in a fun and engaging way. Ready to become a data wizard? Let's dive in!&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Importing Pandas: The Gateway to Data Wonderland 🌀
&lt;/h4&gt;

&lt;p&gt;Before we start playing with data, we need to invite Pandas to the party. Here's how to do it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pandas&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Just like that, Pandas is now a part of your Python environment. Simple, right?&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Reading and Writing Data: Open the Book of Data 📚
&lt;/h4&gt;

&lt;p&gt;Pandas makes it super easy to read data from various file formats and write data to them. Let's look at some common ones:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reading Data:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CSV Files:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;data.csv&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Excel Files:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_excel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;data.xlsx&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;JSON Files:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;data.json&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Writing Data:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;To CSV:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;to_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;output.csv&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;To Excel:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;to_excel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;output.xlsx&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;To JSON:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;to_json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;output.json&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See? With just a few lines of code, you can read and write data like a pro!&lt;/p&gt;

&lt;h4&gt;
  
  
  3. DataFrames and Series: The Dynamic Duo 🦸‍♂️🦸‍♀️
&lt;/h4&gt;

&lt;p&gt;In Pandas, data is primarily handled using two key structures: DataFrames and Series.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DataFrames:&lt;/strong&gt; Think of a DataFrame as a table or a spreadsheet. It's a 2-dimensional labeled data structure with columns of potentially different types.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Name&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Alice&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Bob&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Charlie&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Age&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;27&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;City&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;New York&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Los Angeles&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Chicago&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;DataFrame&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Series:&lt;/strong&gt; A Series is like a single column of data. It's a 1-dimensional labeled array capable of holding any data type.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;ages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Series&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;27&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Age&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  4. Selecting Data: The Art of iloc and loc 🎯
&lt;/h4&gt;

&lt;p&gt;Now that we have our data, let's learn how to select specific parts of it using &lt;code&gt;iloc&lt;/code&gt; and &lt;code&gt;loc&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;iloc:&lt;/strong&gt; Stands for integer-location. It's used for selection by position (index).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Select the first row
&lt;/span&gt;&lt;span class="n"&gt;first_row&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;iloc&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="c1"&gt;# Select the first column
&lt;/span&gt;&lt;span class="n"&gt;first_column&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;iloc&lt;/span&gt;&lt;span class="p"&gt;[:,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;loc:&lt;/strong&gt; Stands for label-location. It's used for selection by label.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Select the row with label 0
&lt;/span&gt;&lt;span class="n"&gt;row_label_0&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;loc&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="c1"&gt;# Select the column with label 'Name'
&lt;/span&gt;&lt;span class="n"&gt;column_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;loc&lt;/span&gt;&lt;span class="p"&gt;[:,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Name&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  5. Fun with Data: A Quick Example 🎉
&lt;/h4&gt;

&lt;p&gt;Let's put it all together with a quick example. Imagine you have a file &lt;code&gt;students.csv&lt;/code&gt; with the following data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Name,Age,Grade
Alice,24,A
Bob,27,B
Charlie,22,A
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here's how you can read the file, select some data, and write the results to a new file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Step 1: Import pandas
&lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pandas&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;

&lt;span class="c1"&gt;# Step 2: Read the data
&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;students.csv&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Step 3: Select students with grade 'A'
&lt;/span&gt;&lt;span class="n"&gt;grade_a_students&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;loc&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Grade&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;A&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="c1"&gt;# Step 4: Write the selected data to a new file
&lt;/span&gt;&lt;span class="n"&gt;grade_a_students&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;to_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;grade_a_students.csv&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And there you have it! In just a few lines of code, you've imported data, selected specific entries, and saved the results. Magic!&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion: Become a Data Wizard 🧙‍♂️
&lt;/h3&gt;

&lt;p&gt;Pandas is an incredible tool that makes data manipulation fun and easy. By mastering the basics of importing data, using DataFrames and Series, and selecting data with &lt;code&gt;iloc&lt;/code&gt; and &lt;code&gt;loc&lt;/code&gt;, you're well on your way to becoming a data wizard. So grab your wand (or keyboard) and start exploring the magical world of Pandas!&lt;/p&gt;

&lt;p&gt;Happy data wrangling! 🐼✨&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>datascience</category>
      <category>pandas</category>
      <category>jupyter</category>
    </item>
    <item>
      <title>What Happens When You Type https://www.google.com in Your Browser and Press Enter?</title>
      <dc:creator>Kirubel.A</dc:creator>
      <pubDate>Wed, 17 Jul 2024 14:26:49 +0000</pubDate>
      <link>https://dev.to/code_japi/what-happens-when-you-type-httpswwwgooglecom-in-your-browser-and-press-enter-4m7h</link>
      <guid>https://dev.to/code_japi/what-happens-when-you-type-httpswwwgooglecom-in-your-browser-and-press-enter-4m7h</guid>
      <description>&lt;p&gt;Ever wondered what happens behind the scenes when you type a URL like &lt;a href="https://www.google.com" rel="noopener noreferrer"&gt;https://www.google.com&lt;/a&gt; into your browser and press Enter? Let's take a journey through the process step by step, covering key aspects like DNS requests, TCP/IP, firewalls, HTTPS/SSL, load balancers, web servers, application servers, and databases.&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%2Fraw.githubusercontent.com%2Fkirubel-web%2Fblog_assets%2Fmain%2FUntitled.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%2Fraw.githubusercontent.com%2Fkirubel-web%2Fblog_assets%2Fmain%2FUntitled.png" alt="image alt"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. DNS Request&lt;/strong&gt;&lt;br&gt;
When you type &lt;a href="https://www.google.com" rel="noopener noreferrer"&gt;https://www.google.com&lt;/a&gt; into your browser, the first step is to translate the human-readable domain name into an IP address that computers can understand. This is where the Domain Name System (DNS) comes into play.&lt;/p&gt;

&lt;p&gt;DNS Resolution: Your browser checks its cache to see if it has recently requested this domain. If not, it sends a DNS query to a DNS resolver.&lt;br&gt;
DNS Resolver: The resolver queries various DNS servers, starting with the root DNS server, followed by the top-level domain (TLD) server (.com in this case), and finally, the authoritative DNS server for google.com.&lt;br&gt;
IP Address: The authoritative DNS server returns the IP address associated with &lt;a href="http://www.google.com" rel="noopener noreferrer"&gt;www.google.com&lt;/a&gt; to your browser.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. TCP/IP&lt;/strong&gt;&lt;br&gt;
With the IP address in hand, your browser needs to establish a connection to the server. This is done using the TCP/IP protocol.&lt;/p&gt;

&lt;p&gt;TCP Handshake: The browser initiates a TCP connection with Google's server using a three-step handshake process (SYN, SYN-ACK, ACK).&lt;br&gt;
Port: The request is made to the server’s IP address on port 443 (the default port for HTTPS).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Firewall&lt;/strong&gt;&lt;br&gt;
Before the request reaches Google's server, it typically passes through one or more firewalls. Firewalls are security devices designed to monitor and filter incoming and outgoing traffic based on predefined security rules.&lt;/p&gt;

&lt;p&gt;Inspection: The firewall inspects the traffic to ensure it meets security criteria.&lt;br&gt;
Pass-through: If the traffic is deemed safe, the firewall allows it to pass through to the server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. HTTPS/SSL&lt;/strong&gt;&lt;br&gt;
HTTPS ensures that the communication between your browser and the server is encrypted, protecting any data exchanged from eavesdroppers.&lt;/p&gt;

&lt;p&gt;SSL/TLS Handshake: The browser and the server perform an SSL/TLS handshake to establish a secure connection. This involves exchanging cryptographic keys and verifying certificates.&lt;br&gt;
Encryption: Once the handshake is complete, all data sent between the browser and the server is encrypted.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Load Balancer&lt;/strong&gt;&lt;br&gt;
Google uses load balancers to distribute incoming traffic across multiple servers to ensure no single server becomes overwhelmed.&lt;/p&gt;

&lt;p&gt;Distribution: The load balancer receives the incoming request and forwards it to one of the many available web servers, balancing the load based on current traffic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Web Server&lt;/strong&gt;&lt;br&gt;
The web server is responsible for handling HTTP requests and serving web pages.&lt;/p&gt;

&lt;p&gt;Handling the Request: The web server receives the request and determines what content to serve. This could be a static HTML page or it could require dynamic content generation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Application Server&lt;/strong&gt;&lt;br&gt;
For dynamic content, the web server forwards the request to an application server.&lt;/p&gt;

&lt;p&gt;Processing: The application server runs the necessary backend logic, which might involve interacting with various services and components to generate the appropriate response.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. Database&lt;/strong&gt;&lt;br&gt;
If the request requires data storage or retrieval, the application server communicates with the database.&lt;/p&gt;

&lt;p&gt;Query: The application server sends a query to the database to retrieve or store data.&lt;br&gt;
Response: The database processes the query and sends the results back to the application server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9. Response Back to Browser&lt;/strong&gt;&lt;br&gt;
Generate Web Page: The application server generates the HTML for the web page based on the data retrieved from the database.&lt;br&gt;
Send Response: The web server sends the final HTML content back through the load balancer, which forwards it to the client (your browser).&lt;br&gt;
Render Page: Your browser receives the HTML, CSS, JavaScript, and other resources, and renders the web page for you to see.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>fullstack</category>
    </item>
  </channel>
</rss>
