Human Errors

0 views

Formal Metadata

Title
Human Errors
Title of Series
Number of Parts
69
Author
Lacan, Olivier
License
CC Attribution - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this license.
Identifiers
Publisher
Confreaks, LLC
Release Date
2017
Language
English

Content Metadata

Subject Area
Abstract
Runtime errors can sometimes turn into dark and unpleasant journeys which lead you to question the nature of reality. Thankfully, Ruby often provides friendly feedback for understanding the cause and remedy for exceptions. Yet, there are situations in which programmers don't receive clear enough context for what really caused an exception and how to address it. We'll look at Ruby's error feedback mechanisms and search for constructive ways in which they can be made more helpful to humans.
Loading...
Point (geometry) Slide rule Standard error Key (cryptography) XML Typprüfung
Point (geometry) State of matter Source code Speech synthesis
Internetworking
Multiplication sign Coma Berenices
Order (biology) Water vapor Flag
Point (geometry) Context awareness Feedback Feedback Data recovery Quicksort
Area Standard error Word Context awareness Standard error Estimation Computer State of matter Measurement Subtraction Condition number
Medical imaging Standard error Word Standard error Integrated development environment Latin square Order (biology) Latin square
Product (category theory) Moment (mathematics) Online help Instance (computer science)
Internet forum Planning Freezing
Product (category theory) Analogy Robot Multiplication sign Right angle Computer
Operating system Formal language Power (physics)
Standard error Database transaction Context awareness Smart card Feedback Gradient Keyboard shortcut output Quicksort Window
Point (geometry) Standard error Code Direction (geometry) Multiplication sign Parameter (computer programming) Line (geometry) System call Number Explosion Message passing Explosion Single-precision floating-point format String (computer science) Boom (sailing) Website Extension (kinesiology) Exception handling
Explosion Divisor Code Boom (sailing) Parameter (computer programming)
Area Standard error Message passing Explosion Mathematics Code Boom (sailing) Code Similarity (geometry) Parameter (computer programming) Number
Point (geometry) Standard error Closed set Multiplication sign Revision control Parameter (computer programming) Normal (geometry)
Explosion Patch (Unix) Code Dependent and independent variables Price index Monster group Gradient descent
Explosion Standard error Code Revision control Code Parameter (computer programming) Online help Parameter (computer programming) Error message Electronic signature Number
Backtracking Standard error State diagram Letterpress printing Reverse engineering Message passing YouTube
Computer programming Programmer (hardware) Standard error Focus (optics) Video game Product (category theory) Software framework Video game Formal language
Context awareness Population density Standard error Information Aliasing 3 (number) Bit Data type
Standard error Data recovery Local ring System call Variable (mathematics)
Standard error Building Data recovery Software framework Parameter (computer programming) Library (computing) Formal language
Inheritance (object-oriented programming) Token ring View (database) Generic programming Number Social class Causality Object (grammar) Information Statement (computer science) Library (computing) Metropolitan area network Formal grammar Exception handling Social class Computer file Computer program Line (geometry) System call Message passing String (computer science) Revision control Block (periodic table) Exception handling Electric current
Standard error Implementation Inheritance (object-oriented programming) System call Standard error Information Software developer Computer file Core dump Line (geometry) Code System call Thread (computing) Open set Number Social class Uniform resource locator Revision control Normal (geometry) Domain name Social class Exception handling
Revision control Standard error Context awareness Causality Line (geometry) Weight System call Social class
Pointer (computer programming) Message passing Multiplication sign Subtraction System call Error message Social class
Standard error Normal (geometry) Open set Formal language Library (computing)
Point (geometry) Standard error Pointer (computer programming) Context awareness Standard error Feedback Normal (geometry) Open set Number
Standard error Context awareness Computer network Nichtkommutative Jordan-Algebra Exception handling Message passing Error message System call Formal language Task (computing)
Aliasing Standard error Context awareness Standard error Aliasing Line (geometry) Infinity Data type
Word Context awareness Greatest element Standard error Computer file Code Multiplication sign Aliasing Line (geometry) Infinity Error message Number
Inclusion map Context awareness MUD Standard error Information Aliasing Motion blur Binary file Multiplication Social class Software bug
Web 2.0 Standard error Divisor Scientific modelling Debugger Interactive television Text editor Quicksort Line (geometry) Block (periodic table)
Video game String (computer science) Speech synthesis Power (physics) Social class
Standard error Context awareness Standard error Directory service Quicksort Library (computing) Library (computing)
Standard error Context awareness Standard error Computer file Feedback Planning Software maintenance Replication (computing) Image resolution Latent heat Personal digital assistant Core dump Software testing Library (computing)
Hypermedia Context-sensitive language Formal language Exception handling
Standard deviation Fiber Standard error Trail Slide rule Inheritance (object-oriented programming) Standard error Computer file Inheritance (object-oriented programming) Scripting language Structural load Euler angles Parameter (computer programming) Price index Interrupt <Informatik> Information security Exception handling Social class Exception handling Default (computer science)
Standard deviation Fiber Standard error Context awareness Inheritance (object-oriented programming) Standard error Scripting language Structural load Electronic mailing list Parameter (computer programming) Price index Parameter (computer programming) Optical disc drive Latent heat Personal digital assistant Software testing Interrupt <Informatik> Information security Exception handling Exception handling Default (computer science)
Area Standard error Context awareness Product (category theory) Software developer Constructor (object-oriented programming) Rule of inference Software bug Process (computing) Personal digital assistant Energy level Software testing Object (grammar) Arithmetic progression Library (computing) Exception handling
Electronic mailing list Row (database) Coma Berenices Exception handling
the the the the
the the the the and I will intimate
other ready during that's the only way I can tell how many of you are in the room when you make sound so and ask you to make some for random reasons and key and sounds she's really good Heckler you know so just learned from her I guess so 1st of all there welcome I hope the keynote was really nicer was phonetically finishing my slides during that so of course I didn't see it so if there's anything really serious I should know someone screaming at some point like an type safety is the thing now another thing emojis article that I get into that of you so that the 1st thing I will ask of you is that they need humans in
the room in the that is like a point out that there there are people not reacting
at all to the state so there's probably aliens among us of the point X to you I don't speak Italian In this talk is not for you and so you can translate if you want speaking of millions actually an alien
myself I'm come from the planet that of weird people that took Louisiana for its native people and then sold it back to you Americans if the Americans in the room the now you have to go up the anyway
the Louisiana it's like that Louisiana that's the 1 that was sold and there's like Denver in there that like really cool places to that like TIMIT I could hardly get an easy vacation thing like to go to River Napoleon was a might I don't need this anymore but my
name is really this is how you pronounce it go the the FIL and and at
the end you feel like that but I am obviously French
which is like 1 of those things out like this Tell me you're sitting on by the way so sitting on French and that's I'm so sorry but so my full name is
this I'm not gonna pronounce it you figure out how to say that that's my internet name because that's what my mother named to me and it makes sense for
5 years have been developing maintaining and securing could school com this thing which is the place that brought you rails resolve these they're not so broken try ruby and a few 2 main jingles
but since I'm French I when they do when I make mistakes I often claimed that
it's on purpose put a really hard to make can do this but like at 1 time I ordered the same dishes my fiance at the Epcot for the White Festival but I'd I didn't
understand by which I mean I didn't listen that she wanted to share her food with me so when it was too late to cancel the order I assured her that no I am really hungry and I wanted to water that and I was but not enough to waste a bunch of many of our food budget and the exact same stuff as her and all of this because I was
afraid this is very not scary person at all would realize I screwed up just because of that no other reason so mistakes are
made and it it's really hard to admit them this often harder to understand how you manage to make 1 how you ended up there especially without feedback so that the you make an error and
you know that the path to recovery is this far away feedback is is the thing they can help you up can help you get to recovery at some point but there's something missing in the in in between those 2 things an animation perhaps know a gift a kind of step they can be made get can make this much more accessible for with proper context so if you have the context as a as a little steps tool to get to recover it so that much easier and that sort of what I'm trying to talk to you about today and and funky in emissions but so the Y is
usually the 1st thing people ask when there's an error why why did it happen to me that we don't understand why computers seems to easily displeased with us and yet we are so easily displeased with users if the dare stray away from the Happy often the most interesting question to ask enough for why there what or how or when or where that's what we're talk about it not but 1st I have to do the opti thing which is to define what I'm talking about Soaring to talk about definitions in words and
things I you've been warned for those who were falling into a I'm so sorry so and areas a mistake could be a spelling error or an error of judgment and the broad definition is the state or condition of being wrong in context of something you you did on judgment something you know decided but the specific 1 for us technical folks is a measure of the estimated difference between the observed or calculated value of a quantity and its true value so simplified for people who don't like long things
observed value not equal true value but the thing that I'm really really excited about when is my fine words like that I try to define them is is the etymology like the the origins of the words like the DNA of that word and how it came to be so you can tell the air comes from the Middle English order I I don't know why in front we see you with you surrealist error or but which is very useful because it happened to be error in Latin anyway so why in the land is really cool it's wondering about so you're you're trying to go somewhere and I mean you lost away that's a perfect like I love that metaphor that that just image of you wondering about trying to get to the thing that you're trying to do so wondering is is usually a an enjoyable if you have a friendly
environment and make lots of signposts to find your way back to the place that you want to get to war you can end up you know you know finding really
hostile people on the way that I don't want you don't want your data to help you or just are not really friendly and so we all want
to stop making mistakes but it's impossible and we we know that but it's calloc grokking thing we we know it but we don't rocket we go internalize the fact that were always going to make mistakes and pushing in the pushing them away is not really gonna help and in moments like this I like to think collective to reframe I could call for instance like a waiter reframe is too good to support and if you work for a product company like that talk to people humans who were using after the use so it's to
find the target but the people that were trying to build things for and for broadly speaking for us it's
end-users which is a really weird freeze me think about because it sounds like use like catching a secret plan to eradicate all users and finally be free of real-world cost consequences the requirements
but which is dabbling not what we want you know so instead I wanna talk about middle uses which is
90 neologism I that's hard to see English but so getting people in this room are actually end users of many things but there also in needle users of a lot of other things like the softer that we build were not just the people using the finished product so
terrible terribly awkward analogy that goes like this from left to right we have the start user that or the robot or computer and middle we have the middle user we go conference we spend time all day instead of being inside all day of eating po-boys and sipping coffee from the French coffee truck it also that all day they're trying and then is that learning that little running rascal of their assigned user like running away He's right across the street without looking and clicking on things too fast he doesn't have a cold on but so occasionally the start user
or about which could be the language the operating systems that we use decides to yell at defenseless little and user and when that happens at I said decided
as if It's decides that really it's often because we dropped the ball in gave pop Roomba over there a little too much power over her keep people we don't really know who don't really understand where he's yammering on about could 253 something that so we intervened we we prior fancy error-handling badge and this just just to be sure maybe a whole met because those pictures scary over
and we we thwack the start user was some justice hammered I don't know it yet but so it's not it's not just the
end users who suffer from confusing error feedback and the there isn't appropriate or just plain hard to understand based on context it's also middle users like us who builds offer for the end users
binds the windows and IOS sort those new critic courtship readers that the but you viciously even though the transaction succeeded and they want you to take your card back in like where grant rare but it's always that why I I didn't feel instead we have was grads
ruby sassy extensions that growling are general direction once a while for no obvious reason but a few months or maybe
years now is time just blow flies a rare but I started noticing occasionally string is strange strange exceptions popping up from the call sites for methods that had recently been refactored which surprises no 1 but that we have a method called exploded which takes a single code argument and with that Kodaira manages the princess string and it's not really useful and we call when we call that method with no argument we did an argument error that says wrong number of arguments given 0 expected 1 so seems normal but the batteries that follows accepts message points to the 1st line of D. explode method definition and when we look at the 1st line of The explode method definition we DeFelice said we wanted the code argument so that's good everything's fine so
when you call the explode method again this providing the argument that works just fine and everybody's happy
let's say team rich factors this method to make it more to make its interphase more explicit so the code argument becomes a required keyword argument but that little coal and the that's really hard to notice very very easy to their not seen
and he said the only changes a single character
and only call with no argument we get a very useful error that's is different messages that missing keyword code cool race I knew what I'm supposed to supply but what happens when we passed the original argument with no keywords does anybody have any idea what happens there so missing cured expect in 1 area and got 1 you know both of your eye but you really care about that a standard Shondra just using of so probably you didn't expect this wrong number of arguments given 1 expected 0 that do similar what's it's clearly not true we have differently if you were Gregori like required argument right there so I had the same reaction but doesn't seem right and thereafter bunch of people who were smarter than me which is the only way to do on
and it turns out that it is a it is about so submitted that went 9 months ago now ends up as soon as you submit a thing on the ruby about but tracker it's Nobel time to to height
I think we too much someone some scum point out everything that's in there all of the shot as you see at the end of his tentacles are actually his last with like it's like from yesterday because that's the way when you all sleeping in drinking and you you know the t noting he's doing that so this is
new he's amazing I had already talked about and a bunch of people have talked about how incredibly productive the patch monsters he's called is and he just responded almost quick like the
2nd response to the thing was about 9 months ago so this policy in week how about this if the fixed but that above all I had to do a descent as a question and so he made a really simple fixed
and it's been merged like 4 months ago so that's it end of the talk the so now
when you use the old saying the old method signature and you send it you still get and not super-rate error message there's work to be then there is like it is not about number of arguments and it's not given were expected 0 it's given 1 expected 1 like you said a of but at least you get required fewer code like that if you if you have if you keep reading than those given so that then maybe you find useful help
and that that's now included in ruby 2 5 0 blue 1 there was released a few weeks ago so you can already play with it if you what it should be in the V 2 5 0
on Christmas which is called but issued he
cares about my amazing kept capability to ask a question have other people do the work for me at this talk explains to you how to do that so it's it's on youtube somewhere as from an old recover 2014 so and also there
are lots of resources at very conference you're sitting on but to help you help ruby so please do that or if you're excited after the conference will could go ahead and try to find old ruby but tracker issues that were maybe not updated or something like that but so that that suddenly a
start but joy I have a lot of during we too excited to be here if the if someone just
talk to you about that said for me the purpose of life is partly to have joy programmers often feel joy when they can concentrate on the creative side of programming so Ruby is designed to make programmers happy and Ruby has inspired a ton of other languages and frameworks and things to kind of focus more on that side of the performance of the productivity of things like rust
which now have errors like this could not
find type neural Mansi but did you mean necromancy like
Serre which gives you like this amazing low-light as saying to tell you like all you should try this 3rd sentence it's nicer and also you press
an elm and and I think that might be my favorite and will segment later and you'll see why I won the density of information and very well explained context in everything so I'll I'll explain everything later you won't find out about Ruby a little bit
more so Ruby also does this by the way
so I don't know if you know but since 2 B 2 3 that did you mean Jenna's included a a B so all of these like very easy to fix errors that you would spend probably a week I try to figure out how why is how my calls to explode derive feeling well because you didn't spot right so Knightley's these that's an easy fix and you get instant recovery from which is I
think 1 of the 1 of the easiest things you could do in a language a framework or library thing that you're buildings like if there's an easy cheap recovery to be had and you know why not put a thing like that in the end you're not actually handling
the error by the way you don't have to because this is this is a mistake parameters like us make a lot of users also make so that can also apply to end users that at fervor
lookin' minute I want I want this these little guys with a little things the knowing the the that the and actual call to the thing that's not found so I am I call this is when
your lines but contextual view because magically carries so if you look at the exception
classes but there's a lot of things that they give you the give you back trace of cause and a message and things like that and for now in ruby we we did the line number but we don't get that amount of detail we don't really get the call man like the specific keyword token that actually cause the exception but it might
be something so I ask a question to matter yesterday and it might be something as possible with its teetered grabbed the column information from that or I think that I was trying to see through the codes of that location class that actually gives you the line number 4 exception anyway there may be some hope there if you're good at sea in you want to do something get has no obvious impact you could look into that and speaking of
obvious impact I found this thing that's 2 years old now I really thought I was like a few months ago but Richard Schneemann basically did this user-submitted that as a it be it be nice OK I make l think there was an implementation offered with it but someone made an implementation that wishes purer the just found the I think it was the receiver of the call it there's no no method error to say is this receiver and the problem that
it was fixing is these these calls when you have 2 calls to the same method on the same line causing and defined as a call you don't know which 1 cause the net the and undefined that the call so that the
promise who did it little error could go a long way from and this is the proposed together as
the propose version that Richard attributes listening psych insist say undefined method call on no classes of like that it's is the method call is under fire on receiver no class which 1st is giving you a context
so where that thing is happening exactly not just somewhat vaguely where it's happening and then it's give you feedback and
personal the and the difference between these 2 things and
I think it's easier over they understate so this is the previous error message undefined method call for no class which is correct kind of the interest I don't know I've seen it so many times that I forget to even read it I think and this thing kind of homes in on what is the actual problems so it's it's a message that takes a little
bit more care and clarity and in in explaining exactly what's happening what what you might have missed which I think matters
and I think that how you say matters it so I think we could find a way to in our libraries and even the language itself to to find these places where something could be misconstrued AMISOM misinterpreted and just clarified the
so it hasn't been updated in 2 years which is concerned so if you want to help
implement that also that you can try to do that I I think the issue tracker number with
this somewhere also did
you just ask me that is so
I would like us as a community it would be really cool if we could try to make it so that we contextualize errors better so we we were pretty good at giving feedback in most scenarios you you get feedback so you get the that something happened to call but we don't really get the context necessary to understand really quickly what to do about it or choose to just to know how they did come about 100 in what's inherited this occur and as I found this this point tweak
about JavaScript which of the applies primitive at any language that it's not a day on gels gives governs lead to do an original but and I think that it's a joke would effectively that's what happened we've offloaded the task of giving context to an error message to stock or or for which could be goody-goody bad that I think it might save everybody a lot of that browsing a lot of network calls but if we we can give it colored directly write like that but
so that l error was look at it the
it's it's gorgeous she can see it's it's not very big so where goal line by line almost but so the 1st thing that it tells you it is you know what happened which
is an alias problem and it's at the very top and it's very big so it's super obvious what we're dealing with right there so you get the
context a type of error and then right after that you get where it happens because it tells you this is the
file and this is even the code where that happened which is amazing it's not just a word is in line number it's showing you those lines in context even the error message and then it tells you how it happens and
explains to you that this notice is recursive and that makes an infinite time and you should do this and use an example of how quickly fix this it's it's I think they they call it and naive fix verse some like that yeah I suggested this naive fix it doesn't mean that the work for you necessarily but even if it doesn't work for you it may be adaptable to your circumstance and you might find a way to recover from that thing really quickly I think the last thing at the bottom it
sees its even sending you to get have to I think at a specific class to find more information about the context of this if the naive fix doesn't work for you so it's
great that's what they're not everyone don't know of as a young
theory that of same as here sent so I'm not trying to be mean about our spec and I don't think this is funny things you are saying it's actually more of a rails are respect intersection bug which sets so that
the actual error is undefined method shall escape for pathname led no method the and what so I I can understand what happened here there was an undefined method what does it help me and if I look at the
batteries the 1st line is this thing run an idea that does look past I guess that was half an hour of the past that sort of makes sense but again that doesn't really help me and so what what end up having to do is go back to the huge factor so you sort the beginning in his goal line by line make OK why made you angry the slowly and so I use tools like Prize and I used make cool little interactive debugger tools you then the rails of web consul but none of it I think we're consul those that that there is is better use that and you can you can there click on the modeling of sectors and go back to that place so that you don't have to do that in the command line at Chapron your editor so does it tell me where it
happened not really because it's telling me where it blew up but not really know the place in which I should have done something different which is and that really hard to to figure out and it doesn't tell you how it happened no what does it tell me how to recover Nope of so it's a 5 because
half of the things that he could have done it didn't do and in the end by the way if you if you care to know but I used I think somehow I use a string and I It's of putting a path in classes a make that no I use the path in class and that wasn't OK in the Lodi and Raleses finds it speech no that was powers of my life the so it was unclear
as to late in the stack for me to know exactly you have like to find a context to recover from it here's another 1 but that's that's 2 per common 1 with beginners Sarubbi because they try to install a gem and then again error like this we even worse this knowledge and it works because the use pseudo but it in no other suitors the thing and then hatred update the genome will this happens and the lesson in wine so again you know what happens you can do this but you sort of know where it happens visitors in the past so it can clear light but you don't know what library ruby no 2 comma decimal 0 is that you don't know how it happened and you don't know how to recover and so again it's a 5
it's not the context-specific error or there is some context but it's not useful so what's
missing is a way forward to recover from this thing back to that little turbine
emission they should earlier there's there's a few little steps tools missing plan to get there
but resolution hence basically and sciences German core summit meeting the weird
but we're talking about this would be just Searles any said something that I think is very nice for this kind of context as a library replication not having a functional need to rescue a possible error doesn't grant us license to ignore how confusing there may be for the person who alternately sees it so in this the case of our spec there it's not really your fault that this pathname just snuck through rails to them and they did know how to handle it to load my test files which is it's something that could happen so I I don't know who I don't really wanna laid the blame on specific libraries and I would like both the library maintainers and
users to be more aware of the kinds of context-sensitive things that they could offer people and so that they can provide more farm-to-table
exceptions there local thank you I'll let you yeah media that was like 30 minutes ago to so items superheavy of this in all the language size of language implementors and users
which are everyone here probably and there's there's another way to to recover from these things fixed these things and
that's turn-by-turn contextualization so the ELM example was that is basically like 1st do this all were here were starting here this is where you are just look around and they were going there and the way you can go there is you can take the step and then the step and that step amazing in it it might seem like a lot of work to do but there's a lot of easy
targets so if you ever download don't do it on this Wi-Fi pleased that
the be source-code out the track through truck as a file called error dot see that as that has all of the error classes and on lots of error handling information inside of it there's a
comet that shows you all of the built-in subclasses of the exception class which you should never rescue by the way pose a slide attitude about this and that he had a funny slide it because there was a that think yeah rescuing exception is an error of so that's
our target this thing this list of exceptions because every single 1 of them I just went through argument errant should you in the context of keyword odds argument Arikan fail because probably because it was introduced as a new future and some things that through and some test cases weren't made you know tested for specific kinds of scenarios for exceptions but there's tons of syntax there is a great 1 they could be helping a lot of beginners so if we target those
of a target things like in error and try to make them a little better I think the impact of those improvements is seen by everybody really really quickly even if it takes a few months to get merged into the new release and so it's easy to forget that your
job is to create a new and exciting areas of tomorrow but these kinds of layers a library at level issues can send people into a panic in her the productivity so I mean you can see users freaking out about a bug but there's there's also lots of developers who were new to Ruby or Not even new to Rabin that is break down in front of 1 of those errors because the context is so intractable so confusing so I use the the definition that bigram
release an exceptional review from Burton Myers object suffer construction an error can cause a failure which cause an exception and the part that we're interested in then I'm interested in that I want us to work and live it more on naturally we as developers want to focus on the errors and prevent them from happening we want to make this cases to progression testing things so that the errors don't don't occur I'm actually interested exceptions because there's always going to be errors so it be nice if we need a rule to take
better care of our exceptions thank you the thanks to
the list of the
Loading...
Feedback

Timings

  668 ms - page object

Version

AV-Portal 3.10.1 (444c3c2f7be8b8a4b766f225e37189cd309f0d7f)
hidden