Love.Law.Robots. by Ang Hou Fu

Ideas

Feature image

I’ve wanted to pen down my thoughts on the next stage of the evolution of my projects for some time. Here I go!

What’s next after pdpc-decisions?

I had a lot of fun writing pdpc-decisions. It scraped data from the Personal Data Protection Commission’s enforcement decisions web page and produced a table, downloads and text. Now I got my copy of the database! From there, I made visualisations, analyses and fun graphs.

All for free.

The “free” includes the training I got coding in Python and trying out various stages of software development, from writing tests to distributing a package as a module and a docker container.

In the lofty “what’s next” section of the post, I wrote:

The ultimate goal of this code, however leads to my slow-going super-project, which I called zeeker. It’s a database of personal data protection resources in the cloud, and I hope to expand on the source material here to create an even richer database. So this will not be my last post on this topic.

I also believe that this is a code framework which can be used to scrape other types of legal cases like the Supreme Court, the State Court, or even the Strata Titles Board. However, given my interest in using enforcement decisions as a dataset, I started with PDPC first. Nevertheless, someone might find it helpful so if there is an interest, please let me know!

What has happened since then?

For one, personal data protection commission decisions are not interesting enough for me. Since working on that project, the deluge of decisions has trickled as the PDPC appeared to have changed its focus to compliance and other cool techy projects.

Furthermore, there are much more interesting data out there: for example, the PDPC has created many valuable guidelines which are currently unsearchable. As Singapore’s rules and regulations grow in complexity, there’s much hidden beneath the surface. The zeeker project shouldn’t just focus on a narrow area of law or judgements and decisions.

In terms of system architecture, I made two other decisions.

Use more open-source libraries, and code less.

I grew more confident in my coding skills doing pdpc-decisions, but I used a few basic libraries and hacked my way through the data. When I look back at my code, it is unmaintainable. Any change can break the library, and the bog of whacked-up coding made it hard for me to understand what I was doing several months later. Tests, comments and other documentation help, but only if you’re a disciplined person. I’m not that kind of guy.

Besides writing code (which takes time and lots of motivation), I could also “piggyback” on the efforts of others to create a better stack. The stack I’ve decided so far has made coding more pleasant.

There are also other programs I would like to try — for example, I plan to deliver the data through an API, so I don’t need to use Python to code the front end. A Javascript framework like Next.JS would be more effective for developing websites.

Decoupling the project with the programming language also expands the palette of tools I can have. For example, instead of using a low-level Python library like pdfminer to “plumb” a PDF, I could use a self-hosted docker container like parsr to OCR or analyse the PDF and then convert it to text.

It’s about finding the best tool for the job, not depending only on my (mediocre) programming skills to bring results.

There’s, of course, an issue of technical debt (if parsr is not being developed anymore, my project can slow down as well). I think this is not so bad because all the projects I picked are open-source. I would also pick well-documented and popular projects to reduce this risk.

It’s all a pipeline, baby.

The only way the above is possible is a paradigm shift from making one single package of code to thinking about the work as a process. There are discrete parts to a task, and the code is suited for that particular task.

I was inspired to change the way I thought about zeeker when I saw the flow chart for OpenLaw NZ’s Data Pipeline.

OpenLaw NZ’s data pipeline structure looks complicated, but it’s easy to follow for me!

It’s made of several AWS components and services (with some Azure). The steps are small, like receiving an event, sending it to a serverless function, putting the data in an S3 bucket, and then running another serverless function.

The key insight is to avoid building a monolith. I am not committed to building a single program or website. Instead, a project is broken into smaller parts. Each part is only intended to do a small task well. In this instance, zeekerscrapers is only a scraper. It looks at the webpage, takes the information already present on the web page, and saves or downloads the information. It doesn't bother with machine learning, displaying the results or any other complicated processing.

Besides using the right tool for the job, it is also easier to maintain.

The modularity also makes it simple to chop and change for different types of data. For example, you need to OCR a scanned PDF but don’t need to do that for a digital PDF. If the workflow is a pipeline, you can take that task out of the pipeline. Furthermore, some tasks, such as downloading a file, are standard fare. If you have a code you can reuse over several pipelines, you can save much coding time.

On the other hand, I would be relying heavily on cloud infrastructure to accomplish this, which is by no means cheap or straightforward.

Experiments continue

Photo by Alex Kondratiev / Unsplash

I have been quite busy lately, so I have yet to develop this at the pace I would like. For now, I have been converting pdpc-decisions to seeker. It’s been a breeze even though I took so much time.

On the other hand, my leisurely pace also allowed me to think about more significant issues, like what I can generalise and whether I will get bad vibes from this code in the future. Hopefully, the other scrapers can develop at breakneck speed once I complete thinking through the issues.

I have also felt more and more troubled by what to prioritise. Should I write more scrapers? Scrape what? Should I focus on adding more features to existing scrapers (like extracting entities and summarisation etc.)? When should I start writing the front end? When should I start advertising this project?

It’d be great to hear your comments. Meanwhile, keep watching this space!

#zeeker #Programming #PDPC-Decisions #Ideas #CloudComputing #LegalTech #OpenSource #scrapy #SQLModel #spaCy #WebScraping

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

Presentations are a crucial part of your professional life. In my line of work, presentations function as introducers, reports, training, proposals, summaries and explainers. Sometimes, presentations are watched in person or through web conferencing. Other times, they appear on websites for browsing or e-learning.

To do the job, many people will start PowerPoint, plunk in many words in bullet points and let their “showmanship” do the rest.

Your old ways of doing PowerPoint are no longer enough

Montreal Design ClubPhoto by charlesdeluvio / Unsplash

Since the pandemic and remote work changed the ways we work today, the demands on presentation have also changed drastically:

  • A “presenter” may no longer be present. You might not even be visible through a Zoom Window. Some presentations are watched in a video. Some people may even view your presentation on “mute” or by continuously scrolling to the “interesting” points.
  • Your audience consumes content differently these days. If I wanted to read a wall of bullet points like this one), I would rather read an article. Worse, if the content doesn’t engage, I lose the audience. You also want the audience to come back to you too.
  • Some studies claim that an audience’s attention span is about 20 minutes. Context matters. You might be forced to sit through the entire presentation like at a conference, but your attention still has to be maintained. Viewing it from home or somewhere else, you must get to the point quickly.

As a lawyer, I seem to have endless things to say. Figuring out how to say it? That’s the tricky part. Your personality and style contribute to your best presentations. Reading a block of bullet points on a template PowerPoint presentation wouldn’t bring that out. You would need opportunity, practice and feedback—all the time.

If you want to look at new ways of doing things, I wrote this post for you.

You can express more on your slide.

I found that the easiest way to improve your presentation is to abandon bullet points. The first step towards approaching any slide is to think about its purpose:

  • Am I making a list?
  • Am I describing a process?
  • Am I highlighting a point which I want the audience to know?
  • And so on.

Once you know what you want, it becomes evident that bullet points aren’t the only way to achieve them. A process can be described with arrows, steps or even a map. A list can be made of post-its, boxes and maybe even articles (for example, a list of news items can be illustrated with “newspaper clippings”). Such design elements will help an audience, no matter how far they are from you, to get the point.

Since presentations aren’t my core area of work, I don’t find myself being able to come up with a design quickly. A quick reference could be helpful.

In the end, I found The Better Deck Deck by Nolan Haims. Essentially they are a bunch of flashcards showing deck ideas. This is not an essay about how to make great presentations, just a collection of examples which condenses excellent ideas and how to execute them.

The Better Deck Deck: 52 Alternatives to Bullet Points | Nolan Haims CreativeThis deck of cards gives you 52 proven design alternatives to the dreaded bullet point layout and over 150 professionally designed examples of slides using these techniques to spark your creativity and improve your next presentation.Nolan Haims CreativeShop

Before I embark on any presentation project, I flip through these cards to get those creative juices flowing. If you do lots of presentations, I recommend it!

SmartArt isn’t stupid once you tear it apart.

If you believe bullet points are not the right direction, fret not; Microsoft PowerPoint agrees with you too.

In recent years, Microsoft PowerPoint has been improving on a function named “SmartArt”. It is an excellent tool for converting your bullet points into anything else. Today, they have galleries of ideas for you to choose from, including 3D.

I’m just kidding. Please don’t choose a 3D SmartArt! I beg you!

Unfortunately, it’s too much of a good thing. SmartArt, as well as the fancier “Design Ideas”, doesn’t teach you which design is best for you, leading to stock templates and bullet points in various shapes and sizes. These days, I can tell which slides were designed by PowerPoint, not you.

Furthermore, because PowerPoint tightly merges design and content, it isn’t easy to customize SmartArt in any profound way. This includes translating any ideas you have from the reference guide in the previous tip to PowerPoint.

The key to making SmartArt do what you want is to convert it to shapes. Once your SmartArt loses its form, you can arrange and align your shapes in any way you please.

This is my current workflow: sketch the contours of my design in SmartArt, then refine it by converting it to shapes and working on them.

This opens many possibilities and speeds up your presentation production by quickly creating basic shapes and designs.

Don’t be a Presenter, Be a Coder: SlideDev

Everybody loves PowerPoint because it is WYSIWYG — what you see is what you get. It’s easy to understand the tools, and there’s comfort in getting what you want right from the development stage. Most alternatives to PowerPoint like Google Slides and Apple Keynote also rely heavily on WYSIWYG.

WYSIWYG is excellent for novice users, but it’s easy to outgrow them.

The first problem with PowerPoint is that it’s easy to be overwhelmed by the number of options. We had seen one of them already when we tried to create an ugly and unreadable 3D SmartArt. You can also wreck your presentation with different fonts and sizes and unprofessional-looking work.

If you’ve always wanted to approach a different approach, try Slidev.

SlideDev employs many features familiar to Coders — Markdown syntax, installation using npm and hosting on a website. You also get to write your presentation on your IDE, version control using git and include anything a website can do, such as embeds and CSS animations.

I can’t use Slidev at work because nobody knows how to read a markdown file, so don’t throw away your PowerPoint yet.

However, having tried it, I appreciated being able to condense the essential parts of making a presentation. Suppose you aren’t a coder but are very familiar with presentations. In that case, I recommend trying Slidev to get a taste of what it is like to code and increase your familiarity with web technologies.

Conclusion

I hope this post helped you with some new places to explore how to make your next presentation. During the pandemic, I searched high and low for ways to improve my presentations, and these are some of the things I found. Did you find something worth sharing? Feel free to let me know!

Would I still use Excel for Contract Management?Many people would like to use Excel to manage their contract data. After two years of operating such a system, would I still recommend it?Love.Law.Robots.HoufuAnother one of my Microsoft Office posts.

#tech #MicrosoftOffice #MicrosoftPowerPoint #Ideas #Slidev #Presentation #Books #Programming #Training

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