DEV Community

Cover image for 1 month deep into boot camp + capstone project
oliverfeher
oliverfeher

Posted on • Edited on

1 month deep into boot camp + capstone project

Dear DEVs,

Summary:

We are heading into the second month of the Flatiron Software Engineering boot camp. The second module mainly focuses on SQL( and extensions), ORMs and ActiveRecord, HTML and CSS(SCSS), and Sinatra. Essentially this module is going to end with a creation of an MVC project using the listed stacks above.

That being said, we've come to the end of the first module which means a capstone project is due. It had to be a CLI application using object-oriented Ruby.

nba player idea

Idea:

Basketball and the NBA have always been a big part of my life, so my idea was inspired by the professional basketball league. I wanted to list all the thirty teams with their current roster, each team's general information (for example their arena name or the year when the franchise was founded), and a few paragraphs about the NBA itself.

I wanted to make sure, that the user is able to navigate the app easily, it has multiple choices, and it displays enough information about not only the content but myself as well. This was all up to my CLI class.

Execution:

With a graphical appearance idea in my head and an execution plan, I was ready to build. I would scrape the team list from wikipedia.com create thirty instances of teams using the scraped data. Scrape the rosters from nba.com and the team properties with universal scraping methods that could be used for any team that is passed in.

I also made a very simple wireframe based on how I imagined the user interface.
Alt Text

Here is a demonstration on YouTube about navigating and using the app!

You can try it if you click here or shown with source code below:
// I recommend using the "here" link due to the small embedded repl window //

One of my biggest obstacles while creating this app was the thirty different urls for the teams. With the help of my technical coach we were able to find a way, and pair-program this solution.

def update_from_wiki                                     
   url = "https://en.wikipedia.org/wiki/#{name.split(' ').join('_')}"
   hash_from_wiki = Scraper.get_team_info(url)
   update_from_hash(hash_from_wiki)

   #https://en.wikipedia.org/wiki/Atlanta_Hawks
   #https://en.wikipedia.org/wiki/Boston_Celtics etc.   
end

The urls are all the same except the very end where the team name sits. I used the team instances name property (team.name) passed it into the url via interpolation.

Conclusion:

I am very satisfied with the final product. I believe, I was able to fulfill all the project requirements and did a little extra. I am always up for new challenges because essentially those what we learn from.

Thank you for reading,
Olly

Top comments (2)

Collapse
 
ianwhiscombe profile image
Ian

Nice post, and great application.

Collapse
 
miku86 profile image
miku86

Great Work, Oliver!