How To Study And Pass The PSD-I Assessment From Scrum.org

The Scrum.org Professional Scrum Developer I assessment is a 60 minute time boxed test where you answer 80 multiple choice type questions. It costs $200 to take and the passing score is 85%.

I took the test September 14, 2016 and passed. My Score was 71 points (or 88.8%)

Scrum.org PSD-I Certificate

Here’s how I studied:

Install Recoll.

Create a directory  where you store any studied Scrum.org document. Setup an appropriate indexing strategy so that Recoll search is rebuilt every time you add a new document to your Scrum study folder.

Study the following documents:

Save the above documents into your study folder.

Read posts in the Scrum.org forum.

Once a day, for at least a few weeks, do the SCRUM OPEN, PRODUCT OWNER OPEN, and DEVELOPER OPEN assessments. When you finish an open assessment it will let you print a summary of your results. Save every summary in your study folder.

Keep doing the open assessments until you consistently get 100% every time

Keep doing the open assessments until you’ve seen every possible question.

The day before doing the test, take the time to create a single open assessments master document. Copy, paste (and study) all the information from all the open assessment summaries into the master document. When creating your master document avoid duplicate questions. Having to search through duplicates will slow you down.

Ignore any resource that doesn’t come from Scrum.org

When you’re ready, pay money to do the test, use your Recoll index to search for help when you don’t know an answer.

Good luck.

MySQL Dump Full Structure, Partial Data, With Triggers & Routines.

You want to do a MySQL dump. You want the entire structure of the database but you want to exclude some tables because they are too big, have sensitive data, or other reasons. Your MySQL database has triggers, routines, and all that good stuff because it’s 2016.

When I went looking for a solution I read a tutorial that wrongly suggested dumping triggers and schema together in the first step. The problem with this approach is when you import your data, the ON INSERT triggers are executed, and this can lead to primary key conflicts or other weird issues. I learned the hard way.

A better way:

  • Schema first
  • Data next
  • Triggers and routines last
mysqldump --no-data --skip-triggers DATABASE > FILE.sql

mysqldump --no-create-db --no-create-info --skip-triggers --ignore-table=TABLE1--ignore-table=TABLE2 DATABASE >> FILE.sql

mysqldump --no-create-db --no-create-info --no-data  --routines --triggers --skip-opt DATABASE >> FILE.sql

Good times.

Free Online Scrum Training

These Scrum Training Series videos are my favourite. The site also offers a nice Scrum reference card. Choice quote:

Doing Scrum, or Pretending to Do Scrum? Scrum’s relentless reality checks expose dysfunctional constraints in individuals, teams, and organizations. Many people claiming to do Scrum modify the parts that require breaking through organizational impediments and end up robbing themselves of most of the benefits.

Autocomplete a Silex Project in PHPStorm

The problem with Silex, and Pimple in general, is that when you do:

$app = new \Pimple\Container();
$app['Foo'] = function () { return new \Acme\Foo(); };
$app['Bar'] = function () { return new \Acme\Bar(); };

PHPStorm has no way of knowing what’s going on in, or how to auto-complete, $app.

I’ve gotten around this in the past by creating an “Inception Proxy” alongside a .phpstorm.meta.php configuration but for a new Silex project I’ve inherited this is not possible.

Pro-tip: If your IDE doesn’t know what’s going on then neither will the poor jerks who inherit your code.

Looking for a solution to this I discovered the PHPStorm Silex Plugin. It’s a bit wonky but it does the job. (sometimes the IDE doesn’t recognize $app and I don’t know why yet.)

For the Silex Plugin to work it requires a manually created configuration file in the project root named “pimple.json”. This file more or less duplicates the functionality of .phpstorm.meta.php but I digress… Pimple.json can be automatically generated using Pimple Dumper.

The format of “pimple.json” looks like:

[
    {
        "name": "routes",
        "type": "class",
        "value": "Symfony\\Component\\Routing\\RouteCollection"
    },
    {
        "name": "request.http_port",
        "type": "int",
        "value": 80
    },
    {
        "name": "charset",
        "type": "string",
        "value": "UTF-8"
    }
]

Once that file is in place, and you jiggle the IDE/Plugin, auto-complete comes alive! Horray for sanity.

Password Protect WordPress Admin With .htaccess

The wp-admin panel is already password protected in that you are required to login. Sometimes that’s not good enough. This tutorial explains how to add an additional layer of authentication to the login process, essentially blocking wp-login.php requests from annoying bots or other malicious users.

Step 1:

Create a `/path/to/.htpasswd` file. (More info.)

Step 2:

Create a `/path/to/your/site/wp-admin/.htacess` file with the following content:

AuthUserFile /path/to/.htpasswd
AuthType basic
AuthName "Restricted Resource"
require valid-user

# Whitelists

<Files "admin-ajax.php" >
   Order allow,deny
   Allow from all
   Satisfy any
</Files>

<Files "*.css" >
   Order allow,deny
   Allow from all
   Satisfy any
</Files>

<Files ~ "\.(jpg|jpeg|png|gif)$">
   Order deny,allow
   Allow from all
   Satisfy any
</Files>

Change `/path/to/` your files accordingly.

Important! Under Whitelists I have added entries for admin-ajax.php, *.css, and a regular expression for images. This unblocks WordPress’ AJAX functionality used by certain plugins, as well as CSS and image files certain themes may be importing. Without these you risk breaking your site.

Step 3:

Append the following to your existing WordPress .htaccess file one parent folder up (Ie. /path/to/your/site/.htaccess):

<Files wp-login.php>
  AuthUserFile /path/to/.htpasswd
  AuthType basic
  AuthName "Restricted Resource"
  require valid-user
</Files>

Change `/path/to/` your files accordingly.