<commit_before>---
layout: post
title:  "Halfway Through My First Project Sprint"
date:   2016-08-22
categories: hackbright
---

At Hackbright, we're halfway through our first sprint of project time. We've all spent the last two weeks working like crazy to get a minimum viable project off the ground, and as part of our homework this past weekend, we were asked to take some time to reflect.

Several of the reflection prompts we received to write on were very much in line with thoughts I wanted to share here, so I figured I'd just share some of those now.

# What inspired you to do this project?

I'm building a personal craft supply inventory tool, where users can log their supplies, monitor their inventory, and see how many supplies they need to build a project. I was inspired to build this app after asking myself two questions:

1. What problems do I have on a regular basis that I could solve by writing a program?
2. Is there a program out there that solves a similar problem that I could look to as a model?

I love arts and crafts, so my answer to Question 1 came pretty quickly. I have a giant box and a big old shelf of craft supplies that are semi-organized, but I honestly have no idea what supplies I actually own. I'd love to be able to just go through them once, catalog them, and create an inventory.

I also tend to just rebuy craft supplies when I want to do a new project, only to discover later that I didn't need to buy them at all. If I had a program that could look at my inventory and tell me how many supplies I need to build something, I could avoid that issue.

Once I knew I wanted to build a personal supply inventory, I realized I already use a personal inventory tool called Deckbox to catalog a very different hobby item--my Magic cards. Deckbox has a lot of features similar to what I wanted for my craft inventory, so I got a lot of inspiration from there. The ability to search and filter your inventory on multiple columns is very much inspired by Deckbox.

# What part of the technology interested you?

From the start, I wanted to create an application where most of the business logic happens on the server and the front end mostly has to worry about submitting data, asking for data, and displaying it, not making big decisions. I really like Python, so I wanted to write a lot of it.

The first time we touched databases at Hackbright, I knew my app was going to revolve around them, too. Databases are fascinating! I was very interested in creating a data model (I'm very proud of mine), designing my system, and being able to display my data in a variety of ways.

I also wanted to get out of my comfort zone and make sure some of my features relied on JavaScript. We didn't get as much time with JavaScript in the regular curriculum, but I wanted some features (like inventory filtering) to be able to change the page appearance without reloading the entire page. As such, I made sure to try using jQuery and AJAX, and I'm glad I did! I think JavaScript and I have reached a truce.

# What are the different elements of your project, and how did you structure your project?

My project revolves around tracking two types of information:

1. The supplies a user owns
2. The supplies needed for a project a user wants to build

My ultimate goal for the first sprint was to be able to tell a user exactly what supplies they own and how many supplies they would need to buy to build a project in the app's database. (Of course, that relies on the user giving accurate data; how well a user wants to keep their inventory up-to-date isn't for me or my app to decide, however.)

To that end, here's how I've structured my project so far, in terms of data and page connections.

## The Data Model

My database has five tables, which work together to represent all supplies my app's users own, all supplies in projects my users want to build, and the details about those supplies.

![](CraftersClosetPlanning/CraftersClosetDataModel.svg)

This data model shows the following relationships:

1. A user can have many projects, but each project is owned by only one user.
2. A user can have many items in their inventory, and each item has a particular set of details attached to it.
3. The set of details that embodies a particular supply can apply to many items owned by users.
4. A project can have many supplies associated with it.
5. The set of details that embodies a particular supply can apply to many supplies required by projects.

