8 ms·
Coding for Lawyers
- mooreds 12y agoSince law is "code for society", I am all on favor of equipping its practitioners with more insight into software.
- adamc 12y agoThat'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 12y ago[deleted]
- esquivalience 12y agoIn fact, only the law can execute.
- rayiner 12y agoCode doesn't execute itself either, to be fair. /compiler geek
- jackweirdy 12y agoNot to mention society changes law, and when society doesn't like law, they can ditch it and make a new one
- the_watcher 12y agoThat's an extremely optimistic view of how easy it is to ditch laws.
- jorgeleo 12y agoLets start teaching what code is by ... chapter 1 Regex???? If the author is reading this: WHY? out of all the horrors, why?
- Mithaldu 12y agoThat question is answered in foot note one of chapter 1: http://codingforlawyers.com/chapters/ch1/ http://codingforlawyers.com/chapters/ch1/ Maybe try reading a thing before breaking out the multi-punctuation and caps? ;)
- barkingcat 12y agoThat footnote does not answer the question. Why start with regex?
- lostinpoetics 12y agosomewhat 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 also argue that the root cause e.g., storage mechanism, should be changed, but often times that is a nonstarter or at least heavily resisted) edit: also, a lot of services like westlaw/lexis have a very rudimentary type of regex searching capacity (i think just * and some connectors) so it's not 100% foreign to many lawyers to be honest though, most attorneys need training in basic desktop publishing software to start with. i've seen things done in microsoft word that no man or woman should ever have to see.
- deleted 12y ago[deleted]
- barkingcat 12y agoI would actually vote version control as chapter 1 of Coding for Lawyers. Also not "coding" per se, but immensely important - anything to get past "importantdocument.version.13.3.barkingcat.doc" hell.
- 12y ago
- themodelplumber 12y agoSeeing 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 of the de-duplication features, and explained what DRY meant--just in terms of content management. The next day I got an email about a bug he found, where a sidebar wasn't showing up properly or something like that. His conclusion at the end of the email read: "So this DRY thing doesn't seem to be working, can we please remove DRY?" (I know, it's my fault for exposing the innocent client to such heavy terminology, blah blah blah...but I had a very pleasurable laugh about the whole thing)
- ap22213 12y agoThat'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.
- nibjib 12y agoWhat about the converse - lawforcoders.com ... or is that essentially what groklaw was?
- afarrell 12y agoIf you wish lawforcoders.com existed, you should read http://lawcomic.net/ http://lawcomic.net/
- igurari 12y agoA 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-charts/ http://www.margarethagan.com/drawings/illustrated-law-flow-c... Law Cases: http://www.margarethagan.com/drawings/drawn-law-cases/ http://www.margarethagan.com/drawings/drawn-law-cases/
- Total_Meltdown 12y agoDo you accept pull requests? From Chapter 3, Exhibit 6: { "title": "Hey Jude" // <-- Missing comma "group": "Beatles", ... }
- Zikes 12y agoAlso, 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.
- adelevie 12y agoI'm not the author (but I know him and he doesn't have an HN account--I've also contributed a chapter currently awaiting as a PR). PRs are certainly welcome.
- danso 12y agoThis 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)
- hellbreakslose 12y agonice job...NOT even for me that am a coder is quite messy.
- jroes 12y agoI like the idea of niching down for a use case, but I've never met a lawyer I thought had the time or energy to devote to learning programming. I'm also having trouble understanding how a lawyer might use their programming skill to improve their daily lives. It seems to me that other folks on a lawyer's staff would be more likely to be interested in this subject and use it to the firm's benefit.
- adelevie 12y agoCheck out https://permafrast.herokuapp.com https://permafrast.herokuapp.com. OP built this as well, and it makes it really easy to read cases without signing into Lexis, Westlaw, or, well ... anything. Just one of many examples of how lawyers can use tech to make their day jobs easier.
- rjtavares 12y agoProgramming is like cooking. You don't have to know it, but it comes in handy and you can impress your friends with it. Just don't thing you can open a restaurant just because you make a great risotto.
- VanL 12y agoThere are lots of things you can use code for as a lawyer, if you just think about it as "automating stuff." I wrote custom code all the time when I was at the law firm (and still do, but I'm in a more technical role now). It was fun to take something where hordes of associates were being used as slightly smarter computers and automate it - there were several times when people were amazed that I turned out a properly formatted in-depth diligence report about multi-hundred-patent portfolios within a couple of days. In my spare time, I built a natural language processing + graph analysis tool to help look for patent prior art. I spoke about it at PyCon - see <http://pyvideo.org/video/425/pycon-2011--how-to-kill-a-patent-with-python> http://pyvideo.org/video/425/pycon-2011--how-to-kill-a-paten.... Right now I use an internal Github instance to manage CCLAs at Rackspace, and its just a matter of time until I automate some more stuff here.
- mountainair 12y agoLawyers don't necessarily need to code to improve their own lives - but they MUST learn to code to improve their relationships with their clients. If there is any aspect of programming involved in any contract or lawsuit (which is becoming the norm), the lawyer absolutely must have at least a vague grasp of the tech to be effective. Too many lawyers and judges are just utterly perplexed, and it leads to bad law that makes things more difficult for everyone down the road. Even the most basic understanding of programming would be so so helpful, if only because it makes the world of computers slightly less alien to your average legal practitioner.
- hobs 12y agoThis guys is a laywer, with a mechanical engineering degree, and does coding on the side. He was also the guy who wrote the SCOTUS opinion tracking software that was all over HN a few months ago. Seems like a cool guy, and unlike some posters I think regex are definitely something to start people off on. Many people who are non-technical but have used a computer understand the concept of a wildcard operator, you just expand that knowledge a bit and they can do very powerful things if their jobs involves a large amount of text. I had some realtors that I worked with, and after seeing me fly through some of the things they did, they were eager for me to teach a bit about regex (and gave them a simple simulator to give them instant matches, I think it was rubular at the time) and they wrote some simple rules to take like 10 hours of drudgery out of their jobs per week.
- igurari 12y agoMost lawyers understand the concept of a regex, so I'd agree that its a good place to start. Law students are taught how to search for caselaw using Terms and Connectors, which is a simplified form of regex: http://lscontent.westlaw.com/images/content/WLNT&CSearching.pdf http://lscontent.westlaw.com/images/content/WLNT&CSearching.... So they already have a lot of familiarity with the topic, and this just makes it easy for them to understand that coding is not so foreign as they might otherwise believe.
- the_watcher 12y agoHaving been to law school in the last 3 years (would have taken the bar 2 months ago had I finished), you are overestimating how many law students actually learn how to perform Westlaw/Lexis searches like that. You only really need to use them in a few select classes, and no one really attends anything more than the mandatory trainings (which cover things like how to log in).
- MWil 12y agoour mandatory legal research class covered wildcard searches and "w/" x number of words/characters
- stevekl 12y agoI am so glad that this started off with REGEX. So many coding lessons are so irrelevant to business / law people. No, business people don't need to really learn how to code. They want to learn how to parse / clean messy spreadsheet data. REGEX + basic loops and conditional in VBA will do wonders to the productivity of business people. On a separate note, I am surprized that there is still no good graphical way to build regexes
- pinkyand 12y agoThat's a good idea , but it could be greatly improved by offering lawyers(which are surely time strapped) , a tool like RegexMagic[1] , which really simplifies the learning needed and lets one easily understand complex regex's. [1]http://www.regexbuddy.com/ http://www.regexbuddy.com/
- the_watcher 12y agoI don't think the point is to offer them a tool, the point is to offer them the option of some coding education designed specifically for their background. Agreed that the tool you mentioned is probably more useful to more lawyers, I just think this is targeting a segment looking to go beyond a tool that does the work for them
- tkiley 12y agoI'm intrigued by the parallels between software engineering (scripting, really) and legal work. In a sense, a legal agreement seems like a cross-platform piece of software that is "executed" in the minds of the signing parties, their business associates, and occasionally the court system. Given that context, I'm a little surprised that lawyers and engineers tend to communicate and think so differently.
- squar1sm 12y agoNice insight. I liked that.
- adultSwim 12y agoTypo: [0-9]{1,2} U\.S\.\C. § \d+(\w+)?( \([0-9]{4}\))? Should probably be: [0-9]{1,2} U\.S\.C\. § \d+(\w+)?( \([0-9]{4}\))? \C. -> C\. Great work! The line between computer user and computer programmer needs to be blurred. Many people who use computers would benefit from knowing a little programming. Just look at how useful Excel is.
- xyclos 12y agoone of my cs profs was also a lawyer who does consulting for startups in addition to teaching coding. he used the same example to teach us regex.
- the_watcher 12y agoI haven't gone through this yet, but I have a liberal arts degree and did a year of law school before dropping out to work on the internet. I'm competent in HTML/CSS, basically competent with Rails (have built very rudimentary web apps), but working full time in online marketing. If this is actually an intro to coding for lawyers, it's an intro to programming for those with no technical background whatsoever. Which is really cool (not that those don't exist, but specifically designing this for a career path full of liberal arts types, not just for those with no experience, is interesting). I like that they start with regex and HTML/markdown, since, while they are not what anyone would call software development, they are a simple, quickly useful example of the basic concept of coding - expressing human instructions in a language designed to be understood by a machine. They also are some of the more quickly usable "coding" concepts, HTML & Markdown in the obvious cases, but regex familiarity makes Google Analytics much more powerful. Looking forward to working through it and seeing what it's like. I sent it on to a few law school friends who had been somewhat interested in tech skills too.