Adding a feature is easy; supporting and maintaining it is a nightmare!
Photo by Rafa Prada
One day we received a feedback from one of our users asking us that it’d be great if LightPaper supported Mermaid library out of the box.
We had never heard of Mermaid library before and when we started looking into it, we couldn’t believe how we could have never heard about such an awesome library before. Mermaid allows you to use Markdown like syntax for adding different types of diagrams.
Mermaid and LightPaper — a match made in heaven?
As you might already know, Markdown allows you to do almost everything you can with a traditional word processing software but with the power of plain texts. Markdown means content first; formatting is only an artifact and an afterthought. With Markdown (and some language extensions), you can add things such as tables, images and links, footnotes, TOC etc.
The only thing that was missing from Markdown was an easy way to add diagrams with only plain texts. Considering all these, supporting Mermaid in LightPaper made a perfect sense.
But wait…
“the most important job as a developer is not to just implement a feature but is to understand the root of the problem is and find out what actually is the job-to-be-done.”
As developers, it is always tempting to just go ahead and implement a feature. But the most important thing is to figure out what actually the problem is and what actually is the “job to be done”.
Supporting Mermaid was not actually the main problem. The main problem was to be able to easily add a third-party library to extend the features of LightPaper.
Supporting a feature out-of-the-box is a great marketing tool. But we knew if we just supported Mermaid out-of-the-box then request for adding some other libraries will keep coming. And there were other possible issues:
- Burden of maintaining it forever
- Bloated codebase
- Users have to depend on us to release the latest version of the libraries
- Support nightmare — users would think that the library is part of our product and would contact us for anything wrong with the library even asking for help with the library.
Think of adding every feature as getting married to it — once committed, it’s very complicated to back out.
Don’t give a fish but…
So to avoid these possible headaches, we added a new feature in LightPaper 1.2 that allows users to add any arbitrary CSS or JavaScript sources. This is great because now you can not only add any third-party libraries but also hook-in your own script and custom CSS. This way you can modify the output without having to write or change a preview theme.
This actually opened a lot of other possibilities. Adding something like MathJAX is now easy and so is adding PrismJS — even if LightPaper support both of them out-of-the-box. Or even adding support for other plaintext formats such as TaskPaper, Textile, Fountain using PlainTextJS.
We asked our beta users to try out this new feature and so far we’ve only received positive reviews. Even the user who actually told us about Mermaid said that this is better than just supporting the library out-of-the-box:
I can’t tell you how cool this is.
Not the first time…
Actually, we’ve done something similar before when people asked for being able to upload an article directly to popular blogs such as WordPress, Tumblr, Medium etc. What we discovered eventually was that most people actually wanted to see how a blog post would finally look like — sort of real preview. And this is why instead of supporting 10 different blogs and the headaches that come with it, we introduced Real Preview in LightPaper v 1.1 and, again, users love this feature!
Killing multiple birds with one stone…
So next time when users ask you for a feature, instead of just diving into it and start implementing, think more about the actual problem. Try putting yourself into the shoes of your users and see if the problem could be solved for larger audience. This will save you time and resources not only during the implementation phase but also in the future when you actually have to support it.
Tired of an expensive markdown editor that looks and functions like the “Notepad” app? Try LightPaper for OS X.
LightPaper lets you write your documents/articles/blogs using powerful features such as markdown, folder navigator, real and live preview, shadow notes, multi-tabs, custom styles, distraction free mode, syntax highlighting, math rendering, full GFM support including GitHub tasks, Jekyll rendering, and more.
Try LightPaper for OS X