Skip to content
This repository was archived by the owner on Oct 12, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions _posts/2018-04-16-the-hubris-of-man.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
layout: post
title: The Hubris of Man
date: 2018-04-16
categories:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not exactly sure how the categories field parses, but at the very least, get rid of the commas at the end

- SmashBros,
- Python,
- Flask,
- SQLAlchemy,
- PostgreSQL,
- HTML,
- Javascript,
- Jeffrey'sMajorProject
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sonofa

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change this tag list, first off to be lowercase, but slim it down to:

- projects
- python
- flask
- html
- javascript

description: Hubris is a Python Flask application meant as an introduction to Python Flask, PostgreSQL, and Web Development. It is a joint project between Elijah Bendinsky and Jeffrey Taglic where Elijah Bendinsky created Smash Queue, a service that provides a basic queue implementation allowing users to keep track of the adds and drops during smash in the lounge. Jeffrey Taglic is in charge of Tournaments, a service allowing users to create a tournament bracket, manage said bracket, and finally complete a major project
image:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you maybe add a photo of one of your two sides of the project?

image-sm:
author: Elijah Bendinsky
author-image: http://zedoax.me/img/logo.png
author-bio: Screeeeeeee
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is public facing, maybe make its something short about your year-level and major.

author-email: zedoax@csh.rit.edu
author-social:
github: https://github.com/zedoax
linkedin: https://linkedin.com/in/zedoax
---

## Problem:
During Smash in the Lounge, there has never been a good way to keep track of the queueing order for players. There have been many a time where someone leaves the room, comes back, and finds that they were removed from the 'queue'. This infuriates many members, and makes it a very confusing process during peak hours of Smash.

## Solution:
In order to devise a solution to this problem, a clean, simple, and intuitive design needed to be created for players to be added, and moved in order that they are entering. For this, a doubly linked list was selected. The reason this was chosen over a queue is the ability to drop people from the queue when they have better things to do with their lives. This is accomplished through a Python class that is stored per session, so multiple queues can be in play for not only smash, but other party games with limited players as well. The app runs through Python Flask, using the Jinja2 templating engine. CSH Tournaments are also a part of my submission, but has no direct interaction with Smash Queue. Tournaments uses a PostgreSQL database, and appropriate GET, POST calls to query and create resources respectively.

## Things Learned:
This was my first python project outside of python used in CS for AP. Because I paid little attention to python to begin with, I had to relearn quite a few of the basic language pieces python uses. The learning part of this project focused on how to create a dynamic Flask application which populates an html/jinja2 template. I began reading demo and beginner documentation, and after performing a few syntax checks I began reading intermediate documentation. After I felt I had a grasp on how to create the application, only then did I begin. I also learned about magic variables in python, and how to utilize these to override creation, create packages, and import said packages. I also learned about importing python libraries, or parts of library files (yeah, I actually didn't have a good feel of that before). The other topic I focused on learning is PostgreSQL. I had not yet begun to learn SQL in classes, so I decided to take the initiative. I learned how to build db tables, insert values into said tables, and query the table to get wanted values.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/python/Python/r

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/db/database/r

(kind of a nitpick; ignore if you want)


## Difficulties encountered:
One of the most difficult parts of this project ended up being how I handled my routes and importing variables in python. I encountered a circular import by trying to handle the database connection in both app.py and my database package. To resolve this, I created a separate file for the db connection, and moved my route handling from direct routes in flask to Blueprint templates to be built by app.py. Another difficulty was the database structure. Me and Jeffrey spent many moons contemplating this, and had a rough idea. After learning them in class, I employed database reduction techniques to a database we created with WAY more information than necessary. The database ended up being approximately 8 tables, with a few attributes in each.

## Things to be Improved:
- I still feel like the database can be improved a bit.
- I applied reduction techniques, but there may be a few tables that would be useful to add, and remove another.
- Deploy on Openshift (Resolved)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Openshift/OpenShift/r

- Caching issue on openshift
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/openshift/OpenShift/r

- There is an issue on openshift that prevents the queue from displaying properly without a refresh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/openshift/OpenShift/r

- Move the queue modification from a GET refresh to Javascript
- Add a "Clear Queue Button" (Idea courtesy of Mike Francis)