I sat for a paper not too long back, on the subject of Business Law (BSP1004A, Legal Environment of Business, for you NUS folk). Pretty much of the syllabus revolved around the various statutes surrounding stuff like Company Law, Contract Law and the Sales of Goods Act (wonderfully descriptive names, don’t you think?).
Anyways, it hit me that there was a certain structure to how statutes were phrased.. a syntax of sorts..
So, hey.. you know, there actually were similarities between the mumble-jumble I was looking at, and the type of text I usually have to work with (program code, that is).
Legal statutes and code are both:
- Non-human-readable
- Perfect examples of reduce, reuse and recycle.
Age limit for directors
153. —(1) Subject to this section but notwithstanding anything in the memorandum or
articles of the company, no person of or over the age of 70 years shall be appointed or
act as a director of a public company or of a subsidiary of a public company.
(2) The office of a director of a public company or of a subsidiary of a public company
shall become vacant at the conclusion of the annual general meeting commencing next
after he attains the age of 70 years.
(3) Any act done by a person as director shall be valid notwithstanding that it is
afterwards discovered that there was a defect in his appointment or that his
appointment had terminated by virtue of subsection (2).
(4) Where the office of a director has become vacant by virtue of subsection (2) no
provision for the automatic reappointment of retiring directors in default of another
appointment shall apply in relation to that director.
– Singapore Companies Act, 4th Schedule, Table A
/* if --all-symbols is not specified, then symbols outside the text
* and inittext sections are discarded */
if (!all_symbols) {
if ((s->addr < _stext || s->addr > _etext)
&& (s->addr < _sinittext || s->addr > _einittext)
&& (s->addr < _sextratext || s->addr > _eextratext))
return 0;
/* Corner case. Discard any symbols with the same value as
* _etext _einittext or _eextratext; they can move between pass
* 1 and 2 when the kallsyms data are added. If these symbols
* move then they may get dropped in pass 2, which breaks the
* kallsyms rules.
*/
if ((s->addr == _etext && strcmp((char*)s->sym + offset, "_etext")) ||
(s->addr == _einittext && strcmp((char*)s->sym + offset, "_einittext")) ||
(s->addr == _eextratext && strcmp((char*)s->sym + offset, "_eextratext")))
return 0;
}
– kallsyms.c, Linux Kernel, 2.6.24.5-85.fc8
Programmers are lazy people who never want to code again whatever that can be reused (or, copied) from somewhere else. In fact, most programming texts extol the virtues of code reusability. To make our lazy butts feel like we’re actually doing something right, programmers have used the time saved to come up with terms to justify the practice. Heard of the DRY Principle? “Efficient code”? Lazy programmers also like to say that they’re “not reinventing the wheel” when they just lift an entire chunk of code from somebody else’s work.
And as for lawyers? If I remember my lectures right, about half of Singapore’s Penal Code was lifted from the British Penal Code and the the other half from someone else (was it the French? My memory fails me.). I guess that’s efficient.. um.. lawyer-ing?
So yeah, there you go. Though the nice thing about code is that syntax highlighting makes code almost readable.

See?
Unfortunately our poor lawyer friends still have to contend with pages upon pages of monochrome text, on *gasp* paper. And no “Find” function either.
Oh, here’s a thought: Someone should really create a text-editor for lawyers. You know, one that’ll be able to syntax highlight legal code, say, plaintiffs in green, defendents in red, statutes in yellow, quotes in purple.. you know.. things like that.
Save our lawyers’ sanity.
—-
Now, that was random.
Leave a comment