<?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: Ivy Chen </title>
    <description>The latest articles on DEV Community by Ivy Chen  (@ivavay).</description>
    <link>https://dev.to/ivavay</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%2F360901%2F2b491bbc-6e85-4b00-9336-7fbf95ad0d34.JPG</url>
      <title>DEV Community: Ivy Chen </title>
      <link>https://dev.to/ivavay</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ivavay"/>
    <language>en</language>
    <item>
      <title>AppWorks School - CloudMile Feedback Loop Project</title>
      <dc:creator>Ivy Chen </dc:creator>
      <pubDate>Wed, 11 Dec 2024 22:32:38 +0000</pubDate>
      <link>https://dev.to/ivavay/appworks-school-cloudmile-feedback-loop-project-2mji</link>
      <guid>https://dev.to/ivavay/appworks-school-cloudmile-feedback-loop-project-2mji</guid>
      <description>&lt;p&gt;As a part of the bootcamp program, I had the chance to work closely with the developer mentors at CloudMile for a project called Feedback Loop. It is a event feedback management tool that helps organizers keep track of participants’ feedback via form submissions. I collaborated with another classmate on this 2-week project and received guidance from our 5 mentors (Juri, Liang, Shan, Welly, Jack), which was super cool! The mentors took turns in reviewing our pull requests, gave recommendations for code quality/best practices, and encouraged me a lot throughout the collaboration!&lt;/p&gt;

&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%2Fkk51w5i7paw8qjeq7h4l.jpeg" 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%2Fkk51w5i7paw8qjeq7h4l.jpeg" alt="Image description" width="800" height="436"&gt;&lt;/a&gt;&lt;br&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%2Funcmke8qhf5zy8na669w.jpeg" 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%2Funcmke8qhf5zy8na669w.jpeg" alt="Image description" width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Learnings
&lt;/h3&gt;

&lt;p&gt;Here are some of the things I learned.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Database Schema&lt;/strong&gt;&lt;/p&gt;

&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%2Fs8oxdlb7rhde31exllxu.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%2Fs8oxdlb7rhde31exllxu.png" alt="Image description" width="800" height="515"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I got more familiar with working with Firebase Firestore to come up with a database schema through this first phase of the process. Through some back-and-forth discussions with our teacher and mentors, we finally got a structure down that we could work off of. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Git Flow&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We used a simplified approach to git flow. The steps were as followed:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Make a develop branch from main&lt;/li&gt;
&lt;li&gt;Pull remote develop to local develop, then make a feature branch from develop&lt;/li&gt;
&lt;li&gt;When done, push local feature branch to remote feature branch&lt;/li&gt;
&lt;li&gt;From remote feature branch, open a pull request to develop&lt;/li&gt;
&lt;li&gt;PR review time!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Best Practices&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Also, we got some advice on best practices for developing collaboratively. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;300-500 lines for a PR&lt;/li&gt;
&lt;li&gt;1 branch: 1 PR, 1 branch: 1 feature&lt;/li&gt;
&lt;li&gt;Pull develop every day &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I think the ratio 1: 1 makes a lot of sense. It’s focused, modular, and more maintainable. Similar to how a food stall should only sell one thing if they want to be specialized in a dish. &lt;/p&gt;

&lt;h3&gt;
  
  
  Reflection
&lt;/h3&gt;

&lt;p&gt;Due to the time crunch (2 weeks was a little tight for this), I relied on AI a lot to debug and break down manageable tasks for me, which resulted me in having less control in the code I was writing. If I had more time on this project, I would spend more time on refactoring so then other features could be built on top of our work in the future.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Crocheting x Programming</title>
      <dc:creator>Ivy Chen </dc:creator>
      <pubDate>Mon, 21 Oct 2024 05:09:34 +0000</pubDate>
      <link>https://dev.to/ivavay/crocheting-x-programming-df4</link>
      <guid>https://dev.to/ivavay/crocheting-x-programming-df4</guid>
      <description>&lt;p&gt;Crocheting is a lot like programming. It requires locked-in focus when you’re first learning a pattern. Sometimes the pattern repeats, sometimes they don’t. It’s stressful when you’re first trying to decipher and replicate a pattern, but then once you get into the groove of it, it becomes like flow.&lt;/p&gt;

&lt;p&gt;Crocheting is also precise. Every round should have a certain number of stitches, no more or less. I often found myself counting and recounting again to make sure the number is exact so it doesn’t affect the outer rounds later. Sometimes if something doesn’t seemed right when you finish a round, you have to go back to check your stitches to see where the mistake happened, which is a form of debugging in itself. Then you either untangle all the stitches up to that point and redo them, or you try to see if there’s a way you can still build on top of the mistake without it being too noticeable. But like programming, if a mistake remains unattended, it usually will end up making later steps harder to implement, though there are still workarounds. But unlike programming, everything is manual and there are no AI-assisted anything to help you speed up the process or get unstuck. Everything is analog, which is such a good breather from screen time.&lt;/p&gt;

&lt;p&gt;Like code reviews in programming, it is a good skill to know how to read other people’s crochet patterns so you can try them yourselves or help them discover what went wrong. To para-quote what the store owner said at the workshop the other day, “once you become &lt;em&gt;literate&lt;/em&gt; in reading crochet patterns, it becomes a whole lot easier”. Like how empowering it was to learn to code, learning to read / create crochet patterns itself was also really encouraging. It’s like gaining access to another sphere that you previously had no access to before.&lt;/p&gt;

</description>
      <category>reflection</category>
      <category>programming</category>
      <category>learning</category>
    </item>
    <item>
      <title>AppWorks School - Week 3</title>
      <dc:creator>Ivy Chen </dc:creator>
      <pubDate>Wed, 14 Aug 2024 05:23:57 +0000</pubDate>
      <link>https://dev.to/ivavay/appworks-school-week-3-5jp</link>
      <guid>https://dev.to/ivavay/appworks-school-week-3-5jp</guid>
      <description>&lt;p&gt;As we’re about done wrapping up the e-commerce shopping website, our teacher gave us his sample code and had us study it as an examplar of how it could be done differently. I think what helped the most was seeing how he structured his folders and files, especially with the way components are broken up and how logic is seperated in index.js seperate from the JSX. He also doesn’t set unnecessary states or use useEffects when he doesn’t need to. He then gave us a set of review questions, mostly foundational JS and React concepts, and we had to use snippets of sample code to back up our answers to these review questions. &lt;/p&gt;

&lt;p&gt;What was really hard about this last week on the project was that we had to do all the functionalities like selecting product (color, size, quantity) and adding to cart / adjusting cart items in this week. For me, it felt like a lot of functionalities squeezed into the span of 1.5 weeks, so it’s taking me a bit longer to fully complete than scheduled. Our teacher always give us feedback comments on our PRs  so that takes time to fix too. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>AppWorks School - Week 2</title>
      <dc:creator>Ivy Chen </dc:creator>
      <pubDate>Sat, 03 Aug 2024 22:09:52 +0000</pubDate>
      <link>https://dev.to/ivavay/appworks-school-week-2-3go2</link>
      <guid>https://dev.to/ivavay/appworks-school-week-2-3go2</guid>
      <description>&lt;p&gt;This week’s progress is definitely a bit more stalled than last week. We had to integrate react into our existing vanilla JS project and I spent some time early in the week figuring out how to do that. Then, it was diving straight into styled components and figuring out how that works that took some more getting used to. Refactoring the header and footer to styled components took some time but then once it was time to build the rest of the product details page’s layout, I got more comfortable. I think I still don’t know how to fully utilize the benefits of styled components to appreciate its design. In theory, it’s supposed to help with modularity (easier tracking of CSS with it being component-based) and dynamic styling. &lt;/p&gt;

&lt;p&gt;We also had some government people come to visit to listen to our presentations and attended a workshop on sharing learning tips. Our company mentors came for the government event as well and we spent some time chatting afterwards, which was so nice. They’re very friendly as usual and made us feel comfortable askig questions. I’m very excited for the 2-week project Gwen and I will be doing with them.&lt;/p&gt;

&lt;h3&gt;
  
  
  How this past week went
&lt;/h3&gt;

