The Unexpected Joys of Open Source

A brief flirtation with viral success brought new attention to one of my #Python libraries and some real-world applications of the workings of #OpenSource.

Cover Photo by NEOM / Unsplash

Readers who have stuck around might recall my big project last year. It was a study on the readability of legislation in Singapore and how much “Plain Laws” drafting affected it. (Spoiler alert: limited, if any).

I wrote a Python library called “#redlines” while writing that post. I needed to represent changes in text like the “track changes” function in Microsoft Word, which was the most familiar method to my audience of lawyers. I couldn't find any libraries to do this in Markdown, so I created one and published it anyway.

You can read more on “how it works” in the original post on this library.

I publish most of my coding publicly on my GitHub. I do it with little expectation that anyone would use it. This post discusses my motivations for publicising almost all of my coding work.

So, something strange happened while I was suffering from an acute attack of imposter syndrome last week. My humble Python library suddenly got stars, and I even received a pull request.

I'm grinning ear to ear at receiving such a dubious achievement.

I found out that the reason for its sudden traffic was that the library was used briefly in a prompt engineering course.

☝🏼If you want to upgrade your ChatGPT skills, being more familiar with prompt engineering is probably the most effective. The course is taught by Andrew Ng, one of the leading lights in data science, and I adored his book too. So, if you need a storm into prompt engineering, this course looks apt!

I was completely unprepared for this. In particular, I wasn't sure how to handle other people's comments on my code. I got lost in understanding how to evaluate a pull request. I'm a lawyer, not a coder!

Luckily for me, this particular pull request was well written, complete with tests and documentation, and the author was responsive, so I had a smooth time working on it.

Given that there are many resources on how to make a contribution, but not much on how to accept them, I reckon I need more experience in maintaining my public work.

For now, I realised that I do have an attachment to my code, and I do have some mental barriers to other people trying to “correct” them. As a maintainer, I have lots of options, including speaking to the contributor as well as merging first, then modifying them later for eventual release.

Ultimately, it's great to be able to apply the open-source principles I want to live by to my work. It's also a great reminder for me to take more care of the libraries I make. 😔

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