Running PHP on the Command Line

I’ve been exploring PHP recently and wanted to test some simple code in the PHP interactive shell. I was puzzled to find that I couldn’t seem to make anything work in the shell – I could enter commands, but didn’t see any output from them. You can run php interactively by entering “php -a” in

Fixing “Verification Failed” errors in Google Search Console

Recently I set up my WordPress site as a “property” in Google Search Console. It was fun (and informative!) to watch the “position” feature in search analytics, listing what search terms found my page and what position each hit was in the search results (for a few results, the position of one of my posts

Update: WordPress in the Age of Hackers

It’s now the fourth month that the CuriousProg.com website has been up and running and the suspected attacks continue. I wrote in the original post about attempts to compromise the security of the site. There were a number of distinct types of attacks that I had seen: Attempts to log in to the WordPress dashboard

Bringing Up a WordPress Site in the Age of Hackers

Imagine if people walking by on your street walked up to your house and tried the door handle – several times a day! That’s the situation on the Internet in the year 2017. It’s very likely that hackers will start scanning and probing your website within hours of first creating it – even before you’ve

Python Immutability for Collection-Typed Attributes

I came across a situation recently where I wanted to preserve the immutability of lists of data that were being returned from a Python class. I held an implicit assumption that nothing in the code would change the content of the lists. But nothing enforced this assumption in the code, and the logic in the

Python: Old versus New Class Declaration

As a followup to my post on Checking Python Code with Pylint, here’s a look at what the effect is of using “new style” vs “old style” declaration when defining classes in Python. The ‘pylint’ checking tool for python complains that the “old style” class declaration is a “coding violation”. The sample code here declares