Paul M. Jones

Don't listen to the crowd, they say "jump."

Everything You Think You Know About The Crusades Is Wrong

It is generally thought that Christians attacked Muslims without provocation to seize their lands and forcibly convert them. The Crusaders were Europe’s lacklands and ne’er-do-wells, who marched against the infidels out of blind zealotry and a desire for booty and land. As such, the Crusades betrayed Christianity itself. They transformed “turn the other cheek” into “kill them all; God will know his own.”

Every word of this is wrong.

via Inventing the Crusades by Thomas F. Madden.


Bookdown: DocBook-Like HTML Output From Markdown

From bookdown.io:

Bookdown generates DocBook-like HTML output using Markdown and JSON files instead of XML.

Bookdown is especially well-suited for publishing project documentation to > GitHub Pages.

Features include:

  • Automatic table-of-contents generation as index pages at each hierarchy level

  • Custom index-page titles via JSON configuration

  • Automatic numbering of page headings

  • Automatic previous/next/up navigation headers and footers

  • Multi-page hierarchical output

  • Loading of remote content files via HTTP

  • Templated output for theming

  • Overridable page processing, especially for rendering

Bookdown can be used as a static site generator, or as a way to publish static pages as a subdirectory in an existing site.

Yes, I know, there’s a ton of static site generators for PHP out there already. Sculpin seems to be the big one (hi Beau!) but it’s not specifically for documentation. Then there’s Couscous (hi Matthieu!), which is for documentation, but it’s not DocBook-like documentation.

By “DocBook-like”, I mean (among other things) numbered headers, auto-generated tables-of-contents on their own pages, hierarchical multi-page presentation, and the next/previous/up linking at the top and bottom of pages. Look at the Solar documentation sites for a better idea; the content on those pages was generated with DocBook.

And frankly, look at the dependency listings on those two projects (Scuplin, Couscous). They’re rather extensive. It that a bad thing? No, but it’s not my speed. I think we we all know at this point that I’m about reducing dependencies as much as possible, and those are just too much for me.

Also: I can’t stand YAML. I don’t like YAML embedded in pages, and I don’t like YAML config files. I much prefer JSON, and I don’t want to add YAML frontmatter on Markdown pages.

So: Bookdown. This scratches my particular itch, with very few dependencies.

Bookdown, although it can be used as a site generator, is only incidentally a site generator. What it really is is a page generator, with the idea that you can integrate the pages into any other site you want.

Additionally, Bookdown allows you to pull content from remote locations. This is especially interesting to me because of the decoupled nature of Aura libraries. I would like very much to keep the manual documentation on each library in the same repo as that library, then publish each alone, and as part of a collection, without having to copy files around. Bookdown remote content should allow for that.

I’m happy with the architecture as well. It took two weekends of experimenting, and then almost exactly a week of dedicated development, to build Bookdown.

The library is fully separated from the project. That means you can either run it as a project on its own, or integrate the core library into your own project and glue its services and commands into your own work.

Everything uses dependency injection through an application-specific container which helps to keep the concerns well-separated. Everything uses factories and builders, which helps to enable the dependency injection.

All the underlying processes are decoupled from each other, which should make it easy to replace them with custom processes. For example, the ConversionProcess currently uses CommonMark, but I find it easy to imagine end-users replacing that with Textile, ReStructuredText, or even a combination of conversions that examines the filename extension.

Finally, the code style is a little bit of a departure for me as well. I have previously used $snake_case variables, but I tried on purpose to use $camelCase instead, and it was not a hard switch to make. Camel-case seems more popular these days, so I may bow to common convention from now on.

I really enjoyed putting this together. It’s something I’ve wanted to see in PHP land for a long time, and I finally got the opportunity and inclination. Take Bookdown out for a test drive, see how you like it, and please feel free to provide constructive feedback!



The Formula For Anti-Capitalist Concern-Trolling

