Charlotte’s progress at Nature’s Classroom Montessori School

Charlotte lining up the seats and her brother
Charlotte lining up the seats and her brother

Kym and I recently attended Charlotte’s parent/teacher conference at Nature’s Classroom Montessori School.  Charlotte is doing well in school and we couldn’t be happier.  She is struggling with attention and has a unique way of learning something new.  When I observed her I noted down that she seemed to glance at another child and “seemed lost”.

Continue reading “Charlotte’s progress at Nature’s Classroom Montessori School”

How to integrate reCAPTCHA with Zend Framework 1.12

I’m not a robot – Google’s reCAPTCHA 2.0

captchaGoogle’s new reCAPTCHA has been released to the wild.  At LPi I had to integrate the customer’s forms to allow for this option for integration.  We use Zend Framework 1.12 for our applications.  ZF1 comes with an integration for recaptcha 1.0 but nothing for recaptcha 2.0.

It was a bit of a challenge to get the captcha working, but I think it will leave a lasting impression for those with Zend Framework 1.12 versions.  It should be written in a well documented manner and in a way that is easily changeable if Google decides to change their API or terminate a service… but they would never do that.

Enough joking aside, let me show you how I programmed it!

Continue reading “How to integrate reCAPTCHA with Zend Framework 1.12″

Resigning from a great team

Goodbye Liturgical Publications…

Sad LPi

This is bitter-sweet, and I don’t usually make such a cliché oxymoron, but it is hard not to when it’s true.  I have worked with LPi since July 2014 and was hired on by Aaron Saray.

I have met some awesome people at LPi and hope to stay in touch with them whenever possible.  Here is a short list of what I think are some positive contributions I’ve made while at LPi.

Continue reading “Resigning from a great team”

Upgrading from Zend 1.12.7 to Zend 1.12.9

Zend released 1.12.9 a bit ago.  At work I started looking into how to upgrade to the recent framework to keep as current as possible but still ran into some pitfalls when trying to follow the documentation for upgrading.

Zend Framework 1.12.8+ introduces some backwards compatibility issues and it isn’t documented too well (don’t even get me started on introducing BC in a minor version).  I was able to upgrade LPi’s product by making some minor changes.  Zend mentions:


#418 can introduce potential BC breaks in the presence of complex SQL statements (for instance using SQL sub-functions). To fix this, use Zend_Db_Expr in group(), order(), or from() method calls.


That is a little confusing for me without examples.

Continue reading “Upgrading from Zend 1.12.7 to Zend 1.12.9″

How to profile and debug PHP with XDebug

RSS bugWhile working help desk tickets with LPi, there was a show stopper that came across one of our products.  PHP was causing our flagship product to crash the server! As I started flowcharting out the issue it was becoming clear that I would need to profile with Xdebug to properly debug the issue in our application.  Our flagship product is a multi-tenant application responsible for serving half a million visitors a month.  At the time of writing this, it all runs on a single instance.  This was my first time using Xdebug’s profiler to do serious debugging work.  Read on and I’ll tell you how I did it and the lessons I learned.

Continue reading “How to profile and debug PHP with XDebug”

Making Home Made Pasta with Charlotte

Learning by doing

The Smiths love pasta.  I think it goes back to growing up in a family of nine and having several pounds of it made for dinner to feed the hungry clan.  Pasta somehow changed my DNA and now Charlotte possesses that gluten loving, carb-fueled, Italian gene.  Now our family of four can demolish a full pound of pasta in one sitting, and Henry doesn’t eat pasta yet.  We have not reached the four pounds that Grandma Zignego makes but I wouldn’t mind if we did.  I love making pasta and enjoy that my daughter can learn how to make pasta by doing it with me.

Continue reading “Making Home Made Pasta with Charlotte”

Refactoring legacy PHP code

Spaghetti Code - John Trainer Flicker
‘Spaghetti Code’ cc John Trainor – flickr

Spaghetti code is frightening, but it is something that we all have hanging out there on the Internet that our 14 year old self would be amazed by.  Spaghetti code is technically known as legacy code.  I struggled with refactoring a larger application I did into a MVC architecture.  It was about half of a million lines of PHP code.  Refactoring it was an uphill battle and was well worth it.  Wanting to call it quits was tempting and now I can share with you pitfalls and strategies to use when evaluating your next project.  I’ll go through the steps and thought process I had when it came to refactoring my PHP application.

Continue reading “Refactoring legacy PHP code”

REST route with Zend Framework 1

Rest Route with Zend Framework 1At LPi I was in charge of programming a REST server that would communicate with our internal data source.  I was under the requirement of using Zend Framework 1 as the REST server – which isn’t ideal but it is workable!  Building a rest route with Zend should be easy – but again… this is utilizing Zend Framework 1.  This post details out to utilize a rest route in Zend 1.

The original thinking for the routing was to pass it to Zend\Controller\Router\Regex.  Now I must admit, it seemed elegant at first… the fallacy in using regex becomes clear as the project begins to grow with more and more routes.

The API can adapt quickly and should have an elegant way to use RESTful resources.  Introducing a simple Rest Route modification.  It quickly checks the method before loading the rest of the application in.

Continue reading “REST route with Zend Framework 1″

Baby sign language for Henry

Today, Henry is a little over eight months and signed his first word clearly.  “Milk” is now signed clearly!  A child grows at an extraordinary rate within their first year and language is one of those growth areas.

Henry signs milkYouTube of Henry signing

Kym and I started signing with our first, Charlotte.  Charlotte took to signing two months earlier than Henry and still signs at the age of three.  As with most things in life when your child finally grasps a concept you have been showing them.  You have to expose that “A-hah!” moment and take advantage as much as possible.  We are now teaching Henry Mom, Dad, Eat, Diaper and other basic baby signs.

Continue reading “Baby sign language for Henry”

PHP ecommerce integration for The Elegant Farmer

PHP ecommerce integration and The Elegant Farmer’s Apple Pie Baked in a Paper Bag.  A match made in heaven allowed this brick and mortar store to expand its ecommerce operations.  Their crisp apples, crunchy topping, and sugary crust will make your mouth water! I’m not a food editor by any means but I know good food when I taste it and was able to assist them in getting online.

The Elegant Farmer is a Wisconsin based business that primarily sells pies (really good pies).  They had the unique problem of having to ship perishable pies next day air, packed with ice, to customers so wonderful pies would not be ruined by mother nature.  The farmer’s paired up with a fulfilment center and me to connect the two systems and make them “talk” – if you will.

The original ecommerce system was Squirrel Cart.  I wrote a cron script that would query the MySQL database for orders and submit them to the fulfilment center in a specified format.  After the fulfilment center completed their processing they would keep a semi-colon delimited file on their FTP server to be fetched and parsed to retrieve the tracking information for the orders.

The code was written fairly modular.  When The Elegant Farmer switched the ecommerce platform to Open Cart I made a few modifications to the script to make it work.


The Elegant Farmer was able to lower their pricing by half and made their tens of orders rise to hundreds of orders.  The Elegant Farmer’s success allowed them to invest more time into increasing their products listed online.


With any PHP ecommerce integration there are some challenges.  The challenge in this instance came down to getting the proper file formatting to the fulfilment center.  I encountered other challenges when I was trying to migrate to a different ecommerce solution but they were mainly data challenges.

I learned a lot about this project while doing it and will be contributing a PHP ecommerce plugin for several different commerce systems in the near future.  This plugin is aimed at connecting stores to other fulfilment centers.