Code Cleanup and Queries

Today I continued work on preparing the queries for display in the React app. There’s not much exciting to report here. It’s just me examining the way the results were arranged (the queries were prepared by my team mate while I worked on the React app itself) and transforming them into either a table or a graph. I took a lot of time today to also pause and clean up my code first. I was very new to the Koa framework that we’re using the drive the back end of the Get API, and also very new to React. I ended up with giant files (the app.js of the back end had almost 1000 lines of code) and it was a nightmare to read. I was able to factor out the individual routes and layers of middleware used so that the app.js file of the back end was less than 150 lines of code.

My plans over the next few days are to finish preparing the queries before we plan on beginning to examine the collected data on Thursday.

Advertisements

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 )

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