Recently, I’ve finally started digging into Laravel 6.x. The simplicity and straightforward nature of the framework has been a welcome relief, although as such with any new framework, information can be piecemeal and scattered. After setting up a few sample projects, this is what I’ve come up with to scaffold and setup a simple Laravel […]
Author Archives: erikd
Quick conversion from UTC to local time in PHP
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 = […]
Convert a constant value to its string name in PHP
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[1]; // output is “MY_CONSTANT” If […]
A Diamond in the Rough? In a sense…
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 […]
Senet 1.0
I’ve been experimenting with the CraftyJS JavaScript game framework lately, and I’m happy to announce my first complete game: Senet. Senet is an ancient Egyptian game whose rules are the subject of some debate. A homebrew version for the Wii exists, but it’s somewhat incomplete and riddled with bugs. This version was born out of […]
4th of July Lassoing Demonstration FAIL
I captured a rather embarrassing performance earlier today during our town’s Independence Day parade. You can find the original YouTube posting here.
public string helloWorld();
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 […]