Day 8 – Project Transit Notifier

To do: Change form and the find vehicle functions to include the direction (in/outbound) and work on editing the transit_request table in my database for is_finished to be True.

What I did: This morning we went over testing in lecture. I love it! We talked about unit and functions testing. The lecture went into how its challenging it is to test a flask route that contains mathy stuff that it being calculated. Joel advised to separate the math (aka. refactor). It made me really excited because I have already come across this and I called it “functionalizing” my code (breaking into the pieces so I can do my unit testing). I really enjoy planning and organizing the flow of my data.

Functionalizing
Functionalizing

The lecture also talked about the different styles of coding (just writing large blocks of code and then breaking them up or chunking the data into pieces first and then linking them together). I am defiantly more of the organizing how my data flows and I like to constantly update my data flow as I am working so it is more of “live” or flexible data flow.

Filtering my list of vehicles on a transit line by the Inbound or Outboud in the vehicle dirtag
Filtering my list of vehicles on a transit line by the Inbound or Outboud in the vehicle dirtag

I worked on correcting my selecting my vehicle with adding a function to filter the vehicle in the transit line to if its I for Inbound or O for Outbound. I had to take care of if my firebase goes out (sometimes my vehicle will disappear for a few seconds and/or the vehicle ends its service). And it worked! I test it over and over (okay, I tested it about 5 times) and it worked. When I met with my mentor Andrew in the evening, it didn’t work, it got onto the wrong direction again! I need to rethink my approach and come up with a different game plan.

We went to Twilio today. I am going to use their api and it is so easy and simple. I was able to send a text message within five mins! It was fantastic!

To do Tomorrow: Work on my website so I can use the stops from Nextbus to link my user to the transit stop and then find the vehicle that way. I’m going to be taking on a whole different approach.


My Thoughts/Process: Today was a little challenging because we went to Twilio, which was fun, but I didn’t have a lot of time to work on my project. I met with Andrew my mentor in the evening and we talked about how I’m at a point where I am connecting things together. I asked him what are some challenges or pitfalls during this part of the process and he said that sometimes its hard for people to let go of the work that they have already done and it doesn’t completely work, to instead of trying to force fix it, to just come up with a different plan. I told him that that makes total sense and that I think I need to do that for my project, but it is frustrating to have worked on something and its not useful. Having someone to talk to about my project in a way that is more of the abstract is great to help me refocus on the bigger “plan.”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s