Articles tagged with Python

Review of "Python Testing with pytest, Second Edition"

By Eric — 3 minute read

Book Cover

Even though I've been using pytest for years, being a testing enthusiast, I thought I'd read Brian Okken's book to see what I might be able to learn from it. I was pleased to discover not only several tidbits of the workings of pytest I hadn't known about, but also …

Read more...

PyCon US 2022

By Eric — 8 minute read

Welcome to PyCon!

I wrapped up my participation in this year's PyCon last night. Being in Salt Lake City was great, since that's just a half-hour drive from my house, but it also means that I don't have the "completely focused on this" experience that traveling to a conference gives you. For example …

Read more...

Architecture Patterns with Python Review

By Eric — 5 minute read

Architecture Patterns with Python

Architecture Patterns with Python by Harry Percival and Bob Gregory

I learned about this book by watching Harry Percival's 2020 PyCon talk Stop Using Mocks (for a while). In the past, I was pretty enthusiastic about mocks, especially in Python because they, along with patching, let me test just about …

Read more...

SQLAlchemy Cascade Delete: Clarity through Examples

By Eric — 10 minute read

Since there is overlapping "cascade delete" functionality supported by SQLAlchemy -- with the ORM handling some deletes and the database itself handling others -- it can be hard to know the right way to set it up. Here are some examples to help clarify how it all works.

Starting Example

Here we …

Read more...

My Best Side Project

By Eric — 3 minute read

After a few years working on it, I can say that the "magic mirror" I built with my son has been the best for-fun side project I've ever done. When I was describing the idea, my wife was hesitant about letting me hang it on the wall -- mostly due to …

Read more...

I'm concerned about using Python

By Eric — 10 minute read

xkcd Python

But...

Python is slow

  • Is the CPU the bounding factor for the project's performance?
  • How much time has been spent trying to optimize performance?
  • Which is currently more important, raw execution speed or time to create features?
  • Is Python fast enough for the project?
  • It is an often used strategy …

Read more...

PyCon 2016 - Day 3

By Eric — 5 minute read

Wednesday was the final day of the main PyCon 2016 conference in Portland, Oregon.

Pioneer Square

Lightning talks

One of the interesting talks was about Web accessibility. It isn't always top-of-mind for me since I do little Web front end currently, but the speaker mentioned the Accessibility Developer Tools for Google Chrome …

Read more...

PyCon 2016 - Day 2

By Eric — 10 minute read

Today's PyCon was a lot about meeting people. I hadn't really anticipated that, but it was a nice surprise nonetheless. But first things first...

Convention Center

Lightning talks (AM)

There were two sets of lightning talks today, book-ending the rest of the events. One interesting one was about using Minecraft to teach …

Read more...

PyCon 2016 - Day 1

By Eric — 8 minute read

PyCon is in Portland, Oregon this year, which is not only more accessible to me than eastern Canada (the previous location), but also the area where most of my extended family lives. Those facts combined to make it a great time to attend for the first time.

Willamette River

In a way …

Read more...

Granular Profiling in PyCharm

By Eric — 1 minute read

PyCharm added profiler integration in version 4.5, which I thought was pretty cool. Used as documented, though, it hasn't been terribly useful. Here's a way to improve on that.

In my case, I was interested in profiling a web service -- specifically requests to a particular resource. I started up …

Read more...