Head First Design Patterns question on Duck Simulator walk through in chapter 1

I am having trouble reconciling a walk through example in intro to design patterns chapter. I copied several images of the chapter’s assertion, solution, and apparent contradictions. Problem: Joe was berated for having rubber ducks flying around on his simulator. He eventually proposes “How about an interface?” There, the MallordDuck (and others) are declared as…

Details

PostgreSQL Viewing a set of related records of the same table in a single row

Let’s have the following table thought to contain linked records: CREATE TABLE tbl(id integer, name text, next_id integer, UNIQUE(id), FOREIGN KEY(next_id) REFERENCES tbl(id)); With the given data inserted in it: INSERT INTO tbl(id, name, next_id) VALUES( 1, ‘x_0’, 2), ( 2, ‘x_1’, 3), ( 3, ‘x_2’, null), ( 4, ‘y_0’, 5), ( 5, ‘y_1’, 6),…

Details

LitElement: best practise (or best performance) when creating many custom style rules vs a couple of dynamic rules inside a tiny web component?

So I’m working on a very small web component to feature as part of a much larger design system. I’m a bit new to use of Web Components, but I know this particular web-component could be used many, many times in a single layout. This web component controls how much vertical space to put around…

Details