<?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: Riz-waan</title>
    <description>The latest articles on DEV Community by Riz-waan (@rizwaan).</description>
    <link>https://dev.to/rizwaan</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%2F390313%2F5a14f4a1-6352-41e3-a01a-f5a1812037f2.jpeg</url>
      <title>DEV Community: Riz-waan</title>
      <link>https://dev.to/rizwaan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rizwaan"/>
    <language>en</language>
    <item>
      <title>My Programming Mistake</title>
      <dc:creator>Riz-waan</dc:creator>
      <pubDate>Wed, 20 May 2020 21:45:09 +0000</pubDate>
      <link>https://dev.to/rizwaan/my-programming-mistake-53kg</link>
      <guid>https://dev.to/rizwaan/my-programming-mistake-53kg</guid>
      <description>&lt;p&gt;﷽ (In the name of God the most merciful and compassionate I begin)&lt;/p&gt;

&lt;p&gt;The following is not a project overview, rather a graduation speech style article taking you through one of my biggest programming mistakes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Story
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Enter 9th Grade
&lt;/h3&gt;

&lt;p&gt;I entered 9th grade with a little over 3 years of programming experience, mostly in scripting languages but with exposure in everything. Within the first quarter, my administrator/counselor introduced me to a problem: our school booking system. Without hesitation, my friend said we can make a better program. Enter, the mistake. I had no idea what I was doing, but I knew I needed to use a database, went through Google Sheets but ended up using MySQL and only one table. &lt;/p&gt;

&lt;h3&gt;
  
  
  Enter 10th Grade
&lt;/h3&gt;

&lt;p&gt;I had to implement a new feature and while doing research I learned the MySQL is a relational database. This should have been my warning. But nope didn't listen continued to self learn MySQL only from problems I had. But this was fine as I was going to implement a lot of features that it was fine to restart from scratch.&lt;/p&gt;

&lt;h3&gt;
  
  
  Enter 11th Grade
&lt;/h3&gt;

&lt;p&gt;I had a few more internships where I used my lack of understanding in MySQL, thankfully most of these projects didn't require a database.&lt;/p&gt;

&lt;h3&gt;
  
  
  12th Grade, the final blow
&lt;/h3&gt;

&lt;p&gt;Deciding to allow the school to maintain the program, I first wanted to make it efficient. This is where I realized export takes 30 seconds, which shouldn't happen for only 200 rows. I decided to reach out to a mentor. And voila, he asked me a question: How many indexes did you use? Wow, my mind was blown, what I knew foreign keys were indexes, but I didn't set them as indexes. So I just made all of the important pieces as indexes. This lowered that 30-second operation to 0.2 seconds. Now, I would have just moved on, but my mentor told me there is a problem in my query as well. Guess what? You can use multiple joins without nesting them or using subselects, and that makes it much more efficient. Through this, thankfully I found out when you create a table you can reference a column to another column, so I started designing databases in MySQL Workbench. My problem was that I didn't know how to use the relationships feature in PHPMyAdmin but in designing an EDR it was much more in my face. At this point, I knew I had to restart, so that is where I am.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Lesson
&lt;/h2&gt;

&lt;p&gt;Learning through building is good, but do it using side projects, not a real project. And when self-learning don't learn only what you think you need because you may need a lot more. I learned that I need to start from basics instead of assuming I know things. Finally, I would like to say Congrats Graduates, and thank you DEV and GitHub for making this graduation possible!&lt;/p&gt;

</description>
      <category>octograd2020</category>
    </item>
  </channel>
</rss>
