My friend, brilliant developer, solutions architect, and (apparent) wizard Nidal calls them “Incantations”. He didn’t have to explain the first time he used the term—perhaps because I’ve done my fair share of scraping Medium, Stack Overflow, and the 4th page of a Google search—or perhaps it is the shared understanding that develops between the members of an efficient team—in any case I knew exactly what he meant.

Incantations are the sets of instructions / commands / guides we find littered in various places on the internet—if you follow them directly in the right environment you will get the expected results—much like magic. In this case he had been working on Cloud Native serverless functions in Java built with GraalVM and Gradle (although the exact piece of work is not important right now) and coming to an impasse in his understanding he had used the content of one such incantation to fill in the gaps and move forward.

This is a great illustration of the different concepts of “I know how it works” and “I got it working”. As a developer I would always prefer to give somebody the time and space to solve a problem or learn something new to get the former result over the latter, ie: “I know how it works” is far superior to “I got it working”. Knowing how something works—in the development world—makes it repeatable, controllable, and reliable which in turn generally makes something more secure and usable. Well known ideas can also be iterated upon in controlled and hence safe (ie: secure) ways.

So using an incantation to fill in the gaps in a learning process is desirable but as I’ve been thinking about this idea I realize that they also have other uses. If you will allow me to torture this metaphor a little more: the idea of spells isn’t the issue, it is really about what wizard, warlock, witch, or other creature wrote them.

We’ve all seen the incantations that run as root and download and execute an unknown script from a random Github account before blessing the caller with an environment / system / castle or other magical thing (hopefully). I think there are probably one or two of us that have run one of these while holding our breath or crossing our fingers.

If we examine what the underlying issue is with doing this it really comes down to—after we pass issues about security, errors, other technical issues—not knowing the intent of the author and / or the fact they can’t practically be responsible for the results. On the internet—where we famously know “…nobody knows you’re a dog”—this is an insurmountable problem as you don’t know if the author intends you harm and if they don’t and there is a mistake that causes harm anyway they probably can’t or have no obligation to help you.

But inside our own organization these issues go away—we know the intent and who is responsible. Provided that we don’t have only one wizard who knows how the spell works (I’ll stop soon I promise) an incantation is a great way to turn “I don’t know how it works” into the usable “I don’t need to worry about how it works right now”. The final process / script / idea can be well defined, packaged, checked for security and other issues, and approved for use in the organization.

In our case it would enable relatively straightforward Java code to be turned into GraalVM powered Cloud Native lightning by Gradle and  a well maintained incantation. But feel free not to trust that, because after all, this is the internet and I could be anyone (even a dog (or a cat)). 

Note: your experience may vary, and if it does or doesn’t I’d love to hear about it and what spells you have cast / written or otherwise incanted.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *