Workshopping my little story about redlines

Should I submit this as a talk to #geekcampsg?
I originally reserved this for Tech.Law.Fest, but chickened out when I was not sure there was an opportunity to speak. (On hindsight, my hunch was probably right.)I am thinking about lots of things: is this an interesting topic to share, is it a 5-10 mins or 30-45 mins presentation? While I continue procrastinating on taking the plunge, I thought I would outline the topic here for future reference. Feel free to let me know of your comments!

A lawyer is drawing thick red lines on a document.

It begins with an itch

This story begins when I heard that the #Singapore government decided to simplify its legislation by replacing words with other words. For example, a “writ” is now known as a “originating application”. While I identified with the end goal, I didn’t agree with the method of doing it. My argument wasn’t that I didn’t like the words chosen, it was that the effect was minimal.If you want to read the result of that project, you can take a look at it here.

In order to describe this argument, I needed to compute the differences between versions of legislation and show such changes. When I looked for a way in Python to describe differences in text, I found this:

['    1. Beautiful is better than ugly.\n',
 '-   2. Explicit is better than implicit.\n',
 '-   3. Simple is better than complex.\n',
 '+   3.   Simple is better than complex.\n',
 '?     ++\n',
 '-   4. Complex is better than complicated.\n',
 '?            ^                     ---- ^\n',
 '+   4. Complicated is better than complex.\n',
 '?           ++++ ^                      ^\n',
 '+   5. Flat is better than nested.\n']

A coder familiar with Python might be able to quickly tell the difference, but to my intended audience of lawyers and non (Python) coders, it looks like a bunch of gobbledygook. I needed something more familiar, like Microsoft Word’s track changes. I also needed in Markdown since this was how Jupyter Notebooks and Streamlit like their text.

I was shocked I couldn’t find anything so I wrote some code myself. It took me about a week of my spare time to whip out a package. [The post I wrote in 2022 gives more technical details on how the code was written.] The results looked good enough for a side project of a side project.

A screen capture of PLUS explorer showing the redlines library in action.

That did the job for me and I was happy to leave it as is.

Oh, and to help somebody else, I decided to spin off the code and publish it as an open source standalone package on the #Python package index. It was free anyway, so whatever right? I moved on with my life in relative peace.

I wake up starry eyed

My peaceful life continued quietly for a bout a year as I worked on other things like my day job and ChatGPT. One morning, I woke up to find that my tiny open source project suddenly acquiring a lot of stars on GitHub.

Screenshot of a page on GitHub showing that I reached my stargazer achievement

I was confused until I realised that it was being used to show changes made by AI in an online course. [I wrote about more initial reaction in a post earlier this year.]

Since then, I have done many things I could only do as an open source maintainer:

I never thought when I was just scratching my itch that I would have written a library that other people are using. It’s really gratifying to watch it grow from humble beginnings, especially since I never considered myself to be a professional coder or some of the other really smart guys I admire.

What are some of the challenges of being a maintainer?

Being a maintainer rather than a user required a big shift in thinking.

What’s the benefits of doing this project?

I have been a #lawyer all my professional life. The way which many lawyers work is very alien to #OpenSource. The caricature looks like this: our work has to be perfect when it is submitted to court or the client. Lawyers don’t develop in the open or in an “agile” manner. Lawyers have to be the smartest in the room, so we don’t regard comments or feedback from others on our work kindly.

Obviously I don’t regard myself as that kind of lawyer, although reality can be very challenging. As far as side projects go, this ticks many boxes:

Another important benefit for me is that I get to meet many new people both online and offline. Frankly, I am the kind of guy who dislikes drinks and meet ups. Many of the people who are interested in a free and open source project that isn’t going to make the news or a lot of money tend to be genuine people. So all this is very gratifying and I have learnt a lot from them.

I do wish more lawyers would try this out, and since this is an open source project, there are many ways to contribute.

What’s next for me

I have a lot of plans for redlines. It’s all there in the issues page or readme on the GitHub repo.

Having gained some experience in maintaining an open source project, I am obviously looking for something more ambitious. I’ll be looking out and hopefully this time I am going to get some help from the open.

Author Portrait
Love.Law.Robots. – A blog by Ang Hou Fu