Live data from Hacker News

Programming in the Debugger

willcrichton.net

51–60 of 89 posts

Re: Programming in the Debugger

#51
post #6

Not a very unique style as claimed though. Common Lisp implementations often have a very full featured debugger coupled with conditional restarts the experience is awesome and really should be a preresquite for any dynamic language to be called fit for serious application. Unfortunately it is often absent

Not related to your point, but I do think it's entertaining that every time I post something about programming languages, there is always at least one person who says "Lisp already solved it!" [1] [2] [1] https://news.ycombinator.com/item?id=16726379 [2] https://news.ycombinator.com/item?id=12221818

Maybe it's because you sound like you detected new and unique (!) stuff or that it is actually like you describe. For example:

> Jupyter presents a unique programming style

UNIQUE (!)

> But the difference between Jupyter and a REPL is that Jupyter is persistent. Code which I write in a REPL disappears along with my data when the REPL exits, but Jupyter notebooks hang around.

Sounds like a typical Mathematica notebook to me.

Macsyma (a Computer Algebra system written in Lisp) has had also Notebooks like that: https://people.eecs.berkeley.edu/~fateman/macsyma/docs/intro...

REPLs on Lisp systems have been persistent in Lisp images (not in notebook files and not transferable) since a very long time and some display text/graphics inline.

Re: Programming in the Debugger

#52
> Jupyter presents a unique programming style where the programmer can change her code while it's running....

Is the author trying to make some kind of statement by using 'her' as a gender neutral third person pronoun? Surely, if this is something they care about (and reasonably so), 'their' would be the logical choice? It's frustrating that the author chooses to be deliberately obtuse in their use of language - to the (slight) detriment of readability.

Re: Programming in the Debugger

#53
post #51

Earlier quoted context omitted.

Not related to your point, but I do think it's entertaining that every time I post something about programming languages, there is always at least one person who says "Lisp already solved it!" [1] [2] [1] https://news.ycombinator.com/item?id=16726379 [2] https://news.ycombinator.com/item?id=12221818

Maybe it's because you sound like you detected new and unique (!) stuff or that it is actually like you describe. For example: > Jupyter presents a unique programming style UNIQUE (!) > But the difference between Jupyter and a REPL is that Jupyter is persistent. Code which I write in a REPL disappears along with my data when the REPL exits, but Jupyter notebooks hang around. Sounds like a typical Mathematica notebook…

I'll grant "unique" is not an ideal world choice. I meant it not as much as "you literally can't find this anywhere else" so much as "it's something you don't find much these days."

And I think it's a little uncharitable to think I was claiming that wholesale, since I explicitly reference other implementations of the same idea at the end.

Re: Programming in the Debugger

#54
post #46

Sometimes I look at the bug database, pick up the next highest priority bug, have zero idea what the problem may be, sometimes there isn't any screenshots and the description is worded so poorly it is hard to make sense of. So I follow the repro steps, which perhaps take 15 minutes and trigger the issue. After that I may pause execution and examine some variables and work out what is wrong. From there I need to work…

But would you be sure you've actually fixed the bug? Perhaps your edit changes the state that would be reached by the continue (e.g. bug is on first iteration of a loop, and your edit inadvertantly changes the initialisation). I think it's useful for fleshing out a bug and could save time if there's another issue downstream, but I wouldn't count it as solved until it has been tested on a fresh run.

That's easy to do. After having the fix, go from the beginning and see if it still happens. Of course, this flow does not apply to all kinds of bugs, but I'm willing to bet that at least 90% of them can be fixed like this.

Re: Programming in the Debugger

#55
post #52

> Jupyter presents a unique programming style where the programmer can change her code while it's running.... Is the author trying to make some kind of statement by using 'her' as a gender neutral third person pronoun? Surely, if this is something they care about (and reasonably so), 'their' would be the logical choice? It's frustrating that the author chooses to be deliberately obtuse in their use of language - to t…

I understand "their" as a plural, so for lack of it, there are no good gender-neutral singular third person pronouns. In my writing I've quite often used "he" in the past, so I try to keep it balanced. I don't consider this deliberately obtuse, since I find it just as disorienting to see "their" used in a singular context.

Re: Programming in the Debugger

#56

I keep thinking I should be more interested in Jupyter than I am. Maybe someone who knows things can tell me this: Can I use it to develop and debug larger existing programs? That is, can I take 10k lines (say) of Python, that are spread across some modules, load them into Jupyter, not get a horrifying mess, and work on my program?

Probably not, but it depends on your program. I've been suprised how well it worked in some places just loading the parts of a program and working with that shimming between them, but as is stated elsewhere it's not really about debugging but more about code exploration.

Re: Programming in the Debugger

#57
post #52

