Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datamade code challenge - JP Martinez Submission #48

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

JPMartinezClaeys
Copy link

Overview

In this PR I'm adding a submission for the Datamade Coding Challenge for the role of Developer. I was able to successfully (up to the reviewer) steps 1,2 and 5. For steps 3 and 4 I modified the html to include html tags for the error message and add id tags to html tags to retrieve them easier.

Notes

Due to unfamiliarity with Java, and to be honest about my current technical skills I was not able to complete this sections 3 and 4 in the suggested time.

Given a high level understanding of Java, here is a brief description of the logic I would apply:

  1. Retrieve the form with class address-form, and from the form retrieve the information for the input with name=address
  2. After submitting the form, do one of two actions depending on the validity of the input, (1( display the table with the parsed results or (2) display an error message
  3. If the input is correct, retrieve from the response JSON the dictionary with the parsed components and the address_type that is returned by AddressParse.get(). For the parsed components iterate over the dictionary where each elements is fitted into a row with a <tr> tag, and then the key and value are '' tags within the <tr> tag; these elements are included in the table element in the div with id address_results . For the address_type, we insert as text_content in the <p> tag with id parse_type.
  4. If the input is incorrect, we insert as text_content in the <p> tag with id address_error the element from the response JSON associated with the error as returned in AddressParse.get()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant