Select Featured Exercises for Object-Oriented October

Next month (October), will have the Object-Oriented October theme, which will feature six languages:

  • C#
  • Crystal
  • Java
  • Pharo
  • Ruby
  • PowerShell

Clearly, we’d want to select exercises that lend themselves well to an object-oriented approach. This is the list of shared implemented exercises:

exercise csharp crystal java pharo-smalltalk ruby powershell
clock :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
diamond :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
flatten-array :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
grains :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
isbn-verifier :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
matrix :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
proverb :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
resistor-color-duo :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
tournament :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
all-your-base :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :white_check_mark:
bowling :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :x:
grade-school :white_check_mark: :x: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
kindergarten-garden :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :white_check_mark:
minesweeper :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :x:
nth-prime :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :white_check_mark:
nucleotide-count :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :white_check_mark:
pascals-triangle :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :white_check_mark:
perfect-numbers :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :white_check_mark:
prime-factors :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :white_check_mark:
queen-attack :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :white_check_mark:
resistor-color :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :white_check_mark:
rotational-cipher :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :white_check_mark:
affine-cipher :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :x:
alphametics :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :x:
binary-search-tree :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :x:
book-store :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :x:
change :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :x:
circular-buffer :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :x:
connect :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :x:
dominoes :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :x:
forth :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :x: :x:
meetup :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :x:
ocr-numbers :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :x:
palindrome-products :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :x:
pig-latin :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :x:
pythagorean-triplet :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :x:
rail-fence-cipher :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :x:
run-length-encoding :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :x:
say :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :x:
sublist :white_check_mark: :white_check_mark: :white_check_mark: :x: :x: :white_check_mark:
twelve-days :white_check_mark: :x: :white_check_mark: :white_check_mark: :white_check_mark: :x:
two-bucket :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :x:
wordy :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :x:
bank-account :white_check_mark: :white_check_mark: :white_check_mark: :x: :x: :x:
beer-song :white_check_mark: :x: :white_check_mark: :x: :white_check_mark: :x:
complex-numbers :white_check_mark: :x: :white_check_mark: :x: :white_check_mark: :x:
crypto-square :white_check_mark: :x: :white_check_mark: :x: :white_check_mark: :x:
custom-set :white_check_mark: :x: :white_check_mark: :x: :white_check_mark: :x:
dnd-character :white_check_mark: :x: :white_check_mark: :x: :x: :white_check_mark:
food-chain :white_check_mark: :x: :white_check_mark: :x: :white_check_mark: :x:
grep :white_check_mark: :x: :white_check_mark: :x: :white_check_mark: :x:
house :white_check_mark: :x: :white_check_mark: :x: :white_check_mark: :x:
list-ops :white_check_mark: :x: :white_check_mark: :x: :white_check_mark: :x:
poker :white_check_mark: :x: :white_check_mark: :x: :white_check_mark: :x:
rational-numbers :white_check_mark: :white_check_mark: :white_check_mark: :x: :x: :x:
resistor-color-trio :white_check_mark: :white_check_mark: :x: :x: :white_check_mark: :x:
simple-cipher :white_check_mark: :x: :white_check_mark: :x: :white_check_mark: :x:
strain :white_check_mark: :white_check_mark: :x: :x: :x: :white_check_mark:
transpose :white_check_mark: :x: :white_check_mark: :x: :white_check_mark: :x:
zipper :white_check_mark: :x: :white_check_mark: :x: :white_check_mark: :x:
accumulate :white_check_mark: :x: :x: :x: :x: :white_check_mark:
diffie-hellman :white_check_mark: :x: :white_check_mark: :x: :x: :x:
error-handling :white_check_mark: :x: :white_check_mark: :x: :x: :x:
go-counting :white_check_mark: :x: :white_check_mark: :x: :x: :x:
hangman :white_check_mark: :x: :white_check_mark: :x: :x: :x:
knapsack :x: :white_check_mark: :white_check_mark: :x: :x: :x:
ledger :white_check_mark: :x: :white_check_mark: :x: :x: :x:
markdown :white_check_mark: :x: :white_check_mark: :x: :x: :x:
parallel-letter-frequency :white_check_mark: :x: :white_check_mark: :x: :x: :x:
pov :white_check_mark: :x: :white_check_mark: :x: :x: :x:
react :white_check_mark: :white_check_mark: :x: :x: :x: :x:
rectangles :white_check_mark: :x: :white_check_mark: :x: :x: :x:
rest-api :white_check_mark: :x: :white_check_mark: :x: :x: :x:
scale-generator :white_check_mark: :x: :x: :x: :white_check_mark: :x:
sgf-parsing :white_check_mark: :x: :white_check_mark: :x: :x: :x:
spiral-matrix :white_check_mark: :x: :white_check_mark: :x: :x: :x:
state-of-tic-tac-toe :x: :white_check_mark: :x: :x: :x: :white_check_mark:
tree-building :white_check_mark: :x: :white_check_mark: :x: :x: :x:
variable-length-quantity :white_check_mark: :x: :white_check_mark: :x: :x: :x:
word-search :white_check_mark: :x: :white_check_mark: :x: :x: :x:
zebra-puzzle :white_check_mark: :x: :white_check_mark: :x: :x: :x:
binary :x: :x: :x: :white_check_mark: :x: :x:
bottle-song :x: :white_check_mark: :x: :x: :x: :x:
die :x: :x: :x: :white_check_mark: :x: :x:
dot-dsl :white_check_mark: :x: :x: :x: :x: :x:
killer-sudoku-helper :x: :white_check_mark: :x: :x: :x: :x:
micro-blog :x: :x: :white_check_mark: :x: :x: :x:
microwave :x: :x: :x: :x: :white_check_mark: :x:
resistor-color-expert :x: :white_check_mark: :x: :x: :x: :x:
satellite :x: :x: :white_check_mark: :x: :x: :x:
square-root :x: :x: :x: :x: :x: :white_check_mark:

