OO Design Principles: ABC's

Some quotes to provide context.

"I read several times that ideally I should avoid inheritance with ABCs and if I do, then from a standard class. That is, I should avoid creating a typical base and subclass construct that is used in a strategy pattern, for example."

"If I look …

more ...

The eval() Conundrum and Python-as-DSL

Many people will proclaim that the eval() function is reprentnatly evil.

Feel free to skip the two rants.

BLUF

The eval() function is relatively easy to work with.

Important

Limit the globals to the fewest possible names.

Eval() Rant

A too-common claim is that we can't use eval() because an …

more ...


Domnain-Specific Language

Generally, I try to frown on Domain-Specific Languages. Often, a tidy set of related functions, or a group of class definitions with a few decorators can create something that's every bit as expressive as a DSL in native Python syntax.

There are a few cases where a DSL can be …

more ...

Joomla Conversion

Recently, we talked about extracting data from complex relational databases. This is -- in a way -- another case study for my Unlearning SQL book. This is a description of what comes next after the "low-level" conversion. Warning: it's complicated.

BLUF: Take the time to get rid of SQL processing.

more ...