What are the Traits of a Problem Solver?

dealing with disastersWho do you go to when disaster strikes?  I’ve been told I’m a good problem solver, and am often a “go-to” person for others when there are difficult technical issues to resolve.  What am I doing to be tagged in this manner?  Note, I don’t know that I actually believe I am better at solving problems, I’m just aware that I do indeed work and get paid to do so, frequently.

I decided to put together a list of attributes that I think make for good problem solving in the technical world.  I hope this perhaps helps others.  I am more than open to feedback for improvement on this list – please weigh in if you see something missing or that can be improved.

Traits of a Good Problem Solver

  • Has A Good Memory
    If you can’t remember what systems are “touched” by a specific action, you’ll be forced to rely on others that do.  Or you will have to look up and research these dependencies on your own first, or discover them in a longer, even more painful path.
  • Has Persistence
    Solving a technical glitch can be difficult, especially when it is something that is difficult to reproduce.  The most difficult problems I encounter are the ones that appear to happen randomly.  The reality is that with a technical issue, this is really never the case; the challenge is in determining what conditions must be met to reproduce the issue.  Is it only happening on a specific server?  Could it involve caching?  Have we established the exact steps taken to create the issue?  What conditions in our testing environment might be missing in the production environment that could be part of the cause?  It takes persistence to work through all of these permutations.
  • Has Patience
    While similar to persistence, this is a different trait in my view.  Perhaps an example will help highlight why I think so.  Often in web development or other technical fields, we are working on custom code or at least an integration of something in a unique environment.  How long will it take to figure out what’s wrong when you are diagnosing something that perhaps has not been seen by others before?  It could be two minutes due to some clarity or luck, or two days, or even weeks.  Being patient and persistent is what will get you through these sorts of problems.
  • Documents Everything
    Very similar to having a good memory, being one who documents everything, including problems and their resolution, really helps problem solving.  Have we seen something like this issue before?  What did we do to fix it before?  There’s nothing worse to me than diving down the same rabbit hole because you forgot how your resolved an issue previously.  Write it down in a tool that has good search features, like a wiki, or Evernote.
  • Can Write Effective Search Engine Queries
    Learning to broaden or restrict your search query is a skill.  So is knowing what keywords to include in your search.  LetMeGoogleThatForYou.com is often used as a joke by me as a none-too-subtle means of poking fun at someone’s poor attempt to solve a problem, but there are skills to using a search engine for sure.  Develop them!
  • Has a Process for Change Management
    The first question I always ask when there’s a problem reported at work is “What’s changed?”  Having a good change management system in place with a code repository as well as a testing->stage->production deployment path for your code makes answering this question easier.  If code hasn’t changed, how about data?  If neither, is there a new browser or an update that has been rolled out?  Some other environmental variable change?  Stable systems don’t usually just “break” — something has been changed that caused a problem or exposed an issue kept hidden previously.

What other traits make a good problem solver for you?  Please let me know what you think.

1and1 wp-login.php Redirection Issues

WordPresFor a time on December 30th, 2013, my hosting provider 1and1.com was redirecting all WordPress logins to whenever one hit wp-login.php effectively blocking all attempts to login — and logout for that matter – from any WordPress installation on their servers.

Their response was less than desired; they stated that this issue was effecting only .5% of their customers.  Even if that were to be true, which I would find doubtful given the widespread use of WordPress, and it seems to discount the severity of the issue for WordPress user, a program that they say they support completely. Read more

Mobile Site Recognition Via htaccess

Using JavaScript to detect a browser type and redirect iPhones, iPad and other mobile devices is not very difficult to do.  However, it means that the page load has already happened as the JavaScript must be invoked before it can redirect the browser to the alternative page.

If you’re using Apache, you can redirect via htaccess.  This will let Apache redirect the browser before there are any assets downloaded.

This example is from StackOverflow.com, and includes a call to cookie the user so that you may code your pages to keep the user on the mobile site unless they choose to view the desktop version.

RewriteEngine On

# Check if this is the noredirect query string
RewriteCond %{QUERY_STRING} (^|&)noredirect=true(&|$)
# Set a cookie, and skip the next rule
RewriteRule ^ - [CO=mredir:0:%{HTTP_HOST},S]

