Python's subprocess: The Right Way to Talk to Your OS

access_time 2025-09-19T08:55:06.037Z face Benito J D
Python's `subprocess`: The Right Way to Talk to Your OS Junior/Mid Engineer Asked at: Any company with DevOps, SRE, or automation needs. Q: Write a Python script to run a shell command (like `df -h`) and print the output. Why this matters: This question is a test of security and control. Your Python...

The Art of Failing Gracefully: Why try/except Is Not Enough

access_time 2025-09-19T06:19:40.239Z face Benito J D
The Art of Failing Gracefully: Why `try/except` Is Not Enough Junior/Mid Engineer Asked at: All of them. This is a universal programming concept. Q: How would you handle exceptions when reading a file that may not exist in Python? Why this matters: This is a fundamental test of correctness and relia...

The Signal in the Noise: Regex as a Language for Pattern Recognition

access_time 2025-09-19T05:39:55.871Z face Benito J D
The Signal in the Noise: Regex as a Language for Pattern Recognition Junior/Mid Engineer Asked at: FAANG, Cybersecurity firms, any company with extensive logging Q: From a multiline string of logs, extract all IP addresses using regular expressions in Python. Why this matters: This question isn't ab...

Beyond requests.get: Why a Simple API Call Reveals Your Engineering Depth

access_time 2025-09-19T05:29:13.923Z face Benito J D
Beyond `requests.get`: Why a Simple API Call Reveals Your Engineering Depth Junior/Mid Engineer Asked at: All modern tech companies Q: Show how you would use Python to send a GET request to an API and print the response status code. Why this matters: This is the "hello, world" of microservices and a...

The Busy Machine Fallacy: Why Your CPU Alerts Are Lying to You

access_time 2025-09-19T04:56:33.664Z face Benito J D
The Busy Machine Fallacy: Why Your CPU Alerts Are Lying to You Junior/Mid Engineer Asked at: Amazon, Meta, Google, Startups Q: Write a Python script to check CPU usage, and if it’s above 80%, print an alert. Why this matters: This question is a smoke test for your operational maturity. It's not abou...