learning-it by example

#310 Forward deployed engineer interviews 5.9 min

Model the Customer's World: Objects, Links and Actions

Three of seven work orders were quietly wrong. A 60-line model found them and refused a bad change.

1. When modelling a customer's world in code, which four ideas does the video use?
2. In the Python field-service sketch of sites, engineers and work orders, how many links were checked and what problems did the link checker find?
3. In the Python field-service sketch of sites, engineers and work orders, how is a work order allowed to change owner?
4. Which two things does who_can_take check for an engineer before a work order can be assigned?
5. What does the video say about how much its Python field-service sketch covers compared with a real ontology product?

Practice only: nothing is saved and no score counts towards anything. Each answer comes with the reason.

  1. Run the link checker

    Copy the code folder first. Run python run.py. Find the three problems the checker prints, and match each one to the work order in world.py that causes it. You should see 13 links checked, and problems for W4, W5 and W7.

    A hint

    The comments in world.py mark the three wrong links.

  2. Repair one bad link

    In world.py change the site of work order W4 from S9 to S1. Predict how many problems are reported and which one disappears, then run python run.py. With this change it reports 2 problems, for W5 and W7.

    A hint

    S1 is one of the three sites.

  3. Tighten the workload limit

    In actions.py change MAX_OPEN = 3 to MAX_OPEN = 1. Predict who can take work order W3 and what both assign attempts will print, then run it. With this change nobody can take W3, both assignments are refused, and W3 is still assigned to None. Then change MAX_OPEN back to 3, because the next exercise needs it.

    A hint

    Ben already has one open order.

  4. Certify another engineer

    In world.py change Cara's certified_for list from ["S1"] to ["S1", "S3"]. Predict the list of who can take W3, then run python run.py. With this change the list is ['E2', 'E3'], and assigning W3 to E2 is still done. Which part of the model did you change, an object, a link or a rule?

    A hint

    Certification is a link between an engineer and a site.

These tasks are for you to try on your own machine. Nothing is checked or saved.

What this does not show

Made-up sites, engineers and work orders, with three problems planted on purpose. A sketch in plain Python, not the Palantir product or API: no storage, history or permissions, hard-coded rules, and the certification lists themselves are not validated, for example a site id that does not exist.

Up next in Forward deployed engineer interviews

More in Forward deployed engineer interviews

All Forward deployed engineer interviews videos

Related videos