03-17-2020 1:47 PM
This is the voting thread for the March 2020 SAP Community Coding Challenge. For the challenge details and directions see this blog:
https://blogs.sap.com/2020/02/28/sap-community-coding-challenge-series/
In this Question thread I will post the 7 finalist. Use the answer voting mechanism to choose the one solution you believe should be the overall winner. Remember: this is all for fun and education. We are all winners here because of the great knowledge sharing!
03-17-2020 2:03 PM
We also have the replay of the live stream where we announced the finalist available: https://youtu.be/4riDYGR_t_o
03-17-2020 2:04 PM
I was really looking forward to see the final solutions. I really love the "SELECT DISTINCT" and the "Sorted Table Discarding Duplicates" Approach.
Congratulation for all the finalist and special award winners.
03-17-2020 2:45 PM
Who will check that nobody does a vote +1 for their favorite and -1 for others? 😉
03-17-2020 2:52 PM
03-17-2020 2:55 PM
03-17-2020 3:01 PM
03-17-2020 3:07 PM
03-17-2020 3:57 PM
03-17-2020 4:01 PM
Congrats to all the finalists! And thanks to the SAP Community team as this was a well thought out and well run challenge.
The challenge said "as few lines of code as possible" but did not say "do not include comments". I'm assuming all the comments were removed for the finalists for clarity of presentation/voting?
I'm seeing a ton of cool new syntax introduced and used (mostly for the better). However, from a support perspective, it can be disruptive and confusing without good comments as there are vast knowledge differences within any group of developers...
03-17-2020 6:46 PM
Very nice challenge. I'm following this one among my fellow Russian community programmers as their brains hurt 😄 Could you please create a one place repository with all the code on git. Thanks!
03-17-2020 8:53 PM
And if you want more details on the Special Award winners, rich.heilman posted a blog about them here: https://blogs.sap.com/2020/03/17/sap-community-coding-challenge-series-march-2020-special-awards/
03-17-2020 11:13 PM
I'll try to provide an AbapGit repo with my local revisions - and the story behind my solution...
03-20-2020 9:15 AM
I thought we should just vote for one solution. Seems, that some of us have voted down all other solutions. This is not very nice.
Remember: This is all for fun and education.
03-21-2020 1:44 PM
Remark about the regular expressions used by 3 of the 5 finalists, they could be written as follows to be more readable and maintainable (example below corresponds to DATA(unique_chars_in_word) = replace( val = word->* regex = `(.)(?=.*\1)` with = `` occ = 0)):
DATA(unique_chars_in_word) = replace( val = word->*
regex = '(.)' " any character (.) registered for later reuse ((something))
& '(?=' " provided that it's followed by
& '.*' " - any character (.) repeated zero or more times (*)
& '\1)' " - the character registered first (\1)
with = `` " replace the match with nothing (delete)
occ = 0 ). " replace ALL occurrences
Another solution is to get the free online explanation by https://regex101.com/r/7RznVy/3: