I have a class that does two things: downloads a call recording as an MP3 from Twilio and then re-uploads it to Amazon S3 for permanent storage. This scenario happens frequently, and I wanted to be able to test it without actually making a real HTTP request from Twilio or to Amazon S3. In this [...]
2018 Resolutions
From where I sit now, 2018 is shaping up to be a great year, both personally and professionally. I have a few resolutions and goals I wanted to jot down so I can see if I actually accomplished them in 2018. Less Photos of My Children I want to take (and share) less photos of [...]
Generating Custom Sequences in Postgres
Postgres, unlike MySQL, uses sequences for auto-incrementing IDs. It's a very powerful feature, and gives you a lot of control over how to store a primary key. But say you want to generate a unique value for a field in a table, only this value is visible to the end user, and always increments by a [...]
Shoe Dog
I picked up the book Shoe Dog by Phil Knight near the end of 2016. I had seen it in bookstores, but ignored it until Bill Gates said it was one of the best books he had read all year. Shoe Dog chronicles the rise and many near-falls of Nike. The book takes you from [...]
Day at the Cabin
My family and I spent the day at my in-laws cabin. It's a relatively remote cabin backed by a large forest and several ponds for fishing. It's only 75 minutes outside of Dallas, yet provides a great escape from the world for a day. My boys haven't stopped talking about it and can't wait to [...]
Unit Testing Your Service Layer is a Waste of Time
Writing unit tests for your application’s service layer is a waste of your time and won’t strengthen your application any better than functional tests would. Writing functional tests that thoroughly test your application does what it says it will do correctly is a much better use of your resources. I first learned about test driven [...]
I Am a Great Programmer, But Horrible At Algorithms
This is an old post written in February 2013 and published my old blog. I am publishing it here because it resonated with the community when it was first posted. The basic idea continues to flourish with the rise of sites like rejected.us and Max Howell’s very popular tweet. I am a great programmer, but [...]
Application Scalability Has Evolved
This is an old post written in November 2012 and published my old blog. I am publishing it here because I believe most of the thoughts presented have become true. We have Vagrant and Docker for fast onboarding, modern frameworks allow applications to be built very rapidly, the rise of continuous integration tools proves rapid [...]
Customizing the precision in percent formatting in Sonata IntlBundle
By default, the number_format_percent macro in the Sonata IntlBundle formats numbers without a decimal fraction. For example, if the value passed to it is .1240, the resulting formatted string will be "12%". If you want to add additional levels of precision, you can customize it with the fraction_digits argument like this: {{ .1240|number_format_percent({'fraction_digits': 2}) }} [...]