Winnipeg Code Retreat 2019

TL;DR

We are having a code retreat on Friday November 15th. Please send me your name and email here: https://bernardic.ca/contact/ . You can just say “Code Retreat” in the message, or write me a longer message with some information about you. I look forward to spending the day with you.

Code Retreat

From the Code Retreat Website:

A code retreat is a day-long, intensive practice event, focusing on the fundamentals of software development and design, away from the pressures of ‘getting things done’

At a code retreat, the attendees split into pairs, for 45 minute session of coding. When the 45 minutes are up, we share some learnings, pair up with a new partner and start coding from scratch again.

Conway’s Game of Life

During each of the code retreat’s 45 minute pair programming sessions, we work on a program that implements Conway’s Game of Life.

From Wikipedia article on Conway’s Game of Life:

The universe of the Game of Life is an infinite, two-dimensional orthogonal grid of square cells, each of which is in one of two possible states, alive or dead, (or populated and unpopulated, respectively). Every cell interacts with its eight neighbours, which are the cells that are horizontally, vertically, or diagonally adjacent. At each step in time, the following transitions occur:

  1. Any live cell with fewer than two live neighbours dies, as if by underpopulation.
  2. Any live cell with two or three live neighbours lives on to the next generation.
  3. Any live cell with more than three live neighbours dies, as if by overpopulation.
  4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

The initial pattern constitutes the seed of the system. The first generation is created by applying the above rules simultaneously to every cell in the seed; births and deaths occur simultaneously, and the discrete moment at which this happens is sometimes called a tick. Each generation is a pure function of the preceding one. The rules continue to be applied repeatedly to create further generations.

Global Day of Code Retreat

Every year the GDCR organization sets a date for the global day of code retreat, which gives us an opportunity to make a local event out of it. During this day developers around the world get together with others in their communities and learn and practice their craft.

Winnipeg Code Retreat 2019

We will have the code retreat at the FarmLink / Farm At Hand office – suite 110 at 93 Lombard Avenue on November 15th.

If this sounds like something you’d like to try, contact me to attend.

P.S.

November 15th is a Friday. From the code retreat website:

Traditionally, the Global Day of Coderetreat takes place on Saturdays, but we also want to invite companies to promote educational opportunities for their employees by hosting a public coderetreat on Friday.

PHP: Peridot and Propel

Wanted to share a little configuration I just finished making for some Peridot and Leo -based tests which work with Propel models.

A bunch of these tests write data to the database using the Propel models, and I need a clean slate DB before each test. I also need a clean slate HTTP session. Here’s some code ( from peridot.php ) that uses transactions to achieve that:

class MyScope extends Scope {
  function __construct( $emitter ) {
    $emitter->on( 'peridot.execute', function() {
      $this->conn = Propel::getConnection();
    } );

    $emitter->on( 'test.start', function() {
      self::destroySession();
      // have to rollback and begin here.
      // it was unreliable when I rolled back on test.end
      $this->conn->rollback();
      $this->conn->beginTransaction();
    } );
  }
  private static function destroySession() {
    session_start();
    $_SESSION =[];

    // If it's desired to kill the session, also delete the session cookie.
    // Note: This will destroy the session, and not just the session data!
    if (ini_get("session.use_cookies")) {
      $params = session_get_cookie_params();
      setcookie(session_name(), '', time() - 42000,
        $params["path"], $params["domain"],
        $params["secure"], $params["httponly"]
      );
    }

    session_destroy();
  }
}

return function($emitter) {
  $gmsScope = new GmsScope( $emitter );

  //add this scope into every suite
  $emitter->on('suite.start', function($test) use ($gmsScope) {
    $test->getScope()->peridotAddChildScope($gmsScope);
  });
};

Scrum master cert test: formulate ScrumMaster duties in lay man’s terms

Provide vision for, and coaching toward achievement of below stated enterprise goals ( among others ):

– Input/output needs of parties involved in communication and other interaction/handoff points are well understood, and thus are always adequately met for said parties.

– Planning ( including daily ), goal/task follow-through and prioritization, customer validation and direct/gatekeepered channels for creating a shared team/customer understanding of the problem and proposed solution the software is addressing are all adequately enabled and well managed by the whole team. Continuous learning is employed in order to achieve continued evolution on all aspects of team-working.

– Functionality that the software implements is fully self-testing, fully self-documenting and perfectly annotated, and thus ultimatelly fully malleable as part of each delivery ( the software remains soft ).

– Motivation is actively managed and provided by the servant leaders of the team through enabling autonomy, mastery and full responsibility and empowerment for defining, and following through on, our worthy cause(tm). People are leaving at 5 every day to enable sustainable pace.

Sprint planning meeting

Recently I had the opportunity to consider what questions I need the sprint planning meeting to answer, and I will share it here so I can refer to it later, and in case it would be useful to you.

1. In what way can we adjust the current software so that our users would start using it after the sprint? ( adjust last part if your software is already in use )
2. What seems like the best way we can come up with right now for actually completing the suggested adjustment to the software by the end of the current sprint?
3. Who could we get to actually start use our adjustments to the software at the end of the sprint? ( all users of the software? Beta users? Alpha users? )

Seems it is valuable to keep those questions in mind for the sprint planning meeting. What questions do you try to answer during your sprint planning meeting?