# Check if this looks like a mobile device
# (You could add another [OR] to the second one and add in what you
#  had to check, but I believe most mobile devices should send at
#  least one of these headers)
RewriteCond %{HTTP:x-wap-profile} !^$ [OR]
RewriteCond %{HTTP:Profile}       !^$
# Check if we're not already on the mobile site
RewriteCond %{HTTP_HOST}          !^m\.
# Check to make sure we haven't set the cookie before
RewriteCond %{HTTP:Cookie}        !\smredir=0(;|$)
# Now redirect to the mobile site
RewriteRule ^ http://m.example.org%{REQUEST_URI} [R,L]

Backup Scripts for 1and1 and Others

1and1.com is the hosting provider I’ve been using and recommending to others for many years.  They provide adequate service on a very complete product offering that is inexpensive.  So long as you can either resolve issues yourself as their technical support is not what I would call strong, they are a great option.  (Does that spell out an endorsement with caution well enough?)

One thing I’ve come up with is a modification to a backup script that if you are using a Linux system at 1and1 and have access to making crontabs, you can have daily, weekly and monthly database backups stored on the server, emailed to you, or both.  I got this script from a project on SourceForge and modified it to work with 1and1.

  1. 1and1-backup-script  Download this zip archive and unzip it.  You’ll find a shell script and an empty folder called “backups” within it.
  2. Open the backup.sh file in a simple text editor — I use my SFTP tool Transmit for this, too – and enter your database information and change the “changeme@email.com” address to yours or make it empty for no email.  (A dedicated Gmail account would be useful here, too.)
  3. Save the file and upload it and the empty backups directory to your root directory of your 1and1 account. Be sure to set the permissions of your shell script to something that is executable.  If you have configured your domain(s) on your account to point to a subdirectory, this will also keep the shell script and backups from being accessible by a web browser.  More on this simple security hack in the future.
  4. Using a command line tool such as Terminal on a Macintosh, login to your 1and1 account using your SSH credentials.  1and1 has good online help here.
  5. Once you’ve logged in, it’s time to setup the crontab that will run the backup.  Enter “crontab -e” to enter the crontab editor.
  6. You’ll be in the program vi after entering this prompt.  To enter a new line, you’ll need to type “i” to INSERT a line.
  7. I have my backup run at 3:30AM on the server every day of the year.  Here’s the line to type to do the same:
    30 03 * * * sh ./backup.sh >> /dev/null 2>&1
  8. Press the escape key to exit Insert mode and then type press the shift key and type “zz” to exit vi.  You’ll get a prompt about your crontab being written (or modified) at this point.
  9. To view the crontab without editing it, you can type “crontab -l”

If you have multiple databases to backup, you can modify the name of the shell script and backup directory easily enough.  I’ve been using this backup script with my website and with client websites for years.  It has never failed me and has saved my clients several times.  Many thanks to the original authors of this useful open source script.


1and1.com – php.ini and htaccess customization

I host my website with 1and1.com, and can honestly say I recommend them to others, too. They provide a great deal of resources at a very reasonable price and have reasonably good service on the occasions I’ve needed it.   Perhaps because I don’t expect much from a low cost hosting entity is also why I think their service is fine, too.  It may also be said that I wouldn’t recommend them because of their service – that’s certainly true, too.

They provide a great Linux/Apache/mySQL/PHP setup and allow you to have private domains through their registrar for no additional costs.  Private domains save you against an onslaught of a ton of spam and unwanted phone calls as your registration remains one hidden behind this 1and1 proxy account.

There are a couple of oddities with any hosting provider to overcome and here’s what I have learned about 1and1 and the tools I use to make development easier.  First off, php 5 is not enabled automatically.  In order to have php 5 be the default for the website, you’ll need to add the following line to an htaccess file —

AddType x-mapp-php5 .php

If you are running Joomla!, and wish to use the built in SEO mod_rewrite features, be sure to also set the RewriteBase flag to the root directory —

RewriteBase /

The controls over php values, like with many shared hosts, are controlled via a php.ini file that you may upload to your root directory.  However, with 1and1, there are some less than   traditional settings and you must also place a php.ini file in each directory on the website that php files are used.  If you’ve just started using 1and1 for the first time, figuring all of this out can be challenging.

Download the ini_help.zip files here To easily install a php.ini file everywhere in the website’s code, I use the script phpcopy.php that you’ll find in the archive.  If you need to delete files, you can use the phpdelete.php script.  You will need to insert the full path of where this script lives on the server within the file before you upload it.  I’ve also included a copy of the php.ini file I use.  It will also need the full server path added to it for the tmp directory line.

If you need to determine the full server path, you can do so with a php info script and look under the environment section. Alternatively, you could login via SSH and navigate to the web directory you wish to use and enter “pwd” to see the full path.