Agriculture in the Classroom

USDA

Project

A big refactor of an existing project written in Django and PostGres.

Front end: HTML5, CSS3, Javascript

Back end: PHP, MySQL

A Little Ambiguity

Problem: At the beginning, the overall idea was clear, but there was a lot of ambiguity to work through.

Solutions: When I wasn't sure how to move forward, I made sure to keep talking to the stakeholders and we kept the lines of communication open. When solutions were not obvious or easily reasoned out, I used my best judgement to move forward with the best idea I could come up with - something that could be accepted or changed as needed.

It wasn't always perfect, but when I got stuck or a solution was ambiguous, I would come up with my best reasoned guess and implement forward. Most of the time, my solutins were good enough, and there were few changes. I missed the boat a couple times, but since we had something to see and react to, we could finally arrive at a better solution. At the beginning of the project, we thought that each state site (of 11) would be hosted by each state. Everything was set up with this in mind. As time went on, that changed. They were moved to one host, and I should have modularized the repeated scaffolding for each site, but I didn't until a bit later.

REST API

Problem: The old API had a lot of problems and no documentation.

Solutions: I created all brand new endpoints and designed a new authorization scheme.

One of the more important things to come out of this was some documentation for the API endpoints. I followed the look and structure of some of my favorite documentation that I have used, jQuery and Stripe. Luckily, (actually by design!), the documentation is correct and thorough, because I have had to fall back on it years later when I had forgotten the information contracts between the API and client.

Find and Replace

Problem: The old information in the database was repeated a lot. Finding the repetitions that could not be programmatically fixed was nearly impossible.

Solution: The answer was two-fold. I wrote a new database schema that would normalize the data and have a single source of truth. Since some repetitions were not easy to programmatically fix, I wrote a tool to make it easier to do by hand.

Once the data was normalized, I added a find and replace for the admins where they could find text within the lessons and Companion Resources and edit it directly in the administration system. This made wholesale changes, for example: updating youtube links, a breeze. Something that took several weeks of mind-numbing text swapping could be done in an afternoon.

Media Content

Problem: I needed to add a way to upload and organize several gigabytes of images, Power Points, Word docs, pdfs, and audio files.

Solution: I created a new repository with an application to act as its own service. It was implemented into the administration site, and allowed admins to upload media directly onto the server.

Lesson Plan Reorganization

Problem: The old UI was painful to use and the page was tough to scan through.

Solution: The lesson plans editing page was completely revamped.

There was no way to quickly go to different parts of the page. I added a fixed flyout that allows for navigation to any portion of the page.

The relative links did not work. I added functionality to the custom instance of the text editor to add flags into the text for a later swap by the API when calling for the lesson.

I added an autosave to the page that could be turned on or off.

I added a text editor called CKEditor to the textareas to make them more robust and allow for better formatting. Within the editor, I wrote plugins to make some specific tasks easier.