Camping with Charlotte and Henry

Charlotte biking by Crystal Lake in Rhinelander, WI
Charlotte biking by Crystal Lake in Rhinelander, WI

Charlotte loved camping in Rhinelander.  Henry enjoyed his time eating nature.  He eventually learned that nature belongs on the ground – not in his mouth.  Only a few leaves and rocks made their happy journey to the digestive system.  An unforgettable experience for the leaves, rocks, and Henry.  An unforgettable experience for all of us.  It is amazing how nature and being away from home tends to do that.

Continue reading “Camping with Charlotte and Henry”

Vagrant/Ansible causing ‘Too many authentication failures’

You might run into an SSH error that seems vague.  Here is the error

SSH Error: Received disconnect from 192.168.56.120: 2: Too many authentication failures for vagrant while connecting to 192.168.56.120:22

Your error will vary on port and IP address but it is all the same.  Here is how you fix it.

Create a file called `ansible.cfg` in the same directory as your Vagrantfile. Add the following to the ansible.cfg file:

[ssh_connection]
ssh_args = -o IdentitiesOnly=yes

That is it.  Now when you run `vagrant provision` you will see that Ansible has the correct settings to connect to the VM and provision the box.  You won’t need to do this when Vagrant 1.7.3 is released because they addressed this issue in the code.

Update 5/28/2015:

I found that making this small change allows host keys to also be checked.  Definitely a RTFM moment.  Still waiting for the 1.7.3 release to assist with too many identities.

ansible.host_key_checking = true

Hiking with Sir Henry

Henry explored John Muir in the Southern Kettle Moraine recently.  Don’t worry, we didn’t just let him crawl around out there.  He doesn’t have the same fear of grass that Charlotte did at that age.  He really enjoyed being hauled around on Kym’s back through the trails.  I also noticed that he signs when he is hitch-hiking a ride.  Typically he is signing milk, sometimes I wish I could read his mind.  Although if I read his mind he would probably just be saying: “I want milk, I want milk, I want milk…”, so maybe there is nothing of interest at this point.

We purchased an Osprey Poco Plus and have been testing it out for our planned camping trip through Canada, Maine, Connecticut, and Maryland.  The child carrier makes it easier to get out and exercise with the kids while distributing the weight well.  Charlotte is able to fit in it as well, but we will reserve that for when her legs don’t want to hike anymore.  She is happy to run along the trail and explore as much as possible.  Most of the time hopping on rocks and touching trees.

Mother Nature has this magnificent way to keep children fascinated, active, and immediately put them to sleep when they get back in the car.  I am somewhat envious of the controlled-narcoleptic hypnotism that she can cast on children at will.  The best way for Henry or Charlotte to nap or sleep is to take a walk or hike outside shortly before nap time or bed time and then it is lights out.  Unfortunately, all too often mother nature’s spell works on children at heart as well.

 

How to refactor a house of cards

Shuffling Cards - WikiMedia CommonsI was recently brought on board to assist in refactoring a legacy PHP application.  I have to be honest, seeing this code base made me want to start from a clean slate.  I’ve refactored a lot of applications over the years and have never blown any of them to bits.  This one was tempting me to do that.  It is truly a house of cards.

Unfortunately, this particular code base started violating object oriented principles before the universe knew what objects were.  It is bad.  If you are in a similar situation you are wondering the same thing as I am: what do I do first without breaking this?

Continue reading “How to refactor a house of cards”

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”