I’ve created a tool at https://www.wimpyprogrammer.com/conditional-parser/ for analyzing conditional expressions. Here’s the story of what inspired it.
When it comes to source code control I’m a purist: I avoid storing any derived files (ex. generated CSS) or third-party code. So when I started using PuPHPet to generate Vagrant and Puppet configurations, I was dismayed by the gigantic
/puphpet/puppet/modules directory. 3,000 files totaling 5 MB?! There must be a better way.
I previously shared my experience using PuPHPet to host a Linux VM on my Windows computer for MEAN stack development. Since then I’ve made some improvements to the startup script I use to overcome Windows’s 260 character path limit, which
bower easily exceed.
During Thanksgiving Break I played the card game War with my girlfriend and remembered how wonderfully mindless it is. Because there’s no strategy or decision-making, it was feasible to write a program to play the game. Once I could simulate one game, I could simulate several and collect some statistics.
Lately I’ve been playing with Vagrant and Puppet to create virtual machines for local MEAN stack development. I quickly learned that hosting a Linux VM on a Windows host is tricky. Let’s look at the challenges and workarounds for them.
In a KnockoutJS custom binding, you may want to retrieve the name of the bound property. This usually isn’t necessary; you can reference the
valueAccessor parameter to get the bound data without knowing the property’s name. But a recent project raised the need.
The other day while working on a legacy Microsoft Access database I was reminded of how bizarre Access can be. When I ran the following query:
SELECT * FROM ([Authors]
INNER JOIN [Publications]
ON [Authors].id = Str([Publications].[authors].VALUE))
WHERE ( [Publications].[date] BETWEEN [Begin Date] AND [End Date] )
I received a peculiar error:
The SQL statement could not be executed because it contains ambiguous outer joins. To force one of the joins to be performed first, create a separate query that performs the first join and then include that query in your SQL statement.
For a query with no outer joins, this was terribly unhelpful.
observableArray. No one else has published such a binding so I’m sharing mine for others’ benefit. But beware that it may not handle every circumstance you throw at it.
I’ve always preferred to use relative file paths in my PHP INI, but ran into problems when running PHP from different directories. For example, a directive like
error_log = "../logs/php_errors.log" will resolve to different paths when invoked by
/public/index.php (e.g. Zend Framework) and
/cli-config.php (e.g. Doctrine CLI). Some INI directives can be set at runtime by our application (see PHP_INI_ALL), but many cannot. I finally found the solution with environment variables.