Then economists ... commenced worrying about, to name a few of the pessimisms concerning “capitalism” they discerned: greed, alienation, racial impurity, workers’ lack of bargaining strength, workers’ bad taste in consumption, immigration of lesser breeds, monopoly, unemployment, business cycles, increasing returns, externalities, under-consumption, monopolistic competition, separation of ownership from control, lack of planning, post-War stagnation, investment spillovers, unbalanced growth, dual labor markets, capital insufficiency, peasant irrationality, capital-market imperfections, public choice, missing markets, informational asymmetry, third-world exploitation, advertising, regulatory capture, free riding, low-level traps, middle-level traps, path dependency, lack of competitiveness, consumerism, consumption externalities, irrationality, hyperbolic discounting, too big to fail, environmental degradation, underpaying of care, slower growth, and more.

... [The formula is this:] First, discover or rediscover a necessary condition for perfect competition or a perfect world (in Piketty’s case, for example, a more perfect equality of income).

Then assert without evidence but with suitable mathematical ornamentation that the condition might be imperfectly realized or the world might not develop in a perfect way.

Then conclude with a flourish that “capitalism” is doomed unless experts intervene with a sweet use of the monopoly of violence in government to implement anti-trust against malefactors of great wealth, or subsidies to diminishing-returns industries, or foreign aid to perfectly honest governments, or money for obviously infant industries, or the nudging of sadly childlike consumers, or, Piketty says, a tax on inequality-causing capital worldwide.

From McCloskey in a long, but inspired and genius, review of Piketty; lightly edited for brevity from the original at http://ejpe.org/pdf/7-2-art-4.pdf.

UPDATE (also lightly edited):

One begins to suspect that the typical leftist starts with a root conviction that capitalism is seriously defective. The conviction is acquired at age 16 when he discovers poverty but has no intellectual tools to understand its source.

Then the lifelong “good social democrat”, in order to support the now deep-rooted conviction, looks around when he has become a professional economist for any qualitative indication that in some imagined world the conviction would be true, without bothering to attach numbers drawn from our own world.

It is the utopianism of good-hearted leftward folk who say, “Surely this wretched society, in which some people are richer and more powerful than others, can be greatly improved. We can do much, much better!” The utopianism springs from the logic of stage theories, conceived in the eighteenth century as a tool with which to fight traditional society.



Conspicuous *Production*: "Sexy" Work, "Schlep" Work, Automation, and Artisans

People who seek sexy work are often members of what I called the Jeffersonian middle class in an earlier post -- motivated by creative self-expression and a sense of personal dignity rather than economic survival.

... Sexy work is attractive to those who like their social identity to be harmoniously integrated within itself (what your mom thinks of you and what your boss thinks of you are not in conflict) and with your private identity (you don’t feel misunderstood). There is consensual external validation of your internal sense of self-worth. You feel authentic.

Sexy work is easy to enjoy, learn, value and integrate into your identity, primarily because it is downhill psychological work: it is the cognitive equivalent of muscular atrophy. You have to choose to make it hard for yourself. You can cash out some status and attention even if you’re not making any money. It does not test your sense of self-worth significantly.

Schlep work has the opposite characteristics along all four vectors. It is harder to enjoy, learn, value and integrate into your identity, primarily because it is uphill psychological work for a social species. It is hard whether or not you want it to be. It is hard to cash out status and attention even if you’re making good money. It tests your sense of self-worth every day.

Somehow, over the past decade, we’ve gone from a useful heuristic (“focus on your strengths” and “find flow”) down a slippery slope of use-with-caution ideas (“work smart, not hard” and “follow your passion”) to the idea of work as a kind of consumption that should be chosen based on the pleasure one can derive from it.

Sexy/schleppy is to my mind, the most natural way to break down human preferences for work. They arise from fundamental desires and aversions. In choosing consumption behaviors or conspicuous production, we tend to feed desires and starve aversions. In schleppy work, we do the opposite: we defer gratification and accept, even seek out, a degree of pain based on the no-pain-no-gain heuristic. A little nudge from a plausible “play to your strengths” philosophy is enough for us to choose the easier way.

Unfortunately, the entire current conversation around work is confused because we prefer a less meaningful distinction, creative vs. uncreative.

Via You Are Not an Artisan.


Burning Responses

Imagine a hypothetical YouTube where the videographer burns a Koran and urinates on the ashes. We in the modern West consider this kind of thing an act of free speech.

Would that act be offensive to Muslims? Absolutely. It be offensive to Jews if it were a Torah. It would be offensive to Christians if it were a Bible. It would be offensive to United States patriots if it were the Constitution.

