PyCon 2014

Descubriendo a Python

David Beazley  · 

Presentación

Vídeo

Transcripción

Extracto de la transcripción automática del vídeo realizada por YouTube.

it looks like there's still a few people coming in in fact a steady stream of people coming in if there is some space in your row if you could please defrag a bit it would make life a lot easier squeeze up yeah well ladies and gentlemen it's great

to see a completely packed house here for our last session after lunch here at PyCon 2014 in Montreal it's quite clear that our next speaker needs no introduction nor are everybody please welcome pythons favorite mad scientist Steve Beasley all right all

right thank you very much this is my attempt to come up with the most boring talk title and pie at the PyCon it was actually one of the reviews and the submission if I could set a terrible title um so what this what this talk is about it's kind of weird

topic in 2005 I was actually hired to go look at one and a half terabytes of source code in a secret vault we'll talk about how you get that much source code in a second and then six years later I ended up testifying about concurrency and event loops and

US District Court you're thinking oh good god what was that about it was not to judge Wapner by the way and so what this talk is about is actually discovering with Python basically bringing Python into a legal battle I think in this picture the chair is

Python okay so like what this is about and just to kind of kind of set this up I love this claim or everything in this talk is true but all the names and details have been changed because a nondisclosure I'd have to kill you and it would take a long time

in this room and so so basically the gist of it is I know nothing and you're gonna learn nothing so just keep that in a queue time right now to set this up get a meet Alice got it needed Alice and Bob meet Alice meet Bob are we talking about cryptography

I don't know okay so Alice and Bob Bob for whatever reason wants to send Alice a message that that she will understand and to do this he's going to employ an attorney Bob's attorney Van Daan there and the attorney is going to nuke Alex with a patent

infringement lawsuit along with an evil laugh I don't know what happened between the two of them to cause this but patent infringement lawsuit al being fortunate has somehow managed to find lawrence lessig to defend her or who's going to crush van

in this in this battle here but basically what this talk is about is essentially patents in some sense i mean these are things that you hear about a lot in the news you know patent infringement and software patents there are other and all this stuff I'm

not I'm not gonna really talk so much about that except to say that if you ever get into a patent litigation it will turn your world upside down for reasons we'll get into in a second and it's also something that is kind of the background of this

talk I'm you say well ok why did why did Dave sit in a vault with one-and-a-half terabytes of source code he was basically in the context of a patent litigation and and where it came up it's sort of in this this timeline of what happens in a patent

lawsuit what happens in these lawsuits is that some you know the suit will get filed and then it kind of goes quiet for a while I mean like you've kind of follow the news you know it's like oh some company sues there's only one and it circles quiet

be the case essentially goes into a phase of known as fact discovery which might last a year maybe even more but it goes it goes on for a while and essentially what in what's going on in that fact discovery phase is the lawyers and the teams are trying

to figure out just what in the world is going on essentially what you have is you have like the plaintiff in a case it's saying well there's obvious patent infringement right an earthworm versus a snake right know what that's about you have the

defendant essentially saying well no they're things are obviously different right there is no infringement yeah so you have you have these two sides and what is happening in in this sort of fact discovery is that that the two sides essentially have to

take a data from the case which might be things like specifications and drawings and documents and software and so forth and sort of figure out what the you know quote facts are in this legal case and you know in it's not usually a really clear-cut thing

many times right I mean it's it's it's not an obvious thing where it's obviously different or it's obviously obviously of the same so to do this usually what happens is a fact expert or an expert witness or somebody like that is called

in to look at the look at the facts and in the case of something involving software it could be somebody in this room myself in this case I mean you know typically what that what lawyers are looking for some kind of technical expert that is unbiased meaning

not employed by either the parties or have a relationship with them it would be somebody that wouldn't hopefully know somebody so they typically tend to target like university professors people like that you know that that know things and essential they're

gonna they're gonna look look at the facts in the case and what you're gonna have it's kind of a you know a team it looks something like this you know maybe Bob's attorney you have a bunch of co-workers you like legal these are these are usually

like the the people to law firm who haven't made partner yet they're like their jobs on the line fact expert in reality it's actually probably more like this Bob's attorney with with co-workers the fact expert it looks like that in my case

that that's me that's actually what it looks like to bike in the Chicago winter by the way I don't know whether people saw the first talk in this session but they're talking about biking in Montreal so I would assume it's kind of similar

though so so that's that's kind of the team and if this happens to you it's actually a really fascinating experience like if you get get the call so to speak saying hey why don't you come in and look at some source code for a patent infringement

suit you're essentially going to be dropped into just a huge firestorm of hell actually okay because what's gonna happen is they're gonna drop you into this case with no technical guidance really and the reason that they don't they're the

reason they can't give any guidance is that's because they could why they called you actually they don't know what's going on so so some of the things that they're gonna happen is you're gonna get end up getting into this like really

quick learning say it's phase where it like well you have to learn what the invention is like what is this patent is it good bs like what is it about to do that you're gonna get all sorts of really fun reading assignments like you'll have to read

the patent itself which might look something like this where it's like you know the system of claim five or six where in the display and input means comprise this display means I'd like you read that and and like you know it's like your head just

stick head explodes it's from the movie scanners which is a great Canadian work of art actually okay so so so you have the you have that in in the case of in the case of this thing the patent actually had 600 pages of C code attached to it as a PDF printed

in 1989 on like a dot matrix printer and you get these fun jobs so it's like okay you have this just what do you do with this code I ended up having to basically compile the code from hand I mean this is something like if you're going in as an expert

it's like is this patent like CBS like does it even work could you explain this code to two other people so one of the very first things that happens is you have to you have to figure out this invention in the case of this thing actually printed out all

of the code and sat down with a highlighter over the weekend and highlighted all function definitions and all function calls it was only available in paper basically right it's like you print it out you highlight all function calls you highlight all all

function definitions and so forth and then I ended up using Python to manually link it I essentially you would you would enter it into just Python data structures from you know a paper copy and then you would just crank it through Python to do like a manual

link and what's going on here is I'm actually trying to figure out whether that code is actually complete does it have code does it have holes in it are there like missing chunks on it chunks in the code that kind of that kind of thing I'm not

going to explain that Python code and in great detail except to say that if you're not using list comprehensions and set comprehensions and the collections module you are missing out on an awesome secret weapon for getting all sorts of problem solved okay

so so you you you you sit down for a weekend you link this code you would say well why would you why would you do that one of the things that will happen in this case is it at some point if it continues far enough you're going to be asked about that cone

maybe like under oath or something like that and if you don't know how it works you're gonna look really freaking bad right okay so and so you you will die basically later if you don't understand the go so so part of what happens is you have to

understand your like your own sides go so that's kind of interesting sort of horrible in a way I might be the only person who's had to link a 600-page C program by hand on paper and apply signs scripts oh so you do that but then it but then it actually

gets it gets even more interesting in these cases you actually have to deal with the other side so so you have Alice here what is what is gonna happen you know on that side is that you're essentially dealing with like a whole different organization you're

[ ... ]

Nota: se han omitido las otras 5.002 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.