My Baby Shark AMPscript Challenge Variations

It’s been a few months since the judging wrapped up for the Baby Shark AMPscript Challenge on HowToSFMC. The goal was to use AMPscript to output the lyrics of Baby Shark (EARWORM WARNING). There were a few of categories for submissions, but I read them all as “with as little code as possible”. Obstinate fixation… engage!

To be completely honest, I spent way too much time obsessing over my own solution — enjoying every moment. Shortest I got on my own was 260 characters. Here are my 7 variations:

1a. 260 characters, compressed

1b. 260 characters, uncompressed

2. Single loop & mod

3. Single loop, mod & math

4. Double loop, string parse

5. String char loop

6. String concatenate loop

7. Multiple concat loop

What I learned

  • The output and outputline functions weirdly require other functions like v or concat.
  • The variable isn’t required for the for-loop next directive
  • I should never, ever write something like this for a client.
  • There are some incredibly talented people in this developer community! I was amazed at some of the entries. The whole thing was super-difficult to judge.
(Visited 109 times, 1 visits today)
Notify of
Inline Feedbacks
View all comments