In Percona Support we spend a few hours per week doing Labs: short collective projects, not directly related to the tickets.
One of our last labs was about to get ready for the winter holiday season which means preparing the tree and decorating it. To do it we used our favorite tools: MySQL, and ASCII art ( As a result, we created a function that prints into the terminal a New Year Tree ( and decorates it with symbols we want.
For example, to create a three-level tree, decorated with starts, call the function as follow:

Since MySQL supports Unicode you can use any symbol, having it has the same width as the space symbol. For example, you can decorate your tree with wax candles without any risk of firing up your home:
You can change your terminal colors to those that look more celebrating, align the size of the terminal with the number of levels in the tree, and call the function in a loop to have an animated picture.
For example, animation at the beginning of this post was created by a few calls like:
I only adjusted the number of levels for each terminal size.
Code for the ny_tree  and two helper functions is located at
We, Percona Support Team, wish you Happy Holidays and Happy New Year without serious database issues!
Notify of

Inline Feedbacks
View all comments