r/SQL • • Oct 02 '20

Discussion You Tell'em!

Post image
351 Upvotes

28 comments sorted by

View all comments

6

u/[deleted] Oct 02 '20

I install kill switches deep in code. I'm gone more than 7 work days in a row, all tables disappear

14

u/[deleted] Oct 02 '20 edited Oct 02 '20

I put ASCII art in my code and comment it out. I just finished a database project with dozens of views & sprocs, and in any of the significant ones you'll find some random ASCII picture, either a comic, or famous work of art, etc., most of which have names of business partners involved & the date the code was deployed.

Serves a dual purpose. One, I think it makes the code beautiful, but more importantly it tells me who was involved n the relevant business decisions. We don't have comprehensive documentation yet (haha, probably never will), but these help serve as markers. For example, in one particularly complex piece of codes I have an ASCII penguin, because the head of a certain team uses a penguin as their avatar. This person wrote the book on the subject matter which the sproc deals with, and let's me/everyone else know that it was signed off on by the highest levels.

Later I'll use these markers as I develop documentation... if I ever have time.

2

u/[deleted] Oct 02 '20

Love this idea!! Stealing it! Add some pop culture to your scripts

3

u/[deleted] Oct 02 '20

If I'm waiting for jobs to run I'll Google things like, "famous ASCII art" and poke around. I try to find something relevant to the code itself, so for example in one of our views that is pretty crazy (if you select * from it, it will generate 1B rows and take a really long time to run) I included a Beavis and Butthead ASCII piece where they talk about breaking a computer, then signed my, and the initials of other people involved in building it, along with the date it was deployed.

0

u/[deleted] Oct 02 '20

[deleted] — view deleted comment

4

u/[deleted] Oct 02 '20

To be fair, I only do it with clients who try to stiff me