Love.Law.Robots. by Ang Hou Fu

blog

I write about why I decided to move from Ghost to Writefreely.

My blog has been a curious fixture in my family.

I never think of myself as a “sales” man. I've seen many classmates sell more raffle tickets than me in school. Heck, I even thought that making partner was too much for me. Convincing people to hand over their cash? That's not me.

It's essential, though. One of my first lessons as an associate was that research and submissions count for nothing until the client pays the invoice. Being a law firm partner is not so much about being the sharpest knife in the firm but bringing in the dough. You have to network, you have to serve, and you've got to make people hand over the money.

Part of growing up (read: growing old) is being more comfortable with your skin. Lately, I have recognised other traits in me — tenacity, a willingness to try, and under all that unwillingness to socialise with others, gobs of empathy. I can think of some jobs I am uncomfortable with, but I must keep finding something that fits me.

That's what this blog is about, and it will stay that way for a while.

Read more...

Feature image

Oh no, Elon Musk has acquired Twitter. Bad things will happen.

I had this premonition months ago when Elon Musk toyed with the idea. I thought it was a dumb idea for him, but people do dumb things all the time and still turn out fine.

Smart people (or so I’ve heard) started exploring alternatives to Twitter. Many of them were led to Mastodon. I am way ahead of these guys.

Months ago, when I received word (on Twitter!) that Elon Musk was entertaining his silly idea to buy Twitter, it was time for me to dive into Mastodon finally. I got my account and a client on my phone and figured out that the star is like, reblog etc.

I was ready to drop Twitter.

How to be part of the Mastodon

To be in Mastodon, you have to sign up at a server. This first step appears to be the most difficult for new users. Which server do I join? What difference does it make? Interestingly, this first step is probably the most inconsequential. Unless you plan to move fast and break some content or moderation policies, joining a public server like https://mstdn.social/ or https://mastodon.online is good enough for trying Mastodon out.

Currently, I am not aware of a public Singaporean Mastodon server (I have long been interested in running one, but I am not sure who is interested in using it). If you want to join one, you can quickly move your existing account to that server or create a new one.

While the above instructions work if you’re using your web browser, you can also do the same by installing a mobile app on your phone. There are dozens of clients you can use on your phone. I used the official one, Tusky was quite all right. Twidere sounded interesting too.

Once you have downloaded your phone app and signed up on a server, you will find Mastodon to be like a pretty basic Twitter to a great extent. It’s also pretty basic because you wouldn’t find any ads or algorithms curating content.

A futuristic Mastodon introduction for 2021:Focusing on things that come up frequently and I don’t see explained that often. Here’s the lede: You can’t ever see or search everything...! This post explains a lot about what Mastodon is for beginners.

The Wonders of the Fediverse

Most people get very confused with the first step because when they want to leave Twitter, they expect the alternative to be like Twitter. It raises good questions like the following:

I'm not sure I get Mastodon. The first step seems like you have to pick a tribe—which is the source of like 90% of the problems on Twitter. And then I have lots of unanswered questions. Who runs the servers? Who pays for it? Privacy? What happens if it gets big? And so on...

— David Beazley (@dabeaz) October 28, 2022

The easy answer is that each “tribe” or Mastodon instance is a tiny “Twitter” server. When you signed up to Twitter, you expected a service, not a tribe. On the other hand, because anyone can run a service, several instances have their own unique identity, whether it's a public or private instance, who they accept to join and what content moderation policies they have.

The idea that you can start your server and join the conversation with other servers is mind-blowing. This is why a big tech company or the wealthiest person in the world can’t buy the Fediverse, it’s made up of different disparate parts, and you can move to any server you want based on the same open-source program.

Once you start thinking harder about these issues, you’re one step away from discovering the Fediverse. You’re going to find an app for almost every social activity on the internet running on the same principles:

  • Pixelfed for Instagram
  • OwnCast for podcasting or streaming
  • BookWyrm for books
  • It looks possible even for WordPress

… But I still have not left Twitter

Notwithstanding my excitement about the Fediverse, I am still using Twitter.

And therein lies a pretty hard truth about social networks. Many of the networks I created following users on Twitter can’t be ported over to Mastodon simply because these users aren’t there. So, if I wanted to follow my latest insights on law twitter and journalists, it appears that Twitter is inescapable.

So, I would discount the reports of Twitter (or Facebook) meetings its demise without the wholesale movement of people off it. Far more than features and content, it appears that the actual value of a social network is the number of friends on it.

Heidi Li Feldman (@[email protected])With thanks to @konrad and @pedantka for the precedents, I have created a Google form to help build a list of #lawyers #lawprofs #legalacademics for a #LawFedi hashtag. Consider adding yourself to to help folks find you and each other. Google form: https://forms.gle/hzzbqzvq754NQzDv7 #LawFedi spr…MastodonIn the meantime, you can check out this post collecting lawyers on the Fediverse.

I’d be keeping my Mastodon app account shortcut pretty on my phone next to my Twitter app for now.

#blog #Fediverse #Mastodon #Twitter #SocialNetwork #OpenSource

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

Feature image

If you’re interested in technology, you will confront this question at some point: should I learn to code?

For many people, including lawyers, coding is something you can ignore without serious consequences. I don’t understand how my microwave oven works, but that will not stop me from using it. Attending that briefing and asking the product guys good questions is probably enough for most lawyers to do your work.

The truth, though, is that life is so much more. In the foreword of the book “Law and Technology in Singapore”, Chief Justice Sundaresh Menon remarked that technology today “permeates, interfaces with, and underpins all aspects of the legal system, and indeed, of society”.

I felt that myself during the pandemic when I had to rely on my familiarity with technology to get work done. Coincidentally, I also implemented my docassemble project at work, using technology to generate contracts 24/7. I needed all my coding skills to whip up the program and provide the cloud infrastructure to run it without supervision. It’s fast, easy to use and avoids many problems associated with do-it-yourself templates. I got my promotion and respect at work.

If you’re convinced that you need to code, the rest of this post contains tips on juggling coding and lawyering. They are based on my personal experiences, so I am also interested in how you’ve done it and any questions you might have.

