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.