Is this what coding is?


This was the first week I’ve had the chance to do some real coding on the project. The first few weeks were spent mostly building infrastructure and setting up a deployment pipeline. I think I’ve finally nailed the last pieces of the pipeline and can now focus 100% on feature implementation.

It was fun jumping head first into an existing frontend having not touched React in a year. It was a sloooow start. I spent a few hours just wrapping my head around React-Tables only to give up and wipe the existing code for the feature I’m working on and rebuilding the page from scratch. Since I work with Angular and ASP.NET at work, I feel much more comfortable with a OOP approach. The functional approach of React was just too much for me to wrap my head around while also trying to deliver features.

I rebuilt the page with React Components, which has a much more familiar OOP feel to it. Components are encapsulated view and behavior for an element or collection of elements. You can then create child components that inherit properties from the parent (props in React speak) and are rendered by the parent component. In a way, this paradigm is a lot like composition in OOP. A main component can be extended by being composed of child components that provide additional functionality but the parent does nothing but send input and receive output from behavior defined within the child component.

I built 3 out of the 4 CRUD behavior for our Skills page from frontend view, behavior, and requests, to the backend endpoints, app logic, and database interface. It was a lot of fun to get back to the heart of a project and contribute to the codebase.

I spent the rest of the week troubleshooting a very annoying issue with running the database standup script I wrote for our Heroku deployment. The goal was to have a flag that we could toggle which would trigger the database standup script when the app runs. Not only did I have to work through a bunch of small bugs and issues setting up everything for it to work, it turns out Heroku deploys the app to a cluster and any code is ran multiple times. This caused the drop/create/insert pattern to run multiple times, breaking the procedure. I ended up finding a way to use worker nodes that do not run code in parallel to execute the script ad hoc. It was painful.

Week 5

  • Set up pipeline for deploying database standup script to Heroku cloud environment
  • Rewrote front-end view for Skills page, using React Components
  • Added additional functionality to all endpoints to mock a user dynamically until we can get user authentication and authorization working
  • Added additional functionality to the database mock data script, to grab ids of dependent foreign key dynamically since our cloud database auto-generated id values are unpredictable. This allows the script to insert data into tables with foreign key relationships without violating the constraint
  • Wrote CRUD operations for the Skills page, including update, delete, add, and a reworked get to include additional metadata
  • Wrote frontend functionality for Skills page, including the ability to update and delete records.

What went well and what didn’t

Nothing about wrapping my head around the database script went well. It was super frustrating and I spent around 5 hours on it. I was also initially frustrated by not being able to jump right in a contribute to the frontend. I am glad I rebuilt the page in a way that is more familiar to me while maintaining the same look and proposed functionality. Excited to continue to contribute to the frontend and start authentication next week!

This week’s quote:

Sometimes things aren’t clear right away. That’s where you need to be patient and persevere and see where things lead.

– Mary Pierce
Print Friendly, PDF & Email

Leave a comment

Your email address will not be published. Required fields are marked *