Paul M. Jones

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

A Peek At Aura v2: Aura.Sql and ExtendedPdo

... it turns out that merely extracting the SQL parts was not good enough for some of our audience. They asked, “Can we download just the SQL connection classes, without the query objects or the mapper?” As with Solar, we had to answer, “No; although the Aura.Sql package is independent from every other Aura package, the various SQL tools all have be taken together as a whole.”

As a result, we have done even more decoupling with the Aura.Sql-v2 packages. We have managed to make these packages independent from each other:

Aura.Sql-v2 is composed primarily of an extended PDO implementation, along with a connection manager and a bare-bones profiler. Its only dependency is the native PDO; there are no userland dependencies. As an added bonus, we have taken pains to make it PHP 5.3 compatible.

Aura.Sql_Query is a package of SELECT, INSERT, UPDATE, and DELETE query objects for MySQL, PostgreSQL, SQLite, and Microsoft SQL Server. It has no dependencies at all, not even on PDO. You build your query with the object, then pass it along to the database abstraction layer of your choice. Because it uses traits, it is for PHP 5.4 and up.

Aura.Sql_Schema comprises “list tables” and “list columns” functionality for MySQL, PostgreSQL, SQLite, and Microsoft. As with Aura.Sql-v2, its only dependency is the native PDO (note, not the Aura.Sql-v2 ExtendedPdo). Also as with Aura.Sql-v2, it is PHP 5.3 compatible.

With this dedicated effort at decoupling and true indpedendence, you can now use just the extended PDO connection object, or the query objects, or the schema discovery tools, without having to download the others. Of course, you can use them all in concert if you like.

via Aura for PHP.


Quality, Features, and Schedule

From the book Lost Moon, retitled Apollo 13 after the movie was made:

Apollo was downright dangerous. Earlier in the development and testing of the craft, the nozzle of the ship’s giant engine…shattered like a teacup when engineers tried to fire it. During a splashdown test, the heat shield of the craft had split open, causing the command module to sink like a $35 million anvil to the bottom of a factory test pool. The environmental control system had already logged 200 individual failures the spacecraft as a whole had accumulated roughly 20,000.

In January 1967, one of the first Apollo spacecraft caught fire during an on-the-ground test, killing astronauts Gus Grissom, Ed White, and Roger Chaffee. At that point, NASA decided that quality was more important than schedule and they overhauled the Apollo project (although they still managed a moon landing 2-1/2 years later).

Far too many software projects are like that. It usually takes a serious failure, one where blame cannot be shifted, for managers to realize that their schedule is unrealistic. Via Quality, Features, and Schedule | askblog.


Gay Men As "Control Group" For Feminist Dogma

From an intellectual perspective gay men allow the rest of us a “control group” of male sexuality, containing within a wide range of masculine expressions, one which refutes or repudiates a lot of the feminist sexual ideology.  After all, you can’t say “society makes straight men do this” without checking to see if society (which has mostly ignored gay men, culturally speaking, except as two-dimensional stock characters to be trotted out for laughs) also makes gay men do it, too.

Case in point: the oft-touted feminist maxim that “men only go after hot young girls because our rape-culture tells them that’s the ideal they should be shooting for.”  Feminism has always taken issue with the masculine preference for youth – and I think we all know why – but blamed it squarely on “the Patriarchy’s” efforts to take power away from older women.  If it wasn’t for our screwed-up youth-worshiping culture, the feminist myth goes, men would get just as hard over saggy tits and cottage cheese thighs as they do perky tits and a tight ass.

But if “the Patriarchy” is the one dictating what men should and shouldn't be attracted to, culturally speaking, then one must also assume that a group like Gay Men, who “the Patriarchy” has traditionally had an antipathy toward, would therefore not be subject to the same “artificial rules” that straight men are.

But it turns out gay dudes like young stuff, too.  A lot.

While the post might not be safe for work, depending on where you work, it is still very much worth reading in its entirety. Via The Red Pill Room: The Lambda Factor.


Healthcare.gov: 47 Different Contractors Built The Site?

I don’t hold it against the contractors that they had prior government experience. I don’t hold it against them that they lobby or contribute to campaigns.

To me, the scandal is that there are 47 different organizations involved in building the site. I cannot imagine that any sane project executive would want it that way. I am just guessing, but it seems more likely to me that this many contractors were imposed on the project executive because there was a requirement to “spread the work out” to keep all these companies in the politicians’ pockets.

In any case, if you are trying to fix something that was assembled by 47 different organizations….good luck with that.

Remember this story any time you think government actors (at any level!) are somehow immune to bad management practices and skewed incentives. They are no smarter, and in aggregate often dumber, than non-government actors. Via Pinpoint the Scandal | askblog.


If you inject a container into your class, you are using Service Locator, not Dependency Injection

A while ago I tweeted

ContainerAware is the new Singleton.

While many people agreed by retweeting and faving. I feel the need to elaborate some more on this statement and safe the explaination for the future.

TL;DR: No class of your application (except for factories) should know about the Dependency Injection Container (DIC).

