Week 8 – Time Goes Fast When You’re Having Fun (Project Status)

To anyone out there who’s watching, I wrapped up week 8 and I’m thinking about how I want to leverage my time in week 9 in preparation for Career Day. I do talk a lot about that as the D day, and it is to some extent. It’s a goal to help keep focus in terms of how I want to prioritize my time. A second goal is that I only have technically 2 weeks left in the program and there are certain subjects I want to practice while I have class time. Sometimes those goals match in purpose and sometimes I have to just pick based on how I’m feeling that day.

So this past week went fast and I found myself eager to get to coding, but also surprised at all the other “stuff” that kept me from touching code at times.

Last Sunday, I spent the day reading up on the Google Places API with the intent to resolve my search functionality requirements. It definitely expanded search capabilities in terms of what can be entered, and I was able to center the search results with coordinates and a radius around the Bay Area. Thus, typing in golden gate more likely came up as the park vs. showing up in another location like LA or somewhere in China. I also concatenated the word “neighborhood” on any search to help further influence the results. There is a lot more I can do here but this is good enough for now.

Monday I decided to leverage the results from both Weather Underground(WUI) and Forecast.io because they had different data points I wanted to report out. I put together a dictionary of the results that mapped to the data points from the different sources to help keep me clear on what I would use. To note, the temperatures between the two at times varied wildly based on given coordinates. Supposedly WUI is more precise based on all the local inputs they are leveraging but it would be interesting to see how accurate they are based on location and time. Again something to think about down the road.

I also started to work on developing the More Details page on Monday and that hit a bit of a snag on Tuesday because I was trying to figure out how to pass the forecast dictionary to the new page. The approach recommendation I received was to pass it in as a Flask session variable. The problem was that the code I put together for the session was spot on, and after checking it several times myself and with others (esp. instructors – huge thanks to Cynthia on that one), we were flummoxed.

I decided to set that aside for the moment, and start to look more at the front-end of the app. Sometimes its important to step away and get a refreshed perspective to help solve problem. So I spent Tuesday and a good deal of Wednesday understanding Bootstrap and CSS. I’ve always wanted to keep my design simple without a lot of distraction. The goal of the app is a simple question that needs a fast and simple answer. Still I found a lot of adjustments to make to the layout and format that made the pages look and feel cleaner. It was a fun activity to do and the right distraction from the session kerfuffle.

Late in the day on Tuesday, my mentor, Michelle, helped me identify and start work on an alternative for the more details page to bypass the need to use session. Interestingly enough the alternative was what I had wanted to do with the page in the first place. The way it worked was that on the first results page there is a link to click and expand the page with more details. We used Bootstap’s accordion functionality to make this happen. The reason it bypassed the need for using session was that the dictionary had already been passed directly to the main results page when it was created and the more details expansion took place now on the main results page. So there wasn’t a new page being generated.

Wednesday I figured out how to apply a calendar on the search page with jQuery, and continued building the more details results expansion.  I also figured out how to add a Google map onto the more details section which helped make the page really feel like it was coming together.  By the end of the day, session started working even though I didn’t need it at that point. No one knows why (the thought is that it’s probably a cache problem), but it works.

Thursday I spent time optimizing my code and changing the forecast dictionary into an object which helped me practice my understanding on classes and OOP. I also spent a good amount of time testing code and fixing functionality. At the end of the day, I needed something a little more fun; thus, I expanded the results to include night. I had been ignoring it purposefully before since it is a sun finder app. Before I was just popping up a message at night to tell people to go to sleep. So I added in images of different phases of the moon and the moonphase package to help generate the phase and subsequent picture to pop up on the results page.

Friday was more code clean-up and testing. I started to hook up the calendar to the backend functionality and I shifted the date results from timestamp format to datetime format. For anyone who works with dates and times, just be aware that datetime is tricky and can take a little time to understand. I also started working with timepicker to include choosing an hour in the search process, but decided to shelve it for now. There are other features and functions that are more of a priority for now. Also, I still need to finish building out how the results will populate if a date is picked that is not the current day. As I mentioned last week, every time I do something it brings up a number other questions and things to do. It continues to be great practice in finding and keeping focus.

Saturday (yes I worked on this thing every day this past week), I spent the whole afternoon with my awesome mentor, Jeremy, who helped me debug the moon functionality that I added. He also gave me great pointers on keyboard shortcuts and how to utilize pdb when looking at the results from the weather APIs. This allowed me to work with results directly in the terminal and will make it easier to search for the data points that I will want to target in my results page based on the date chosen. We started working on building the functionality for setting up the map to have names of neighborhoods and make it clickable. While working on that we stumbled on the weather overlay on Google Maps which was cool but on further inspection, I realized it just wasn’t detailed enough to use for my purposes.

At the end of the day, he shared a great video, JavaScript: The Good Parts by Doug Crockford. We went through some of the video together and he took time to coach me through the concepts which helped speed up my understanding of the subject. It was definitely very helpful as I work on getting more comfortable with JavaScript.

Something to stress that I mentioned a few times above is that throughout the week I was constantly testing my pages to make sure they were working, and that the results were what I expected. Any time I made changes, I would go back to test to see the impact. So a good percentage of my time was spent in just testing. It’s good practice to have because as you develop, something doesn’t always work the way you expect, and it can be a small error. It’s harder to debug if you’ve been making several changes, and you get an error that is not easy to track down despite all the error reports.

This past week was definitely full and there is plenty still that I want to do. I understand it won’t all get done and I’m ok with that. I’m pretty happy with where the app is at already. Michelle had me show it to some of the alumni this past Thursday night, and I got some great feedback on it. SO I plan to this next week to really try out functionality I want to learn and get practice with. Its going fast and I know this next week will not be any different.


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