#125: Will you conquer the deadlock empire?
Published Sat, Apr 13, 2019,
recorded Wed, Apr 10, 2019
Sponsored by Datadog: pythonbytes.fm/datadog
Brian #1: My How and Why: pyproject.toml & the 'src' Project Structure
- Brian Skinn
- pyproject.toml
- but with setuptools, instead of flit or poetry
- with a
src
dir - and tox and black
- all the bits and pieces to make all of this work
Michael #2: The Deadlock Empire: Slay dragons, master concurrency!
- A game to test your thread safety and skill!
- Deadlocks occur in code when two threads end up trying to enter two or more locks (RLocks please!)
- Consider
lock_a
andlock_b
- Thread one enters
lock_a
and will soon enterlock_b
- Thread two enters
lock_b
and will soon enterlock
_a - Imagine transferring money between two accounts, each with a lock, and each thread does this in opposite order.
Brian #3: Cog 3.0
- Ned Batchelder’s
cog
gets an update (last one was a few years ago). - “Cog … finds snippets of Python in text files, executes them, and inserts the result back into the text. It’s good for adding a little bit of computational support into an otherwise static file.”
- Development moved from Bitbucket to GitHub.
- Travis and Appveyor CI.
- The biggest functional change is that errors during execution now get reasonable tracebacks that don’t require you to reverse-engineer how cog ran your code.
- mutmut mutation testing added. Cool.
- What I want to know more about is this statement: “…now I use it for making all my presentations”. Very cool idea.
Michael #4: StackOverflow 2019 Developer Survey Results
- More good news for Python
- Lots of focus on gender in this one
- Contributing to Open Source
- About 65% of professional developers on Stack Overflow contribute to open source projects once a year or more. Involvement in open source varies with language. Developers who work with Rust, WebAssembly, and Elixir contribute to open source at the highest rates, while developers who work with VBA, C#, and SQL do so at about half those rates.
- Competence and Experience
- We see evidence here among the most junior developers for impostor syndrome, pervasive patterns of self-doubt, insecurity, and fear of being exposed as a fraud. Among our respondents, men grew more confident much more quickly than gender minorities.
- Programming, Scripting, and Markup Languages
- Python edges out Java, second only to JavaScript (and two non-programming languages)
- Databases
- MySQL, Postgres, Microsoft SQL Server, SQLite, MongoDB
- Most Loved, Dreaded, and Wanted Languages
- Loved: Rust, Python
- Wanted: Python, JavaScript
- Dreaded: VBA, ObjectiveC
- Most Loved, Dreaded, and Wanted Databases
- Loved: Postgres
- Wanted: MongoDB
- Most Popular Development Environments
- VS Code is crushing it
- How Technologies Are Connected is just interesting
Brian #5: Cuv’ner “A commanding view of your test-coverage"
- Coverage visualizations on the console.
Michael #6: Mobile apps launched
- The tech (sadly only 50% Python)
- Xamarin, Mono, and C# on the device-side
- Python, Pyramid, and MongoDB on the server-side
- 90% code sharing or higher
- Native applications
- Build the prototype myself on Windows
- Hired Giorgi via TopTal
- Get your own developer or get some freelancing work and support my app progress with my referral code: toptal.com/#we-annexed-perfect-engineers
- Dear mobile app developers: You have my sympathy!
- Try the app at training.talkpython.fm/apps Comes with 2 free courses for anyone who logs in.
- Android only at the moment but not for long
Extras
Brian:
- Python Bytes Patreon page is up: patreon.com/pythonbytes
Michael:
- PyCon Booth
- XKCD Plots in Matplotlib with examples via Tim Harrison
- Fira Code Retina and Font Ligatures
- The EuroSciPy 2019 Conference will take place from September 2 to September 6 in Bilbao, Spain
Jokes
- “When your hammer is C++, everything begins to look like a thumb.”
- “Why don't jokes work in octal? Because 7 10 11”
- Over explained: Why is 6 afraid of 7. Cuz 7 8 9.
- Follow on: Why did 7 eat 9? He was trying to eat 3^2 meals.
- I've been using Vim for a long time now, mainly because I can't figure out how to exit.