&lt;p&gt;What was working? &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Having your own ideas for how to implement something and why is very important. Being able to explain my code to someone else (not just what but why) is a skill I want to improve on. &lt;/li&gt;
&lt;li&gt;Writing “robust” code is important, e.g. you shouldn’t have to drastically refactor in the future if more data is pulled in. &lt;/li&gt;
&lt;li&gt;Also learned that naming stuff like functions and variable should be self-descriptive as much as possible. This will reduce the needs for comments. But at this stage, I still prefer using comments everywhere to remind myself of what I’m doing. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Reminders to self
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Rebasing is a tiresome process, even more so than programming the logic itself because mistakes are deadly. But still, you should rebase often! And, you could always make a backup branch before the rebase process in case something goes horribly wrong. &lt;/li&gt;
&lt;li&gt;Done over perfection. Especially if you’re under a time crunch. &lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>bootcamp</category>
      <category>javascript</category>
    </item>
    <item>
      <title>AppWorks School - Week 1</title>
      <dc:creator>Ivy Chen </dc:creator>
      <pubDate>Fri, 26 Jul 2024 06:30:00 +0000</pubDate>
      <link>https://dev.to/ivavay/appwork-school-week-1-1aff</link>
      <guid>https://dev.to/ivavay/appwork-school-week-1-1aff</guid>
      <description>&lt;h3&gt;
  
  
  Top learnings 🔄 recap sessions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;From design file, pay close attention to which containers are dynamic and which ones are fixed with viewport changes &lt;/li&gt;
&lt;li&gt;An HTML structure is considered good if it can allow adding/changing elements in the future &lt;/li&gt;
&lt;li&gt;Git merge vs rebase

&lt;ul&gt;
&lt;li&gt;Merge shows all commit history of both branches and is ideal for collaboration&lt;/li&gt;
&lt;li&gt;Rebase integrate changes from the main branch into feature branch&lt;/li&gt;
&lt;li&gt;Don’t use rebase if you’re collaborating with other people, because you’ll accidentally change other people’s work&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Git commands ⌨️&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;git checkout feature-branch&lt;/code&gt; -&amp;gt; &lt;code&gt;git fetch origin&lt;/code&gt;? -&amp;gt; &lt;code&gt;git rebase main&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git checkout main&lt;/code&gt; -&amp;gt; &lt;code&gt;git merge feature-branch&lt;/code&gt; (to see feature-branch work in main)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How this past week went 🗓️
&lt;/h3&gt;

&lt;p&gt;✅ What was working? Why?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Taking the time to visualize how you want to tackle the task and break into smaller to-do’s before actually diving into code.&lt;/li&gt;
&lt;li&gt;Console logging a lot! Especially in and outside of code blocks to see what’s actually being run. Indicate what you’re logging out too, not just the item itself. &lt;/li&gt;
&lt;li&gt;Giving ChatGPT very specific git branching scenarios to know with confidence which git commands to give and in what order to keep things up-to-date. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🙅🏻‍♀️ What didn’t work? Why?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Just throwing your blocks of code at ChatGPT to debug without thinking about what exactly you want it to check before&lt;/li&gt;
&lt;li&gt;Being too fixated on a bug for more than 2 hours. Stand up and go take a breath of air. It’ll help reframe your perspective once you come back. &lt;/li&gt;
&lt;li&gt;Don’t code when you’re too tired because you’ll make stupid mistakes. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Top learnings 🔄 project
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Try to think ahead early on and plan for future implementations so you won’t have to refactor your logic drastically later to make it work&lt;/li&gt;
&lt;li&gt;Edge cases like error messages matter for a smooth user experience&lt;/li&gt;
&lt;li&gt;Make there aren’t redundant (don’t repeat yourself) or unnecessary code &lt;/li&gt;
&lt;li&gt;Your commits should be concise and descriptive as to what you changed/added/refactored/deleted&lt;/li&gt;
&lt;li&gt;Learned that PR’s should have test cases for what you want the reviewer to test out on their end manually! &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Reminders to self 💅🏼
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Habits lead to consistency. Consistency leads to growth.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;If you want to grow, then develop good habits 💪🏼&lt;/li&gt;
&lt;li&gt;You’re here at the bootcamp for only 4 more months. Prioritize what’s important and what you want to get out of it &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Links:&lt;br&gt;
&lt;a href="https://whatismyviewport.com/" rel="noopener noreferrer"&gt;What’s my viewport&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.postman.com/" rel="noopener noreferrer"&gt;Postman&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.gitkraken.com/gitlens" rel="noopener noreferrer"&gt;GitLens Chrome Extension&lt;/a&gt; &lt;/p&gt;

