#150 Winning the Python software interview
Python Bytes - Podcast tekijän mukaan Michael Kennedy and Brian Okken - Maanantaisin
Kategoriat:
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
- Use
enumerate()
to iterate over both indices and values - Debug problematic code with
breakpoint()
- 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
collections.Counter
class - Use the standard library to get lists of permutations and combinations
- Use
Brian #2: The Python Software Foundation has updated its Code of Conduct
- 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
- Algorithms
- Big O Notation
- Dynamic Programming
- String Manipulation
- System Design
- Operating Systems
- Threads
- Object Oriented
- Design Patterns
- SQL
- Fun conversation in the comments
Brian #4: re-assert : “show where your regex match assertion failed”
- Anthony Sotille
- “
re-assert
provides a helper class to make assertions of regexes simpler.” - The
Matches
objects allows for useful pytest assertion messages - In order to get my head around it, I looked at the test code:
- https://raw.githubusercontent.com/asottile/re-assert/master/tests/re_assert_test.py
- 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.
- Taxonomy
- 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.
Brian #6: Developer Advocacy: Frequently Asked Questions
- 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
Work/life?
- Not all DAs travel all the time. that was my main question.
Talk Python episode: War Stories of the Developer Evangelists
Extras:
Michael:
Joke: