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 open-source.
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.
I publish most of my coding publicly on my GitHub. I do it with little expectation that anyone would use it.
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 found out that the reason for its sudden traffic was that the library was used briefly in a prompt engineering course:
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. 😔