Wednesday, December 30, 2015

Test Driven Design

My last post was critical of the new control language created to implement a concept called Behaviour Driven Design (BDD).

The process of creating a control language seems liberating at first because the creation process helps improve communications among the creators, but it soon becomes oppressive to those on the outside.

That criticism aside, I actually agree with many of the ideas discussed in Test Driven Design and Behaviour Driven Design.

A quality software shop tests it products thoroughly. Tests are difficult because one needs to test for both expected and unexpected conditions.

Programmers have a tendency to write programs for the way that they imagine people will use their program and fail to realize the creative things people actually do with code. The testers have to test the software for all the different permutations that might happen with the software. This means throwing invalid data at the software and even throwing malicious code at the software to see how it fares against hackers.

Imagine a simple procedure with 5 variables. The testing department has to test all the permutations of those variables.

Object Oriented Programs are even harder to test. Imagine a class with a dozen methods. The testing department needs to test all the paths through that object. 

I find that my testing scripts are generally magnitudes longer than the software itself.

New programs generally need to be tested against existing data. Which is itself a chore.

The idea behind Test Driven Design is that companies should design their tests before writing the software. This seems odd at first. But on considering the vast about of existing data laying around most companies have a good idea about the software will need to handle before coding begins.

Of course, building software around tests is an imbalanced approach. One needs to step back and ask fundamental questions about what the code should be doing ... the case for BDD.

But these questions are already part of the iterative design process.

Anyway, the process of getting my new web site up and running is taking an extremely long time because I am testing every single little piece of code and cranking through some really fundamental questions about the way I want the programs to behave.

Tuesday, December 29, 2015

Control Languages

I wrote this post in reply to Liz Keogh who said responded to my post on the similarities between "Behavior Driven Design" and "Behaviorism"

"BDD is merely the use of examples in conversation to illustrate the desired behaviour of a system. The approach is all about communication, and nothing to do with behaviorism.

There are some supporting tools which turn examples into automated tests, and this is what Kevin Dishman has criticised. They aren't the only tools, nor do they speak to the heart of BDD.