</description>
      <category>bootcamp</category>
      <category>webdev</category>
      <category>git</category>
    </item>
    <item>
      <title>AppWorks School - Week 0</title>
      <dc:creator>Ivy Chen </dc:creator>
      <pubDate>Sat, 20 Jul 2024 05:46:09 +0000</pubDate>
      <link>https://dev.to/ivavay/appworks-school-week-0-2gfl</link>
      <guid>https://dev.to/ivavay/appworks-school-week-0-2gfl</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%2Fnc5nrqo9fo79kfeqqiqp.JPG" 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%2Fnc5nrqo9fo79kfeqqiqp.JPG" alt="Image description" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’m a month into the bootcamp at Appworks School and just wrapped up my first week on a class project. I’m learning a lot and liking it so far! Our frontend instructor is really thorough with checking our work and patient with my questions. &lt;/p&gt;

&lt;p&gt;Every morning, we start off with a 1-hour recap of what we worked on yesterday and next steps. Usually, there are guided discussion questions based around our approaches to the task the day before and we break into small groups to share. Sometimes, we’re given some things to research on our own in our free time, such as what is/how to rebase in git. Then, we’re off to work on our task for the day. &lt;/p&gt;

&lt;p&gt;Last week, our recap sessions have primarily been focused on github workflow for collaboration and CSS approaches to unconventional design (I finally can understand why it’s empathetic to not set random pixel numbers and have wacky UI). I’m really glad that we get to experience what it’s like to “collab” using git and github so early on in the bootcamp and learn about best practices. For this class project, we’re not actually collabing with others but rather mimicking the process of collabing by making a pull request, getting our work reviewed (merging), and pulling the latest updates (including all the other students’ work) into our local repo. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A pull request is a request made to the upstream repo (original repo where you forked from) to see if you could “merge” your work into it. Merging is usually done by the person who owns and maintains the upstream repo and an action that cannot (?) be reversed. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I also learned a bit more about branches. It’s best to use branches that stem from your main and make one every time you want to work on a new feature (or experiment with something). Usually, one branch is used for one PR (?), and after the PR has been merged, you can dispose that branch. There are naming conventions for these branches, usually something like feature/what-you-work-on (eg: feature/w0-p2). From what I understand, a branch contains all the content you have in main and is like a copy, or a “snapshot” to work from. It is a good idea to frequently check which branch you’re on to make sure you’re working in the right one (git branch). &lt;/p&gt;

&lt;p&gt;My current workflow look like this: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;switch into main &lt;code&gt;git checkout main&lt;/code&gt;, sync fork (sync your main to the newest updates from upstream), switch into main, &lt;code&gt;git pull origin main&lt;/code&gt; (so your local main have the latest update from remote main),  create and checkout new branch &lt;code&gt;git checkout -b &amp;lt;branch-name&amp;gt;&lt;/code&gt;, start making progress, git add/git commit, &lt;code&gt;git push origin &amp;lt;branch name&amp;gt;&lt;/code&gt;, make a PR (then back to the start). &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This workflow also means that I can only start working on another PR after the last one is merged. But apparently there are some workarounds because reviewing PRs can take some time and you don’t want that to be a blocker for moving on to the next task. It is possible to make a new branch from the previous branch, but I don’t really understand how it works after that. Maybe I should look into what rebase it but I feel like it gets more complicated from there. The last thing I want it making irreversible changes. &lt;/p&gt;

</description>
      <category>git</category>
      <category>bootcamp</category>
      <category>webdev</category>
    </item>
    <item>
      <title>CS50 Week 4 - Memory</title>
      <dc:creator>Ivy Chen </dc:creator>
      <pubDate>Sun, 10 Mar 2024 00:54:15 +0000</pubDate>
      <link>https://dev.to/ivavay/cs50-week-4-memory-11am</link>
      <guid>https://dev.to/ivavay/cs50-week-4-memory-11am</guid>
      <description>&lt;p&gt;To be fairly honest, this week's lecture went a little over my head. It was about bytes, pointers (which store the address of a value), and storing/freeing memory. It is good to free up memory that you're done using. The content this week felt more archaic and even after practice with the psets, I still feel uncomfortable doing it on my own. &lt;/p&gt;

&lt;p&gt;The psets were interesting though and really practical! The first one was Volume and the task was to change the volume of a melody by 2x the speed. The second one was Filter and the goal was to make 4 different filters that you could use on images. The final one was Recover and I had to write a program to find and "recover" the JPEGS in a memory card. For this one, I practiced opening, reading, and writing to files. &lt;/p&gt;

