dmaster18.github.io


The Video Game Collector App

The Video Game Collector App is a Sinatra web application that allows users to store their video game and console collections into a database, in which they can add, view, edit, and remove individual games and consoles as they see fit. This app is very useful for any gamer who has a lot of consoles and games and wants to keep track of them to know what they have to ensure they don’t buy the same game or console again by accident. Installation Video Game Collector App can be downloaded from https://github.com/dmaster18/Video-Game-Collector-App. Once downloaded, go to the program’s directory from your local Terminal/Command Line and then run bundle install or bundle exec install to ensure all the dependencies are installed. Once all the dependencies have been installed, run the shotgun command from your Mac or Linux machine Terminal or rackup command from your Windows PC initiate the web application. Usage Once your local server is up and running the application, go to the following HTML address to arrive at the welcome page: http://127.0.0.1:9393(OR YOUR LOCAL SERVER)/users. From the welcome page, the user will be greeted with buttons to either sign up, if the user is new, or log in, if the user already has an account. When signing up for the first time, the user must make sure to enter a unique username as well as a password that is at least eight characters long and contains at least one capital letter, one number, and one special character. If the user fails to sign up or log in, he or she should be greeted with error(s) in red text alerting him or her of the mistake. Once logged in, the user will be sent to a home page that gives options to either view his or her entire game or console collections, or to add to those collections. As the user tries to add new consoles/games or edit exists ones, he or she will realize that certain fields are mandatory. In order to create a valid console, a user must enter data into both the console’s name and company fields. Likewise, to create a valid game, the user must give the game a title and assign the game to a corresponding console, at the very least. Furthermore, if the user decides to enter data into optional fields, he or she will discover that some of these fields have restrictions. For instance, if a user decides to enter a console generation, it must be an integer between 1 through 9, since there are currently only 9 console generations. Similarly, a user must enter a valid ESRB age rating, such as “E”, “T”, or “M”. Lastly, for both consoles and games, if a user decides to enter a release year, that release year must be in between 1972 (the year Atari introduced Pong to the arcades) and the current year, 2020. If the user ever wants to access his main account page, each page of the Video Game Collector App conveniently has a home page button, which has a logout button once the user has finished viewing and modifying the collections for the day. Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/dmaster18/Video-Game-Collector-App/pulls. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct. License The gem is available as open source under the terms of the MIT License.


Top 100 IMDb Movies Ruby CLI Data Gem

As a student in Flatiron School’s Online Software Engineering Program, I initially found the prospect of completing my first portfolio project to be a daunting one. There is a noticeable transition involved from doing guided lessons, code-along sessions, and small projects to creating a Ruby CLI Data Gem from scratch. Nevertheless, upon completing this project, I believe that I have I learned a lot from my experience and feel more confident in my ability to craft my own programs with little to no guidance going forward. Below, I would like to give a summary of some of the significant steps involved in my journey of creating my first Ruby CLI Data Gem, top_one_hundred_movies, https://github.com/dmaster18/top_one_hundred_movies. When first tasked with this project, I wanted to make a program that reflected my interests. As a movie lover, I thought that it would be interesting to create a program that could scrape a list of the best films ever. No such compilation is definitive, but I agreed with many of the choices from IMDb’s “Top 100 Greatest Movies of All Time, https://www.imdb.com/list/ls055592025/, so I decided to use this website for my source of information to scrape for my Ruby CLI Data Gem. Now that I had my movie data trove, I next needed to determine what specific information I wanted to scrape to craft my Movie objects. I ultimately decided to scrape the details that I would most like to know myself before making a decision of whether to see a movie. I decided that each Movie object would have the following attributes: title, director, year, rating, duration, and genres. All these details are essential to the formation any individual Movie object, and they can be easily found and gathered from the main index page https://www.imdb.com/list/ls055592025/ using a Scraper instance method called index_page. In addition to just collecting the most basic details, however, I wanted to also give my Ruby CLI Data Gem the ability to scrape and present more intricate and fascinating data about the top one hundred films of all time. Therefore, I created three additional Scraper instance methods called movie_page, trivia_page and quotes_page, each of which accesses separate associated IMDb URLs. While the movie_page method gives Movie objects access to tagline, cast, and plot details, the trivia_page and quotes_page methods amass trivia and famous film quotations, respectively. Because many of the films’ trivia and quotes’ URLs contain hundreds, and sometimes thousands, of lines of trivia and quotations, my gem only allows the user to see fifty interesting facts or famous quotes at a time, so as to not overwhelm the user or his CLI terminal. To increase the responsiveness and usability of top_one_hundred_movies, I made sure that the gem only scraped the data it absolutely had to at any given time. When first playing around with the program, I discovered that it would take far too much time for the gem to scrape and initialize one hundred films. It would be unreasonable to ask any user to wait such a long time. To solve this problem, I decided to present the user with the top one hundred best film titles sorted by IMDb ranking. Equipped with that information, the user can then choose any film he would like to learn more about by entering its associated IMDb ranking. The user would thus only have to wait a small period of time while his Movie object is being initialized with the basic details gathered from the Scraper instance method index_page. If the user decides he would like to know even more information about a particular Movie object, he can learn about its tagline, plot, or cast from the Scraper instance method movie_page, about its trivia from the Scraper instance method trivia_page, or about its quotes from the Scraper instance method quotes_page. Finally, I gave the top_one_hundred_movies gem with playlist functionality, so that a user can add any of the top one hundred films to a personal playlist, reminding him or her to watch a specific film, or films, in the future. In conclusion, the creation of top_one_hundred_movies has been a fun and educational journey for me. I hope that my gem top_one_hundred_movies addresses the needs of any film lover who would like to peruse and learn about the greatest films of all time.