The ContainerAware interface (actually ContainerAwareInterface, ContainerAware is a basic implementation of it) is part of the Symfony2 API, but a similar concept is known from many other frameworks and many applications rely on it. It defines only the one method setContainer(), which allows to inject the DIC into into an object so that it can directly retrieve services from it.

I wouldn't call it "the new Singleton", I'd call it "Service Location." If you use a dependency injection container inside your class to bring dependencies into the object, you are using Service Locator, not Dependency Injection. Solar used SL, but when we started Aura (a collection of truly decoupled library packages, each with no dependencies) we switched over to DI proper. Real DI has been a huge win.

Via ContainerAware Considered Harmful - Qafoo GmbH - passion for software quality.


Untangling Obamacare's Web Glitches

What the heck could be going on? My friend stated the obvious: “It's clear that they're getting more traffic than they can handle. The question is why they can't handle the traffic they're getting.” Load problems could explain servers hanging in California and New York … but the drop-downs? The standard explanation for this is “high load,” but high server loads don’t cause your security dropboxes to empty out.

“The drop-down thing is mystifying,” he told me. If federal exchanges decided to populate the security question fields by calling up a list of possible questions from another server -- one that didn’t have a lot of capacity -- then that might be causing the sign-up process to stall at that step. For an application that expects a lot of traffic, this is a very bad idea.

“Just cache them on the front ends, for heaven's sake, so you only need to ask once,” he said. “A database call to get questions shouldn't be in the critical serving path. If you're hitting the database just to load the security questions, then just serving individual pages is going to be expensive.”

The various glitches, he pointed out, “could very easily be because deadline pressure caused them to take some shortcuts that impacted their ability to scale.”

Such as?

“The aforementioned let's-hit-the-database-for-security-questions thing.”

Why would they use such a seemingly obvious poor design?

“It can be easier to make a call to another server to get something when you need it than to implement a cache that you prepopulate either from static files or from the database on startup. Making a call to another server is also something you'd naturally think to do if you hadn't had to focus on scalability before. The security question page is probably not the thing you're most concerned about, so you give it to the new hire to do as their starter project. They don't know what they're doing, so they implement it the straightforward way … and since you're under unbelievable deadline pressure to get something working now nobody reviews it in detail.”

Obviously, we don’t know if this theory is correct -- but it does fit the particulars.

Government programmers are subject to the same development pressures as the rest of us. Via Untangling Obamacare's Web Glitches - Bloomberg.


Aura for PHP: Lessons Learned, and Looking Ahead

“Libraries first” is the way to go; it imposes good discipline

Extracting is detailed work, but you get testable units

DependencyInjection is awesome …

… but in-library ServiceLocators can be useful

There are still lots of PHP 5.3 users

If you have server or session vars in your HTTP request object, it’s not an HTTP request object

Some packages are still too broad in scope

From PEAR to Composer

People love ORMs

New packages: Aura.Dispatcher, Aura.Includer, Aura.Sql_Query, and others

PHP 5.3 support in some new packages

via Aura for PHP.


Aura Framework: Stable 1.0.0 System Release

The Aura “system” package, which combines a system skeleton and the Aura libraries into a full-stack framework, was released today at 1.0.0 stable. This makes it formally ready for production use (although it has been in production use informally for the past year or so).

You can now start an Aura project with a single Composer command:

composer create-project aura/system /path/to/your/project

Take a look at the installation instructions for more information.

It feels great to have both stable, decoupled, truly independent package libraries and a system that integrates them into a framework. Many, many thanks to everyone involved who helped get us to this point.

Aura for PHP.


Aura Has New Releases: Input, Sql, and View

On the heels of last week’s slew of releases, we have three followups!

The Aura.Input package got a feature-level bump to 1.1.0, with a new FormFactory. Thanks to Hari KT for championing that one.

Aura.Sql is now at 1.3.0, due to lots of work from MAXakaWIZARD to provide SQLite- and PostgreSQL-specific query objects.

Finally, the Aura.View package got a bugfix and is now at 1.2.1; it handles content-type negotiation better for those times when there is no Accept header.

Take a look at all of the Aura packages here – each of them completely decoupled from the others, ready for you to use with no additional dependencies.

via Aura for PHP.


The Devil's Dictionary for Developers

(With apologies to Ambrose Bierce.)

bloat, bloated
One or more lines of someone else's code that do something I don't need right now. Used as a reason to write my own code.
collaboration
Other people working on my project. "I believe strongly in collaboration; other people should be helping with my projects."
fast
The performance of my favored projects. (When benchmarks show otherwise, this explains why the benchmark is skewed, measures the wrong things, or doesn't matter.)
easy
The work that other people have to do.
good coding style
The code looks and feels just as if I wrote it myself.
hard
The work that I have to do.
practical, pragmatism
Whatever is expedient at the moment, regardless of long-term considerations. "Your use of (good practice X) just isn't practical in this situation." (Note especially the appeal to absolutes instead of tradeoffs between options; as an aside: "What is 'practical' depends on what you want to practice.")
quality
The project overall is designed just as if I did it myself.
reuse
Other people using my code. "I believe strongly in reuse; stop writing your own code and use mine."
slow
The performance of projects other than my favored ones. (When benchmarks show otherwise, this explains why the benchmark is skewed, measures the wrong things, or doesn't matter.)