Skip to content

Instantly share code, notes, and snippets.

@particlebanana
Last active February 15, 2021 17:16
Show Gist options
  • Save particlebanana/4124568ddf18110376ed22d9cf378127 to your computer and use it in GitHub Desktop.
Save particlebanana/4124568ddf18110376ed22d9cf378127 to your computer and use it in GitHub Desktop.
Knock Backend Node Developer Questions

Knock Backend Node Developer Questions

Thank you for your interest in working at Knock! To help us better understand your experience, knowledge, and problem solving methods we have a short list of questions we would love to have you answer.

In answering the code questions, please submit code as if you intended to ship it to production. The details matter. Tests are expected, as is well written, simple idiomatic code. You may structure the project however you like.

When answering the questions please use JavaScript. You may use whatever libraries you like. Please email cody@knock.com a link to your answers, some applicants have found gist.github.com useful for sharing solutions. Please feel free to reach out with any questions you may have.

We believe this should take less than 2 hours to complete, but understand you may have other commitments and time constraints. Please let me know (roughly) when we should expect your answers (e.g. "over the weekend"). Let me know if you need more time.

It may take us 2 to 3 days to review your answers. They’re passed to one of our engineering teams to review.

  • What's something you have built or done that you are most proud of and why? It doesn't need to be professionally and a short paragraph is fine.

  • What is a tech problem or area that you are excited about? If you could drop everything and spend your time solving or working in this space what would it be?

  • Why Knock?

  • Write a function that takes two strings: a and b of varying lengths and merges them into a single string, appending any remaining characters to the end and returns it. For example you have two strings abc and stuvwx. Alternating between the two you should return asbtcuvwx.

  • At Knock we deal with data vendors all across the country. Please write a function that can take varying JSON data input sources representing a property on a MLS (multiple listing service) and send them to our fictional CRM endpoint. You should make an http post call to the CRM endpoint in the function for a customer with the id 762910. The function should take in one of the MLS JSON input sources at a time. Keep in mind that the data sources will grow with each new city we add so try and think through the implications of this. The CRM endpoint is not real so you will need to mock out the test calls.

Knock has a CRM that keeps track of the customers submitting their homes to us. Below is a fictional endpoint that creates a new record with the details about the houses a customer is interested in buying. For this example don't worry about authentication.

Endpoint

POST https://knock-crm.io/customer/{:id}/properties

Payload

  • mls_name - (string, required) which mls the property belongs to
  • mls_id - (number, required) a unique identifier within the mls supplied
  • street_address - (string, required) the number and street name of the property
  • city - (string, required) the name of the city the property is in
  • state - (string, required) the name of the state the property is in
  • zip_code - (number, required) a 5 digit value for zip code of the property
  • list_price - (number, required) how much the property is listed for. This should be an integer, example 400000
  • list_date - (number, required) a Unix timestamp indicating the date the property was listed on. example 1525143600
  • bedrooms - (number) how many bedrooms the property has
  • full_baths - (number) how many full bathrooms the property has
  • half_baths - (number) how many half bathrooms the property has
  • size - (number) how many square feet the property has
[
{
"data_name": "ga_fmls",
"vendor_id": "76257",
"address_components": {
"address": "176 Milton Ave, Atlanta, GA 30317",
"street_name": "Milton",
"street_number": "176",
"street_suffix": "Ave",
"city": "Atlanta",
"state": "GA",
"zipcode": "30317"
},
"list": "$275,000",
"date": "2018-05-02T04:19:27-04:00",
"property": {
"bed_count": "3",
"bath_count": "2",
"half_bath_count": "1",
"square_feet": "2300"
}
}
]
[
{
"name": "ncsc_cmls",
"id": "53728",
"geo": {
"address": "256 Old Mill",
"city": "Charlotte",
"state": "NC",
"zip": "28269"
},
"listing": {
"price": "299,999.00",
"bedrooms": "4",
"bathrooms": "3",
"square_feet": "1975"
},
"created": "2018-05-14 03:00:00 EST"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment