1 of 14

Renuo Code and Learning Week

in Sicily, Nov 2015

by Simon Huber

2016-01-20, Railshöck @Renuo, Wallisellen

2 of 14

Why?

knowledge exchange

organizational processes

team spirit

bring Renuo further

focus

3 of 14

Day 1

travelling

program

rules for the week

4 of 14

Day 2

research

organizational questions

5 of 14

Day 3

software principles

project: microservices

6 of 14

Day 4

hiking

GRASP

7 of 14

Day 5

code-smells and refactoring

tools research

visit Catania

8 of 14

Day 6

organizational part II

vision, mission, values

9 of 14

Day 7

Code Retreat

10 of 14

Day 7

def active_count_around(x, y)

left = x-1

top = y-1

right = x+1

bottom = y+1

left = nil if left < 0

top = nil if top < 0

right = nil if right >= self.current_state.size

bottom = nil if bottom >= self.current_state[0].size

counter = 0

counter += 1 if self.current_state[left][top] rescue nil

counter += 1 if self.current_state[x][top] rescue nil

counter += 1 if self.current_state[right][top] rescue nil

counter += 1 if self.current_state[right][y] rescue nil

counter += 1 if self.current_state[right][bottom] rescue nil

counter += 1 if self.current_state[x][bottom] rescue nil

counter += 1 if self.current_state[left][bottom] rescue nil

counter += 1 if self.current_state[left][y] rescue nil

counter

end

11 of 14

Day 7

def find_alive_neighbours(x, y)

z = (x-1..x+1).map do |row|

(y-1..y+1).map do |cell|

fields[row][cell] unless row == x && cell == y rescue false

end

end.flatten.count { |alive| alive }

end

def count(board, x, y)

([x - 1, 0].max..[x + 1, board.size - 1].min).map do |row|

([y - 1, 0].max..[y + 1, board[x].size - 1].min).map do |cell|

board[row][cell] unless x == row and y == cell

end

end.flatten.count { |alive| alive }

end

def get_no_of_active_neighbours(x, y)

[[-1, -1], [-1, 0], [-1, 1], [0, -1], [0, 1], [1, -1], [1, 0], [1, 1]].map do |coordinates|

fields[x + coordinates.first, y + coordinates.last] rescue false

end.flatten.count { |alive| alive }

end

12 of 14

Day 8

travelling

13 of 14

Evaluation

  • really productive
  • great for team cohesion
  • learned a lot
  • a lot of fun
  • motivated to get better
  • want to do it again

14 of 14