<?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: DouglasG98</title>
    <description>The latest articles on DEV Community by DouglasG98 (@douglasg98).</description>
    <link>https://dev.to/douglasg98</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%2F2904382%2Fbf4c896e-b862-4104-9cce-fa9236ecd38c.png</url>
      <title>DEV Community: DouglasG98</title>
      <link>https://dev.to/douglasg98</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/douglasg98"/>
    <language>en</language>
    <item>
      <title>Simulating 8 bit CPU using Python</title>
      <dc:creator>DouglasG98</dc:creator>
      <pubDate>Fri, 11 Jul 2025 13:37:55 +0000</pubDate>
      <link>https://dev.to/douglasg98/simulating-8-bit-cpu-using-python-152</link>
      <guid>https://dev.to/douglasg98/simulating-8-bit-cpu-using-python-152</guid>
      <description>&lt;p&gt;This has been the most challenging project I had to code so far. It took me several versions before I manage to complete it.&lt;/p&gt;

&lt;p&gt;The goal of this project was to simulate a CPU using python. Similar to a CPU it will have the function to fetch, decode, execute and write back data based on the assembly language MIPS32. &lt;/p&gt;

&lt;p&gt;In this project I tried my best to mimic the operations of a CPU, e.g. using binary when possible, starting from logic gates. Then using those logic gates to build full-adders, full-adders into ALU and so on. The most challenging part for me was to try and rely on as little of python built in functions as possible. By doing so, it made the code a lot more bulkier.&lt;/p&gt;

&lt;p&gt;Throughout this project, the majority of time spent was researching on how a CPU(and essentially the transistors within) actually would perform arithmetic operations. This research process took me through multiple simple CPU schematics, such as the 8 bit ALU, multipliers e.g.&lt;/p&gt;

&lt;p&gt;All in all, although the code for this project wasn't the cleanest or the most accurate in mimicking an 8-bit CPU, it did significantly deepen my understanding and interest in the fundamental level of CPU arithmetic calculations and assemble languages. &lt;/p&gt;

&lt;p&gt;If you are interest, here is the link to my GitHub containing the code: &lt;a href="https://github.com/DouglasG98/Simulated-8bit-CPU" rel="noopener noreferrer"&gt;LINK&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Process to Create a Movie Recommender in the Terminal</title>
      <dc:creator>DouglasG98</dc:creator>
      <pubDate>Sat, 17 May 2025 07:35:00 +0000</pubDate>
      <link>https://dev.to/douglasg98/process-to-create-a-movie-recommender-in-the-terminal-3ee2</link>
      <guid>https://dev.to/douglasg98/process-to-create-a-movie-recommender-in-the-terminal-3ee2</guid>
      <description>&lt;p&gt;This post is about the process of how I coded a Movie Recommender program in the terminal for anyone that is interested. :)&lt;/p&gt;

&lt;p&gt;Pre-Planning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Going into this project, I knew the main concept that I wanted to work around was using class and different data structures in python. Before starting I needed to plan for the class of the data, source of the data, the user interface and the search algorithm.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Data Structure for database:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each movie in the database is a node containing a dictionary with key: value pairs that correspond to information about the movie. The main attributes of the class were .name, .genre, .rating, .actors, and .synopsis. As a movie can have multiple genres and actors, these attributes store data in lists.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Data Source:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The source of the data was from the movie review website - RottonTomatoes. The data was compiled into a CSV file and initialized into Movie class objects whenever the program starts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;User Interface:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The user interface was where most of the coding was done. I found that using flowcharts to visualize program flow made writing the code many times easier. The user interface is programmed to ask users what filters they would like to add to the search. All user preference is saved into a separate dictionary and used in the search algorithm. There are definitely more improvements to be done with the interface, however, it should work just fine and should be comprehensible enough for users to navigate.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Search Algorithm:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The search algorithm is a simple linear search algorithm that will first add all movies that fits the rating and actors criteria set by the users. After that, the algorithm iterates through the list of added movies and remove all that does not fit the genre criteria. In essences, it will display all movies with any of the actors in the filter and any rating within the range of the filter. However, only movies with all genre filters will remain. The search algorithm has a time-complexity and space-complexity of O(n).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are interested, you can find my code here at &lt;a href="https://github.com/DouglasG98/terminal-movie-recommender.git" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>python</category>
    </item>
    <item>
      <title>I did Minesweeper in Terminal Using Python</title>
      <dc:creator>DouglasG98</dc:creator>
      <pubDate>Fri, 28 Feb 2025 18:52:30 +0000</pubDate>
      <link>https://dev.to/douglasg98/i-did-minesweeper-in-terminal-using-python-4bnh</link>
      <guid>https://dev.to/douglasg98/i-did-minesweeper-in-terminal-using-python-4bnh</guid>
      <description>&lt;p&gt;Howdy,&lt;/p&gt;

&lt;p&gt;This is sort of my first program that I coded from scrap. I decide to recreate minesweeper but in the terminal because it seems quite challenging to me (and because I didn't have any other inspiration at the moment hehe). &lt;/p&gt;

&lt;p&gt;Here's a sneak peak of the code running in the terminal (I'm definitely more proud of it that I should be, but let me have it).&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%2Ffxgj76ofa9g2qlyaepga.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%2Ffxgj76ofa9g2qlyaepga.png" alt="Image description" width="555" height="669"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Basically, how it works is I created two grids using nested lists (one to keep track of all the generated values of the game and another one to keep track of user inputs throughout the game), and based on the contents of the grids, it will be printed to the terminal. Each time it is printed, the user will have the options to reveal or flag certain boxes using coordinate inputs or end the game immediately. Once all the non-mines boxes has been opened, the game will share a victory message. Or if the player hits a mine, the game will share a defeat message.&lt;/p&gt;

&lt;p&gt;The most challenging part for me was to code a logic that continues to open the boxes until a number box is shown. However, I did manage by running the functions within the same functions to make it work.&lt;/p&gt;

&lt;p&gt;If you are interested, you can find my code here at &lt;a href="https://github.com/DouglasG98/terminal-minesweeper.git" rel="noopener noreferrer"&gt;github&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Conclusion:&lt;br&gt;
A code for minesweeper that runs in the terminal, definitely not the cleanest and not the most efficient, but definitely something that I am proud of.  &lt;/p&gt;

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