> Jupyter presents a unique programming style where the programmer can change her code while it's running.... Is the author trying to make some kind of statement by using 'her' as a gender neutral third person pronoun? Surely, if this is something they care about (and reasonably so), 'their' would be the logical choice? It's frustrating that the author chooses to be deliberately obtuse in their use of language - to t…

I understand "their" as a plural, so for lack of it, there are no good gender-neutral singular third person pronouns. In my writing I've quite often used "he" in the past, so I try to keep it balanced. I don't consider this deliberately obtuse, since I find it just as disorienting to see "their" used in a singular context.

That's interesting, since 'her' in this context causes something equivalent to a Parse Error in my brain, but 'their' flows completely naturally for me.

Re: Programming in the Debugger

#58
post #45
post #44

Earlier quoted context omitted.

Not sure if I'm reading incorrectly into the tone of your response, but, for context, 'SteveJS was a developer on that feature, as he says elsewhere in the comment tree.

I sure noticed that, I just think when we work as professional programmers are worthy of having productivity features like "Edit and Continue". I don't have to "enjoy" doing everything the hard way, just for the sake of being professional. UI/UX and language features designed for productivity, help everyone, not only newbies. What I understood from SteveJS's remark, is that although he took part designing that featur…

I think it is more than fine to use Edit and Continue as a professional. I’m acknowledging the trade offs and making an argument meant to be heard by a resistant audience that is likely to be the ones making the tool.

E&C is a useful tool, just like a debugger in general is a useful tool, despite early enthusiasm for unit testing having people claim you shouldn’t use debuggers anymore, but instead write unit tests to debug every issue. E&C can be misused. If i was using C# i would take generics over edit and continue if I could only have one, but I definitely prefer to have both.

The theory behind using personas is you get a better tool or solution by highly focusing on a concrete user rather than spread around a bunch of features across every possible customer. What i expressed is what is necessary to ‘get through’ to someone who hasn’t read a book like ‘the inmates are running the asylum’. That was true of many in Devdiv back at that time. UX is now recognized more firmly as a separable highly valued skill. If you read and understand the persona and still think ‘i’m a programmer, this is a dev tool, my opinion is more import than what the persona would want .. that is the audience for the above. I think that is what is present in the comment to which i was replying, so i was attempting to put it in those terms.

I do believe it is helpful to understand who a tool is designed for to see why it works as it does. Edit and continue when done well is incredibly ‘safe’. It does what you expect every single time, even if you don’t know how it is doing it.

A good example where there is a hard choice is changing a linq statement. To make E&C in a dev tool that holds true to ‘what is on the page is what runs’ you need to violate aspects of how deferred execution works. If the closure was already captured are all existing instances of them going back to the source as it is on the page now or the source as it was when when captured? I have a strong opinion that it should be the source on the page now to build a good E&C, but that choice is detrimental to learning what is happening with any type of deferred execution. The cost of implementation for my opinion is also probably two or more orders of magnitude in effort.

I also think ‘non-professionals’ should be able to program and get to something that works. Particularly in people who write developer tools the bigger chore is gaining empathy for people who deserve to program, but simply aren’t making infrastructure. My reply is counterproductive in trying to model proper empathy so thank you for calling that out.

Re: Programming in the Debugger

#59
post #22

Earlier quoted context omitted.

It’s useful to realize Edit and Continue is not for professional programmers, and the qualities we’d most want are not appropriate to every problem. The horrible code you inherited as the programmer brought on is because some non-professional domain expert made a ‘hairball of extreme utility’ that unlocked product-market fit on back of a mess of experiments. VB’s persona was ‘Mort’, literally a scientist trying to ge…

There are lots of interesting problems with interacting with external underdocumented systems. I find edit and continue really useful for making something worm with these. Are these out of the reach of "professional programmers"? Can they only work on systems with fully specified models, with exacting requirements?

I agree with you and poorly worded this for a larger audience that doesn’t have the full context of design decisions on the feature.

As an example ... for a ‘professional programmer’ there is an argument that allowing E&C to work if you edit in vim or emails is a feature. For what we needed to accomplish that is an anti-feature.

Re: Programming in the Debugger

#60
post #57

Earlier quoted context omitted.

I understand "their" as a plural, so for lack of it, there are no good gender-neutral singular third person pronouns. In my writing I've quite often used "he" in the past, so I try to keep it balanced. I don't consider this deliberately obtuse, since I find it just as disorienting to see "their" used in a singular context.

That's interesting, since 'her' in this context causes something equivalent to a Parse Error in my brain, but 'their' flows completely naturally for me.

Perhaps that's something you should evaluate about yourself then, because I don't think you'd raise the same ParseError if the profession were "nurse". Unconscious biases don't have to be malicious to exist, and I catch myself thinking the way you describe sometimes before realising "wait, this should be fine though".
Post reply on HN