Do Jews, Christians, or United States patriots use that kind of speech as a pretext to riot or murder? If so, would their violence be met with sympathy from the West? No, no, and no. Burning a Koran, and reactions thereto, should be no different.

But here's the thing: you feel *safe* when you criticize Jews, Christians, and United States patriots, because you know they don't consider it acceptable to do violence in response to offensive speech. You *don't* feel safe when it comes to Muslims, because you know there is a non-trivial number of them who *do* consider it acceptable, even a requirement, to do violence in response to offensive speech.

The vast majority of Muslims reading this are civilized, and recognize that violence is not a civilized response to offensive speech. But there are some Muslims, and their sympathizers, who believe that offensive speech must be answered with violence, and who will use offensive speech as a pretext for riot and murder. The behavior is uncivilized, premodern, and barbaric, and should be recognized as such.


Cafe Coca and Snake Eyes

Cafe Coca from De-Phazz (YouTube) samples some movie lines at about the 2:00 mark:

And in the end we'll meet in one of the seven circles.
And I'll be there for not doing what I could to help you.
And you'll be there for doing what you could to stop me.
You'll blow my brains out.

It always stuck with me, and after some searching it appears to come from a 1993 movie called "Dangerous Game" or "Snake Eyes." Google revealed it from Subzin.


The Varieties of Scientific Experience

I liked this mostly because it exposes a lot of "fans of science" as mostly tribal, not as actual adherents to a methodology or approach. The varieties are:

- Science as Method

- Science as Production and Stewardship

- Science as Authority

- Science as Belonging

- Science as “Progress”

- Science as Aesthetic

- Science as Dispassionate Sensibility

- Science as Nihilism

- Non-Experience of Science

Via The Varieties of Scientific Experience.



MVC and ADR are User-Interface Patterns, Not Application Architectures

N.b.: I am the author of the Action-Domain-Responder paper referenced in this article.

In his post on MVC alternatives (including Action-Domain-Responder), Anthony Ferrara makes a claim that is central to his discussion. While I agree with much he says in that and related articles, I believe that one claim is in error, and while it does not discredit the essay as a whole, replacing the erroneous claim with a more accurate one gives the essay a different flavor.

The central mistake I think Anthony makes is near the end of his post, where he states (in talking about MVC, ADR, et al.) that “All Pretend To Be Application Architectures.” That assertion strikes me as incorrect.

While it may be that developers using MVC may mistakenly think of MVC as an application architecture, the pattern description itself makes no such claim. Indeed, Fowler categorizes MVC as a “Web Presentation Pattern” and not as an “Application Architecture” per se.

Sure, MVC is described in book called “Patterns of Enterprise Application Architecture”, but MVC itself is a presentation pattern within an application architecture. Here’s another example of the distinction: we would not call “Table Data Gateway” an application architecture, even though it too appears in the same book. It is a data source pattern within an application architecture.

Fowler's categorization and description of MVC define it pretty clearly as a user interface pattern. ADR, as a refinement of MVC, is likewise a user interface pattern. Neither is an application architecture in and of itself, although they are the outermost part of an application architecture. So when Anthony’s article states elsewhere that ADR’s “coupling to HTTP that it becomes difficult to make a non-HTTP interface” my response is “Well, obviously – it’s a user interface pattern centered around HTTP.”

Anthony then goes on to say:

And that’s the biggest reason all of these “patterns”, “architectures” and “concepts” are a bad joke. They solve the easy problem, and throw the hard problem over the fence.

MVC, ADR, et al., solve a user-interface problem. That may be an easy problem for Anthony to solve, but to say that user-interface patterns “throw the hard problem over the fence” strikes me as starting from the wrong set of expectations. MVC and ADR, as user-interface patterns, aren’t supposed to be dealing with core business logic in the first place.

It might be better to say that the underlying application that is presented through the user interface is not really the user interface’s problem in the first place. The user interface code probably should not care too much about the internal operation of the underlying application code. If it does, then the application code is bubbling up too far into the user interface.

In summary, I think the assertion that “All Pretend To Be Application Architectures” is just not an accurate categorization. It would more correct to say that “All Are User Interface Patterns, Not Entire Application Architectures” – or, even better, that “Developers Frequently Misunderstand Them To Be Application Architectures”.