7/6/15 – Adam Shaw

I spent the morning completing the app by finally porting it over to Swift 2.0. This was fairly painless, although there were a few quite annoying and quirky things that popped up. For one, Printable was replaced by CustomStringConvertible, so I had to make sure that was correctly implemented. Additionally, strings are once again drastically changed to be more friendly to character work, not indexing, which is quite annoying. This essentially means that to find the length of a string, you must do “string.characters.count,” so I spent a little time adding extensions which alleviate this problem and make it nice and readable. Finally, there was a problem with the scrolling label (of course) with the scrolling. First I had to redo the error handling, as NSError! is a thing of the past, and so I implemented guard error checking. Then the contentSize of the scrollView broke for some reason as soon as the accelerometer was instantiated, but I just moved it two lines down and it worked, so whatever.

In the afternoon I took over data analysis and handling from Vidushi. I fixed a part of her code which she asked me to take a look at that had to do with the labeling of data points on the graphs. Ultimately it came down to her sorting one of the lists, but not others, so list indices she was using were out of whack. I fixed it by sorting the raw data, so that all subsequent data would all be sorted by time, regardless of what actual indices they used. This is exactly why I made the data arrays of (key,value) instead of dictionaries, because sorting is helpful. After that I got to work on cleaning up her longest word function. I have improved it, but I need to work out one more kink, so that will be for tomorrow.

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s