I think this post indicates some fundamental misunderstandings (and Kevin Dishman's post is misleadingly titled).

December 27, 2015"

The comment made me feel bad; So, I spent the morning reading reading Dan North's introduction to BDD ( In this article, Dan North says he was using an Agile method called Test Driven Design. TTD creates a barrage of tests on the logic of a system.

He was having a hard time wrapping his head around the logic of programs and decided that replacing the word "test" with "behaviour."

"I found the shift from thinking in tests to thinking in behaviour so profound that I started to refer to TDD as BDD, or behaviour- driven development."

Changing this word made Dan North feel empowered. The little switch in Mr. North's mind pushed the logic of the system back a step and gave him the feeling of control.

This is identical to what happened with Behaviorism.

Prior to behaviorism, academics held that man was a rational being. When researchers spoke of human beings, they would talk about the reasons for their actions.

Behaviorists felt uncomfortable in engaging in this discussion of reason and felt empowered when they pushed reasoning aside and decided to focus strictly on human behavior.

Behaviorists felt extremely empowered because they systematically pieced together an ideology that reduced the people around them from rational beings to test subjects ripe for experimentation.

Behaviorism quickly became a favored ideology of the ruling elite and intellectuals. When you reduce people to behaviors, you no longer feel obliged to engage with their reasoning processes. You can treat them as sets of behaviors.

North's works seems to take on a Chomskian flare. Changing a word made him feel better; So he jumped in to create a new language and that made him feel even more empowered.

Dan North is openly admitting that he created BDD as a control language.

I admit, I like to feel in control. So, I would like to ask you a simple question: Is my organizing a department so that I feel empowered really the best course for a company or for society at large?

If I told you that; you would probably look at me and say: No way! I don't want to be subservient to you!

IMHO, development should start with the questions about what is best for the business and what is best for society at large.

Come on, if a business isn't actually improving things for its customers or for society, should it really be in business?

But, lets get back to Dan North.

Mr. North is writing in 2003. If I take his article as if it were the first article ever written on business communications. Then, yes, it sounds wonderful. But it wasn't the first article on communication. People have been yakking on and on about the best way to organize things since antiquity.

The things we have today were built on things from the past.

Dan North was working on, what was then, a relatively new idea called Test Driven Development which was created to overcome perceived faults in Object-Oriented Analysis, which was created to overcome problems of procedural design, which was created to over problems with control structures in basic programming languages which were designed to overcome the vagaries of assembly language which was created to piece together ideas about algorithms and Boolean Logic with computer circuitry. These ideas, in turn were built on ideas dating centuries before.

Needless to say, there are huge volumes of work on system design. One can't just jump in and say: "Oh wow, this idea makes me feel empowered and go it with."

One actually has to ask if this path is taking a better route than the millions of routes tried and followed before.

It is fun to say: "Dan North is just trying to improve communication by creating a new language."

Stepping back, one has to ask: are our communication problems the result of lack of language? There's over a million words in the English language. The language includes tried and true grammatical forms. Why isn't this language good enough?

The language we have is sufficient for communication. The problem is that, even with a great language, it is extremely difficult to get people do what we tell them to do.

Mr. North isn't creating a new language to communicate ideas. The purpose of this new language is to control a process.

BBD falls into a category called a control language.

This brings up a fun story.

Back in 1949, a man named George Orwell was looking at the control languages being created by behaviorists and other ideologues of his day.

The people creating the control languages felt empowered, but Orwell had the foresight to think ahead and tried to imagine what would happen to the people who inherited a world controlled by the new control languages.

Orwell decided to write a piece of speculative fiction about the people who inherited a control language that he called "newspeak" that took place 40 years in the future. He called the book "1984."

The idea of a control language is not new. Orwell wrote about this very subject 70 years ago. I agree with him. Control languages seem empowering at first but entrap the people who become ensnared in the newspaek.

The idead of creating languages to control processes or people is not a new idea.

The issue of the proper use of language has raged since the invention of language itself.

The proper use of language was a prime topic of Socrates through Aristotle. This tradition created an education based on a thing called the "Trivium." The three legs of classical education were Grammar, Logic and Rhetoric.

Grammar studies the structure of language. Logic is about the structure of ideas. Rhetoric is the art of successfully communicating ideas.

The whole point of classical education was to teach students how to develop and communicate their ideas. Dan North is not the first person on the planet to think that language is about communicating ideas.

I find the Trivium to be relevant in programming. For that matter, I would say that the best way to organize software education would be to revive the Trivium.

So, lets look at computer science:

There are many different computer languages that have similar functions. The syntax of these languages maps to grammar. What the computers actually do is called logic. The way we talk about computers is rhetoric.

Interestingly, the heart of Aristotle's logic is a strange thing called a "syllogism." To cut to the chase, an "if/then" statement is a form of the syllogism. Boolean Logic is a subset of classical logic written in symbols for easy manipulation.

We need to be able to talk about computer design. This talking about design maps to rhetoric.

All of the little tricks we pull on our coworkers to win the battle of ideas fall under the guise of rhetoric.

This whole thing we call computer science is very much a natural development from the discourses Aristotle that took place a few millenniums back.

The computer sitting on your desk top is essentially doing what scholastic monks were trying to do in the Middle Ages. Computers are trying to make sense out of an endless stream of syllogisms.

The book "Aristotle's Children" is a fun read showing hows societies blossom when the people embrace logic and how societies falter when power brokers first try to control the use of logic and are later compelled to stamp out reason.

This cycle of reason blossoming and being suppressed by man's innate desire to control others has been repeated time and time again in history.

Orwell's generation was the generation that removed logic from our primary school curriculum as politicians sought the creation of new control based languages. (The left, the right and this thing called ISIS in the Middle East all use control based languages to consolidate power).

So, let's look at the removal of logic from the curriculum.

Anyway, the Trivium formed the heart of education from Aristotle up until the early 1900s.

We had a education which focused primarily on teaching people how to develop and communicate ideas.

The problem is that people who learn to develope and communicate ideas tend to become unruly.

Seriously, people who are skilled at reasoning start to realize that the ideas coming from the king are no better than those from the learned pauper. Even worse, since they can communicate, their discontent with being ruled can spread.

In 1776, there was an event in which classically trained thinkers in the colonies had the temerity to up and rebel against their beloved king! (gasp)

It happened again in France a few years later! (gasp, gasp).

I don't want to get into that spectacle beyond saying that people who learn to reason will question their leaders and become unruly.

After the horrific events of the American and French Revolution, the ruling class retreated into its ivory halls to address the question: How does one reign in all these unruly people?

If language and logic are the source or rebellion, one must create new languages and new logic to reign the people in!

These new creations were called "ideologies." The new ideologies generally feature some form of "modern logic" coupled with some form of control language.

BDD seems to fit this pattern called "ideology." The people who push it seem to fit to a model called "ideologue."

Historically, one of the first new ideologies was created by King William IV and Sir Robert Peel (1778-1850). It is called "conservatism." The century saw a ton of other control languages and logics including socialism, modern liberalism, capitalism, progressivism, etc..

What the ruling class did was truly clever. Both the Left and Right are based on the essentially the same structure. Rule by George Bush and rule by Barrack Obama both result in centralization and a growing state of individual disenfranchisement.

There's not just one ideology based on the modern form. There's hundreds and many of the ideologies re-inforce each other.

Behaviorism is really just one of a whole class of ideologies that feature a control language and new logic. Behaviorism is often applied in political science where political decide on a desired outcome then set in on manipulating the people until they achieve their outcome.

The US Founders dreamed of a society where people, trained in classical logic controlled their government. The removal of logic from the curriculum flipped the switch and we now have a ruling class set on manipulating the people.

After reading North's work, It is clear that BDD shares both a name and structure with this an other ideologies.

As for the need to create a new language, I contend the existing languages work quite well.

Creating a newspeak to reign in software design is likely to make communication harder in the long run as each little fiefdom develops its own newspeak.

I would encourage anyone confronted with BBD at work to resist.

If you really want to learn to communicate, I suggest reading "The Art of Thinking" (aka The Port Royal Logic) written by Antoine Arnauld in 1662 before inventing a new language.

Sunday, December 27, 2015

I Don't Need sqlLoop

What was I thinking?

Yesterday I introduced a new function called sqlLoop().

I can do everything in sqlLoop() with repeated calls to sqlRow().

sqlRow() works as follows. If it is successful, it returns an array full of data. On failure, it returns an array in which the first element is false. My loop looks like:

$row =sqlRow($sql);

while ($row[0]) {
  // process row
  $row = sqlRow(); 
The one problem with this code is that if I forget to call sqlRow() in the loop, I've created an infinite loop ... and I am very forgetful.

Hey, I have an idea.

Scrambles back to the drawing board.

If you call sqlRow('chk') then the function returns true if the row exists and false if it doesn't. It maintains a counter to that breaks the loop.
$row =sqlRow($sql);

while (sqlRow(DB_CHK)) {
  // process row
  $row = sqlRow(); 
The first form is faster, the second protects from infinite loops. I will put this new code up in a minute.

Saturday, December 26, 2015

The Bug is with the User and Not the Program

This just in: The program does not have a bug. The problem is the user. Here is the bug report. The response is simply that I need to learn to program.

The exact bug I reported was that, on my system, the PDOStatement::fetch(PDO::FETCH_NUM) command returns an array when called on its own, but it returns an incomplete string when called in a foreach loop. PHP's documentation states the function always returns an array and that foreach loop is the preferred method for looping through output.

The program does not do what their examples and their documentation claims.

This is the classic definition of a bug.

Now that the bug report has been rejected, I feel free to solve the problem my way.

I've worked with dozens of SQL drivers over the years. Long ago I realized that a SQL driver needs to do things. One needs to be able to take data out and put data back in.

Now, the very first thing that I do when I encounter a new database driver is to create my own wrapper for the driver. I usually call the program that sends SQL commands to the database execSQL(). I usually create two programs to pull data out of the database which I call sqlValue(), and sqlRow().

As the name imply, sqlValue() pulls a single value from the database with a command like:

$user_nm = sqlValue('SELECT user_name FROM User_Table WHERE user_id = :user_id);

I never liked the mysql_ or the mysqli_ family of programs because they are vendor specific. So, I simply wrapped the vendor specific programs with my programs.

Now, I am not as pigheaded as you might imagine. I strongly believe in following industry standards. I was ready to abandon my tried and true approach for the new Object-Oriented way.

But I have yet to see anything which is as robust as my little database functions.

So, what I decided to do over Christmas was to give up on the "object oriented" way and revive the tried and true style of accessing data with simple functions.

I did make one huge leap forward in the way that I loop through database tables, which I will get to after discussing loops.

So, I would like you to take a moment and consider the while loop.

The loop has the form:

While condition is true perform an action.

The condition is a statement that evaluates to true or false. If you have a condition that is always false, you will never see the inside of the loop. If a condition is always true, the loop will run until some one or something kills the job.

Now, lets consider the following PHP Code which loops through an array:

$arr = array('a','b','c','d');
$cnt = 0;
while ($val = $arr[$cnt++]) {
  echo 'Line '.$cnt.' is '.$val.'';
In the conditional part of the statement. The program attempts to pull an item from the array. If the assignment succeeds, the system reports true and the loop continues. When the assignment fails, the system throws an error and the computer pops out of the loop.

That is a very ugly way to handle a loop.

The foreach loop implements an idea called "traversable." It is functionally the same as the while loop, but captures the error more elegantly.

$arr = array('a','b','c','d');
foreach ($arr as $val) {
  echo 'The value of this object is '.$val.'
  if ($cnt++>100) break;
In a superficial way, the foreach loop appears more elegant. As my experience of this last moth shows, the condition for breaking out of the loop is dependent a weird thing called "traversable".

The problem in both the first and second loop is that we are trying to use the code that assigns the value as the condition for the loop.

The form of a while loop should be: "while condition perform action." This next example shows a better form for the while loop:

$arr = array('a','b','c','d');
$cnt = 0;
while (isset($arr[$cnt])) {
  $val = $arr[$cnt];
  echo 'Line '.$cnt.' is '.$val.'';

The function isset() cleanly evaluates to true or false. It returns true for offsets 0 thru 4 and fails on 5; popping us out of the loop.

Looping with sqlRow()

I decided I wanted to improve the looping with sqlRow(); So, I updated the program to work as follows.
If you call the function as sqlRow($sql,$arr), with $sql containing a SQL statement and $arr being an array of parameters. The program will fetch a row with that statement. If you call sqlRow() with no parameters; it returns a row from the last result set. If you call it with the option DB_CHK; the program returns a true/false statement.

A loop works as follows:
$sql = 'SELECT a bunch of data FROM Table WHERE id = ?';
$arr = [$id];  // arr contains a bound array with the variables for the SQL
$row = sqlRow($sql, $arr);  // get the first row.
while (sqlRow(DB_CHK)) {
  // process data in $row
  $row = sqlRow();  // get the next row.

The big trick in the code above is that I pass the $row parameter by reference.

Creating the first row outside the loop seems awkward at first. However, it is useful when producing tables, lists and other HTML elements. You want to know if you have any data before creating the table as in the following example:

$sql = 'SELECT list_data FROM Table WHERE id = ?';
$arr = [$id];  // arr contains a bound array with the variables for the SQL
$row = sqlRow($sql, $arr);  // get the first row.
if (sqlRow(DB_CHK)) {
  echo '<ul class="ulclass" >';  // open Ordered List
  $closeUL = '</ul>';
} else {
  $closeUL = '';
while (sqlRow(DB_CHK)) {
  // process data in $row
  $row = sqlRow();  // get the next row.
echo closeUL;
You don't want to print the UL tags if there is no data.
I put the pre-alpha version of the code in my code viewer. The code has passed my initial tests on this and a few other servers. I will start writing code with sqlLoop() tomorrow.

Wednesday, December 23, 2015

The Best Way to Connect to the Database

I've been thinking about writing an article on the best way to connect a web server to the database.

I can't write this article because, for some unknown reason, I cannot get PDO to work on PHP7. I've completely removed and reinstalled PHP a half dozen times and it simply doesn't work.

I've spent more time battling PDO than I've spent battling any piece of software in my life.

I've had inconsistent results with PDO on every server that I've encountered. There is something seriously wrong with PDO.

Since I can't get PDO to work with SQLite3. I decided to install PostgreSQL.

I didn't want to install the full application on my account. So, I Googled "postgresql hosting" and found someone reselling Amazon Web Services.

ADVERTISEMENT: You can get access to free (but limited) database hosting with Amazon Web Services. NOTE: This link sets an affiliate cookie. I might get a commission on sales. Of course, you are buying something for $0; So, my commission won't actually be anything, but at least it is a sale. It is better to get a commission on nothing than to not get a commission on anything ... or something like that.

If you don't want to go through my affiliate link, you can just type in your browser.

You can sign up for a PostgreSQL or other database. It will create a and user for you. You can then install the PostgreSQL client on your web server (or home computer) and start accessing the database.

On Ubuntu, you install the postgresql client with the command "sudo apt-get install postgresql-client".

After installing the client, you can access your Amazon hosted database from the command line with psql.

It was like  magic. I was able to create and update tables on the Amazon server.

The next step is to connect PosgreSQL with php. There are different modules for different databases. I installed the module for PHP7.0 with the command "sudo apt-get install  php7.0-pgsql"

And ... it doesn't work. I can query the database, but I am unable to modify the database with the PDOStatement->execute() command.

Anyway, as soon as I figure out how to get PDO to work on PHP 7.0. I am going to write that article on the short comings of PDO.

Unfortunately, I can't write that article until I get the damn thing to work.

Although I am frustrated to no end with PDO, I love having a free database on Here is the affiliate link for those of you who skipped the advertisemnet: Amazon Web Services

Tuesday, December 22, 2015

SQLite3 Object

I feel like the biggest dolt in the world.

Apparently, PHP has a SQLite3 Class that is similar to PDO. The documentation does not say it works in PHP7, but first tests indicate that it can connect to the database.

I thought PHP had deprecated all of the database functions and wanted universal usage of PDO.  The inability of PDO to fetch SQL queries had effectively turned my new domain into nothing but an expensive Boggle Server.

The SQLite3 Class is significantly different than PDO. For example, you can't just send it an array of data, you actually have to bind variables to make it work right.

The class has different function names and might have a slightly different work flow than PDO.

The class might be sufficient for my needs; so I will start developing with it ... keeping in mind that PHP is likely to deprecate the object in a future release.


Never mind. The SQLite3 Class isn't working either. There are too many goofy things with this object. For example, the query() and execute() functions return different types of objects, the big kicker, you can't use bound variables for queries ... which was the whole purpose of moving from functions to objects.

Monday, December 21, 2015

Boggle Server

I've been staring at an expensive Boggle Server for the last several days and feeling like a dope.

I can't do anything with my web site migration until I figure out the PDO fetch problem. So, I've spent the last several days playing Boggle over SSH trying to figure out how I can get the site running.

Anyway, I decided, after long hours of torment, that I would file a bug report. It bug report 71185. I suspect it will be summarily dismissed, but It will be interesting to watch the rejection process as I master typing short words on my Boggle Server.

Sunday, December 20, 2015

SQLite3 Drivers?

I finally figured out the cause of the mysterious PHP problem that has stopped me dead in my tracks.

My problem is that the command PDOStatment::fetch(PDO::FETCH_NUM) is returning a string instead of an array.

Apparently, this is what happened:

The SQL standard (which was established before PHP was a twinkle in Lerdorf's eye) return strings that the receiving program must parse.

The RDMS companies that courted PHP in the early days wrote drivers that presented the data in a more efficient manner.

Big companies, like Microsoft and Oracle, are always happy to provide drivers as the drivers create a dependency on their products.

SQLite is an open source, "zero configuration", standards based program which is designed to be embedded in other applications. The term "zero configuration" means that SQLite does not design drivers. I want to emphasize the term "embedded." SQLite hands you their code and you actually embed it in your program; so there is no driver.

Anyway, the problem I am experiencing today appears to be a repeat of a bug reported experienced in 2008.

If you read the report, the PHP programmers say that this problem is the fault of the drivers between PHP and the database. (The drivers take the standards based output and put it in a form more to the liking of PHP).

SQLite is standards based and embedded. SQLite has no drivers. In the SQLite paradigm, SQLite presents source code to the world. Companies like PHP can compile it into their program ... the catch is that it is the responsibility of the company embedding SQLite to make the driver work.

This error is actually quite humorous. This grand PHP PDO object (which is supposed to be the crown jewel of the new PHP) can't handle standards based output.

PDO has a dependency injection. The PDO object is dependent on the external driver written by large firms like Oracle and Microsoft.

I know that it will be auto rejected, but, I am seriously considering writing up a bug report on this issue, but I think I will try a twitter poll first.

Saturday, December 19, 2015

Repeating Mistakes from Philosophy into Code

There is an interesting trend. The academic community takes popular ideas from philosophy and tries to impose them on computer engineering.

Behaviorism is a weird ideology that appeared last century that de-emphasized individual reason in the study of human behavior in favor of the idea that man is simply driven by impulse.

Historically, Behaviorism played a role in the decision to remove logic from the curriculum last century.

Apparently there is a new buzzword in soft ware design called BDD (Behavior-Driven-Development)  that is becoming popular in agile design circles. I've been reading buzzword rich articles trying to sell this technology.

It appears that the goal of BDD is to create a group-think approach to software development that creates something called "Domain Specific Languages" that spews out code.

Kevin Dishman wrote a blog post called BDDont questioning BDD as a design tool.

I want to applaud Mr. Dishman for standing up and calling out this technology.

The ideology of Behaviorism has not improve society.

Ideas from behaviorism have influenced both the left and right, and we see that many politicians and people are making their decisions based on impulse and are not reasoning through ideas.

How can we reason through ideas if we never learned logic?

What we have now is a political system with media feeding us an unending stream of images which cause impulses which then cause us to vote and tweet in predictable ways.

The factions in our political system use Domain Specific Languages. The result of removing the study of logic from schools and emphasizing behaviorism is that the people at large have become tied up in factions and cannot communicate with each other.

Personally, if I was working for a company that tried to impose BDD, I would probably just leave. But, you know, the imposition of BDD in the work force creates a situation where one can actually measure the results of development driven by a group-think process to ones in which individuals engage in reason.

The latter, reason, produces better results than group think. I hope Mr. Dishman keeps up his scrutiny.

After Hours of Debugging I Discovered This

Two days wasted. I've been running the following code on PHP verion ""
  $sql = 'SELECT id, test_nm FROM Test_File LIMIT 3';

  $db = new PDO('sqlite:/var/www/db/main.db');
  $stmt = $db->prepare($sql);
  $row = array(1,2,3);
  echo gettype($row).'</ br>';
  // This reports row is an array.

  foreach ($stmt->fetch(PDO::FETCH_NUM) as $row) {
    echo 'This should be an array it is a '.gettype($row).'.
    // this reports that row is a string.
This is the result of the query on my server:
The PDO::fetch() directive on this version of PHP returns a string. The description on PHP.NET says: "PDO::FETCH_NUM: returns an array indexed by column number as returned in your result set, starting at column 0"

I got my compiled version of PHP from I guess I am stuck waiting for Ondřej Surý to update this package to PHP 7.0.1 to figure out if this bug is related to something I did or this version.
This failure brings me back the the question: Are objects superior to procedures? Here is an object a production version of PPP 7 causing total failure in the system I am trying to port to PHP 7.

This particular failure took several additional hours to debug because I assumed that the problem was something to do with the path I took through the object. It didn't even dawn on me to actually check the type of the data coming out of PDO::fetch() as the manual said it was an array.

NOTE: A 2008 bug report says the problem is with the database driver and not PHP:

Thursday, December 17, 2015

Expanding Source Files

The first version of my source code viewer had a fatal flaw: It could only display one file at a time.

When I code, I usually break things up into several files.

I don't want to open every file; So, I took advantage of the fact that PHP has two ways into include a file: include() and require(). The code viewer will put a link to the code if included with include(). If I use require() it will include the code from the required file in line and light up the line with a purple background.

You can expand and hide the required code by clicking on the line.

As mentioned in the last post. I am trying to write this program in vim and vim is driving me batty.

I wanted the program to include the files with a recursive call. But something wasn't working.

I took the low road and wrote the code so that it buffers the code from the various files and re-orders them the way I like.

Anyway, this exercise of writing a program in vim was very useful as it showed me how the tools one uses to write code affects the code.

Here is the current version of the code viewer:

Hmm, I just tried saving this post by hitting esc and typing :w. I appear to have gone off the deep end.

Tuesday, December 15, 2015

Source Code Viewer

I wrote a Source Code Viewer.

There are two things behind this project. The first was the practical problem. I was cutting and copying code for display on my site and I accidentally added errors to the code.

Since my goal is to discuss working code, why not just pull the code from my site?

The second thing. I was playing with the vim text editor that comes with Linux and I wanted to see if I could just sit down and write a program in vim.

Now, I admit, I had become accustomed to the advance code editing features of the WYSIWYG Notepad++ editor. So, I wanted to prove that I could write code in another editor.

By default the code viewer shows the code I wrote to make the code viewer. Unfortunately, this particular piece of code is a big funky as I haven't figured out how to efficiently move text around with vim. In Notepad++, I just highlight it with the mouse, copy and paste. In vim one has to switch modes, yank and move.

I think it is good to periodically switch environments as it forces a rethinking of basics.

My Source Code Viewer lets me display the actual source code of my new site online. It pulls the code from production directory with file_get_contents() and highlights the different parts of the code with bright colors for easy reading.

Currently the code only shows two programs. I will add more as I start porting my sites to this new server. You can comment on the project below or on the Discus Forum.

Sunday, December 13, 2015

PHP PDO Wrapper (Pre Release)

I dread writing this post and keep putting it off, but I have to get it out of the way before completing my web site upgrade.

After experimenting with dozens of different designs, I decided that the best way to handle PDO database connection in PHP is to encapsulate the PDO object in a procedure.

The Design Pattern crowd labels this approach an anti-pattern and a dependency injection.

The two pieces of code that I am publishing are: A notification which I am calling msgNote and a procedure that encapsulates the PDO connection called dbMain().

Together these two programs have 200 lines of code ... a third of the lines are comments.

WARNING: This morning I decided to change the error handing on dbMain(). I have not tested the program fully. Expect dbMain() to change as I run it through tests on this, my test server.

The program is in a test phase. I welcome comments on this page or on my disqus widget.

Thursday, December 10, 2015

Trump and other forms of Low Quality Discourse

The "Trump equal Hitler" campaign has been in the works for the last several months.

The campaign hit with such a fervor last week that I finally relented and looked up the incindiary remark that Trump made to throw the campaign into full swing. Here is the video:

What Trump said is that we should block Muslims from entering the country until congress debates the issue and finds out what is going on. He then cites sonm reports with troubling polls which indicates a troubling amount of radicalization within the immigrant community.

Technically this is a call for debate. Using a bombastic sound bite to start a debate is a rhetorical style. In Marxian theory, it is called a Praxis. Bernie Sanders often lets loose with bombastic statements.

The big question here is if Trump follows through with a quality debate or not.

I admit, I have a certain amount of empathy for Trump on this issue. I spent a solid six years trying to find a group within 500 miles of Salt Lake willing to talk about free market health care reform.

I finally gave up. Not being able to find people willing to talk about the issue devasted me. I don't mind losing debates. Not being able to find people brave enough to discuss free market health care reform completely floored me.

We, as a society, have lost the ability to discuss issues.

Come on world. The United States is in a horrible situation. The Obama Adminstration passed the most intrusive health care legislation in American history and no-one is willing to discuss the mathematics of health care.

In the Bush Adminstratioin, our president invaded Iraq before asking the fundamental question: Is the Islamic world open to Western ideas about democracy.

Bush simply assumed that the people in Iraq were yearning for freedom and would automatically take to the idea of electing their leaders. The actual experience was that tribal warlords set in on each other seeking political dominance.

It is naive to believe that all religions on this world share the same ideals about governmance as Christianity.

From its inception, Christianity drew a distinction between the secular and sacred. The New Testament holds that Jesus Christ was far more interested in individual ethics and the after life than in worldly power. Jesus surrendered unto Caesar what was Caesar's. The message was about individual salvation than a quest for power.

Politicians love to cross the line between Church and State. The core theology of Christianity holds the sacred, which deals with the eternal, is of a higher rhealm than the secular which deals with the politics of day to day life.

Not all religions make the same division.

To the world's misfortune, the political impulse is for people and groups to grab for all the power that they can get. Notably, in the Roman Empire, the Caesar set himself up as a god.

One finds many religions with a close tie in between the political structure and religion.

Western history shows politicians (in both the clergy and state) eager to jump across the division between the secular and sacred to grab power.

Of particular interest in the English speaking world: King Henry VIII set up the monarch as the head of both church and state.

The American Experiment in secularism wasn't just a political argument. It was a combined political and theological argument. It is an argument that assumes that both political and religious leaders are supportive of secularism.

The truth is that the politically ambitious use whatever is at hand to take and consolidate power.

I live in Utah which is dominated by Mormons. Mormonism is a religion created in the United States. While most contemporary Mormons support a strong separation between Church and State, when one looks at the history of this American born religion one finds politically ambitious people in the movement seeking to establish a theocracy. (Eg, an LDS Prophet named James Strang declared himself king. One can find references of Brigham Young attempting to establish a thing called "The Empire of Deseret" which included a good chunk of Colorado and stretched Southwest to San Diego. Brigham Young held both religious and political authority.

On the otherside of the religious spectrum, most atheists support "secularism." One can find radical versions of atheism which are simply intolerant of religion. Modern atheists committed many of the worst atrocities in history in the efforts to purge religious.

The political impulse is for people to dictate their beliefs.

BTW, "secularism" itself is a paradoxical belief. The Parliament of World Religions had its conference in Salt Lake this year, giving members a chance to interface with people from different religions. Some people in the Parliament seem to be set on creating a new über-religion that incorporates elements of all religion. Is an ecumencial effort to merge all religions into some sort of super religion secular or is it a grab at power?

But that's a future debate.

The number of historical incidences where political leaders sought to use religion to gain power or for religious authorities to use political power to impose their morality exceed the incidences of people trying to separate the two.

It is naïve for the West to encourage wide scale immigration from the Islamic world without addressing the important issue of how the west will assure that the immigrants adhere to the ideals of secularism.

The bombing in Paris and attempts by Islamic groups in the Middle East and North Africa to impose Sharia Law indicate that maybe something is amiss here.

France has bent over backwards since WWII in accommodating Islam. France and Belgium seem to be having more problems with Islam than other immigrant groups.

The picture below came from wikipedia. Assuming its true, then it shows people who are not appreciative of democracy:

About Tolerance

I favor tolerance. But true tolerance must be based on understanding.

The first thing we need to know about tolerance is that tolerance is subject to the reflexive paradox:

Supressing intolerance is an act of intolerance. Yet if a society that favors tolerance fails to address intolerance, the intolerant might come to rule the day.

This is one of a myriad of paradoxes that Hegelian dialectics works upon. People, left and right, jump on the band wagon to supress Donald Trump failing to realize that the spectre of irrational group action is precisely the thing that made Trump's message so appalling.

I want to repeat my remarks above. There were people who wanted to debate whether or not Islam was open to Democratic/Secular form of government before Bush invaded Iraq. In theory, Trump thinks that we should have that debate before blindly inviting large throngs from Syria into becoming citizens of the United States.

I sincerely believe that such debates are good things. Blindly believing that Muslims are good Christians who believe in separating the sacred and secular, we should actually listen.

Many religions and ideologies seem to take well to the ideal of a secular and pluralistic society. Some do not.

Most religions present a mixed bag. Most people favor tolerance, but the politically ambitious have, throughout history, felt compelled to impose their morality on others.

As for Trump

As for my actual feelings about Trump. While I understand why he did what he did, I think his actions show that he is not in tune with the psyche of the American people and is unlikely to be an effective president.

It is infuriating that people cannot debate immigration policy in this country without being labeled racist. It is infuriating that Obama passed a healthc care bill without adequate debate. It is infuriating the Bush invaded Iraq without apropriate deliberation.

Something has happened to this country which has destroyed our ability to engage in public discourse.

Trump claimed that he simply wants Congress to debate the issue.

That's a laugh. It's been decades since Congress last engaged in a debate. Today's Congress simply a collection of individual fiefdoms full of political leaders who posture as government leaders dictate. Congress has not engaged in serious deliberation over an issue for decades.

Unfortunately, we cannot break out of our disputational malaise through bombastic statements. It has been tried again, and again and again to no avail.

There are things that the right could do to win debates, which I don't have time to develop right now. The approach Trump just tried is doomed to failure.

Trump's little soundbite was trumped by an even louder sound bite with pre-engineered campaign to project the image of Hitler on Trump and the image of the National Socialist Party on the GOP. [BTW, the Hitler campaign is rather funny. The left claims that anyone who stands against socialism is a National Socialist ... but people have such poor education these day that people fall for it.

Our inability to engage in discourse appears to be setting our society up for failure.

We've just seen terrorist attacks in Paris and San Bernardino. Rather than uniting and looking for ways to address the growing international problem if Jihad, our leadership and American press have turned into a full frontal, no-holds-barred, attack on their political enemy---the GOP.

America has lost its ability to engage in rational discourse and that does not bode well for the future.

Tuesday, December 08, 2015

Disqus Thread

I am doing a huge web redesign for Community Color and my home page. I will open source the code I write under the title The Resource Model for Web Design.

I decided to open a Disqus thread on the site in the remote chance that there are people who find PHP programming, database and web design an interesting topic.

I am blocking out the site in HTML while testing and porting the code to PHP7.

I admit, there is a political aim to the site. I want to encourage PHP programmers to resist the dictates of the design pattern crowd.

Saturday, December 05, 2015

Hello You Silly Person

NOTE: I finally got PHP7 installed and working from Apache2.

I logged into the server as "root" and ran all of the scripts without "sudo."

there is not supposed to be a "root" user on Ubuntu; my web host created one so the administration of their VPS servers would be consistent.

Anyway, they are going to send me to Ubuntu Hell for logging in as a superuser, but maybe I am already there.

I've been working my web server configuration.

For those of you who think I am too stupid to get PHP 7 installed on a server, I posted the image above to prove that I got the program installed. This little command line program executes the phpversion() command and tells me that it's version 7.0.
I am smart enough to get PHP on the server. I am just not smart enough to get the web server to run the blazing script.

I can't officially write a hello world because the flappin' program can only talk to me.

BTW, I realized I probably made a mistake installing Ubuntu. The Ubuntu world seems driven by the idea that installing programs is all about the installation script.

The site AskUbuntu says that, since PHP7 was just released on Dec 3, we shouldn't expect a Ubuntu script for quite sometime. It sounds like it might be a couple of months.

I've been reading web pages about all of the different install scripts and forks of install scripts that people have made for this release. The idea that we can maintain web servers through magic scripts by third parties is even more confusing than the idea of just learning to read and directly edit configuration files.

The command line tells me that PHP is working. I now just need to figure out what I need to do to apache2 so that it can find and execute the programs.

I did learn one thing today. Apparently, admins were adding the line:

AddHandler application/x-httpd-php .php? 

to their Apache configuration file; so that php would run on various php extensions and that script-kiddies would upload files with the a name like "image.php.png" The upload program would think this a harmless image. Apache2 would see that it matches the AddHandler pattern and execute the malicious code in the file.

Anyway, all the nice little scripts by ubuntu are fun. In the long run, I still think it best to figure out the configuration files and to learn what programs do what on the web server.

I am just wondering how much longer it will take before I get this server ready. I need to find a page that tells me all the pieces that need to be in place for apache to run php on scripts and I can't find a good resource.

Thursday, December 03, 2015

On the Makers of Refugees

Last month, I wrote a long post on the refugee problem.

The post started with the observation that refugees tend to dislike the tyrants who made them refugees and refugees tend to become staunch advocates of liberty and are prone to be hawkish on the needs for strong national defense on seeing what happens when a nation fails to defend its people.

A general rule of thumb is that if the west treats refugees well, the refugees will develop into advocates for a free society.

That said, it is possible that a refugee group itself has been radicalized.

The attacks in Paris prove that some immigrants to France have been radicalized.

When discussing refugees, one has to look at the particular refugees and there has to be a dialog about the long term effects of the refugees.

I suspect that, on the large, the people made refugee by ISIS will be staunchly against radical Islam.

Since the Syrian refugees have personal stories about the horrors of radical Islam, it is highly likely that they could help stem within the existing Islamic community in the West.

To assure that the refugees will be a positive influence, our nation needs to scrutinize the refugees.

Here lies the problem. The activist roots of our current president raises question as to whether or not the administration would engage in the proper scrutiny of the refugees.

Obama's treatment of the San Bernardino shows a president who is more interested in attacking his political opponents at home than in defending our nation against terrorist threats. Obama did not wait to find out information about the shooter before shooting off attacks of his political opponents.

The San Bernardino attacks followed shortly after similar attacks in Paris, yet the president is so blinded by his partisan views that he was out agitating against domestic rivals before intelligence on the shootings were available.

A community activist, by definition, is a person who activates a group of people against the activist's enemies. So, while we are looking at refugees who are likely to become allies in the struggle against radical Islam, we can't be sure that our activist president will not, himself, seek to activate the refugees in his political.

This political style of Obama makes claims like Mike Savage's accusation that Obama is Building and Seeing a Refugee Army within the United States plausible.

Ann Coulter points out at that a disproportionate number of the mass killings in the US seem have been committed by immigrants.  There a great deal of documentation showing that there has been efforts to radicalize immigrant communities.

In conclusion, if handled properly, the Syrians refugees could help stem radicalization in the Islamic community by telling people the horrors that drove them into exile from the Islamic State.

In practice there is very little reason to believe that the current administration will handle the acceptance of refugees properly.

The ideologies in place in the US and Europe may have created a climate where the influx of refugees will destabilize nations and lead to even more horrors and refugees.

San Bern(uh)dino

There was a mass shooting yesterday in San Bernardino.

Before the bodies were cold, President Obama rushed to the nearest microphone and began agitating against his political enemies and campaigning for new regulations.

There were hundreds of thousands of comments and retweets on the mispelled hashtag #SanBernadino ... most were from people who were simply trying to spin a sensational event to their political bent.

Many of the tweets asked why becoming so violent. Favorite answers included the Tea Party, the NRA, the GOP and Christianity.

Having invested a great deal of time into studying the history of logic, I suspect that the reason we are becoming more violent is the result of the way that we are taught in school.

Back in college, my dream was to become a high school math teacher. I attended the education department of the University of Utah back in the 1980s.

This department, and other departments across the nation, were teaching an activist model for education. Paulo Freire's "Pedagogy of the Oppressed" was a primary text along with Plato's and Marx's "Manifesto."

A primary theme of Freire is that education is a praxis in the social revolution. We were given assignments in which we were asked how to organize a classroom around the ideal of a social praxis.

I was horrified by what they were teaching. Having studied the history of math and logic, I realized that they were teaching the same ideology that had taken Europe by storm before World War II. Back in the 1980s, I said that if we organize education this way, we will end up with a violent society.

The professors at the U were so upset at my challenging their authority that they flunked me out. I flunked three classes in one quarter, destroying any attempt I could make at pursuing a career in teaching.

My distaste of activist education is so strong, that I was willing to stand against authority and have my career destroyed by taking the stand.

An activist education teaches us that the society progresses though social conflict and that the activist teacher needs to prepare students through propaganda and by organizing the students against the enemies of the party.

Activism can be effective in bringing a party to power. Activism can help a partisan group put down its enemies.

The problem with an activist education is that it destroys people's ability to communicate and can even destroy their ability to reason.

Back in the 1980s (and even today) my ideals about math education is that the goal of a math teacher is to teach mathematics. A good math teacher might delve into the history and conflicts which have taken place in mathematics and logic, but should stay away from the political.

The hope behind this form of education is that students who have a firm grip of mathematics might be better equipped to handle the challenges they face in life.

Truthfully, I've become even firmer in this stance.

Freire drove the ideas that schooling should be seen as a praxis.

The term "praxis," in the Marxian school of thought, is an action taken to realize a philosophy.

Many of the mass shootings that we see today seem to follow a pattern of a Marxian praxis.

The Colorado Springs shooting was done by a man upset at Planned Parenthood's selling baby parts. He killed some people at random and said the selling of baby parts must stop at his arrest.

This is a praxis. It is a classic praxis.

This is what Paulo Friere was teaching should be fundamental to education!!!!

Thirty years ago when I was flunked out of the University of Utah, my complaint was that education theory which had swept the nation would lead to a populace that was unable to engage in discourse and that was likely to engage in violence.

Today we have a president who was weened on the Alinsky style of community organization. The fact that Obama was using the shooting to agitate for political change before we even knew the name of the suspect in the shootings shows that the ideals of activism are fully in play in our nation ...

... and, as I feared in the 1980s, we are becoming a violent society as result.


Now, I need to point out something that is extremely scary.

The education we receive in school affects both the left and the right.

The Right Wing Conservatism that we see today shares the same foundational philosophy as the left.

I've attended Tea Party meetings and Conservative rallies in which the organizers are repeating exactly the same methodology that occurred on the left.

So, we are seeing an unprecedented amount of agititation coming from both sides of the political fence and are seeing fewer and fewer public figures effectively engaged in discourse.

The reason that this is happening is because our schools have been using the activist model.

There were over three hundred thousand posts and retweets with the misspelled hashtag #sanbernadino before the police released the names of the shooter. My tumblr feed was polluted with activist messages using the shooting to attack their enemies.

The activist education that we received in school is destroying our ability to engage in discourse. Unfortunately, it has affected the right as deeply as the left giving us no where to turn.

Tuesday, December 01, 2015

On Aiming a Canonical

I accomplished less than I wanted to today. I spent most the day researching SSL Certificates, then installed one on

If I did everything right, the SSL version of the page should no longer issue warnings about the site. Please drop a note if it does not.

Switching to https also meant I had to add an "s" to inbound links so that people will go to the SSL version.

When there are more than one version of a page online, Google suggests adding a "rel/canonical" tag to let search engines know which page to index. The tag on should look like this <link rel="canonical" href="" />

Now, I tend to have typos when I type URLS.

While trying to figure out how to text the links, I discovered that FireFox has greatly improved its view source program. If you are in a web browser, you can right click in the page and select "View Source" from the menu.

The View Source Page highlights all of the links including the link in the rel/canonical tag. The best part of FireFox's View Source is that you can follow the links and verify that they work.

If you are a web developer, it is to browse through view source and check all of the links on the page. IMHO a good web developer should spend a good portion of the day checking out HTML code in view source. This is a topic I will address in my upcoming web tutorial.

Sunday, November 29, 2015

Resource Model for Web Design

Well folks. Today I am launching a major rewrite of all of my web sites. I am developing an approach to program which I will call The Resource Model for Web Design.

In this project I will gradually open source the code for several web sites. (I am waiting for the production release of PHP 7.0 before doing so. A primary theme is handling the PDO object).

There is a reason why I started the project, which I will also get into later.

The first step of the project is to create a streamlined responsive splash page.

I wanted to get more done today, but, alas I am forced to spend the rest of the night engaged in family obligations. So, one single splash page is all you get for now.

You can follow the status of the project on the Record of Revision Page, which only has one entry at the moment. My goal in this project is to use a minimalist approach to both the HTML and PHP coding.

I am waiting for the release of PHP 7.0 before adding PHP code. The Splash Page is HTML only. Feel free to view the source and leave comments.

Wednesday, November 25, 2015

Tales and Broken Links

Looks like the DNS propagation is complete. the domain now points to a  cloud base host using SSD drives ... a big improvement in speed.

I am moving files one by one to the new host and most of the links are broken.

The files are some fun short stories I wrote back in 2000 to test different web authoring tools.

Brain Washing is the tale of an apprentice janitor that I wrote in college.

The Ballad of the EcoRustlers  is a silly sci-fi story. The EcoRustlers have 'trodes that stimulate neural activity. You plug them into a cow. When the cows are legally sentient, the 'trodes register the cows with the Social Security Office and you can't butcher them. Chad is the hero trying to save the herd from the EcoRustlers.

The Detectometer is another scifi skit in which police detectives have been replace by robots. An old time detective is sitting at the crime scene and eating donuts and solves a crime that baffled the computer.

They were fun stories to write. I stopped writing fiction, as I live in Utah where people prefer to live fiction than read fiction.

Tuesday, November 24, 2015

Web Site Changes

PHP 7 will be released soon.

I decided to use this major upgrade as an opportunity to complete rework my web presence and move  my domains to new servers. is offering cloud based hosting using SSD disks. SSD drives are substantially faster than hard disks. The pricing for the SSD Cloud starts at $5/month. Being a cloud account, you can add disk space, CPU power and bandwidth.

The catch of VPS is that their managed services are quite expensive; So, I am breaking out my old Linux manuals and trying to figure out how to install and configure web servers.

The first domain I am moving is I am moving things over file by file. Because I want to see how the service behaves, I initiated the DNS move before I moved all the files. (Sorry about any broken links you experience.)

This subdomain ( is hosted by blogspot. So, it should not break as I break the primary domain of the site.

Sunday, November 22, 2015

Subdomain v. Subdirectories

A site called currently has the top spot in Google for the topic of Sub-domain v. Sub-directory.

Apparently people at Moz site obsess over SEO and getting that precious top spot in google appeases their egos.

That an SEO obsessed group accomplished an SEO goal does not mean that the group has the best answer to this question.

I dislike SEO, I think people should develop the navigation of their websites to the benefit of people and not to the vagaries of a search engine.

IMHO, one should consider user experience before thinking about search engines.

Subdomains are extremely effective in conveying information about the structure or content of a site. I opt to use subdomains when I want to communication information about the structure of an organization, or to communicate primary information about the structure of a site.

As the subdomain appears before the domain name, they are useful for people who access your site by typing the URL in the address bar.

Likewise, it is also easier to get people to link to content differentiated by a subdomain than by a sub-directory. I find it easier to get someone to link to than

When a site uses different language, I find it more effective to communicate this a subdomain than subdirectory. I prefer and to and

Efforts to market to different areas is usually best done with subdomains. For example, in the Arizona Color project has different directories for different counties, eg is for Tucson, is for Flagstaff, etc..

I think it best to communicate different administrative functions with subdomains. The url does a better job conveying that you are at a help desk than as the name of the department comes first.

When different parts of a web project have radically different structures, I prefer to convey this with a subdomain. For example, blogs are collections of free form essays organized by date. I like to keep the blog in its own subdomain, ie

When properly developed a blog should be part of a social media effort and not part of a primary site. Ideally, one should have a social media group running the blog and not an SEO expert.

People should come first and search engines second.

Most of the large blog services these days include social marketing services. If I were in charge of the social media of a company, I would maintain a blog on each of the popular blog services and use the blogs specifically to interface with the people using the services.

I point the subdomain to blogspot. Google users can follow the blog. If I were smart, I would spend time engaging with folllowers.

I point the subdomain to a tumblr web site. If I were a social media aficionado, I would be actively engaging people one tumblr with that blog. ( is a better example. This subdomain is simply about interfacing with people who photograph the Grand Canyon State.).

In conclusion, I think that web designers who are interested in interacting with people and the market should make use of subdomains in their over all structure. Subdomains are extremely effective at communicating administrative functions or for helping sites engage in social media efforts where contact with people is more important than SEO.

Sunday, November 15, 2015

I Did Not Believe It Possible, but Democrats have gotten worse

I did not believe it was possible, but the Democratic Party actually managed to get worse in the last few years.

Old people like me can remember Bill Clinton's second term. During his second term, Clinton moved toward the center and things started getting better.

I was hoping that Democratic Candidates, wanting to distance themselves from Obama's failures, would start looking to centrist solutions or even start considering free market solutions to our economic malaise.

Instead we see the half witted Bernie Sanders repeating the tired old rhetoric of Lenin and Mao 

Rather than seeking a common ground with the people of this nation, the Democratic Debate last night showed a ruling elite that's become even more isolated and detached from reality and the economic needs of the people.

The people are not in need of more government buildings, regulations and bureaucrats. The people need real economic opportunities.

One does not create economic opportunity through greater economic centralization.

Political and economic centralization was the driving theme of the three candidates.

For example, Hillary Clinton advocated limiting the role that state's play in health care because she hates the governor of Iowa.

The Democratic Candidates believe that raising the minimum wage will some how solve the problem of chronic unemployment. (Hint, raising the base cost of labor will make it harder to hire people and increase chronic unemployment.)

The debaters want us to believe that socialism is something new and untried.

When will the people of this nation realize that socialism is the tired old ideology that has failed the people of this world time and time again?

The ideals of freedom advocated by the founders and advanced in the early days the US are the shining ideas that can lead to widespread prosperity.

Socialism is a failed ideology. Socialism traces to an ideology created by King Frederic the Great called "enlightened absolutism." Enlightened Socialism is a reformulation of an ideology called "The Divine Right of Kings."

The basic idea of King Frederic was the monarchy (ie the state) was the driving force of economics and that society could achieve an egalitarian utopia through political centralization. Once the state achieves absolute political centralization, a social contract will form between the state and people leading to Utopian egalitarianism.

The reality of the socialist state is that the political centralization led to a state of massive disenfranchisement of the people and often leads to mass starvation. Hundreds of millions died under Lenin and Marx despite the fact that both were skilled at left wing rhetoric.

Now, I have to admit, enlightened absolutism makes for some great rhetoric. Populist political candidates have learned to use the rhetoric to make political centralization appear appealing.

But that rhetoric is false. Economic and political centralization march hand in hand. Despite promises of egalitarianism, the people in the centralized state become wealthy and those on the outside become disenfranchised both politically and economically.

I can actually prove this mathematically, but it takes a fairly large data set and time.

I was hoping that, by the end of Obama's second term, Democrats would start piecing together that the growing disparities in our culture are due to the political centralization.

But, The Democratic Party seems intent on proving that people are stupid and that left wing zealots can spend their entire life supporting an ideology of despotism while being completely unaware that the growing inequality in our nation is due to the despotism that they zealously support.

There is a small segment of the Democratic Party that holds to the ideals of liberty.

The segment is small and shrinking, but there is always a hope that it might gain influence. This segment is actually better at enabling free market reforms than the GOP.

Some readers might remember the second term of Bill Clinton's Administration.

During his second term, Clinton attempted to head toward the center and things were starting to get better as a result.

Unfortunately, the Clintons have a Marxian understanding of economics. The defining legislation of Clinton's second term was a thing called  "The Commodity Futures Modernization Act of 2000."

This act passed in a lame duck session and signed by Bill Clinton created the derivatives market that played a leading role in crashing the economy in 2006.

Karl Marx wrote a huge tome on economics called "Das Kapital."

Clinton's "Commodity and Futures Modernization Act" is counter to the economic ideals of the classical liberals who see the economic activities of individuals as the driving force in the economy, but fits, to a tee, the economic model envisioned in Das Kapital.

As Clinton proved, most people on the left have a truly twisted ideas about the free market. People with twisted ideas about the free market are incapable of enacting viable free market reform.

Clinton's Security Modernization Act created an unregulated derivatives market. The failure in Clinton's thinking is that derivatives are an anti-market contrivance which were designed by Wall Street to regulate the stock market. Deregulating derivatives created a unregulated regulator. Instead of creating economic stability, the unregulated regulator amplified economic faults and turned what should have been a minor economic correction into a catastrophic economic event.

The fact that the Bill Clinton's attempt to deregulate the derivatives market blew up in our face does not nullify the argument that Clinton's turn to the right started to improve things. Clinton simply proved that stupid ideas passed in the name of the free market are still stupid ideas.

What our nation needs at this point in history is for groups to develop reforms based on a classical liberal understand of economics.

The classical liberal idea of economics is based on the idea that individual people are the driving force of economics.

(In contrast Marx sees pools of capital as the driving economic force. BTW, a market built on the ideas of Das Kapital is called "capitalism." Marx's Capitalism is almost as bad as Marx's Communism.)

I guess this aside leads into the second great problem our nation is facing.

Conservative Republicans have become enamored with Marx's Capitalism.

Just as Clinton is incapable of passing viable free market reforms, Conservatives are incapable of defining viable economic reforms as well.

Conservatism, as I am sure you are all aware, is the ideology of the Conservative Party.

The Conservative was created by Sir Robert Pool at the request of King William IV as an effort to rebrand the Tory Party in 1831.

The Tories, as you may recall, were the people who leveled their muskets at the US Founders during the Revolutionary War.

The term "conservative" was taken from the French "conservatif" which referred to efforts to restore the French Monarchy after the Napoleonic Wars.

Watch BBC and you will see that members of the Conservative Party still proudly call themselves "Tories."

The driving goal of conservatism is to conserve the class structure of the ancient regime in an age of reform.

Conservatives captured the Republican Party in the 1960s in reaction to the Civil Rights Movement.

Conservatives tend to be driven by culture war issues and tend to be blind to the actual needs of the people.

As such, conservatives are equally incapable of enacting free market reform.

The problem with conservatism is that when we follow the economic understanding of Tories like Sean Hannity and Rupert Murdock's Fox News, we end up with Fascism which is essentially the same as socialism.

The Left/Right split has created a completely untenable political and economic situation for our nation.

So watching the leftward march of the Democrats following the failed policies of Obama has me truly worried for our nation's future.

Thursday, November 05, 2015

Mortality Rates Among the X-ed Group

The reporters on PBS News Hour seemed puzzled yesterday at reports of an increase in the mortality of middle aged white Americans without a college degree.

The report gave the ages between 45 and 54. This group roughly coincides with the group the Douglas Coupland referred to as Generation X. NOTE: The meaning of GenX changed. Coupland used it to refer to the people on the tail end of the Baby Boom ... those born between 1955-1965. The name GenX was too cool to waste on this group. Demographers now use GenX to describe those born between 1965-1980.

Coupland was dismissed as a whiner, but the group at the end of the baby boom (circa 1956 to circa 1965) was crunched by demographic trends.

People without a college education are more susceptible to negative trends. The lower economic spectrum is an indicator group.

Coupland's original thesis in "Generation X" was that the group at the tail end of the Baby boom was being crunched by demographic trends. The increase in mortality rates among this group vindicates this thesis.

That the term "Generation X" no longer refers to the group born between 1955 and 1965 but refers to the group born between 1965-1980 does not change the thesis.

Anyway, the increased mortality rate of people born on the tail end of the Babyboom was to be expected. I am not sure if it warrants much study. This same group is retiring at the tail end of the baby boom retirement. I suspect that college educated members of this X-ed group will have a higher mortality rate than the baby boomers.

Wednesday, November 04, 2015

Election 2015

The 2015 election was by mail. Being a traditionalist, I decided to put off voting until election day anyway. The news report I heard about the election said that we had to mail the ballot by 11/3.

When I went to fill out the ballot, the envelop said I had to mail the ballot prior to the 3rd.

Oops. So, made a last minute dash to the nearest polling place. The polling place was a trash can size container outside the Millcreek Police Department.

Anyway, I put my and some family member ballots into a slot on the trash can size thing ... feeling that maybe I had just thrown my vote away.

The only item on the ballot this years was a question of whether Mill Creek should be organized as a city or as a strange thing called a municipal service district with Copperton, Kearns and White City and other locations. Regardless of how I voted on this issue, a band of crooks will get their hands on tax dollars. Ironically, I decided to vote for Mill Creek to become a city because three cities would be smaller than a huge municipal district, and I like things to be small.

The second vote was about a sales tax increase to expand transportation. The ballots I put in the slot cancelled each other. One was for the increase the other against.

Quite frankly, I suspect that most of the votes from this household simply cancel out each other. Being the first election by mail in the area, this is the first time I know for certain what others voted.

Voting by mail is convenient. But I love the privacy that voting in a booth gives. If voting by mail became the norm, I fear that political bosses would start sending out activists to pressure voters.
Anyway, I put my ballot in a trash can and felt I threw my vote away. I understand that next year Salt Lake will experiment with a new liquid ballot. These we will place in a commode shaped receptacle. To vote we will pull a handle and flush.

Thursday, September 24, 2015

Rand Paul Does Not Deserve to Be on Stage

I have to confess. I've been a fan of Ron Paul for several decades and I like that Rand Paul was permitted to participate in the debate as I believe that Ron and Rand have consistently represented the ideals of the US Founders and the Party of Lincoln while most of the modern forms of Conservatism have sold out. Paleo-Cons, Neo-Cons, Dixiecrats, etc., are willing to sell out the ideals of liberty to favor their preferred institutions.

During the GOP debate, the GOP front runner Donald Trump made an astute observation: “First of all, Rand Paul shouldn’t even be on this stage, he’s number 11,” Trump said, “he’s got 1 percent in the polls."

Trump, Rand Paul and the ideals of limited government have such a poor showing in the GOP that he should not be on the podium.

Personally, I have never met a conservative who is willing to discuss much less support free market reform. GOP is the "Conservative Party." Conservatism is an ideology that started with efforts to restore the French Monarchy after Napoleon that was developed into a full ideology by the Tories in England.

Since the day that the Tory Party changed its name to the Conservative Party in 1831, Conservatives have never stood for liberty. Yes, Conservatives are prone to use free market rhetoric in elections. But Conservatives consistently pass legislation designed to favor the ruling class over the people.

The Party of Lincoln was, lke the US Founders, a group led by classical liberal ideals. The ideals of Washington, Franklin, Jefferson and Lincoln have been soundly rejected by the socialist left and conservative right.

The ideals of liberty are in the hinterlands.

Despite decades of effort. Rand Paul does not deserve a spot on the GOP podium. Just like the Party of Jefferson disappeared after it was captured by Jackson. The Party of Lincoln disappeared forever when it was captured by conservatives.

Since the ideals of our Founders have been driven out of the Democratic Party by progressives and have been driven out of the GOP by conservatives, I am left wondering if there is any platform left where the ideals of liberty can be spoken and nutured?

Sunday, July 19, 2015

Contrast v. dichotomous thinking

One of the best ways to increase understanding of a topic is to contrast ideas and approaches to a topic. To draw a contrast, one gives a name to the two approaches. This way, they can discuss the likely result of the two approaches.

When drawing a contrast, one wants to highlight differences between the items in focus so that we can better understand the difference between the two approaches.

An analogy can be found in photography. Photographers often shine lights on objects to make the object stand out. Photographers shine strong lights when they want stark contrast and diffused lights when they want soft contrast.

The fact that a photographer is shining a light on an object to take its picture does not mean that the object is the only object in the universe.

There is an unlimited number of ideas in the world meaning that there is an unlimited number of constrasts that we can draw. Even worse, there is an unlimited number of filters that we can shine on objects when we draw our contrasts.

When we are trying to draw a contrast, there is a natural tendency to present the contrast as fundamental. Again, lets imagine a wildlife photographer taking a picture of a bird in a park. Teh photographer will position the camera to ignore the telephone poles and playground equipment in the park to take a picture of the bird.

The fact that the photographer focused on the bird does not mean the playground equipment doesn't exist.

There is a great deal that we can learn by contrasting ideas. It is a mistake to treat the contrasts we draw as fundamental dichotomy.

So, I started to write a blog post about two different approaches to programming. I've hesitated to publish the post because some Nimrod out that would probably take my constrast as a fundamental dichotomy, when I am simply trying to contrast the result of different approaches to programming.

In general, I find that the process of contrasting ideas to be enlightening as the contrast helps us understand the different results from different ideas. When drawing contrasts it is helpful to shine a sharp light on the contrast. Unfortunately, when people take the sharp contrast we draw as a dichotomy, the contrast itself often become a negative, for the dichotomy causes us to lose sight of other ideas.

In my article I sought to contrast two approaches to programming: In the first approach, the programmer considers the format of the program to be of primary concern.

In the second approach, the programmer considers the data produced by the program to be of primary importance and the format of the program to be secondary.

One would suspect that concentrating on the form of the program would produce the best program.

My personal experience is that I create better programs when I concentrate on the data produced by the program than on the form of the program.

The reason for this is that the data becomes an objective measure for the quality of the form of the program.

The idea that I wish to state is that a data-centric approach to programming often produces a better result than approaches that focus primarily on the form of the program.

The reason that I want to draw this contrast is that I believe that many object oriented programmers have become too focused on the form of their programs. The end result of this obsession about form is software bloat.

NOTE: I recently bought a new laptop computer to replace my ten year old laptop computer. Although the new computer has substantially more resources and runs faster, the new software has become so bloated that the new computer is slower than the old one.

Anyway, I wish to write a series of articles that state that a good way to address the bloat of software is for programmers to concentrate more on the data produced by the software and a bit less on the form of the software.

The challenge in writing these articles is that I do not wish people to take my discussion of contrast to imply that there is some sort of fundamental dichotomy between the data centered and object oriented programming.

Tuesday, July 14, 2015

Major Web Site Rebuild

The PHP Group, which defines the PHP programming language, deprecated the mysql() function and replaced the function with the PDO object. The group has announced plans to completely remove the function in the upcoming release of PHP 7.

The mysql() function was open to SQL injection attacks. The function simply sends mysql commands from web server to the database server. Clever hackers learned that they could send code to web sites that could to break out of improperly formed SQL strings and take control of the server.

The PDO object has some additional features to fight such attacks. But if programmers fail to use the new features correctly, their scripts will still be subject to attack.
This change will force me to undergo a major rewrite of all of the programs I've written using PHP.

I've been anticipating this change for a few years. I've thrown hundreds of hours into experimenting with the new PDO object, and have yet to find a way to use the object elegantly.

I happen to be a fan of object design and I usually favor replacing functions with objects; so, I was surprised at my displeasure with the PDO object.

The problem I faced was not with the clunky object syntax in PHP. The problems I faced had to do with the scope of the objects. The mysql_query() function is a language construct and has a global scope. The PDO object only has local scope in the function that created it.

To use the PDO object one needs to either open multiple connections to the database to generate a web page. (which slows down web sites) or include in the code contortions to access the object as needed.

Whenever I have a problem with programming, my natural instinct is to assume that there is something wrong with me. I convinced myself that if I just kept reading programming manuals and online tutorials I would at some point light on an elegant way to employ the new PDO object.

Having read thousands of posts on (a popular coding site), it finally dawned on me. Perhaps the problem is not with me, but with the direction that the PHP Group is taking their product.

It appears that the group is trying to go after the enterprise development market by turning their back on their primary market which is webmasters who want to add server side features to a web site.

Now, I need to rewrite my PHP web sites in preparation for PHP 7.0. As I engage in this project, I will open source portions of the code and write articles defending the approach I am taking toward web development. The goal of the project is to create a web site designed to aid in general research ahd authorship.

Monday, June 01, 2015

A two line short story.

Clyve Groundspot studied web programming at the community college where he developed the habit of pacing back and forth while making design decisions.

On graduating he found the field crowded and competition intense; So he took a job in construction where he had a short lived career as a roofer.

The End

The moral of the story is that it is not prudent to make an impression too early in your career.

Saturday, May 02, 2015

It's Not Supposed to Make Sense

Yesterday I had a long conversation with a person who was trying to make sense of the Freddie Gray riots in Maryland and the Mike Brown riots in Ferguson. The person had moved from Baltimore to Utah in reaction to the high crime rate.

The point I tried to make in the conversation was that the political game being played between the left and right is not supposed to make sense.

The demonstrations prove that the left can get thousands of angry people marching in every state at the snap of a finger.

These protests are tempered by the fact that our Commander in Chief is a left wing community organizer.

The Alinsky model of community organization uses a network of activists and agitators to organize people into angry mobs. The community organizers occasionally flex their kollective muscle by marching mobs on the street. Scared politicians then give special favors to the people who control the machine.

The events that drive people to the street are unimportant. For that matter, community organization is most effective when the events really don't make sense.

Sadly, Mike Brown was acting like a thug on the day of his fatal encounter. Mr. Brown bullied a shop owner and was shot after bullying a police officer. Although I have a greatly concerned with the situation faced by black people in this nation, I don't find Mike Brown's case as compelling as say the case of Darien Hunt.

The Mike Brown case quickly became the catalyst for progressive protest precisely because the case was not compelling.

To understand this, one has to look back at the Alinsky Model. The Alinsky model is dependent on conservative reaction to a protest. When conservatives, and most objective viewers, look at the tape of Mike Brown robbing a store and pushing aside its owner, they see a thug. The investigation seems to show that Mr. Brown tried intimidating an officer during the arrest by taking his gun. This resulted in a fatal shooting.

Once conservatives are drawn into reaction, progressives can play off the reaction to deepen divisions.

This leads me back to an inherent problem with "conservatism."

"Conservatism" is a reactionary ideology that was created in England by the Tories in the early 1800s. Conservatives consolidate power by reacting to the actions of the progressive left.

This sets up an extremely dangerous system of action and reaction that can lead to societal break down and war.

The process of action and reaction in Europe led to two world wars in which hundreds of millions of people were killed.

The Ferguson and Baltimore riots were tempered by the fact that the Commander in Chief is a left wing community organizer who desperately wants to distance his administration from the riots.

The problem the GOP faces is that if we have a Republican who is aggressively promoting the label "conservative;" the left will be able to amplify the division until their protests are magnitudes greater than the current protests.

Progressivism had created a real problem.

IMHO, the first step to solving this problem is for Republicans to recognize "conservatism" for what it is. Conservatism is a partisan ideology developed by the Tories.  The Conservative Party was created from the Tory Party in the 1830s. English Conservatives still call themselves Tories.

The Tories were the people who fought against the American Revolution. Both the US Founders and the GOP came from the Whig Party.

The really sad truth is that the term "conservatism" was popularized during the Civil Rights Movement. The GOP deployed the term "conservative" to attract Southerners who were disaffected by the Civil Rights Movement (The Dixiecrats).

Not only does the term "conservative" come from the Tories. The term "conservative" is directly associated with negative reaction to the Civil Rights Movement.

Looking back at the 2012 primary campaign we see that GOP candidates engaged in a shrill debate about which candidate was the most severely conservative. The Republican Party then lost the election.

The term "conservative" turned millions of voters from the GOP and handed Barrack Obama a second term.

Imagine the improvement that would take place if Republican candidates wholeheartedly rejected the label "conservative" and concentrated on the ideals of the United States and the liberating aspects of the Party of Lincoln.

Distancing the GOP from the term "conservative" would reduce the ability of the left to raise people in protest and it would soften the effects of action/reaction politics that occur within the left/right split.

The GOP has married a term that no only is diametrically opposed to the ideals of the US Founders. The GOP has married a term that amplified division in Europe until Europe was ripped apart by war. The GOP has married a term that directly undermines its century old tradition of supporting civil liberties and human rights.

The GOP has married a term that drives millions of people away from the Republican Party and its vision of liberty.

The GOP has married a term that causes the GOP to lose election after election and puts our nation into the hands of the worst elements of the progressive left.

The biggest improvement that the Republican Party could make in the lead up to 2016 would be to divorce itself from a term which was coined by the Tories in an effort to rebrand the Tory Party as modern.

In conclusion. The protests in Baltimore and Ferguson make little sense to Conservatives. The idiotic decision that the GOP made in turning its back on liberating history of the Party of Lincoln to accept the ideals of the Tories makes even less sense.

Left/Right politics is absurdity on steroids.