Tip 1: Have realistic ambitions

Photo by Lucas Clara / Unsplash

Lawyering takes time and experience to master. Passing the bar is the first baby step to a lifetime of learning. PQE is the currency of a lawyer in the job market.

Well, guess what? Coding is very similar too!

There are many options and possibilities — programming languages, tools and methods. Unlike a law school degree, there are free options you can check out, which would give you a good foundation. (Learnpython for Python and W3Schools for the web come to mind.) I got my first break with Udemy, and if you are a Singaporean, you can make use of SkillsFuture Credits to make your online learning free.

Just as becoming a good lawyer is no mean feat, becoming a good coder needs a substantial investment of time and learning. When you are already a lawyer, you may not have enough time in your life to be as good a coder.

I believe the answer is a strong no. Lawyers need to know what is possible, not how to do it. Lawyers will never be as good as real, full-time coders. Why give them another thing to thing the are “special” at. Lawyers need to learn to collaborate with those do code. https://t.co/3EsPbnikzK

— Patrick Lamb (@ElevateLamb) September 9, 2022

So, this is my suggestion: don’t aim to conquer programming languages or produce full-blown applications to rival a LegalTech company you’ve always admired on your own. Focus instead on developing proof of concepts or pushing the tools you are already familiar with as far as you can go. In addition, look at no code or low code alternatives to get easy wins.

By limiting the scope of your ambitions, you’d be able to focus on learning the things you need to produce quick and impactful results. The reinforcement from such quick wins would improve your confidence in your coding skills and abilities.

There might be a day when your project has the makings of a killer app. When that time comes, I am sure that you will decide that going solo is not only impossible but also a bad idea as well. Apps are pretty complex today, so I honestly think it’s unrealistic to rely on yourself to make them.

Tip 2: Follow what interests you

Muddy HandsPhoto by Sandie Clarke / Unsplash

It’s related to tip 1 — you’d probably be able to learn faster and more effectively if you are doing things related to what you are already doing. For lawyers, this means doing your job, but with code. A great example of this is docassemble, which is an open-source system for guided interviews and document assembly.

When you do docassemble, you would try to mimic what you do in practice. For example, crafting questions to get the information you need from a client to file a document or create a contract. However, instead of interviewing a person directly, you will be doing this code.

In the course of my travails looking for projects which interest me, I found the following interesting:

  • Rules as Code: I found Blawx to be the most user-friendly way to get your hands dirty on the idea that legislation, codes and regulations can be code.
  • Docassemble: I mentioned this earlier in this tip
  • Natural Language Processing: Using Artificial Intelligence to process text will lead you to many of the most exciting fields these days: summarisation, search and question and answer. Many of these solutions are fascinating when used for legal text.

I wouldn’t suggest that law is the only subject that lawyers find interesting. I have also spent time trying to create an e-commerce website for my wife and getting a computer to play Monopoly Junior 5 million times a day.

Such “fun” projects might not have much relevance to your professional life, but I learned new things which could help me in the future. E-commerce websites are the life of the internet today, and I experiment with the latest cloud technologies. Running 5 million games in a day made me think harder about code performance and how to achieve more with a single computer.

Tip 3: Develop in the open

Waiting for the big show...Photo by Barry Weatherall / Unsplash

Not many people think about this, so please hang around.

When I was a kid, I had already dreamed of playing around with code and computers. In secondary school, a bunch of guys would race to make the best apps in the class (for some strange reason, they tend to revolve around computer games). I learned a lot about coding then.

As I grew up and my focus changed towards learning and building a career in law, my coding skills deteriorated rapidly. One of the obvious reasons is that I was doing something else, and working late nights in a law firm or law school is not conducive to developing hobbies.

I also found community essential for maintaining your coding skills and interest. The most straightforward reason is that a community will help you when encountering difficulties in your nascent journey as a coder. On the other hand, listening and helping other people with their coding problems also improves your knowledge and skills.

The best thing about the internet is that you can find someone with similar interests as you — lawyers who code. On days when I feel exhausted with my day job, it’s good to know that someone out there is interested in the same things I am interested in, even if they live in a different world. So it would be best if you found your tribe; the only way to do that is to develop in the open.

  • Get your own GitHub account, write some code and publish it. Here's mine!
  • Interact on social media with people with the same interests as you. You’re more likely to learn what’s hot and exciting from them. I found Twitter to be the most lively place. Here's mine!
  • Join mailing lists, newsletters and meetups.

I find that it’s vital to be open since lawyers who code are rare, and you have to make a special effort to find them. They are like unicorns🦄!

Conclusion

So, do lawyers need to code? To me, you need a lot of drive to learn to code and build a career in law in the meantime. For those set on setting themselves apart this way, I hope the tips above can point the way. What other projects or opportunities do you see that can help lawyers who would like to code?

#Lawyers #Programming #LegalTech #blog #docassemble #Ideas #Law #OpenSource #RulesAsCode

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

Feature image

I was shocked when Mailgun informed me that they would charge me $35 a month to send emails. $35 for sending 150 emails a month is a tad ridiculous. In the end, I managed to switch to a more suitable plan. Since I switched from Ghost(Pro) to a self-hosted install, these costs seem to keep popping out.

It reminds me that this blog is still a modest operation, and every little development is a blessing to me.

How much does it cost to run Love.Law.Robots?I code. I law. I am a unicorn.Love.Law.Robots.HoufuFind out more about the costs involved in running a blog.

New Features for Members

Since I started blogging in 2017, this blog has gone through several guises. WordPress on OpenLiteSpeed, Hugo/Jekyll and now Ghost.

I was drawn to Ghost last year because of its newsletter and membership features. Writing a newsletter was a new frontier then. It also solved my concern about knowing how to write more personally and professionally simultaneously.

SubscriptionWhy you should subscribe to Love.Law.Robots. This is my quirky little blog detailing my journeys in the world of tech and law. Subscribing to this blog gives you lots of nice things: 1. Analysis: Bringing my unique vantage as a coder, a lawyer, and someone from a differentLove.Law.Robots.HoufuSome of my motivations for doing a newsletter are also mentioned here.

