...

/

Antipattern: Making Bricks Without Straw

Antipattern: Making Bricks Without Straw

Let's discuss the bad habits that lead to the See No Evil antipattern.

Developers commonly practice the See No Evil antipattern in two forms: first, ignoring the return values of a database API, and second, reading fragments of SQL code interspersed with application code. In both cases, developers fail to use information that is readily available to them.

Diagnoses without diagnostics

Let’s take a look at the code below:

<?php
$pdo = new PDO("mysql:dbname=test;host=db.example.com",
"dbuser",
...