Live data from Hacker News

Coding for Lawyers

codingforlawyers.com

11–20 of 47 posts

Re: Coding for Lawyers

#13

Seeing DRY at the end there was amusing. I recently worked with a client who convinced me he was really interested in our web project's back-end. Normally I keep things really light, but this guy had a convincing air of tech-savvy about him. Toward the end of the project, he wanted to do a lot of copy/paste-style "reuse" within the content management portion of the project, so I showed him how he could take advantage…

That's an interesting story. I know a guy who's a senior developer - probably makes $190k a year. He just codes copy-paste. I think he makes a lot because he puts out products really fast, and clients are really impressed. But, he completely ignores any maintenance. He just hands off the code to some other poor souls who have to maintain it. And, then they look bad, because what used to take hours now takes weeks.

DRY is good when you care about maintenance or design, but to those who don't understand or care about maintenance, it just looks like added complexity.

Or, in other words, a lot more people would rather buy a junky watch with a fashionable aesthetics than a simple-looking watch with impeccable internals.

Re: Coding for Lawyers

#14

Do you accept pull requests? From Chapter 3, Exhibit 6: { "title": "Hey Jude" //

Also, in Chapter 1 the completed regex is

    [0-9]{1,2} U\.S\.\C. § \d+(\w+)?( \([0-9]{4}\))?
Should be

    [0-9]{1,2} U\.S\.C\. § \d+(\w+)?( \([0-9]{4}\))?
Note the backslash location change in U.S.C.

Re: Coding for Lawyers

#15
This project immediately won my heart by starting off with regular expressions. It amazes me how many coders flip out at the suggestion of teaching/advocating regexes to novices, as if the first thing a novice will attempt to do is parse HTML with regex or build a credit card validation application.

I've spent most of my life in the journalism world, and I imagine parts of it, especially the investigative projects time, share some characteristics with the law world...in that you're dealing with messy documents and data. You would not f--king believe how much time is wasted on manually reading lists of names/addresses, because the person has no idea how to split "Smith, Bob -- 1020 Broadway, NY" into a spreadsheet. Nevermind the countless hours spent hand fixing whitespace or other formatting errors, things that could take seconds with even just Sublime Text.

Regexes are amazing because they teach people how to think in patterns, and that manually defining the pattern for your specific domain can be a very powerful thing. I've greatly increased the speed that I can research things across large document sets...simply by grepping documents for patterns that fit proper nouns, or even large money values (for example, /(?:\d{3},){2,}/)...when dealing with messily OCR'ed documents, in which phrases/words will have common mistranslations, being able to grep in order to find a key name/number/noun is incredibly powerful.

IMO, regex is exactly the first thing you should be teaching people like lawyers and researchers. It's a very powerful programming concept, but besides that, it is immediately useful to anyone who can use a text editor. And it opens the door to programming in general (because find-and-replace with a text editor gets old, you'll soon find the need to run grep from the CLI)

Re: Coding for Lawyers

#16

Earlier quoted context omitted.

That footnote does not answer the question. Why start with regex?

somewhat agree that it's a tough topic to start with, but regexes are one of the few things that can be immediately applied. a lot of the practice of law (esp. early in your career) is pretty mundane and repetitive stuff. couple that with attorneys love of OCR, you get a lot of copy/paste/hours of editing workflow that can easily be solved by a quick find and replace with a handful of regular expressions. (you could…

[deleted]

Re: Coding for Lawyers

#18
post #9
post #2

Since law is "code for society", I am all on favor of equipping its practitioners with more insight into software.

That's a pretty loose analogy. Law doesn't execute. I guess you could think of it as source, but the execution engine is a lot more, um, variable.

[deleted]

Re: Coding for Lawyers

#19

If you wish lawforcoders.com existed, you should read http://lawcomic.net/

A different style, but wonderful to read and illustrative of the often craziness of law, is Margaret Hagen's work:

Law Flow Charts: http://www.margarethagan.com/drawings/illustrated-law-flow-c...

Law Cases: http://www.margarethagan.com/drawings/drawn-law-cases/

Re: Coding for Lawyers

#20
post #4
post #3

Lets start teaching what code is by ... chapter 1 Regex???? If the author is reading this: WHY? out of all the horrors, why?

That question is answered in foot note one of chapter 1: http://codingforlawyers.com/chapters/ch1/ Maybe try reading a thing before breaking out the multi-punctuation and caps? ;)

The end note is just a legal in-joke which could be paraphrased as: 'because I say so, so there!', but he does give good reasons in the first paragraph (and the legal profession would not have to be persuaded of the usefulness of more powerful automated search).
Post reply on HN