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 care. 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.
I 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?
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”.
Google’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 neverdothat.
Enough joking aside, let me show you how I programmed it!
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.
While 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.
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.
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.
At 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.