Skip to content

Instantly share code, notes, and snippets.

@tavisrudd
Last active September 20, 2022 17:36
Show Gist options
  • Save tavisrudd/cc26ff05ff37befbf1d9edbfa764a12c to your computer and use it in GitHub Desktop.
Save tavisrudd/cc26ff05ff37befbf1d9edbfa764a12c to your computer and use it in GitHub Desktop.

Agenda (90 min):

  • [2:00, 5min] 1) Introductions

  • [2:05, 30min] 2) Can you give us an example of a “technical vision” or roadmap that you’ve rolled out previously. Can you whiteboard that vision to us? looking for clarity of vision and technical communication

  • [2:35, 10min] 3) A very short-code review (see code-review.ts below)

  • [2:45, 30min] 4) AuthN/Z and Coordination in Distributed systems looking for distributed systems and security knowledge plus a plan for progressive remediation

  • [3:15, 10min] 5) Your questions for us

  • Extra if time: 6) Can you give us an example of when you’ve helped a team get unstuck or radically change their perspectives and approach to solving a technical problem?

////////////////////////////////////////////////////////////////////////
// 1.1) If you saw something like this during a code review
// what would you say and how would you improve it?
// (If you don't know Typescript's type system well, pseudo-code it or talk about a typed language you know well.)
type Shape = {
type: "circle" | "square";
size: number;
radius: number;
};
// 1.2) On your improved type, write a function that calculates the area
// 1.3) On your improved type, write a type predicate isCircle (if you know Typescript. Skip otherwise)
////////////////////////////////////////////////////////////////////////
// 2.1) From an error handling perspective what's the difference
// between these in node.
const async1 = async () => {
try {
const resp = await fetch(url);
return resp.json();
} catch (err) {
console.error(err);
throw new Error("oops");
}
};
const async2 = async () => {
const respPromise = fetch(url);
try {
return (await respPromise).json();
} catch (err) {
console.error(err);
throw new Error("oops");
}
};
// 2.2) What else would you say about the error handling of both
// during a code review
@tavisrudd
Copy link
Author

eyJhbGciOiJIUzUxMiJ9.eyJleHAiOjE2NDI5OTYxMjQsInVzZXIiOnsiaWQiOiI2OGQxZjNlZi1jOWZhLTQ5MDItODQxNi0yY2FkNjg1NGU5MGQiLCJpbnRJZCI6ODM1ODgyLCJhZG1pbiI6dHJ1ZX0sImFjY291bnQiOnsiaWQiOiIxZTNhMWZiNC02NzYyLTQ4MTAtODIyYi05NzA2YzAzM2ZhNjgiLCJyb2xlcyI6WyJvd25lciJdfSwiY2xpZW50Ijp7ImlkIjoiYzk0NzJlNGUtNjNiNy00ODQzLWEzZjItNDAxZmNhMzg1Njk2IiwiaW50SWQiOjM0NDQyOTEsInJvbGVzIjpbImF1dGhvciJdfX0.ViNT-mu1T7QPFTEx_R8svu4oiL1cG4Um2CTiSVrpjhIw7aXzg-ZlqAjAMhblNL2s92wcrTLxCkhI9cVvdqylKg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment