“Performance Starts With Food”Colorado Athletics Performance Nutrition Slogan
As many people know, nutrition plays a huge role in athletic success. Whether you are the occasional gym rat, or a member of an NCAA Division I Cross Country team, your nutrition and your performance go hand and hand. The varsity athletic department at the University of Colorado Boulder has gone through great lengths to ensure that each and every athlete no matter the sport or scholarship status has the opportunity to perform at high levels through its robust Performance Nutrition department. I myself am a member of the CU Cross Country and Track teams and take advantage of the Performance Nutrition Department’s offerings every day.
The Fueling Station
The University of Colorado Boulder has an athlete exclusive dining hall in the athletic department building. The dining hall on most days serves two meals daily to all athletes 5 days a week. Food is selected for each meal by the nutritionists in the department to ensure athletes are getting the types of food they need. Food is served buffet style similar to regular college dining halls. In order to make sure their is enough food for everyone as well as to reduce waste, athletes are required to “check in” to the fueling station.
The old Check in process.
The check in process athletes used prior to COVID-19 was done on old fashion pen and paper. A “student checker” would write down every name and sport of each athlete who came in to get food. Believe it or not this process had many difficulties. Writing people’s names down along with their sport and student identifier sometimes caused long lines to form when getting food due to a large amount of athletes attending at once. As a result, the nutrition department struggled to find and hire students willing to ask every “sometimes hangry” athlete for their name, sport and identikey and write down their names each day. The athletic department also experimented with a Google Form like survey during COVID-19 but found that athletes did not like filling it out and would constantly skip doing it.
Version: 1.0: 1-Click Check in
The Fueling Station App was originally designed to do one simple task. Record each athlete who attended the fueling station for a particular meal. With Xcode and Swift, building an iOS app that did this took me only a few days to make and just a couple of weeks to get a custom designed app icon from the Colorado Athletic Department. In just a few weeks I had the app in the App Store. All athletes had to do now was fill out the requested information once during the initial app setup and press a singular button every time they wanted to check in.
On the staff side of things. I built a second app that was distributed internally that allowed for the staff to export a spreadsheet of who has checked in.
A task so simple yet so complex
While both athletes and staff loved the new process, it turns out that people (especially young adults) don’t like listening to bureaucratic requests such as checking in. In order for athletes to be compliant with checking in, the task would have to involve the least effort on their part as possible. In addition to this, I had found the following problems:
- The App was iOS only and left out the 5 or so Android users (who were using the old survey process).
- CU Boulder has a terrible captive portal system (the website the pops up to press accept before you can use the internet). This meant there were many internet issues that caused users to receive errors when checking in.
- People would lie that they checked in and there was no way to prove that they had unless the staff looked through the spreadsheet.
- iCloud Drive needed to be turned on for every athlete causing issues with a handful of users.
The Android Version
Even though there are only a small number of Android user’s in the department, I know I needed to make the new check in system cater to them as well. Through Android Studio, the Kotlin language, and a slew of YouTube tutorials, I had a barebones Android version of the app up and running on Google Play. It used an entirely different database called Firebase as opposed to Apple’s CloudKit. Though Firebase would turn out to be the database for both platforms in later updates.
Version 2.0: Loads of New Features
After a few months of slow development due to finals and a crazy COVID-19 Cross Country practice schedule I had finally launched version 2 which aimed to fix many of the issues in version 1. I introduced the following features.
-Automatic Check In (Optional feature): By using a Raspberry Pi Zero W I mounted in the Fueling Station, the app utilizes iBeacon technology to determine if the athlete is in the fueling station dining hall and checks them in. This requires location services to be turned on.
-Offline Check in: All check ins are stored on device and uploaded later if the network connection fails when the athlete checks in. This allows for accurate data even if the internet is not working correctly.
-Visible Checkmark: When the user checks in a large green check mark is displayed. This allows staff to enforce the check in process by requiring athletes to show the check mark on their phones when they enter the fueling station.
As for the Android version only Offline Check in and the visible check mark were added. It had turned out that Firebase had a built in persistence feature for bad internet and was surprisingly easy to add.
These features were really well received. However, they weren’t without their problems. Automatic check in requires the “Always on” location permission. Not only does enabling this permission on the user’s device require a multistep process, iOS will remind users that it is on frequently and have an easily accidentally pressed button to turn it off. Additionally, the iOS offline check in would only try to re-upload check ins every time the app was opened which for many was only when they were in the fueling station (where the bad internet was in the first place)
Version 3.0 CloudKit gets Fired + Gold Card Support
Due to the lots of spare time summer gave me, version 3.0 was developed relatively fast compared to version 2. One of the most requested features by my teammates (and myself) was Gold Card balance checking. CU Boulder really spoils its athletes when it comes to food. In addition to the food served at the fueling station, athletes not in dorms get a “Gold Card” through a local company called the Flatiron Meal Plan. This card is loaded with $44 a week to spend on local restaurants such as Noodle’s and Company and Modern Market. Because of the tax exemption status and other various restrictions of the Gold Card, the Flatiron Meal Plan app used by normal customers does not allow for athletes on Gold Card to check their balance. Instead, athletes had to log in to the Flatiron Meal Plan website every time they wanted to see their balance.
I worked with the owner of the Flatiron Meal Plan to see if it was possible for some sort of API integration for my app to fetch balance information from their servers. Unfortunately, the company contracted to run their servers was not allowing new integrations. I eventually got sick of waiting and figured out a way to fetch athletes balance using web scraping techniques on the Flatiron Meal Plan website.
Web-scraping is the process extracting data from websites usually through an automated process. To get Gold Card balance information I implemented a feature in the Fueling Station App that allowed a user to enter their credentials into the app once and save them. Then, when they wanted to see their balance a function would run in the app that reads the HTML of the Flatiron Meal Plan website and logs the user in. The function would then find the portion of the HTML that displays their current balance and display it neatly as a label in the app. All of the web scraping would happen in a matter of seconds and completely behind the scenes from the user.
Usually Web-scraping receives some scrutiny on its use due to factors such as copyright infringement and the possibility of overloading a website. To prevent this, I added a restriction on how frequently an athlete can refresh their balance (20 seconds in this case). Most importantly however, I got the Flatiron Meal Plan’s permission to add this feature before I published the update. In a subsequent minor update I also added a table of all of the merchants that are compatible with Gold Card as well as the addresses of each.
Additionally, I moved the iOS app off of Apple’s CloudKit database system to Firebase just like the Android version. This allowed me to significantly reduce the complexity of the code in the iOS app. Most importantly, it removed the need to have iCloud Drive turned on significantly reducing the amount of “it doesn’t work for me” complaints. This change also allowed me to utilize Background App Refresh capability’s to upload check ins that failed to upload when they were created.
The Kiosk app and live check in count
Version 3 is where we are today in terms of the iOS app (Android is still on Version 2). When I had published version 3 I had one thing missing. What did I do for the athlete’s who didn’t have their phone on them? My solution to this was the Kiosk app. This app was by far the easiest one for me to program. It was an iPad app that would allow users to quickly fill out their name, identikey, and sport. I donated an old iPad Air to the athletic department to avoid a bureaucratic nightmare of getting them to buy a new device. The iPad with the kiosk app sits on a desk in front of the Fueling Station entrance for users to check in manually if they do not have their phones.
Another major feature addition was to the Admin app that the staff use to get spreadsheets of the check in data. This feature is known as Live Check in count. This feature lets the a person see in real time who has check in, how many athletes have check in in total and for each sport.
Where we are now
With the school year in full swing, the Fueling Station Platform is used every day by about 200 athletes. The athletic department now requires every student-athlete to have the app installed on their device (unless they use the kiosk app). Each day a student checker sits at a desk in front of the entrance to the Fueling Station asking every athlete to show the green check mark or use the Kiosk app. The checker does not need to write down names like before so the job is significantly easier and many student checkers can study at the same time. The checker usually has a phone out too with the live check in count going so the staff can get an idea of how many athletes have yet to come in. As for future feature enhancements I hope to add an auto updating Gold Card balance widget for athletes to place on their home green as well as the ability for the staff to change fueling station meal times without needing me to update the app.