&lt;p&gt;I'm entering my halfway point in the course and I feel good! Excited to dive into the more modern languages and see how they approach teaching it. &lt;/p&gt;

&lt;p&gt;Also I feel like I should start thinking what I'd want to do for my final project.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>cs50</category>
      <category>learning</category>
    </item>
    <item>
      <title>CS50 Week 3 - Algorithms and runoff</title>
      <dc:creator>Ivy Chen </dc:creator>
      <pubDate>Sun, 28 Jan 2024 22:54:59 +0000</pubDate>
      <link>https://dev.to/ivavay/cs50-week-3-algorithms-and-runoff-4o4j</link>
      <guid>https://dev.to/ivavay/cs50-week-3-algorithms-and-runoff-4o4j</guid>
      <description>&lt;p&gt;I decided to come back to CS50 after taking a break from this core course last August (I started doing CS50's Web course instead). I remembered stopping because I got stuck on this problem set problem called runoff, which was pretty difficult at the time. Coming around in 2024, I decided to give this problem another try and familiarize myself with coding in C again. &lt;/p&gt;

&lt;p&gt;In week 3's lecture, the professor used various demonstrations to show us the difference between a couple of algorithms, like merge sort (fast), selection sort (slow), and bubble sort. I still don't remember when you would use them but I did note down which ones are fast or slow. David also went over the concept of recursion, which I interpreted as reusing a small part of a problem that we know the answer to in other similar problems. It is an "elegant" way, but not necessarily "faster".  &lt;/p&gt;

&lt;p&gt;Then comes the pset problem runoff, which I remembered I had a hard time understanding the prompt the last time around so I could barely even get started. This time, there was an accompanying walkthrough video, which broke down the different functions we needed to finish writing for us. At a glance, a runoff election is a way of deciding who the election winner is by counting the votes of first-preference candidates while eliminating the candidate with the fewest votes. I struggled with the &lt;code&gt;tabular&lt;/code&gt; function the most because I kept on entering an infinite loop. Then the other functions were pretty quick and self-explanatory. I finally got rid of the infinite loop with the Duck's help, among other bugs as well. &lt;/p&gt;

&lt;p&gt;I finished the runoff problem in a little under 4 hours, which was a lot of time considering people could run a marathon with this amount of time. &lt;/p&gt;

&lt;p&gt;If you're hesitating whether or not to take CS50, I'd say that it is a bit harder than most introductory programming courses but the quality of the lectures/problem sets is spectacular. &lt;/p&gt;

&lt;p&gt;I'll be continuing this series and updating each week's reflection as it goes.  &lt;/p&gt;

</description>
      <category>cs50</category>
      <category>beginners</category>
      <category>programming</category>
      <category>learning</category>
    </item>
    <item>
      <title>CS50 Web - Project 2</title>
      <dc:creator>Ivy Chen </dc:creator>
      <pubDate>Thu, 07 Dec 2023 02:27:30 +0000</pubDate>
      <link>https://dev.to/ivavay/cs50-web-project-2-3egm</link>
      <guid>https://dev.to/ivavay/cs50-web-project-2-3egm</guid>
      <description>&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%2F6yz9hyg7v3bt55ad04wf.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%2F6yz9hyg7v3bt55ad04wf.png" alt="Image description" width="800" height="473"&gt;&lt;/a&gt;&lt;br&gt;
Second project with Django down ✅ This time around, I was tasked with building an auctions site where users could create listings, close listings, add to watchlist, bid on listings, and add comments, which was definitely a handful. I was initially pretty doubtful whether or not I'd be able to complete this since I've never done a full stack project with so many functionalities before, but I did it so yay.&lt;/p&gt;

&lt;p&gt;Working with views.py in Django has taught me the importance of separating functionalities, the more distinct the better. For example, originally I had the bidding functionality and the displaying bids both in the same function, but then after I separated them, Django got more clear on what each of them is supposed to do. One thing for one function at a time. &lt;/p&gt;

&lt;p&gt;I also learned more about databases from Django models and what foreign key, one-to-one relationship, and many-to-many relationship means. &lt;/p&gt;

&lt;p&gt;I'm really liking how hands-off these CS50 projects are so far. They don't tell you how to do something but give you what you need to do, which almost mimics real life. &lt;/p&gt;

&lt;p&gt;You can check out the demo of the working app &lt;a href="https://www.youtube.com/watch?v=JtOW5pCYh20&amp;amp;t=6s"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>python</category>
      <category>tutorial</category>
      <category>cs50w</category>
    </item>
    <item>
      <title>🚊 How to make a terminal-based metro game</title>
      <dc:creator>Ivy Chen </dc:creator>
      <pubDate>Fri, 24 Nov 2023 03:40:54 +0000</pubDate>
      <link>https://dev.to/ivavay/how-to-make-a-terminal-based-metro-game-521b</link>
      <guid>https://dev.to/ivavay/how-to-make-a-terminal-based-metro-game-521b</guid>
      <description>&lt;p&gt;I got this idea from an &lt;a href="https://www.instagram.com/p/CuzIt2yAKW-/"&gt;Instagram reel&lt;/a&gt; that I've seen recently where these people play a game to see which metro stop it'll take them to! I thought it'd be good practice to digitize this and make it into a terminal game. If you're not familiar with the Taipei metro system, don't worry. You can easily replicate the steps here to suit your city's metro system and make a unique one for the metro system of your choice!&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%2F8cfobjaxmnsb6ll349a5.gif" 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%2F8cfobjaxmnsb6ll349a5.gif" alt="Image description" width="600" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🚊 Let's get into the code
&lt;/h2&gt;

&lt;p&gt;First, you want to create dictionaries for each of the stations in selected metro lines. My city's MRT stations come with an associated number, but if your metro doesn't, then just assign a number to each from one direction to another. Create a dictionary for each metro line.&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;brown&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;taipei zoo&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;muhza&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;wanfang community&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;wanfang hospital&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;xinhai&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;linguang&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;liuzangli&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
         &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;technology building&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;daan&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;zhongxiao fuxing&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;nanjing fuxing&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;zhongshan junior high&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
         &lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;songshan airport&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dahzi&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;jiannan road&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;xihu&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;17&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;gangqian&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;wende&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;19&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;neihu&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dahu park&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
         &lt;span class="mi"&gt;21&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;huzhou&lt;/span&gt;&lt;span class="sh"&gt;'&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;donghu&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;nangang software park&lt;/span&gt;&lt;span class="sh"&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="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;nangang exhibtion center&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;Next, it's time for getting the user's inputs. You want to get which station they're starting from and what line that station is on.&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;starting_station&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Which station are you starting from? &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;color_line&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Which color is your station on? &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;You want to convert the &lt;code&gt;color_line&lt;/code&gt; input to a dictionary to easier access later. So...&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;color_dict&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;eval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;color_line&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, we want to emulate a coin toss to see if it's heads or tails. If it's heads, you will go north/east from where you are. If it's tails, you will go south/west. Don't forget to &lt;code&gt;import random&lt;/code&gt; at the beginning of the 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="n"&gt;coin_flip&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;heads&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;tails&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; 
&lt;span class="n"&gt;coin_flip_result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;choice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;coin_flip&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You want to do the same thing for rolling a dice too. In which you can go like this.&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;dice&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;randomize_number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;choice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dice&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then comes the fun part, implementing the logic! I used a nested if/else conditional to make it work.&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="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;station&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;color_dict&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;starting_station&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;color_dict&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;station&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="c1"&gt;# station is the key aka number
&lt;/span&gt;        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;coin_flip_result&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;heads&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# increase station number 
&lt;/span&gt;            &lt;span class="n"&gt;destination&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;station&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;randomize_number&lt;/span&gt;
            &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;🪙 Your coin flip turned out to be &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;coin_flip_result&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;🎲 You are going &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;randomize_number&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; stops in &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;heads&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; direction on the &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;color_line&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; line&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;coin_flip_result&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;tails&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# decrease station number 
&lt;/span&gt;            &lt;span class="n"&gt;destination&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;station&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;randomize_number&lt;/span&gt;
            &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;🪙 Your coin flip turned out to be &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;coin_flip_result&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;🎲 You are going &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;randomize_number&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; stops in &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;tails&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; direction on the &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;color_line&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; line&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;I also used a try/exception to catch an index out of bounds error just in case you're starting at a station that's towards the end of the lines and you number from the dice exceeds what is possible.&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="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;🥁 Your destination is &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;color_dict&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;destination&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;except&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;☹️ Try again, index out of bound&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;h2&gt;
  
  
  💭 Conclusion
&lt;/h2&gt;

&lt;p&gt;And that's it! Make sure to run &lt;code&gt;python3 filename&lt;/code&gt; to run it while you're working on it! Here's the &lt;a href="https://github.com/ivavay/mrt-game"&gt;Github repo&lt;/a&gt; if you need a fuller look at it. &lt;/p&gt;

</description>
      <category>showdev</category>
      <category>python</category>
      <category>tutorial</category>
      <category>programming</category>
    </item>
    <item>
      <title>CS50 Web - Project 1</title>
      <dc:creator>Ivy Chen </dc:creator>
      <pubDate>Tue, 21 Nov 2023 07:55:10 +0000</pubDate>
      <link>https://dev.to/ivavay/cs50-web-project-1-1ke3</link>
      <guid>https://dev.to/ivavay/cs50-web-project-1-1ke3</guid>
      <description>&lt;p&gt;Hi from 2 months later! I finally got around to wrapping this project up, which is a clone of a simplified Wikipedia. I had loads of fun designing the baby blue-themed UI from scratch and implementing it using Django. Django was introduced in week 3's lecture and it wasn't nearly enough to make me feel comfortable building this project, which I did what I could with Googling.&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%2Fm850ipg1j0nj6c9zsgc4.gif" 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%2Fm850ipg1j0nj6c9zsgc4.gif" alt="Image description" width="600" height="358"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There were 7 main features of this website, my favorites included creating/editing a page, randomly displaying a page, and the search functionality. I struggled the most with the search feature to make it work just right because you also had to account for if a user just typed in a substring of the actual entry page name and showed them the search results regardless of the spelling typo. &lt;/p&gt;

&lt;p&gt;The overall features of this project reminded me of the structure you would have for a blog, which includes the usual CRUD (create, read, update, delete), except this project's criteria didn't need to have the delete function. &lt;/p&gt;

&lt;p&gt;Overall, this project was a good challenge as it took over 15 hours (roughly) for me to complete!&lt;/p&gt;

&lt;p&gt;Here's a &lt;a href="https://youtu.be/wnOig0RRhDs?si=X0k-jBY3G2nWNmay"&gt;demo&lt;/a&gt; of the finished project with timestamps. &lt;/p&gt;

</description>
      <category>cs50w</category>
      <category>webdev</category>
      <category>django</category>
      <category>python</category>
    </item>
    <item>
      <title>CS50 Web - Project 0</title>
      <dc:creator>Ivy Chen </dc:creator>
      <pubDate>Fri, 22 Sep 2023 07:19:01 +0000</pubDate>
      <link>https://dev.to/ivavay/cs50-web-project-0-eag</link>
      <guid>https://dev.to/ivavay/cs50-web-project-0-eag</guid>
      <description>&lt;p&gt;Hello!! It has truly been a hot minute since I've written on here but I'm glad to be back. This time around, I'm taking a course called CS50 Web and I want to document my journey through it, especially the projects part. In total, there are 5 projects + a final project to be completed for this course. &lt;/p&gt;

&lt;p&gt;I really like the format of the CS50 series because of the automatic grading system for assignments, but I was pleasantly surprised that not only is this web dev course of CS50 graded automatically, but it is also simultaneously looked over by human graders! In this first project (and probably in the upcoming projects as well), students have to record a screencast of their finished demo and give a verbal explanations with it. I thought this was really nice that they made this mandatory because it could help me with my presentation skills :) &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%2F5kbludyc6ppc8do0m71p.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%2F5kbludyc6ppc8do0m71p.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This project was to build a clone of Google Search, Google Image Search, and Advanced Search. At first, I thought I had to use some sort of API or build a backend but it turned out that you could just rely on HTML to grab the queries of your inputs. How fascinating! &lt;/p&gt;

&lt;p&gt;For example, to implement the "I'm feeling lucky" button, which takes you directly to the first result of your search, you just have to use this &lt;code&gt;name="btnI"&lt;/code&gt; thing. &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;

&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"input"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"btnI"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"I'm Feeling Lucky"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;This project was a good way to make sure you can implement pixel-perfect HTML/CSS by inspecting the original designs using the developer tool. &lt;/p&gt;

&lt;p&gt;Here's my &lt;a href="https://youtu.be/aDlDXeaBSGk?si=DuEl78U7Imjd_7RF" rel="noopener noreferrer"&gt;demo video &lt;/a&gt;with timestamps. &lt;/p&gt;

</description>
      <category>cs50w</category>
      <category>css</category>
      <category>projects</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
