Php

Lone Star PHP 2015: Day 0

Published: April 27, 2015

The first day of Lone Star 2015 was devoted to training. The workshop track I took was geared towards unit testing. Getting Started with PHPUnit - Matt Frost - Twitter: @shrtwhitebldguy - Slides One reason I took this workshop was so that I could become more familiar with mocks. I had a mental block when it comes to mocks and…

Read more...

Bite of PHP: Heredoc vs. Nowdoc

Published: April 23, 2015

Heredoc Heredoc will define a string of text in a what-you-see-is-what-you-mean type of format. So, if you want to echo out structured text, like so: text I think that I Shall never pay As much as I Have for 2015-04-23 You would put it in a heredoc like this: php $today = date('Y-m-d'); $poem = <<<HTML I think that I…

Read more...

Bite of PHP: Double vs Single Quote Echo

Published: March 04, 2015

In PHP, we have two ways of formatting an echo statement: we can choose to use single-quotes or double-quotes. The choice is less dependent upon which side of the Atlantic we learned to read and more dependent upon what we hope to accomplish with echoing that string. If you want to echo the string without parsing it, use single-quotes. If…

Read more...

A TDD Fizzbuzz Kata

Published: December 22, 2014

Kata Kata are a series of movements which, when repeated, migrate mindful action into muscle memory. An example kata is performed by Rika Usami of Japan during the 2012 World Karate Championship in Paris. Kata can be thought of in terms of playing an instrument or a craft. During the warmup before a concert, listen to the musicians. They are…

Read more...

Lone Star PHP Conference 2014

Published: May 06, 2014

I was fortunate to receive a scholarship to attend the 2014 Lone Star PHP Conference in Addison, TX (Dallas metro area) over the April last weekend in April. I just had to get myself there. Thank you, Lone Star PHP and NomadPHP! I enjoyed meeting some of the luminaries of the PHP Renaissance, meeting some of the local PHP aficionados,…

Read more...

Atom.io - a PHP-Oriented Review

Published: April 08, 2014

Last week, I gave a short demo of the Atom.io text editor to the Kansas City PHP User Group. I realized after-the-fact that I had presented the early-release as an IDE, when I should have presented it as a fancy text-editor. Coming from using PHPStorm as my primary PHP IDE, Atom seems like a cute, yet unintelligent cousin. I tried…

Read more...

Python Timing Comparison

Published: October 01, 2011

On page 7 of Learning Python (4th ed), Mark Lutz briefly discusses the speed differences between Python and compiled languages like C++. I was curious as to how much slower an interpreted language is than a compiled language. To illustrate this, I whipped up a quick and simple program that exercises the CPU so I can see the difference —…

Read more...