Here’s some:

I’ve been porting exercises to powershell for over a month now with the help of @Meatball . As soon as we got the short list I will prioritize those for october. :+1:

Yeah and @glaxxie have created some more exercises, so to the list for PowerShell could the following exercises:

  • Simple Cipher
  • Meet up
  • Change

I will likely do grade school or list ops for Crystal this weekend (dependent on if Ryan comes before me on one of them), and there will likely be an addition of around 4 exercises for Crystal but not sure which ones yet.

I also want to add to the pool of suggestion:
Rational numbers, Complex numbers, Custom set
Good candidates for OOP with the addition of overloading operators

Hi! Pharo contributor here. If you encounter some of the exercises seen as must for OOP October, please write it down! Pharo has biggest gaps in terms of implemented exercises, but we’ll (with Glenn J. ) try to support them ASAP.

I think clock, rational-numbers, complex-numbers and custom-set are somewhat similar, in that they are small wrappers and usually require operator overloading. Of those, I think clock is the best option, as it is the easiest to understand and the least mathy.

I like bot of these options, especially matrix.

I like these two options, my only concern being that they’re somewhat harder exercises, and we usually try to select relatively easy ones.

A very prototypical OO exercise, my only worry being that for some tracks (including C#) it will introduce concurrency (issues), which makes things a bit more complex.

I quite like this one, but unfortunately we’ve already used it for Functional February.

I like this option a lot, as you’ll have to do something with constructors/

Do these exercises require a proper OO solution? I think they’re more algorithmic in nature.

1 Like

So as a starting point, I quite like:

  • clock
  • matrix
  • simple-cipher

Oh and I do like binary-search-tree too.

Some more suggestions:

  • bowling
  • circular-buffer

I think grade-school could work well too.

+1 for binary-search-tree and circular-buffer

These weren’t suggestions, I just said they are planned to be added, so the list for those languages is a bit larger.

Okay any objections to this selection?

  • clock
  • matrix
  • simple-cipher
  • circular-buffer
  • binary-search-tree

Regarding powershell track for these chosen exercises:

  • Clock : done.
  • Matrix : done, however it isn’t in OOP style, @meatball authored this, but I can redo it. But idk much about protocol of redoing a whole exercise that already published so i leave the decision to you guys.
  • Simple cipher : i’m PRing it atm, but i didn’t design it as oop, so i can pull it down now and make the changes.
  • Circular buffer: not yet, next on the list
  • Binary search tree : practically done, just need to add test cases

A question regarding implementing binary search tree : would it be ok if i add more tests for extra functionalities? Atm, the specs only ask for comparison between the tree, and sorted data (inorder), but i want to ask learner to implement : preorder, postorder, search (maybe even deletion but it is probably too much)

I’d say that’s OK, the example solution is just to prove the problem can be solved. I’d think that students might be encouraged to solve it in a OO style.

I think some extra functionality is good. I wouldn’t go overboard with it. If something is particularly tricky, you should definitely make it optional (meaning: not solving it does not influence the test results)

This is the current status:

exercise csharp crystal java pharo-smalltalk ruby powershell
binary-search-tree :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :x:
circular-buffer :white_check_mark: :white_check_mark: :white_check_mark: :x: :white_check_mark: :x:
clock :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
matrix :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
simple-cipher :white_check_mark: :x: :white_check_mark: :x: :white_check_mark: :x:

I will create adequate PRs for Pharo track to have vanilla (no solution yet) exercises on BST, circular buffer, simple cipher

1 Like

@ErikSchierboom @Meatball
PRs for all 3 left of powershell : BST, simple cipher and circular buffer.

Great! I’ll let @Meatball handle the merging