

Programming for lawyers, the law for programmers - AwesomeTogether

I'm trying to learn how to program and the easiest way for me to understand it is by comparing it to something I understand better. For me, that's the law.<p>Programmers often use a framework to make their job easier. Legislation is a type of framework and when you're drafting a contract (a program) you can sometimes opt-in to provisions contained into legislation. It makes your job a lot easier as a lawyer, but they will also need modification. This is a very general comparison but it holds true (imo).<p>Pushing code is similar to having your contract (program, remember) tested by a court.<p>variables, functions, all these things have their equivalent in the law, but somehow getting the hang of programming seems a lot harder.<p>Syntactical errors and typos are frowned upon in the law, but they happen all the time and they don't break the whole system<p>Sigh...
======
ppereira
I've found the law and programming to be quite different. In programming and
engineering in general, you are often working towards one particular goal. The
optimum is in the distance and you are on your path to achieving it. In the
law, you are often weighing two opposing viewpoints and trying to find the
best way to advance your particular view. Perhaps the closest analogy to a
large program would be with international tax law, an area that is statute
driven with many complex interactions.

For me, there was no shortcut. I first learned to program with Abelson and
Sussman's book, SICP. Depending on your background, the mathematical bits may
not be that useful and are easily skipped. From there, learning the languages
du jour are quite trivial, the only exception being low level coding in C or
assembly for which the C book by Kernighan and Ritchie and the first volume of
Knuth's TAOCP are quite useful.

------
noonespecial
_Pushing code is similar to having your contract (program, remember) tested by
a court._

The computer _always_ runs the same code the exact same way. The courts can be
damn near random on many issues.

Thinking of law like programming is a dangerous trap many techies fall into.
Its a whole different mode of thought.

~~~
AwesomeTogether
True but browsers don't run code the same way

~~~
thwarted
Different browsers don't run code the same way, that's part of implementation,
but the same browser should run the same code the same way. It's nearly the
definition of computation to be predictable.

Similar to law, that's like leaving something purposely ambiguous and letting
the courts sort it out later and get more specific. But with computers, that's
nearly impossible and wouldn't produce usable software You can't just write
some code intended to run in the browser, and release it and expect the
browser to do something sane, reasonable, desired, or even logical after the
fact. The testing for intended results needs to happen _before_ the code is
released and is "used".

