Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Coderetreat with ABAP?

cyclingfisch_
Active Contributor
0 Kudos

Hi developers,

we are thinking about doing a Coderetreat with our developers. The tasks would be Conway's Game of Life. Is there somebody who ever did something like this and if yes, what were your experience?

Thanks and cheers,

Martin

1 ACCEPTED SOLUTION

0 Kudos

Hi Martin,

on 14.11.2015 we took part in the global day of Coderetreat.

We had several programming languages, even ABAP.

Short answer: Yes it works.

In detail:

As well as in other languages ​​"Coderetreat" is a great way to approach things differently and to try new things.

Of course, due to the short sessions (1-2 hours) you do not get a final Version with full functionality.

Therefore, we have locked us away for two days in a small room in the basement and created a final version of ABAP Conway's Game of live,

which in my opinion does not need to hide...

We had different approaches. In the end we have focused us on the most flexible solution.

We store the X and Y coordinates of dead and living cells.

Of course we could also "just" store the living cells, however we decided to store the state.

In case of extension, for example a Rock, we will be more flexible.

We have outsourced the logic of patterns (Blinker, Glider, Heavy-Weight-Spaceship, etc.)

in an abstract parent class (ZCL_CGOL_PATTERN).

So we can very easily create as many (child) patterns as we want (ZCL_CGOL_RANDOM_PATTERN, ZCL_CGOL_BLINKER_PATTERN, ZCL_CGOL_GLEITER_PATTERN, ZCL_CGOL_SEGLER_PATTERN).

The cell-class (ZCL_CGOL_CELL) is also covered by unit tests with 100% coverage

The amazing thing is that even with complex logic our entire code has (without comments and blank lines) under 1000 lines! 🙂

Of course we want to share the results with the abap community.

It is atteched at this posting.

Greetings from sunny Weinsberg,

Henry Bogner & Sebastian Engel

(Kaufland Informationssysteme HQ)

7 REPLIES 7

0 Kudos

Hi Martin,

on 14.11.2015 we took part in the global day of Coderetreat.

We had several programming languages, even ABAP.

Short answer: Yes it works.

In detail:

As well as in other languages ​​"Coderetreat" is a great way to approach things differently and to try new things.

Of course, due to the short sessions (1-2 hours) you do not get a final Version with full functionality.

Therefore, we have locked us away for two days in a small room in the basement and created a final version of ABAP Conway's Game of live,

which in my opinion does not need to hide...

We had different approaches. In the end we have focused us on the most flexible solution.

We store the X and Y coordinates of dead and living cells.

Of course we could also "just" store the living cells, however we decided to store the state.

In case of extension, for example a Rock, we will be more flexible.

We have outsourced the logic of patterns (Blinker, Glider, Heavy-Weight-Spaceship, etc.)

in an abstract parent class (ZCL_CGOL_PATTERN).

So we can very easily create as many (child) patterns as we want (ZCL_CGOL_RANDOM_PATTERN, ZCL_CGOL_BLINKER_PATTERN, ZCL_CGOL_GLEITER_PATTERN, ZCL_CGOL_SEGLER_PATTERN).

The cell-class (ZCL_CGOL_CELL) is also covered by unit tests with 100% coverage

The amazing thing is that even with complex logic our entire code has (without comments and blank lines) under 1000 lines! 🙂

Of course we want to share the results with the abap community.

It is atteched at this posting.

Greetings from sunny Weinsberg,

Henry Bogner & Sebastian Engel

(Kaufland Informationssysteme HQ)

0 Kudos

Further code...

State

Pattern (Parent Class)

Pattern: Blinker

0 Kudos

and other patterns:

Random

Glider

Heavy-Weight-Spaceship

0 Kudos

at least an overview

+ example of Heavy-Weight-Spaceship

0 Kudos

Moderator note:

If you were to post this as a blog, with more detail of the experience of the retreat, I think that would be a valuable contribution to the community.

0 Kudos

+1 to Matthew. Blog would also have better visibility and better "pinots" ROI as well.

raphael_almeida
Active Contributor
0 Kudos

I fully agree.


@Martin (Or any other person who is making the publication), just do not forget to update the link of Conway's Game of Life (It's wrong in the question). The correct link is: https://en.wikipedia.org/wiki/Conway's_Game_of_Life .


Waiting the blog here.


Warm regards,


Raphael Pacheco.