Determining exactly what the relationships between users, projects, and inventories should be was a really fun and interesting problem to solve. Thanks to some top-notch advising (Lavinia, you're the best!), I realized that it would make sense to separate the "idea" of a supply from the information specific to users and projects. From there, we determined that projects and supplies actually have a similar relationship to the one between users and supplies.

## Site Pages and Connections
When a user first arrives at my homepage, they see a landing page where they can search for projects other users have created, register, or authenticate. On registration, a user is authenticated automatically.

I'll take you on a little tour of the application so far, but try to ignore the actual data. Some of it is...creative. I blame the debugging process.

### The Dashboard
On authentication, a user is taken to the dashboard.

![](https://github.com/jgriffith23/jgriffith23.github.io/blob/master/assets/CC-early-screens/Dashboard.png?raw=true)

From the dashboard, a user can filter their inventory view...

![](https://raw.githubusercontent.com/jgriffith23/jgriffith23.github.io/master/assets/CC-early-screens/InventoryFilter.PNG)<commit_msg>Fixed a stray img link.<commit_after>---
layout: post
title:  "Halfway Through My First Project Sprint"
date:   2016-08-22
categories: hackbright
---

At Hackbright, we're halfway through our first sprint of project time. We've all spent the last two weeks working like crazy to get a minimum viable project off the ground, and as part of our homework this past weekend, we were asked to take some time to reflect.

Several of the reflection prompts we received to write on were very much in line with thoughts I wanted to share here, so I figured I'd just share some of those now.

# What inspired you to do this project?

I'm building a personal craft supply inventory tool, where users can log their supplies, monitor their inventory, and see how many supplies they need to build a project. I was inspired to build this app after asking myself two questions:

1. What problems do I have on a regular basis that I could solve by writing a program?
2. Is there a program out there that solves a similar problem that I could look to as a model?

I love arts and crafts, so my answer to Question 1 came pretty quickly. I have a giant box and a big old shelf of craft supplies that are semi-organized, but I honestly have no idea what supplies I actually own. I'd love to be able to just go through them once, catalog them, and create an inventory.

I also tend to just rebuy craft supplies when I want to do a new project, only to discover later that I didn't need to buy them at all. If I had a program that could look at my inventory and tell me how many supplies I need to build something, I could avoid that issue.

Once I knew I wanted to build a personal supply inventory, I realized I already use a personal inventory tool called Deckbox to catalog a very different hobby item--my Magic cards. Deckbox has a lot of features similar to what I wanted for my craft inventory, so I got a lot of inspiration from there. The ability to search and filter your inventory on multiple columns is very much inspired by Deckbox.

# What part of the technology interested you?

From the start, I wanted to create an application where most of the business logic happens on the server and the front end mostly has to worry about submitting data, asking for data, and displaying it, not making big decisions. I really like Python, so I wanted to write a lot of it.

The first time we touched databases at Hackbright, I knew my app was going to revolve around them, too. Databases are fascinating! I was very interested in creating a data model (I'm very proud of mine), designing my system, and being able to display my data in a variety of ways.

I also wanted to get out of my comfort zone and make sure some of my features relied on JavaScript. We didn't get as much time with JavaScript in the regular curriculum, but I wanted some features (like inventory filtering) to be able to change the page appearance without reloading the entire page. As such, I made sure to try using jQuery and AJAX, and I'm glad I did! I think JavaScript and I have reached a truce.

# What are the different elements of your project, and how did you structure your project?

My project revolves around tracking two types of information:

1. The supplies a user owns
2. The supplies needed for a project a user wants to build

My ultimate goal for the first sprint was to be able to tell a user exactly what supplies they own and how many supplies they would need to buy to build a project in the app's database. (Of course, that relies on the user giving accurate data; how well a user wants to keep their inventory up-to-date isn't for me or my app to decide, however.)

To that end, here's how I've structured my project so far, in terms of data and page connections.

## The Data Model

My database has five tables, which work together to represent all supplies my app's users own, all supplies in projects my users want to build, and the details about those supplies.

![](https://github.com/jgriffith23/jgriffith23.github.io/blob/master/assets/CC-early-screens/CraftersClosetDataModel.png?raw=true)

This data model shows the following relationships:

1. A user can have many projects, but each project is owned by only one user.
2. A user can have many items in their inventory, and each item has a particular set of details attached to it.
3. The set of details that embodies a particular supply can apply to many items owned by users.
4. A project can have many supplies associated with it.
5. The set of details that embodies a particular supply can apply to many supplies required by projects.

Determining exactly what the relationships between users, projects, and inventories should be was a really fun and interesting problem to solve. Thanks to some top-notch advising (Lavinia, you're the best!), I realized that it would make sense to separate the "idea" of a supply from the information specific to users and projects. From there, we determined that projects and supplies actually have a similar relationship to the one between users and supplies.

## Site Pages and Connections
When a user first arrives at my homepage, they see a landing page where they can search for projects other users have created, register, or authenticate. On registration, a user is authenticated automatically.

I'll take you on a little tour of the application so far, but try to ignore the actual data. Some of it is...creative. I blame the debugging process.

### The Dashboard
On authentication, a user is taken to the dashboard.

![](https://github.com/jgriffith23/jgriffith23.github.io/blob/master/assets/CC-early-screens/Dashboard.png?raw=true)

From the dashboard, a user can filter their inventory view...

![](https://raw.githubusercontent.com/jgriffith23/jgriffith23.github.io/master/assets/CC-early-screens/InventoryFilter.PNG)
{'fraction_non_alphanumeric': 0.040145668949969654, 'fraction_numerical': 0.004855631665655077, 'mean_word_length': 4.188484030589294, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2131802', 'n_tokens_mistral': 2860, 'n_tokens_neox': 2721, 'n_words': 1935}