I ran across something in a work project where I was required to convert all times stored in UTC to the client’s local time zone. All of the PHP solutions involved multiple lines of code involved the DateTime and DateTimeZone classes, so in order to simplify that, I came up with the following: $formatUTCDateTime = […]
Author Archives: erikd
I ran into a case where I had to get the string representation of a constant based only on its value, so a little digging around and some experimentation produced this: const MY_CONSTANT = 1; // get constant name by value $class = new ReflectionClass(‘MyClassName’); $constants = array_flip($class->getConstants()); echo $constants; // output is “MY_CONSTANT” If […]
I ran across this gem tonight while trying to figure out why Visual Studio 2010 has crashed on me ten times in under an hour. The discussion is primarily focused on the compatibility of the AnhkSVN SCC pluin, albeit with a few side tangents. It was the last comment, however, which made the hours of […]
I captured a rather embarrassing performance earlier today during our town’s Independence Day parade. You can find the original YouTube posting here.
Greetings. I’ve finally committed to something I’ve wanted to do for a long time; write about what I love to do. And what I love to do is develop software. To me, “coding”, “programming”, and “developing” are three entirely different approaches to what are fundamentally all the same task. The difference lies in the attitude […]