Episode #150: Winning the Python software interview
Sponsored by Datadog: pythonbytes.fm/datadog
Michael #1: How to Stand Out in a Python Coding Interview
- Real Python, by James Timmins
- Are tech interviews broken? Well at least we can try to succeed at them anyway
- You’ve made it past the phone call with the recruiter, and now it’s time to show that you know how to solve problems with actual code…
- Interviews aren’t just about solving problems: they’re also about showing that you can write clean production code. This means that you have a deep knowledge of Python’s built-in functionality and libraries.
- Things to learn
enumerate()to iterate over both indices and values
- Debug problematic code with
- Format strings effectively with f-strings
- Sort lists with custom arguments
- Use generators instead of list comprehensions to conserve memory
- Define default values when looking up dictionary keys
- Count hashable objects with the
- Use the standard library to get lists of permutations and combinations
- There’s now one code of conduct for PSF and PyCon US and other spaces sponsored by the PSF
- This includes some regional conferences, such as PyCascades, and some meetup groups, (ears perk up)
- The docs
- Do we need to care?
- all of us, yes. If there weren’t problems, we wouldn’t need these.
- attendees, yes. Know before you go.
- organizers, yes. Better to think about it ahead of time and have a plan than have to make up a strategy during an event if something happens.
- me, in particular, and Michael. Ugh. yes. our first meetup is next month. I’d like to be in line with the rest of Python. So, yep, we are going to have to talk about this and put something in place.
Michael #3: The Interview Study Guide For Software Engineers
- A checklist on my last round of interviews that covers many of the popular topics.
- Warm Up With The Classics
- Many many videos on interview topics and ideas
- Data Structures
- Big O Notation
- Dynamic Programming
- String Manipulation
- System Design
- Operating Systems
- Object Oriented
- Design Patterns
- Fun conversation in the comments
Brian #4: re-assert : “show where your regex match assertion failed”
- Anthony Sotille
re-assertprovides a helper class to make assertions of regexes simpler.”
Matchesobjects allows for useful pytest assertion messages
- In order to get my head around it, I looked at the test code:
- and modified it to remove all of the
with pytest.raises(AssertionError)…to actually get to see the errors and how to use it.
def test_match_old(): > assert re.match('foo', 'fob') E AssertionError: assert None E + where None = [HTML_REMOVED]('foo', 'fob') E + where [HTML_REMOVED] = re.match test_re.py:8: AssertionError ____________ test_match_new ___________________ def test_match_new(): > assert Matches('foo') == 'fob' E AssertionError: assert Matches('foo') ^ == 'fob' E -Matches('foo') E - # regex failed to match at: E - # E - #> fob E - # ^ E +'fob'
Michael #5: awesome-python-typing
- Collection of awesome Python types, stubs, plugins, and tools to work with them.
- Static type checkers: mypy - Optional static typing for Python 3 and 2 (PEP 484).
- Stub packages: Typeshed - Collection of library stubs for Python, with static types.
- Tools (super category): pytest-mypy - Mypy static type checker plugin for Pytest.
- Articles: Typechecking Django and DRF - Full tutorial about type-checking django.
- Dustin Ingram
- I know a handful of people who have this job title. What is it?
- disclaimer: Dustin is a DA at Google. Other companies might be different
- What is it?
- “I help represent the Python community at [company]"
- “part of my job is to be deeply involved in the Python community.”
- working on projects that help Python, PyPI, packaging, etc.
- speaking at conferences
- talking to people. customers and non-customers
- talking to product teams
- being “user zero” for new products and features
- paying attention to places users might raise issues about products
- working in open source
- creating content for Python devs
- being involved in the community as a company rep
- representing Python in the company
- coordinating with other DAs
- Not all DAs travel all the time. that was my main question.
Talk Python episode: War Stories of the Developer Evangelists