At Ardoq we pride ourselves on the vibrant culture of innovation our employees have built across departments and functions. Our bold, caring, and driven outlook as a company and individuals helps propel us forward in everything that we do.
Tinkerpop has been crucial to the development of Ardoq so Øyvind and Ardoq’s joint donation of Gremlint to the foundation was a great opportunity to give back to the community. Before we dive into the details of Øyvind’s creation, some of you may be wondering what Gremlin actually is. (Those in the know should feel free to just skip ahead to why Gremlint is a fantastic tool and what it does.)
What Is Gremlin and How Is It Used at Ardoq?
Several of Ardoq’s advanced features, such as graph search, calculated fields, and graph filters, allow users to retrieve, calculate, and visualize data based on graph queries. These queries are written in Gremlin, a graph traversal language developed by Apache TinkerPop. It has a bit of a steep learning curve but once mastered, makes for a very powerful analytics tool.
Why Gremlint and What Does It Do?
“Gremlint is a portmanteau of Gremlin and Lint. Linting is the process of analyzing code to discover stylistic or syntactic problems, so I thought it seemed quite fitting. I actually came up with the name before I started working on the project and was inspired to work on it partly because I was so fond of the name.” - Gremlint Creator Øyvind Sæbø
In a nutshell, Gremlint is able to identify Gremlin in a portion of code and autoformat only that portion to make troubleshooting easier while keeping the surrounding code intact. Thanks to Gremlint, an engineer uses quite a lot less time they might have originally needed to detangle a given issue. This means it can be safely used in tandem with other code formatters.
Developing the Gremlin Code Formatter: Motivation and Aspirations
We caught up with Øyvind over coffee to talk about the Gremlint project, what inspired him to create it and how it has progressed from a personal creation to a valuable tool for other developers.
What inspired you to create Gremlint?
I actually started learning Gremlin through trial and error when I began as an intern at Ardoq.
Now I primarily work as a front-end developer, but I also write a lot of Gremlin code. There are formatting tools available for a number of different programming languages, but I couldn’t find any for Gremlin. Without a tool like this, a lot of time is spent making our queries readable, almost as much as actually writing it in the first place.
Large Gremlin queries can quickly become difficult to read if not well-formatted. Having a code formatter for Gremlin would make it easier to write readable Gremlin code. It helps establish a standard way of communicating Gremlin and saves a lot of time spent trying to understand someone else’s formatting style. Personal software projects tend to be a bit overambitious and often never get finished. What intrigued me about Gremlint was that it seemed quite achievable, with a clear, limited scope. I was also inspired to see this project to the end because I knew that the completion of Gremlint would help solve a problem I face daily, a clear measure of success.
Gremlint is now Apache TinkerPop’s official Gremlin code formatter. How did that happen?
I hacked together the first version of Gremlint during Christmas of 2018. It didn’t adhere to the official TinkerPop style guide, but it worked pretty well, so I made it available as an online Gremlin query formatter that could be accessed through gremlint.com. As early as a few months after launch, it was already gaining up to 100 visits a day which was very encouraging. Despite its limitations that initial version of Gremlint showcased the power and demand for making Gremlin code instantaneously readable while typing it. At some point, it was discovered by Stephen Mallette, the Chair of Apache TinkerPop’s Project Management Committee, who wrote about it in a Gremlin-users Google group. The Gremlint website then started to gain more traction in the community.
Stephen later reached out to me personally, expressing his interest in getting Gremlint more aligned with the official Gremlin style guide. He saw the potential for Gremlint to serve as an official “living” style guide for the Gremlin query language. Coincidentally I was already well on my way to recreating a new and improved Gremlint from scratch. It eventually reached a point where it aligned with the TinkerPop style guide and Stephen raised the question about whether I would be willing to let Gremlint become part of TinkerPop.
How big a role did Ardoq play in this project?
Ardoq is incredibly supportive of the growth of its developers. 10% of our time can be dedicated to personal projects, be it contributing to open source projects or experimenting with new technology. Gremlint was one of the projects that came out of this culture of encouraging innovation and experimentation. Ardoq also fully compensated me for the time I spent making Gremlint in exchange for making it a joint donation to The Apache Software Foundation.
How do you feel about the donation of Gremlint to The Apache Software Foundation?
Like much of the contributing open source community, I find joy in knowing that the well-recognized software I use every day is partly written by myself. I knew that donating it could help earn more recognition in the community for myself as a developer and for the project. It is definitely very satisfying to know that you wrote the official TinkerPop Gremlin code formatter. It’s also quite cool to get the Ardoq name out there in the graph community.
It is my hope that having Gremlint managed by TinkerPop will make it more visible to the Gremlin community, which in turn will help it evolve further through crowdsourced feedback and with the aid of developers besides myself.
Øyvind is just one of many Ardoqians who exemplify our values, driving innovation at every level of the organization every day. Driven, creative individuals are the lifeblood of Ardoq and we are always on the lookout for more bold and skilled developers to help us drive innovation. If you’re interested in joining us:Deborah Theseira Deborah is a Content Specialist at Ardoq. She wields words in the hope of demystifying the complex and ever-evolving world of Enterprise Architecture.