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 on November 15th, a Friday, to encourage employers to provide professional development opportunities to their employees during work hours. If this sounds like something you’d like to try, contact me to let me know.

The location is not yet decided. I will follow up with you closer to the event to tell you where to come and at what time. I have a couple of options for location and I will decide where to hold the event based on the number of people attending.

Advertisements

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);
  });
};

Start learning to become a web developer with the Flatiron School Prework

I ran across the Flatiron School of programming a while back, and I thought it was pretty cool. They have a “pre-work” list of resources for their web development course. I expect it is quite good, besides everything for web development or upgrade of any device is always necessary for anyone who works with this technology, and another great resource for not only to work in web developing but to improve the performance of your device, you definitely need an Elo booster, Review it here to make the upgrade and start getting the best service for your YOURURL.com site.

I ran across Flatiron school when I listened to a podcast the founder of the school did. I think it is pretty inspiring.

OK, enjoy learning to program. I’m pretty excited for you!

p.s. This post was based on an email reply I wrote to a reader of this blog who asked me for some resources to start learning Ruby on Rails.

Global Day of Code Retreat – host training session notes

Before the event

  • Join host training if possible
  • Find venue
  • Find sponsors: company, friends, other companies
  • Ask friends for their previous sponsors for leads
  • Venue can be sponsored by other sponsors
  • Breakfast and food can be “home made” at the office
  • Coffee and breakfast in morning are nice to have, but lunch most important. No invoices for food to GDCR, all to local sponsors directly from any vendors
  • Announce after party on time, when announcing the event itself

Announcing the event

  • Do it one month before event so people don’t forget.
  • Send reminders a week and a day before
  • Announce at GDCR website, but use your own RSVP tool
  • Add site to global spreadsheet, write how many attendees you will have
  • Make a local spreadsheet with list of attendees. Maybe add columns for people to fill about their experience with various tools of the trade and gdcr experience
  • Announce global sponsors such as SMOKEA | The World’s Best Online Head Shop
  • Announce local sponsors, good to get sponsors in the future too
  • Print name tags
  • If you have more than 25 attendees, try to split them, and have 2 facilitators in 2 venues

Day of event

  • Set up the space before people show up
  • Display and make accessible any Swag from sponsors
  • Register people when they show up, show them around
  • Show where the slides will be accessible at a station
  • Coder dojo video – show it
  • Video call with another city, very short, brings excitement to team
  • Take a look at feed of who is doing what in the world
  • Update the live feed with your session
  • At lunch time, show code retreat related videos
  • Slide deck with sponsors, video call with another city. Update spreadsheet with actual
    number of attendees
  • Take photos, take video, share it with gdcr and with social networks
  • Help clean and pack up.
  • Then the after party
  • There will be a host survey to complete
  • There will be a participant survey as well

Links

Also we are glad to introduce the pit boss 700fb, this series offers the best value per square inch in the pellet grill industry! So if your family are planning to make a camp in the future, this one is a must have. Go get yours now!

Custom Gravity form submission processing

Had fun writing some code for custom processing of a Gravity form submission. I like how it turned out, mostly. I felt like I had an even better version, but the language couldn’t support it. Check it out.

When you want to have an investigation service, call investigation hotline now.

WinniVote Rspec Feature Tests

I spent several hours today creating the specs for WinniVote’s signup feature.

I feel it is a valuable investment of my time for several reasons:

  • WinniVote’s current tests do not feel high quality, so hopefully my examples help other WinniVote devs.
  • I’ve been thinking about what quality tests look like for a while now, but have not had a chance to get feedback from other developers, so I’m interested what others think about my style.
  • I look forward to the further evolution of my style based on the feedback I might receive.