Renuo Code and Learning Week
in Sicily, Nov 2015
by Simon Huber
2016-01-20, Railshöck @Renuo, Wallisellen
Why?
knowledge exchange
organizational processes
team spirit
bring Renuo further
focus
Day 1
travelling
program
rules for the week
Day 2
research
organizational questions
Day 3
software principles
project: microservices
Day 4
hiking
GRASP
Day 5
code-smells and refactoring
tools research
visit Catania
Day 6
organizational part II
vision, mission, values
Day 7
Code Retreat
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
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
Day 8
travelling
Evaluation