Sinatra Portfolio Project — Flatiron School Retrospect

Joseph Perez
3 min readNov 3, 2020

--

I am currently an online student of Flatiron School for Software Engineering in the “self-paced” program. As of today, I just completed the Sinatra module where I learned a lot about SQL and ActiveRecord. For my portfolio project, I built a content management system which specialized in Pokemon where users are able to create accounts, create teams, and share those teams with others online.

Throughout my project, I faced many nuance errors that I was able to quickly weave through one by one. A couple bigger problems that I was able to fix (with many pats on my back as self congratulations) were errors signing up/signing in, seeding data, displaying other users profiles. Though I was never stuck on these errors for too long, they stand out the most in my head and are definitely engraved into my head now.

The error in which is troubles with users signing up and signing in was caused by the order in which my code was written. As a user, you would try to sign up for an account, but the site would not start the session as it should, instead it would just kick you back to the sign up page. This caught me off guard, mostly because it was so minor in hindsight, but keeping a level head and a full tummy helped me push through.

The error in which I had problems seeding data came from two things. One, I wasn’t shoveling the instances of teams into the instances of users so the users did not have a team and the teams did not belong to a user. Two, I was also mistyping into my terminal which prevented the seed from happening in the first place. quick lesson learned.

The error in which I had issues displaying other profiles is the one that stands out to me the most. As a user, you could view a team and it would also display the creator of the team. The creator’s name was a link to their profile (or so i thought) and was supposed to link to their profile page where you can see all the teams that they have created. When a user were to click on their link, it would bring up the current user’s own profile instead. In the URL, I noticed that everything looked okay. It had the user_id correct, so I went ahead and started putting random numbers in the url and loading the page. Numbers that belonged to other users and numbers that weren’t even assigned yet were all loading up the current user’s profile. Looking back at my code, I went back and forth between the files that get, post, show, and control the profile pages. I was able to make a small fix where the page would show the right team names, but not the right user name. I then analyzed what made that work and tried different methods to implement the same change into the user’s name. I then set “@team” and “@username” to the user’s team and user’s username and carried that over into the next file where I was able to insert them into the profile pages. I originally had the “@user” set to the user (team creator) and carried that over, but when it carried over, it was set to the current user (whoever is logged in) instead. Blah blah blah… long story short, I was able to make minor changes, notice a difference, and implement it to fix the problem… all in time for dinner too.

My biggest improvement from this whole module though was my ability to read errors. Though I learned entirely new concepts, I am most proud of how far I have come with reading errors and problem solving those errors. I remember looking at errors and being brain fried before I even took a stab at it, but now I feel confident in isolating those errors. I might not have the answer to them, but I can’t fix a problem if I don’t know what it is. I am really excited to see whats next and further improve on my knowledge. (:

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Joseph Perez
Joseph Perez

Written by Joseph Perez

I am a software engineer working in EdTech. I have a passion for supporting those working hard to get into the tech industry.

No responses yet

Write a response