Skip to content

Instantly share code, notes, and snippets.

@Sierra-T-9598
Last active March 25, 2022 16:24
Show Gist options
  • Select an option

  • Save Sierra-T-9598/bbc8450d6016f06e59ce2d99aa212490 to your computer and use it in GitHub Desktop.

Select an option

Save Sierra-T-9598/bbc8450d6016f06e59ce2d99aa212490 to your computer and use it in GitHub Desktop.
Approach to legacy code

Issue: #65 Add error messaging to FE Profile container when phone number is not the right format

Approach:

  • Where will you start in tech codebase, and why did you decide to start there?
    • First get some familiarity with the README see if anything pops out to set the stage for what I should be looking for, also a good way to get a first look at DB schema
    • Take a look at gem file to see what we are working with
    • Take a look at schema and models to see the relationships
    • Now in context of the issue, we are dealing with messaging/phone numbers so I am going to go look for where that functionality is and is tested. In this case, I see that the phone number is part of the SMS API service being consumed by the BE.
    • I see that an error is occuring in the SMS service on the BE if the phone number is not a good format.
    • However, the issue references the error messaging on the FE Profile Container, so I am going to navigate to the FE codebase to find this Profile Container (Javascript). I am going to need to decipher how the phone number is being taken in and validated and add an error message for if a phone number is found to be inavlid. This issue says to add to FE profile container, and I will likely need to find a way to test that the validation/erroring works.
  • What is familiar to you about the codebase?
    • AR Models and postgreSQL DB
    • Service and service_spec for SMS
    • Many gems
  • Are you making any assumptions?
    • I am assuming that this needs to be handled on the BE bc it is an issue opened on the BE repo
    • I am assuming everything is well tested
    • I am assuming that since the issue says add the error messaging to FE Profile container that it actually needs to be handled by the FE Profile Container. BC I am unfamiliar with JS, I am also assuming that this can all be acheived in the container, although I should probably look for tests?
  • How are you identifying what files are relevant to your issue?
    • Psuedo-coding/thinking about how I would implement the issue: FE profile container sounds like something that would be in the FE repo (I checked it out and it is part of the JS lingo)
  • What is the data flow in the application?
    • FE App queries BE App
  • What is unfamiliar?
    • JS of the FE
    • GraphQL API set up/structure and testing
    • Serializing data in the service
    • gem graphql
    • gem search_object_graphql
    • gem graphiql-rails
    • gem sidekiq
    • gem sinatra`
    • gem skylight
    • gem webdrivers
    • gem selenium-webdriver
  • Is there technology you would need to research?

How might this process apply to the job search?

  • Being able to look at Open Source Code
  • Being able to process and synthesize unfamiliar code for a job interview
  • Being able to talk through your approach for getting comfy with something unfamiliar

How might this process apply to the job itself?

  • Being able to learn and understand the flow and concepts of your code base relevant to your tasks early on and work effectively without having to understand the whole entire thing.

How would you talk through this experience in an interview?

  • I would highlight the importance of being able to target pieces of the code base relevant to my issue
  • I would highlight the process and key things I look for: starting with documentation and then looking to see what the data flow might look like
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment