I go to the school of hard knocks.  Part of the reason is the pace of change in technology is so dizzying that formal education often won’t offer much as it is outdated by the time it’s become packaged and sold.  So here are some WordPress development lessons I learned the hard way, so you don’t have to!

Always back up your WordPress installs.  This can be accomplished by a plugin like BackWPUp.  Also make sure to have it do off site backups, perhaps to your Dropbox.  The reason this has become more important is malware attacks have become more rampant.  One insecure plugin or theme and your whole site could be a goner.  Also backing up the content using Tools > Export is a good way to keep the site’s content in case something happens to the entire install.

One site per server.  If you are hosting multiple sites, make sure each WordPress install is on a separate server instance (for example each one has its own cPanel).  A lot of hosts offer multi site plans and you should take advantage of these.  This way if one of your sites gets infected the infection won’t cascade to the others.

The Less WordPress plugins the better.  Every plugin can turn into an engine for malware at any moment.  The less of them you have the less likely your site will be compromised.  The ones you do have should be updated regularly.  WordPress auto updates but plugins do not.  Also be on the lookout for plugins that haven’t been updated in a while.  Googling the plugin name sometimes will give you information.

Make sure your theme is up to date.  Themes can spread malware as well.  This is particularly true with older versions of popular themes as those are the most likely worth the effort to make an exploit for.

These tips might take a little work but could be a life saver.

I own an Amazon echo and love it mostly but do have a couple things I wish they would implement:

  • Slow Voice Pickup: some people have speech impairments that would call for this.  Others like me talk too slow when we’re trying to enunciate.  Obviously this would have to be an option because making it detect slow speech would make it less quick.
  • Reprise Resume:  when listening to spoken audio content it becomes muted after the Hey Alexa call and all while you’re talking to it.  It would be nice if there was a way to resume the content at a second before you made the Hey Alexa call.  I haven’t used Audible so this may already be a thing on there but it would be nice if there was an option to make it work like this in Bluetooth mode (though I’m not sure if Bluetooth control gives you the ability to scrub what you’re playing).
  • More album navigation commands: for example if you wanted to go four tracks ahead you could say “Forward 4” or something like that and a play from the beginning command.

After searching for hours trying to figure out why the WordPress WYSIWYG code editor TinyMCE kept changing my PHP code I came upon a thread that was a somewhat helpful.   Basically it let me set TinyMCE’s configuration in the WordPress theme which is great for all kinds of things, like if you want more HTML tags in your posts.

What I needed to do however was get TinyMCE to not touch my code when it was inside PHP code or the insert_php shortcode.  To do that I had to modify the protect option in TinyMCE.  Then I had to create a JavaScript regular expression to exempt certain blocks of code from TinyMCE’s parser.  Below is the code I came up with, just add it in the functions.php section of your WordPress theme:

function schema_TinyMCE_init($in)
{
// more things modifying TinyMCE can go here

// for PHP tag and insert_php shortcode (JavaScript regular expressions)
$in['protect'] = "[
/\<\?php[\s\S]*?\?\>/g,
/\[insert_php\][\s\S]*?\[\/insert_php\]/g
]";
return $in;
}
add_filter('tiny_mce_before_init', 'schema_TinyMCE_init' );

It’s got room for improvement, the line breaks don’t always line up correctly.  For the <?php one for some reason you need to put an > on the first line.  So for example the opening line of code would be  <?php  //>   after doing this the editor doesn’t touch the line breaks.

With the knowledge of JavaScript regular expressions you could do things to exempt all kinds of code, not just PHP.

This was tested on WordPress 4.5.3, your mileage may vary for versions further from this.

I just created a plugin based on this you can access here.  Please note that you cannot use the plugin and this fix at the same time.

Your iPhone or iPad will become a lot less useful when they don’t get the latest version of iOS.  This is because a lot of times apps have minimum iOS requirements for their new versions.  So for example my 2010 vintage 4th generation iPod Touch can’t get the latest Skype app because it requires iOS 8 and I can’t upgrade it past iOS 6.  The biggest upgrades subsequent iOS devices are getting is the (often) doubling of their RAM.  For example the 4th generation iPod touch had 256 MB of RAM where the 5th generation one had 512 MB.  Similar RAM upgrades are present in the iPhone and iPad line as well.

Newer versions of iOS often require more RAM and this means that some old devices (particularly when RAM has doubled twice after two cycles) will be dropped off.  So if you are planning on buying an iOS device, my advice would be look at how much RAM it has relative to the other iOS devices on the market.  For example, the iPad Air 2 has 2 GB of RAM verses the iPad Air’s 1 GB so I’d say the iPad Air is much more future proof.  Same with the iPhone 6s which has twice as much RAM as the 6.

SHIFT-Enter – Gives you a line feed as opposed to Enter which gives a carriage return.  This is useful when you want a new line on a bulleted list (without it adding another bullet) or beginning a new line without ending a paragraph.  A rough HTML analogue would be Enter=<p> where SHIFT-Enter=<br>

CTRL-ALT-PrintScreen – takes a screen shot of just that particular application.  Great for browser screenshots.  As a bonus you can now paste copied screenshots directly into a GMail message.

SHIFT-CTRL-V – pastes your text with formatting removed.  This is particularly useful when copying text from web pages into e-mails where you don’t want to preempt the existing formatting.  Unfortunately this shortcut doesn’t work in a lot of Microsoft programs.

Any letter inside of a folder – click inside of a folder and type any letter and the file starting with that letter will get selected

SHIFT-CTRL-T (in browser) – brings back tab you just closed

There was a time when Bing wasn’t worth serious searching.  That time is no longer.  I have noticed Bing giving better results than Google for some programming related searches.  For example trying to modify a WordPress install to override permilinks for some directories.  Bing gave me the answer that worked.

I remember the reason I started using Google was for programming related searches (in fact that’s what my Computer Science professor used it for) and only after that for everything else.

I subscribe to Oyster, a service that allows me to read as many books as I please from a pretty decent selection.  In its catalog are a large selection of self published titles by authors trying to get exposure for their work.  Oyster (or any other subscription service seeking to boost subscriber engagement) could simply create a third party cookie that indicated whether a user was logged into their service.  Then ad networks could show service-specific ads.

An example: William has published, “Space Weasels and Blue Food”, a book of science fiction short stories on Oyster (via SmashWords).  He wants to make a name for himself so he creates an ad for his book on Facebook that, because of the third party cookie, is only shown to subscribers of Oyster that happen to be logged in.  Users simply click the ad and can immediately be enjoying William’s book.

This could work on any subscription service for any type of media.  For mobile apps I’m not sure it would work but should work on mobile websites.