Post Production

March 27th, 2020
deploy

Touch Up

As I was leaving work yesterday, my feature in the app I had built was being tested by the CTO, with the CEO and other executives in on the video call. It seemed to be working fine, but I left before I heard any feedback about the feature. Just a side note, I'm not sure what to call it; it's more than a feature, but it's not a standalone app. I built on a completely new arm to the app, more than doubling it in size, while completely revamping the initial app multiple times over. For simplicity's sake, I'll call it a feature. I knew there would be some things to fix up today, mostly I figured it would be changes to the copy, since I never really got much guidance as to how this should come out. Before I got this job, I figured most apps were built with a wireframe in hand, taken from the design team, and molded into the final product to appear as the wireframe did. While I did get a little guidance from my neighbor, and at one point he built out a quasi-wireframe, it certainly didn't come from the designers. All I had to go on was the idea of what the feature should be; the rest was up to me. While this did give me a little freedom to make my own decisions, I think things would have been a lot more clear if I had a wireframe, or a better idea of how it should look. Anyways, I knew there would be changes to make, but I didn't think they would be extensive.

clean up

It turns out, I was mostly right. Some of the data being passed through was inherently wrong, by no fault of my own. I had been told one thing at the beginning as to how the data should come in, and it happened to be pretty different from that. This was still an easy fix, though. I took the form where the representative built out the membership information, changed the math on a couple of inputs, and added another input to reflect the new data. I also had to add a field in to the context object being passed through, but this was a cinch. The way I built this with context and reducers works beautifully when adding things in or taking them out. Instead of having to manipulate state through multiple levels, it can be changed in a central location and passed into the component that is necessary, and that's it. I also did have to change quite a bit of copy for the feature itself. It turns out they wanted the verbiage to be directed towards the representative more than towards the customer themselves, which again, I was not given any initial direction on, and just speculated as to how it should appear. In fact, I asked several times about who would be going through this process, as in the representative or the individual customer, and I was given contradictory information. Regardless, this was another easy fix and I was able to knock it out in a matter of about 15 minutes. From there, I had to wait some more on the backend stuff to get finished up before I could proceed, so I got to do some refactoring.

refactor

This refactoring work I've done in the last week has turned out to be a great learning tool for me. It gives me time to really dive deeper into the code, and speculate on better ways to write it. In several cases, I had some massive conditional statements that, after working with them for an hour or so, in some cases, I'd cut out massive amounts of lines of code. The most significant changes today were to the membership information page. I had to add some input fields to put in if they were married, single, divorced, or widowed, as well as the partner's information when applicable. After writing this file initially, it was 413 lines long. Absolutely massive. By the end of the day, I had gotten it down to 150 lines of code, and everything was much more dynamic. I had about 15 cases of useState being used when I started it; by the end of it, I had one in the parent component, and one in each of the child components. Reusable code is a beautiful thing, but it takes time to understand the nuances of React, and getting the tricks of the trade down, especially with complex things like forms, is not easy. Overall, this project was a great learning experience for me, and I feel confident I can tackle pretty much everything they can throw at me from here on out. Not to mention, whenever we are tasked with adding more features to this application specifically, it's going to be so easy. So, with about an hour left in the day, we got it pushed back up to production and ran some tests to make sure it was working. Everything seemed to be running well, but I still didn't hear from the higher-ups if it had been approved for action. I guess I'll just have to wait until Monday.

Until tomorrow!

Created by Sam Thoyre, © 2019