I didn't realise that I was growing up with the platform too. Ghost has introduced several new features since I joined. Here are a few which popped up in recent weeks.

You can now comment on posts:

Interact with the post. Give it a go!

I've long been sceptical of comments on blog posts. (I still remember reading weird offers on my WordPress blog. The name Akismet still rings bells in my head.) I reckon they are an exciting way to interact with my writing.

Whatever my feelings about blog comments, you can be sure that I will read the comment you post almost immediately.

To post a comment, scroll to the bottom of the post, right before the related post section. Click on a box and start a conversation!

Oh, you have to be a member too. Subscribing is free!

If you receive this newsletter via email, you always have the option of replying to the email to talk to me directly.

0:00

/

Search is hard to do, but thanks to Ghost, I finally have it.

Now you can access all the posts in my 4-year archive by searching for keywords. The search also allows you to access content by tags to see groups of posts under specific themes.

Check out the video to find the magnifying glass button and give it a try!

Features – Love.Law.Robots.Love.Law.Robots.On the other hand, I tried having these headline posts so that you can find additional content in the archives. Several posts are members only!

Premium Member newsletters?!

I now can make paid subscriber-only previews. (Previously, the only way I can make paid subscriber content is to mark them as paid only)

As the months go by, I have come up with an easy separation. I publish all my tutorials and lengthy posts on the blog and send out personal, direct communications via the newsletter. (I am betting that if you subscribe, you are interested to know more about me and my projects)

It's unclear how to do this exclusive paid subscriber-only content. The suggestion is to create a content funnel by getting readers to want more. I am still figuring out what's the best way.

Conclusion

I am always excited to try new features and bring them to you. Hopefully with these recent changes, I can get more value to you. How else do you think I can improve the experience on this blog? Use the comments!

#blog #News #Newsletter

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

Feature image

I wrote this “emergency” post to note that after what seemed to be a lifetime of debate, the government has given the most unambiguous indication that section 377A of the Penal Code will be repealed.

Section 377A is a provision inherited from our colonial masters criminalising sex between men, including in private.

Although this is a hot topic and has something to do with law and love, I've stayed away from it on this blog mainly because you can find other places with better write-ups on it. In case anyone wants my opinion on it, I don't know why it's taken so long and become so hard.

e-Archive | SAcLJ | AP Journals Onlinee-First MenuEven the former Chief Justice waded in.

Section 377A is ridiculous because it's straightforward why it should be repealed. Simply stated, we don't put men who have sex with each other in jail. However, the repeal of section 377A has become an apocalyptic symbol of the downfall of society for some.

This brings me to the uneasy compromise: I wouldn't accept having a constitutional amendment to “enshrine” marriage between a man and a woman for the repeal of section 377A. It's like we decided to recognise the dignity of gay couples only to take it away at the same time.

Not just vanilla illegal, but constitutionally illegal. They're going to amend the supreme law of the land—the one that all other laws have to align with—to say that we, Singapore, as a country, do not and will not recognise same-sex couples as a legal family unit. https://t.co/MwTPijlzvO

— Kirsten Han 韩俐颖 (@kixes) August 21, 2022

I am not sure this constitutional amendment makes sense politically. Section 377A is inherited, so we can't blame the government of the day for it. On the other hand, they will own a constitutional provision which apparently can't be challenged in court, so they can't pass off its effects to the courts as they do for the death penalty.

Constitutional amendments are easy now because the government has had a supermajority forever. It's not clear whether this will be the case in the future. If for some reason, we are stuck with something more challenging to change than section 377A, we now risk splintering society even further with no easy way out.

I feel that this “compromise” was meant to end the debate on LGBTQ issues by giving these weird people whatever they were clamouring for in the first place.

Bigger fights are on the way: workplace discrimination is among the most interesting ones for me. Marriage for all sorts of couples? That's another big one that we've never debated (but is now going to be constitutionally enshrined?).

Will Singapore’s new workplace discrimination law be a win for equality?By conflating protectionism with traditional workplace discrimination, we risk creating a watered-down law that fails to address the real discrimination faced by people from from marginalised groups.JomDaryl Yang

So, I honestly think this compromise is a trojan horse, and I would never have accepted it if it was up to me. However, that's my principles, and I think the current situation demands we take what the government of the day has given us.

If you, like me, feel a bit discouraged that this debate has ended this way, I would remind myself of this: There is one difference between the people who would like marriage equality and those who don't. Only one of these groups has real victims who are hurt by the policies we chose as a society. When we recognise them, there is only one answer to these questions.

So, have faith that love conquers all. Good night.

#blog #News #Newsletter #Government #Law #Singapore

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

Feature image

It’s going to be a busy week! I’ll be attending the conferences below:

Here are the sessions that I am looking forward to:

SCCE Singapore Regional 2022

Of all the conferences, this is probably the one with the most practical topics I can apply to my work. So, although maintaining those Continuing Education Units for my certification is a serious challenge (40 points in 2 years?! Video conference at 1am?! 🤮), membership is still very useful to me.

Compared to last year’s regional, I think this one has far more breadth and indeed some depth into hot topics like ESG and Digital Data Management. Hot favourites like compliance training and supply chain management make an appearance too.

I am particularly curious about the finale: “Are robots running the compliance program?” Automation in compliance is that small victory that I think cash- and human resource-strapped compliance departments should look into. From the handout, the “automation” is Microsoft Power Automate, which while simple to understand and used in many corporate environments, is not as widely applicable compared to something like Zapier. Let’s see what new ideas I will get!

Automate Boring Stuff: Get Python and your Web Browser to download your judgementsThis post is part of a series on my Data Science journey with PDPC Decisions. Check it out for more posts on visualisations, natural languge processing, data extraction and processing! Update 13 June 2020: “At least until the PDPC breaks its website.” How prescient… about three months after I wroteLove.Law.Robots.HoufuIt's always important to automate the boring stuff.

IAPP Asia Privacy Forum

They took a long time to flesh this out — back when I bought the early bird ticket in early June, half of the programme was labelled to be confirmed. I’m glad they managed to flesh this out. It’d be my first IAPP Conference even though I have been a member and am CIPP/A-certified since 2019.

I am a pretty practical person, so I am going to list things that have meaning to me.

  • Building Privacy Technology Into Your Privacy Programme ” — Privacy by Design is one of those revolutionary concepts introduced by the GDPR that you probably don’t hear enough about. Privacy engineering has always been very fascinating to me too.
  • Towards Innovative and Global Solutions for Trans-Border Flow ” — The biggest challenges in Singapore isn’t really complying with the PDPA here but dealing with the implications of having an open economy. In my context, a regional HQ is a hub for data flows so having an interesting way to handle them will be useful.
  • Implementing Privacy in Yet-to-Mature Geographies ” — Related to the previous point, we are in a region where jurisdictions have not had much experience in privacy. Thailand recently made its GDPR-like law effective. Indonesia is still toying with the idea. India’s comprehensive data protection law appears to be trapped in legislative purgatory. Coping strategies will be very appreciated.

Alongside IAPP Asia Privacy Forum, the Singapore PDPC also organise the Singapore version of a conference. Topics seem quite interesting, but given my decreasing focus on data privacy in recent years, I am going to give it a pass.

TechLaw.Fest

It’s my third TechLaw.Fest and my first in person!

Actually. I don't know whether this is an in-person event. Something about the metaverse.

I count myself as a sceptic of the metaverse and was actually profoundly upset that the programme focuses almost entirely on this topic. Compared to last year where there was an even spread, this year looks like an advertorial to convince you that there is something special.

Three Things: TechLawFest 2021I debrief on the TechLawFest in Singapore which ended recently with three key takeaways.Love.Law.Robots.HoufuCompared to last year...

Anyway, I am still sorting out my registration because, frankly, the organisation of this event is messy this year.

I will be hiding out in the Tech Talks section this year. I don’t want to hear a big talk about a fad which no one will care about in a year or two. The metaverse is like cryptocurrency and NFTs; somebody is pouring lots of money into it but nobody honestly has high hopes about it.

Live by the Code… Die by the Code?The excitement about Cryptocurrency and NFTs has turned to panic and loss. Will something different take its place?Love.Law.Robots.HoufuIn an earlier post, I wondered whether the fallout from cryptocurrency will bring forth something good.

Some of the things I wish they covered:

  • The fallout about Crypto Currency and NFTs: This is an awesome topic for litigators and restructuring professionals with all the news going around of bank runs, fraud and corporate dissolutions. To be fair, I have a suspicion that this is going to be covered in “ ** What Happens in the Metaverse Doesn’t Stay in the Metaverse: How Laws Apply Such That In-world Crime Could Mean Real-world Punishment** ” on the Main Stage on 22 July 2022.
  • AI Regulation — I believe there are some major advances in the field (in Europe, I think?) and this is a topic that is getting closer to law and regulation once the technology is more mainstream. The IMDA also released its own AI Governance Testing framework and toolkit in May, so I am surprised nobody wants to talk about it here.
  • I wouldn’t complain about learning more about legal operations. To be fair, “ ** The Virtual Lawyer: How Digitalisation is Changing the Business of Law** ” on the Main Stage on 21 July 2022 seems related. I am going to be rather peeved if it’s about how I can appear as an avatar to my colleagues… as if using Microsoft Teams wasn’t lame enough.

The past two years have forced a reckoning that the brick-and-mortar law office may not be as essential to lawyering as was assumed by many for a long time. In this session, we hear from a range of legal professionals wrestling with digitalisation and the business of law. #tlf22 pic.twitter.com/ShnH1DRCup

— TechLaw.Fest (@TechLawFest) July 13, 2022

Conclusion

There's going to be lots to do, and I am going to practice live tweeting this year so that I would get better at it. Last year, I tried to write a roundup but it was really tiresome, so please follow me on Twitter!

#blog #Compliance #Cryptocurrency #Ethics #Law #News #NFT #PersonalDataProtectionAct #Privacy #Singapore #TechLawFest #TechnologyLaw #IAPP #SCCE #DataProtectionOfficer

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

Feature image

This is the story of my lockdown during a global pandemic. [ Cue post-apocalypse 🎼]

Amid a global pandemic, schools and workplaces shut down, and families had to huddle together at home. There was no escape. Everyone was getting on each others' nerves. Running out of options, we played Monopoly Junior, which my daughter recently learned how to play. As we went over several games, we found the beginner winning every game. Was it beginner's luck? I seethed with rage. Intuitively, I knew the odds were against me. I wasn't terrible at Monopoly. I had to prove it with science.

How would I prove it with science? This sounds ridiculous at first, but you'd do it by playing 5 million Monopoly Junior games. Yes, once you play enough games, suddenly your anecdotal observations become INSIGHT. (Senior lawyers might also call it experience, but I am pretty sure that they never experienced 5 million cases.)

This is the story of how I tried different ways to play 5 million Monopoly JR games.

What is Monopoly Junior?

Front cover for the box of the board game, Monopoly JR.The cover for the Monopoly Junior board game.

Most people know what the board game called Monopoly is. You start with a bunch of money, and the goal is to bankrupt everyone else. To bankrupt everyone else, you go round the board and purchase properties, build hotels and take everyone else's money through rent-seeking behaviour (the literal kind). It's a game for eight and up. Mainly because you have to count with hundreds and thousands, and you would need the stamina to last an entire night to crush your opposition.

If you are, like my daughter, five years old, Monopoly JR is available. Many complicated features in Monopoly (for example, counting past 30, auctions and building houses and hotels) are removed for young players to join the game. You also get a smaller board and less money. Unless you receive the right chance card, you don't have a choice once you roll the dice. You buy, or you pay rent on the space you land on.

As it's a pretty deterministic game, it's not fun for adults. On the other hand, the game spares you the ignominy of mano-a-mano battles with your kids by ending the game once anyone becomes bankrupt. Count the cash, and the winner is the richest. It ends much quicker.

Hasbro Monopoly Junior Game,A69843480 : Amazon.sg: ToysHasbro Monopoly Junior Game,A69843480 : Amazon.sg: ToysInstead of letting computers have all the fun, now you can play the game yourself! (I earn a commission when you buy from this amazon affiliate link)

Determining the Approach, Realising the Scale

Ombre BalloonsPhoto by Amy Shamblen / Unsplash

There is a pretty straightforward way to write this program. Write the rules of the game in code and then play it five million times. No sweat!

However, if you wanted to prove my hypothesis that players who go first are more likely to win, you would need to do more:

  • We need data. At the minimum, you would want to know who won in the end. This way, you can find out the odds you'd win if you were the one who goes first (like my daughter) or the last player (like me).
  • As I explored the data more, interesting questions began to pop up. For example, given any position in the game, what are the odds of winning? What kind of events cause the chances of winning to be altered significantly?
  • The data needs to be stored in a manner that allows me to process and analyse efficiently. CSV?
  • It'd be nice if the program would finish as quickly as possible. I'm excited to do some analysis, and waiting for days can be burdensome and expensive! (I'm running this on a DigitalOcean Droplet.)

The last point becomes very troublesome once you realise the scale of the project. Here's an illustration: you can run many games (20,000 is a large enough sample, maybe) to get the odds of a player winning a game. Imagine you decide to do this after every turn for each game. If the average game had, say, 100 turns (a random but plausible number), you'd be playing 20,000 X 100 = 2 million additional games already! Oh, let's say you also want to play three-player and four-player games too...

It looks like I have got my work cut out for me!

Route One: Always the best way?

I decided to go for the most obvious way to program the game. In hindsight, what seemed obvious isn't obvious at all. Having started programming using object-orientated languages (like Java), I decided to create classes for all my data.

An example of how I used a class to store my data. Not rocket science.

The classes also came in handy when I wrote the program to move the game.

Object notation makes programming easy.

It was also pretty fast, too — 20,000 two-player games took less than a minute. 5 million two-player games would take about 4 hours. I used python's standard multiprocessing modules so that several CPUs can work on running games by themselves.

Yes, my computers are named after cartoon characters.

After working this out, I decided to experiment with being more “Pythonic”. Instead of using classes, I would use Python dictionaries to store data. This also had the side effect of flattening the data, so you would not need to access an object within an object. With a dictionary, I could easily use pandas to save a CSV.

This snippet shows how the basic data for a whole game is created.

Instead of using object notation to find data about a player, the data is accessed by using its key in a python dictionary.

The same code to move player is implemented for a dictionary.

I didn't think it would make a difference honestly. However, I found the speed up was remarkable: almost 10 times! 20,000 two-player games now took 4 seconds. The difference between 4 seconds and less than a minute is a trip to the toilet, but for 5 million games, it was reduced from 4 hours to 16 mins. That might save me 20 cents in Droplet costs!

Colour me impressed.

Here are some lessons I learnt in the first part of my journey:

  • Your first idea might not always be the best one. It's best to iterate, learn new stuff and experiment!
  • Don't underestimate standard libraries and utilities. With less overhead, they might be able to do a job really fast.
  • Scale matters. A difference of 1 second multiplied by a million is a lot. (More than 11.5 days, FYI.)

A Common-Sense Guide to Data Structures and Algorithms, Second EditionBig O notation can make your code faster by orders of magnitude. Get the hands-on info you need to master data structures and algorithms for your daily work.Jay WengrowLearn new stuff – this book was useful in helping me dive deeper into the underlying work that programmers do.

Route 3: Don't play games, send messages

After my life-changing experiment, I got really ambitious and wanted to try something even harder. I then got the idea that playing a game from start to finish isn't the only way for a computer to play Monopoly JR.

https://media.giphy.com/media/eOAYCCymR0OqSN4aiF/giphy.gif

As time progressed in lockdown, I explored the idea of using microservices (more specifically, I read this book). So instead of following the rules of the game, the program would send “messages” depicting what was going on in a game. The computer would pick up these messages, process them and hand them off. In other words, instead of a pool of workers each playing their own game, the workers would get their commands (or jobs) from a queue. It didn't matter what game they were playing. They just need to perform their commands.

A schematic of what messages or commands a worker might have to process to play a game of Monopoly JR.When the NewGameCommand is executed, it writes some information to a database and then puts a PlayRoundCommand in the queue for the next worker.

So, what I had basically done was chop the game into several independent parts. This was in response to certain drawbacks I observed in the original code. Some games took longer than others and this held back a worker as it furiously tried to finish it before it could move on to the next one. I hoped that it could finish more games quickly by making independent parts. Anyway, since they were all easy jobs, the workers would be able to handle them quickly in rapid succession, right?

It turns out I was completely wrong.

It was so traumatically slow that I had to reduce the number of games from 20000 to 200 just to take this screenshot.

Instead of completing hundreds or thousands of games in a second, it took almost 1 second to complete a game. You wouldn't be able to imagine how long 5 million seconds would now take. How much I would have to pay DigitalOcean again for their droplets? (Maybe $24.)

What slowed the program?

Tortoise 🐢 Photo by Craig Pattenaude / Unsplash

I haven't been able to drill down the cause, but this is my educated guess: The original command might be simple and straightforward, but I might have introduced a laborious overhead: operating a messaging system. As the jobs finished pretty quickly, the main thread repeatedly asked what to do next. If you are a manager, you might know why this is terrible and inefficient.

Experimenting again, I found the program to improve its times substantively once I allowed it to play several rounds in one command rather than a single round. I pushed it so hard that it was literally completing 1 game in 1 command. It never reached the heights of the original program using the python dictionaries though. At scale, the overhead does matter.

Best Practices — Dask documentationThinking about multiprocessing can be counterintuitive for a beginner. I found Dask's documentation helpful in starting out.

So, is sending messages a lousy solution? The experiment shows that when using one computer, its performance is markedly poor. However, there are circumstances when sending messages is better. If several clients and servers are involved in the program, and you are unsure how reliable they are, then a program with several independent parts is likely to be more robust. Anyway, I also think it makes the code a bit more readable as it focuses on the process.

I now think a better solution is to improve my original program.

Conclusion: Final lessons

Writing code, it turns out, isn't just a matter of style. There are serious effects when different methods are applied to a problem. Did it make the program faster? Is it easier to read? Would it be more conducive to multiprocessing or asynchronous operations? It turns out that there isn't a silver bullet. It depends on your current situation and resources. After all this, I wouldn't believe I became an expert, but it's definitely given me a better appreciation of the issues from an engineering perspective.

Now I only have to work on my previous code😭. The fun's over, isn't it?

#Programming #blog #Python #DigitalOcean #Monopoly #DataScience

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

Feature image

The COVID-19 pandemic has changed many things, including a sudden prevalence of free online talks and seminars. If you're an introvert or have no qualms to stay up till late to catch what the other side of the world is doing, this is a boon.

I am afraid those days may be numbered. Once restrictions are rescinded, the push to go online would not be strong anymore. It's challenging holding an online event effectively, so many events may prefer to stick to its “core” audience.

When one window closes, perhaps one should look for others. Something old school still exists — books. They can deal with depth and complexity. At possibly a hundred dollars or two at most, books also seem fairly efficient in delivering information, compared to recorded videos.

A primer on technology law struggles to get on the same boat

I was excited about the forthcoming “Law and Technology in Singapore” book by the Singapore Academy of Law. Its mission felt ambitious:

This primer by experts in their respective fields offers students and practitioners an overview of the relevant technologies, a survey of their impact on the content of law today, and a window into future issues that may arise – as well as some of the potential solutions. The text is meant to be accessible to students and practitioners, as well as to interested laypersons. The authors have strived to be clear and avoid unnecessary jargon – simple, but not simplistic.

I managed to download the first chapter, which expands on the explanation quoted above and provides a roadmap of the book. If you want to know what's in the book, that chapter will be illuminating.

Lawyers are supposed to be wary of semantics, but I believe this needs highlighting. It's a book on the law and technology. Based on the road map in the first chapter, you're probably going to hear lots about technology and lots about law, but not much on practice. The road map spends three paragraphs on one chapter on legal education, which might not be surprising considering how many professors flood the list of contributors. One sentence mentions process automation and innovation in law practice in a chapter co-written by four professors. Thankfully though, it counts a founder of Rajah and Tann's digital arm as its other co-author.

Esplanade_whiteskyPhoto by OpticalNomad / Unsplash

I will be pessimistic and recount all my fears about what this book is going to be. Unlike most primers I am aware of, this book will be thick, heavy and impossible to finish in one night. Like almost every book that the Singapore Academy of Law publishes, it will have end to end walls of text. For lawyers on innovation, this might be an interesting reference book. Students will learn a lot from the text.

For innovative lawyers, I suspect that this book is not going to be helpful. If you are motivated enough to go through a hefty tome, you don't need more convincing that technology has a profound impact on the law. Substantive law is an essential aspect of a lawyer's toolkit, but this book's emphasis seems particularly heavy.

It's unfair to criticise a book on technology law for not having much content on the impact of technology on law and the changes facing the legal profession. Smart contracts, AI and the Internet are minor characters in the legal innovation story. In legal innovation, it's all about People , Process and Technology. The contributors list and the topics chosen don't reflect this.

A short aside: Books I recommend for the innovative lawyer

If you're an innovative lawyer and you want to do technology as opposed to talking about it, these books are far cheaper and contain much more actionable advice.

As an Amazon Associate, I earn from qualifying purchases made on the books linked here.

I've already reviewed “Sign Here” by Alex Hamilton. I remarked in the review that the book contains excellent insights and actionable advice on the interaction of technology and contracts, an essential aspect of law practice.

Five things I wish I learnt from “Sign Here” by Alex Hamilton“Sign Here” is great for anyone who wants to improve their contracting process, but it came too late for me.Love.Law.Robots.Houfu

If you want a real primer on legal innovation, I recommend Lucy Endel Bassli's “The Simple Guide to Legal Innovation”. ALSPs, alternative fee arrangements, legal operations, project management and a dozen other concepts feature here at a level lawyers of all levels of familiarity and students can grasp. Its reflections on the state of legal innovation in the States might appear alien in Singapore, but you'd still find enough here to make yourself the most thoughtful person in #matchworking.

I liked Bassli's book so much I am excited about her new one: “CLM Simplified: Efficient Contracting for Law Departments”. It touches on topics that aren't regularly featured, like a legal department's contract review policies. 😮 I'd preorder soon.

Buying a digital book shouldn't cause this much angst

I am quite certain there is no Kindle version. (Photo by Maarten van den Heuvel / Unsplash)

Whatever views I may have, I will still buy “Law and Technology in Singapore” because I like technology, I like law, and I like the depth and breadth of the book.

However, I am still dithering on the preorder because I couldn't decide whether to get a “digital” version for an extra $15. The page has no information on the “digital” version, so I emailed the Academy for details on what I could get. I wasn't about to pay $15 for a DRM laden PDF (even if I ignore my deep hatred for PDFs).

The reply I got was quite cryptic:

The digital version ID will be emailed to you once when our platform is ready for it's release in mid-October. [ sic ]

It gave me palpitations. I imagined a web page where you can click on the right column, and the page will animatedly “flip” to the other side. Other than that piece of magic, you will need an internet connection to access it, and you can't copy or search the book. Furthermore, if the Academy doesn't want to support the website anymore, it can flush your digital book down the drain. It's worse than a PDF!

Update (23/9): I have a slightly better idea of what will be provided during TechLawFest. Thankfully, it won't be as lame as a flipping book, but still...

Anyway, I ordered the book with the digital version because I had a lot of Academy credit to burn. Hooray for COVID!

Are books the best solution for this age?

The issues regarding the delivery of this product (a heavy tome partnered by a possibly DRM-laden web platform) dampened my enthusiasm for this book.

These issues are pretty ironic considering that authors wanted the book to be accessible. As mentioned in the chapter, they have consciously made it cheaper and provided a digital version.

However, to be fair, if they considered my wish list, I would have wanted it free as in free beer , and free as in libre.

To take their goals further, I even wonder whether a book is the best medium to provide a fast reference for practitioners and a deep primer for students. Books aren't searchable, take up space on a cupboard and can't be shared. Considering that the book will get outdated really fast, it will become very expensive too when you always have to get the latest iteration (if ever, if any) .

Wikipedia for desktop A wiki might have been more effective solution, if lawyers wanted to share their knowledge. (Photo by Luke Chesser / Unsplash)

If I wanted to find information fast, what would I do? Evidently for small firms in the UK, Google it. For myself, I like reading Wikipedia. It can be a detailed primer and a fast reference. It can also be searchable. It can even be updated continuously. Honestly, they can take away my Academy credits if they provided this resource free to all Singaporeans.

It's not as if such a project is without precedent. Last week, “Civil Procedure and Practice in Ontario”, Ontario's version of Singapore Civil Procedure”, became available for free on CANLII. A book that might have cost $1,280 is now available for all, including litigants in person.

Besides an open access e-book, there are probably other ways to make this book more accessible. To cut through the walls of text and overlaps of content across discrete chapters, a chatbot using machine learning might be able to automate the searching of answers. This sounds like a fun project to get my hands dirty in machine learning again. Now to figure out how to scrape this thing once it comes out.

Conclusion

The goals of “Law and Technology in Singapore” are laudable. However, it's readily apparent that it doesn't go far enough. The authors wanted to write a book, and have tried to push it as hard as it can go. Maybe the real lesson is that we haven't grappled directly with the challenges of the medium. So for the innovative lawyer in me, I am always going to appreciate books, but I would always be reminded of what it could have been.

#blog #BookReview #COVID-19 #Law #Singapore #TechLawFest #TechnologyLaw

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

Feature image

It's August! This newsletter came slightly late this time because I spent a few evenings playing computer games. Tsk. The Battle of Polytopia reminded me of a condensed Civilization, which is great because I still need to work the next morning. Get the Humble Bundle and do something for charity!

header.jpg

Tech Law Fest Special Edition

Now let's get back to the newsletter.

TLF-Web-Header-\(1\).jpg

Over three days in September, Tech.Law.Fest happens in Singapore. There's a lot of talking involved over the three days on a cornucopia of topics that someone with legal knowledge might be interested in. It's going to be in person as well as virtual.

These talks are organised according to four ideas — “Legal Operations”, “Law of Technology”, “Access to Justice” and “Technology of Law”. Unfortunately, this doesn't mean that each of them gets equal or even some representation — “law of technology” features at least half of every day, while tangential topics lightly touch the others.

The best day seems to be Friday — 24 September 2021. You will get to hear Mary O'Carroll, a huge name in Legal Operations, speak in one of the few sessions featuring a panel. So if you are going to pick only one day to turn up, maybe you should pick this day.

Tech.Law.Fest also features something they call “matchworking”, an in-person networking session that greatly benefits from the recent relaxation of meeting rules in Singapore (you can have fun if you're vaccinated). They are organised into four tracks like the topics; you have no idea when a topic is happening, and you might be charged $100 for no show. I ain't a big fan of wine either. So I am a bit hesitant to put my name on this. You can still register your interest.

Here's something new — there's an ALITA SOLIA Award thing that has a public voting section happening next week. There's not much information on who is up for voting. So I reckon we have to keep checking.

As you can tell from my fairly unvarnished take on the event, no one is paying me to write about it. Nevertheless, I will be figuring out whether there is a way to post Twitter updates of hot takes, so I don't need to write a 20-minute long article on this blog. Follow my Twitter!

Let's be grateful that we can see the light of the tunnel. In terms of event design, Tech.Law.Fest seems to have suffered and adapted to the whiplashes caused by the pandemic, so one should applaud their efforts. (I haven't heard much about the other major Singapore legal conferences like IAPP Asia). It's still an exciting time to write a blog!

I'm still figuring out how to write this blog

Iced Coffee in a glassImage by cromaconceptovisual from Pixabay

Bravo to our new full subscriber! I have been writing this blog for over 2 years now, but I am s.till humbled by the many new things I am still learning in this journey.

So far, I have been feeling my way around this blog or newsletter stuff. For the initial product, everything was free, but it was unsustainable. I didn't run out of ideas or words in my head, but I wasn't sure whether this was worth my time. Some feedback, in whatever form, was important to keep things going.

As such, paying for a subscription shouldn't be seen as a transaction. At 1 cup of kopi a month, you're keeping the lights on in this room and pushing me to come up with more ideas to create value. So, if you ain't one already, do consider signing up.

Of course, there are other ways to contribute, such as providing feedback on what I have written or what kind of content you would like to see. When I talk about books on the blog, you can also use the affiliate links to purchase them and support the blog.

Let's build something together!

That's it!

Thanks for reading, and feel free to reach out!

#Newsletter #blog #TechLawFest

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

Feature image

I really like Notion

I have a confession to make. I really like Notion. Notion, at its most basic, is a note-taking application. It allows you to create pages that contain various content, like web links, markdown, checklists, embedded content and so on. I am not alone too in liking Notion — look for the #notion hashtag on Twitter, and you'd find people rabidly professing their love. They aren't celebrities trying to sell something, but normal and authentic people who love a product.

Notion – The all-in-one workspace for your notes, tasks, wikis, and databases.A new tool that blends your everyday work apps into one. It’s the all-in-one workspace for you and your team.Notion

My wife, who is a bit flabbergasted that I recommend Notion for everything , told me frankly, “Isn't this like Todoist? Or some journal app? There are dozens of such programs out there on the Internet. Free or paid.”

It's true. You can find dozens of apps that can provide you with a Kanban. It's a crowded field.

But Notion is special.

To me, it's a content management system that is very user friendly, yet very powerful at the same time. Like my wife says, the kanban, the markdown, the images, whatever, all those features aren't very interesting. However, you can dive straight into the app and create any of them in Notion. There isn't much to configure or install. You don't get to code it. To be frank, your interaction with Notion doesn't go further than typing text on a keyboard or enabling some option on a pop-up toolbar.

Is “no-code” for lawyers... or losers?

This brings me to the concept of “no-code” or “low code”. Apparently, lawyers are highly allergic to coding anything, so the idea that you don't have to do any coding is a feature. Among the front runners of this feature is Documate. It is a document assembly service built on docassemble but turns all that “programming” into buildable boxes so you don't have to do any coding. Another non-legal example is Scratch, an MIT project that teaches children how to program using blocks.

Document Automation Software – DocumateLegal document automation software to create powerful workflows that push data into your templates and forms.Documate

I haven't used Documate before, so I can't tell you whether it's good. Judging by its community though, it looks great. If you are attracted to its “no-code” premise and terrified of having to learn YAML and Jinga/Python in order to use docassemble, you should definitely give it a go.

As I can code, the idea of “no-code” turns me off though. Being able to tinker with a product is the fun part to me. Telling me I can't code means I cannot fully utilise the product. Once you become familiar with the capabilities of the product, your inability to code starts to look like the true barrier to achieving something. Suddenly, it's your fault, and that feeling really sucks.

It doesn't have to be this way. The opposite of “no-code” or “low code” isn't to code everything. To put it in another way, a product that asks you to do everything yourself is terrible. Ultimately a product has to provide features that you can use to achieve your aims. A particular set of features might be so limiting that it can do only one thing (and maybe do that one thing well). However, a different set of features could be so intriguing that you can use it for everything.

Think of “no-code” or “low code” this way:

  • You hardly ever need to code in Microsoft Word. Yet you can create any kind of document you want. No code ftw!
  • It ain't obvious, but you do some coding when you input a formula in Microsoft Excel. However, this “low code” environment allows you to perform calculations and filters and then use the output to visualize data. Excel is a prototypical database, a custom program and a report generator. Oops, sorry, Excel is a spreadsheet program.

Why I would use Excel for my Contract Management SystemHow do I get on this legal technology wave? Where do I even start? A “contract management system” or a “document management system” (“CMS”) is a good place. Business operations are not affected, but the legal department can get their hands dirty and show results for it. If you wouldLove.Law.Robots.HoufuSome good advice: consider using stuff you have already installed for innovation rather than inventing the wheel.

It's important to note that these Microsoft Office programs don't advertise themselves as “no-code”. They're still easy to use and accessible to all types of users.

Using Notion to improve my wife's website

So if you've been following so far, I think Notion is a great product that is equal parts friendly and powerful. It's also improving with a killer feature — an API. So a great product is now available to be integrated with others, making it even more powerful.

Notion APIConnect Notion pages and databases to the tools you use every day, creating powerful workflows.Notion API

My use case shows how you can use Notion to make small, impactful improvements to your projects.

Problem Statement

My wife is diligently developing her illustrator side hustle on her website, which I developed in roughly a week using NextJS. As an illustrator, a gallery is an important showcase of her work. Even though I had no qualms about doing it, being able to manage the content on the gallery herself would be a good feature. Content gets on the website quicker, and she'd get full autonomy on how to present it.

How the end product is going to look like – The Gallery page features categories where illustrations are organised. The pages for individual galleries feature a gallery of illustrations for the selected categories. Individual images feature some metadata.

My wife is not a coder, so choosing a data format for her was going to be challenging. It has to work with the website and work in her workflow too. A full-fledged content management system like WordPress would surely be overkill. However, explaining to her the intricacies of JSON, YAML or TOML would probably turn her off as well.

To turn you off, here's how the original YAML file looked like:

—- – caption: Travel sketches dateupdated: '2021-03-02' id: 3 location: travels title: Adventures and travels images: – caption: '' source: travels1.jpg thumbnailCaption: '' – caption: '' source: travels2.jpg thumbnailCaption: '' – caption: '' source: travels3.jpg thumbnailCaption: '' – caption: '' source: travels_4.jpg thumbnailCaption: '' portrait: true

I'd call this “code lite” like docassemble since she only has to edit one text file. But this will become problematic very fast:

  • What does “travels_1.jpg” mean? How do I write a caption for something which I don't even know what it is?
  • This is a text file, so the actual images are missing. It turns out that she still has to send the file to me, and then I have to rename it, and errm... a bunch of other manual steps before it gets on the website.
  • It's not difficult for an ordinary user to commit errors on YAML. For example, the indents are significant. Any typo on the source file names is sufficient to break the system as well.

Notion Everywhere!

Enter Notion. It does all of the above and it does it even better. The YAML text file is now replaced with a screen that looks like this:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/b366764b-cef6-4c06-8821-93d0a26c7c7d/Untitled.png

Each box is clickable, and it leads you to the illustration's own page.

Deceptively, it looks like a gallery, but its underlying structure is a database. So I can view all my pictures in a user-friendly gallery, which allows for searching and filtering. Furthermore, the gallery packs an interface for me to upload new illustrations. It's not obvious from the screenshot, but you can even create new categories of illustrations.

Editing the metadata of an individual illustration is also straightforward:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/d0737aaf-1ec4-4118-a480-26ee662b240b/Untitled.png

The gallery also allows my wife to attach her illustration to the individual item, so I am able to get everything I need to create the gallery from Notion.

Finally, using Notion API, the NextJS website generator grabs all the information from Notion to create the gallery you now see on the website. (NB: As of writing the Notion API does not support images, so that step is still manual at this time.)

Once you have decided on the scheme of your data, you can directly translate it into a user-friendly Notion page. My wife doesn't need to touch any code, but she still gets to plan her gallery in the way she wants. (Now she just has to scan some illustrations. 😝)

Conclusion

I hope this demonstration gets you to question what we really want from “no-code” or “low code”. It's sexy to claim that lawyers don't get to touch any code, or that they can automate their workflows by dragging and dropping some boxes. However, we can be more discerning than that. What exactly are the features of this product? What can I do with it? Does it make me pull my hair out at the limitations it imposes on me? Or does it offer to sacrifice me on the altar of my crappy computer skills? In the end, designing a good product is a lot more difficult than having an effect that doesn't need you to code. Even a product made for general use (like Word or Notion) might be more relevant than a product that is labelled “legal tech”.

And if you ask me, a good barometer of a great product is the fans who are willing to say nice things about it.

#Programming #tech #docassemble #blog #MicrosoftOffice #Notion #LegalTech

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