Tech Interview Preparation Module 9 – Your role and your situation
Career switches, gaps, layoffs and roles abroad
Explain a career switch, a gap or a layoff in a few honest sentences, and check a role abroad for sponsorship, a registered agent, its contract and its pay.
What you will learn
- Explain a career switch, a gap or a layoff honestly in 60 words or fewer
- Check a role abroad for visa sponsorship, a registered recruiting agent and a work visa
- Compare pay across currencies at the exchange rate and by purchasing power
- Recognise when a visa or legal fact needs an official page read on the day
Before you start
What you’ll learn · Before you start
What you will learn
- Explain a career switch, a gap or a layoff honestly in 60 words or fewer
- Check a role abroad for visa sponsorship, a registered recruiting agent and a work visa
- Compare pay across currencies at the exchange rate and by purchasing power
- Recognise when a visa or legal fact needs an official page read on the day
Before you start
On this page
Your resume shows 14 months between two jobs, and the recruiter’s first question is about them. Two honest sentences and a third about what you are ready for answer it in under 60 words, while a minute of explanation tends to raise more questions than it settles. Career switches, gaps and layoffs all take that shape, and roles abroad add checks of their own before the first round.
This lesson builds those short explanations, sets out the checks for a role in another country, and shows why a visa or legal fact has to come from an official page read on the day you decide.
Gaps and layoffs: two honest sentences, then what you are ready for
What an interviewer needs to hear about gaps and layoffs is short: that you can explain one plainly and are ready to work. Say what happened in one true sentence without blame, what you did since with one piece of evidence, and what you are ready for now. You owe no detail about health or family: “I took two years out to care for a parent” is complete. Step through an answer about a layoff:
The drawing shows the whole scene; its 6 steps are listed below.
Every step as text
- The question. The recruiter sees that your last job ended months ago and asks why you left.
- What happened. One true sentence, without blame. "My role was one of 120 cut when the company closed its mobile team."
- What you did. One sentence of evidence from the time since. "Since then I have finished the offline-sync feature I started there as an open-source library."
- What you are ready for. The last sentence looks forward and points at this role. "I am now looking for a team that builds Android apps for people on slow networks."
- A follow-up. The recruiter asks how the people to be cut were chosen. You do not need to know or guess.
- One more true detail. Answer with what you know, briefly, and return to the role. "The whole team went, so it was not about individuals. The library is on my resume if you would like to see it."
The program checks two answers against three rules: at most 60 words, a last sentence that looks forward, and no words of blame. Press Edit and check your own:
"""Two answers to "why did you leave?" after a layoff, checked against three rules of a short, honest explanation."""
import re
LIMIT = 60 # words
FORWARD = ("ready", "looking for", "next", "now", "want to", "keen to", "plan to")
BLAME = ("unfair", "fault", "blame", "toxic", "terrible", "useless", "incompetent", "hate")
ANSWERS = {
"Weak": (
"Honestly it was totally unfair. My manager never liked me and the company was badly run, "
"so when they cut costs I was the easy target, even though the real fault was the leadership's. "
"I have been applying everywhere since then and it has been a terrible few months."
),
"Strong": (
"My role was one of 120 cut when the company closed its mobile team. "
"Since then I have finished the offline-sync feature I started there as an open-source library. "
"I am now looking for a team that builds Android apps for people on slow networks."
),
}
def problems(text: str) -> list[str]:
"""What breaks the three rules: the word limit, a forward-looking last sentence, no blame."""
found = []
words = len(text.split())
if words > LIMIT:
found.append(f"over {LIMIT} words ({words})")
last = re.split(r"(?<=[.!?])\s+", text.strip())[-1].lower()
if not any(term in last for term in FORWARD):
found.append("the last sentence does not look forward")
found += [f"blame word: {w}" for w in BLAME if re.search(rf"\b{w}\b", text.lower())]
return found
for name, text in ANSWERS.items():
print(f"{name}, {len(text.split())} words")
for line in problems(text) or ["passes all three rules"]:
print(f" {line}") Output
Weak, 49 words the last sentence does not look forward blame word: unfair blame word: fault blame word: terrible Strong, 45 words passes all three rules
Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 layoff_check.py
Runs on this device, in your browser. The first run downloads Python (about 13.5 MB), which is kept for the next runs.
Your run, in this browser
The weak answer fits the length and still fails: it never looks forward, and its blame words, unfair, fault and terrible, make the listener wonder about you rather than the company. The strong one gives a number, a piece of work and a direction in 45 words.
Key idea
Explain a gap or a layoff in three sentences: what happened, what you did since, and what you are ready for now.
Checkpoint
Check: Explaining a gap or a layoff
Career switches lead with evidence
Career switches are judged on evidence, as anyone new to a role is. Google’s hiring page tells recent graduates and people with limited work experience to include school-related projects or coursework that show relevant skills, and the advice serves a switcher as well. Lead with what you have built, then with what your first field gives you:
| Evidence | For a mechanical engineer moving into software |
|---|---|
| A project people use | A sensor dashboard used by 40 engineers |
| Code from the old job | Python scripts that cut test analysis from two days to two hours |
| Knowledge of the domain | What a test rig produces, and what engineers need from it |
Name the switch as a decision, not an escape: what drew you, and the evidence that it was the right move.
Checkpoint
Check: Evidence for a career switch
Roles abroad: four checks before the first round
Roles abroad add questions that can end a process early, which is cheaper than ending it after the last round. Ask whether the employer visa sponsorship: An employer's application to a government for permission to employ a foreign worker, which the worker cannot make alone. In the United States, for example, the employer files the H-1B petition.: in the United States, for example, the employer files the petition for an H-1B worker, not the worker. Ask whether you would be an employee, a contractor or employed through a third party, an employer of record: A third party that is a worker's legal employer and runs payroll, tax and benefits while the worker works for another company, often in another country.: the US Internal Revenue Service says an employer generally withholds income tax, Social Security and Medicare from an employee’s wages and nothing from a contractor’s pay. Step through the checks:
The drawing shows the whole scene; its 6 steps are listed below.
Every step as text
- Sponsorship first. Ask on the first call whether the employer sponsors work visas for the role. In the United States, for example, the employer files the H-1B petition, not the worker, so an employer that does not sponsor ends the process.
- A registered agent. For a job abroad recruited from India, use a recruiting agent registered with the Ministry of External Affairs, and check it on the list of active agents on the eMigrate portal.
- The visa in the offer. A genuine offer lets you travel on an employment or work visa. The ministry's advisory says a tourist visa is for tourism only.
- A tourist visa offer. An offer that asks you to travel on a tourist visa is a warning sign. Stop before you pay anything or travel.
- Your status. Ask whether you would be an employee, a contractor or employed through a third party. The tax withheld, the benefits and the protections differ with each.
- Then the rounds. With sponsorship, the agent, the visa and your status confirmed in writing, the process is worth your time.
Jobs abroad recruited from India
India’s Ministry of External Affairs asks job seekers to use only registered recruiting agent: In India, an agency registered with the Ministry of External Affairs to recruit workers for jobs abroad. The list of active agents is published on the eMigrate portal., and to check an agent on the list of active agents on the eMigrate portal. Under the Emigration Act, 1983, an agent may charge at most 30,000 rupees plus GST, with a receipt, and a genuine offer lets you travel on an employment or work visa, never a tourist one.
To compare the pay, convert it at the day’s exchange rate, and also by purchasing power parity (PPP): A rate between two currencies at which the same basket of goods and services costs the same in both countries. It compares what pay buys, where the exchange rate compares what it converts to., which asks what the money buys where you would live. Prices differ between countries, so a salary that converts to a large sum can still buy far less where it is spent.
Checkpoint
Check: Checks on a role abroad
Visa and legal facts change, so read the official page on the day
Rules for working abroad change faster than any lesson can, and a rule that applied when you applied may not apply when the petition is filed. The US government’s page on H-1B specialty occupations shows one rule moving several times in a short time:
- Proclamation
A new payment for certain petitions
A presidential proclamation required an additional payment of $100,000 with certain new H-1B petitions, as a condition of eligibility.
- Guidance
The agency sets out how it applies
The government's agencies issued guidance on how the payment requirement would be carried out.
- Court order
The guidance is vacated court
A US district court issued an order that vacated the agency guidance implementing the payment requirement.
- Appeal
A request to suspend the order is refused
The order was stayed while the government asked an appeals court to suspend it pending appeal, and the appeals court refused. The USCIS page says that if the order is later lifted, the Department of Homeland Security still plans to collect the payment.
- Your case
Read the page on the day check
Which of these applies to you depends on the day you read the page and on your case. Read the government's page then, and ask the employer, who files the petition.
The timeline has 5 events, from Proclamation to Your case.
Which version applies to you depends on the day you read the page, so treat every visa or legal fact as dated: read the government’s page on the day you decide, ask the employer that files the petition, and take advice from a qualified adviser where the stakes are high. This lesson is general information, not immigration or legal advice.
Checkpoint
Check: Visa and legal facts from the source
Three explanations, scored: a layoff, a two-year gap and a career switch Pro: opens with a Pro, Premium or Ultimate pass
The checker above catches the mechanical failures; this part adds the judgement it cannot make. It scores a weak and a strong version of a gap and of a switch, answers the follow-ups each invites, and plans the first weeks back after a break.
In this part:
- Four answers through a stricter checker, and what it still misses
- The follow-ups each one invites, and short replies
- A gap you would rather not explain in detail
- Coming back after a break: the first four weeks
1 runnable example (Python) · about 4 minutes
Opening this part with your pass…
This part opens with any MySmartCoPilot pass.
- Pro pass · 1 week₹79$2.99
- 30 days₹179$5.99
- 1 year₹1,699$45
One payment; a pass never renews. The price shown is the total you pay: no fees or charges are added at checkout.
Passes can’t be bought right now, so this part can’t be opened at the moment. The free part above stands on its own. If you have a pass, enter your licence key.
It also opens every other in-depth part in Learn and every Pro tool. Sales are final, except where the law gives you a right to withdraw, for example in the EU and the UK (refund policy).
A salary in euros against an Indian offer, with the caveats beside the numbers Pro: opens with a Pro, Premium or Ultimate pass
A salary abroad can look twice as large and buy half as much. This part compares a salary of 60,000 euros with an Indian offer of 30,00,000 rupees at the exchange rate and by purchasing power, then sets out what changes when you would be a contractor or employed through a third party.
In this part:
- Two conversions of one salary, worked with numbers
- Employee, contractor or employed through a third party
- What to settle before the final round of a role abroad
- What to keep from the two parts
1 runnable example (Python) · about 6 minutes
Opening this part with your pass…Pro part. It opens with the same pass as the part above.
Practise: check your own explanation
Write the checker the first example runs, then run the sample tests:
Exercise · Easy · Python
Check an explanation of a gap, a layoff or a switch
Write check_explanation(text), which returns the problems of a short explanation of a gap, a layoff or a career switch, as a list of strings in the order below, or an empty list when it passes. The starter gives you LIMIT, FORWARD and BLAME.
"over 60 words (N)"when the text has more thanLIMITwords, whereNis the count. Count words withtext.split()."the last sentence does not look forward"when the last sentence contains none of the phrases inFORWARD, compared in lower case. Sentences end with.,!or?followed by a space, so split after those."blame word: <word>"for each word ofBLAME, in the order of the list, that appears in the text as a whole word, in any case:unfairlydoes not count asunfair.
For example, "My role was one of 120 cut when the company closed its mobile team. I am now looking for an Android role." passes: 22 words, a last sentence with "now" and "looking for", and no blame word.
Starter code · explanation.py
"""Check a short explanation of a gap, a layoff or a career switch."""
import re
LIMIT = 60
FORWARD = ("ready", "looking for", "next", "now", "want to", "keen to", "plan to")
BLAME = ("unfair", "fault", "blame", "toxic", "terrible", "useless", "incompetent", "hate")
def check_explanation(text):
"""The explanation's problems, in order, or [] when it passes.
>>> check_explanation("My role was cut when the team closed. I am now looking for an Android role.")
[]
"""
# Write your solution here.
return [] The sample tests · test_explanation.py
from explanation import check_explanation
STRONG = ("My role was one of 120 cut when the company closed its mobile team. Since then I have finished the "
"offline-sync feature I started there as an open-source library. I am now looking for a team that builds "
"Android apps for people on slow networks.")
def test_the_strong_layoff_answer_passes():
"""45 words, a forward-looking last sentence, no blame"""
assert check_explanation(STRONG) == []
def test_too_long():
"""more than 60 words is reported with the count"""
text = "I did a lot of things in that time. " * 8 + "I am ready now."
assert check_explanation(text) == ["over 60 words (76)"]
def test_last_sentence_must_look_forward():
"""a forward word earlier in the text does not count"""
text = "I am ready to explain. I was laid off when the team closed."
assert check_explanation(text) == ["the last sentence does not look forward"]
def test_blame_words_in_list_order():
"""each blame word is reported once, in the order of the list"""
text = "It was unfair and terrible, and the fault was theirs. Now I want to move on."
assert check_explanation(text) == ["blame word: unfair", "blame word: fault", "blame word: terrible"]
def test_whole_words_only():
"""unfairly is not the blame word unfair"""
text = "The cuts fell unfairly on contractors, me among them. I am ready for a permanent role."
assert check_explanation(text) == []
def test_case_does_not_matter():
"""a blame word in capitals still counts"""
text = "TOXIC is the only word for it. Next, I want a calmer team."
assert check_explanation(text) == ["blame word: toxic"]
def test_question_and_exclamation_end_sentences():
"""the last sentence follows a question mark or an exclamation mark too"""
text = "Why did I leave? The project ended! I am keen to join a product team."
assert check_explanation(text) == []
def test_all_problems_together():
"""the rules are reported in their order"""
text = "I hate how it went, and it was useless. " * 7 + "That is all."
assert check_explanation(text) == ["over 60 words (66)", "the last sentence does not look forward",
"blame word: useless", "blame word: hate"] A hint
re.split(r"(?<=[.!?])\s+", text.strip()) splits after each sentence end and keeps the punctuation; take the last piece. For whole words, re.search(rf"\b{word}\b", text.lower()) matches unfair but not unfairly.
Results of the sample tests
| Test | Result | Details |
|---|
What your code printed
The sample tests run on this device, in your browser (Pyodide): nothing is sent to mysmartcopilot.com. The first run downloads Python (about 13.5 MB), which is kept for the next runs. A check in your browser is feedback for you, not proof that the code is right for every input.
Then check yourself, weakest idea first:
Practice that adapts to you
Practise this lesson
8 questions about 7 ideas of this lesson. Each answer is explained at once, and what you get right is kept in this browser.
Interview questions
Recruiters and hiring managers ask about gaps, layoffs and switches early, and about visas on the first call:
-
Fresher to senior · Warm-up
Tell me about the gap in your resume.
Answer in three sentences and under a minute: what happened, what you did since, and what you are ready for. "I took a year out when my contract ended, to help run my family's shop. While there I built a small web app for its billing, which cut the month-end close from three days to one. I am ready now to return to product engineering full-time." You owe no detail about health or family; naming the kind of reason is enough. Avoid blame, avoid a long story, and keep the same three sentences in every round and form, so that no two versions disagree.
-
Mid to senior
You were laid off in a restructuring three months ago. Why did it happen, and why should we hire you now?
-
Mid to senior
You spent five years as a mechanical engineer. Why would you succeed as a software engineer here, against candidates with computer science degrees?
-
Fresher to senior
The role is in another country, and you would need a work visa. When and how do you raise it, and what do you check before the final round?
Key takeaways
- Explain gaps and layoffs in three sentences: what happened, what you did since and what you are ready for.
- Career switches lead with evidence: a project people use, code from the old job and knowledge of the domain.
- Check roles abroad early: who sponsors the visa, whether the agent is registered, which visa the offer uses, and your employment status.
- Read visa and legal facts on the government’s own page on the day you decide.
Terms in this lesson
- employer of record
- A third party that is a worker's legal employer and runs payroll, tax and benefits while the worker works for another company, often in another country.
- purchasing power parity (PPP)
- A rate between two currencies at which the same basket of goods and services costs the same in both countries. It compares what pay buys, where the exchange rate compares what it converts to.
- registered recruiting agent
- In India, an agency registered with the Ministry of External Affairs to recruit workers for jobs abroad. The list of active agents is published on the eMigrate portal.
- visa sponsorship
- An employer's application to a government for permission to employ a foreign worker, which the worker cannot make alone. In the United States, for example, the employer files the H-1B petition.
References
- Our hiring process (How we hire): projects and coursework for limited experience (Google Careers)
- H-1B Specialty Occupations (U.S. Citizenship and Immigration Services)
- Advisory on overcharging by agents for overseas recruitment, fake overseas jobs and illegal recruitment (Embassy of India, Algiers (Ministry of External Affairs))
- Independent contractor (self-employed) or employee? (Internal Revenue Service (United States))
- PPP conversion factor, household final consumption expenditure (LCU per international $) (World Bank (International Comparison Program))
- Euro foreign exchange reference rates (European Central Bank)
Related tools
Report a problem with this lesson
Kept only in this browser. Your Learn progress