Live data from Hacker News

Programming in the Debugger

willcrichton.net

71–80 of 89 posts

Re: Programming in the Debugger

#71
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.

> I understand "their" as a plural

Singular "they" has been in use in English for centuries. See https://en.wikipedia.org/wiki/Singular_they or https://www.merriam-webster.com/words-at-play/singular-nonbi... for example.

Re: Programming in the Debugger

#72
post #12

My biggest issue with notebooks is that we're throwing aways years of best practices. Notebooks often lead to untested code with poor structure, frequent use of global variables and readability issues. Even using it as debugger is limited since there's no way to step into functions.

but who builds whole applications in a notebook anyway? most software dev best practices are really out the window when what you are doing is data analysis, or explication, or putting together reports.

Re: Programming in the Debugger

#73
post #2

> Interactive editing and debugging is limited to top-level code. Very true. When programming in jupyter notebooks I often put off wrapping my code in a function because it becomes harder to interact with and debug. But this obviously becomes problematic when you want to leverage code reuse and abstraction. In order to tackle this (somewhat) I made a tool [1] which allows you to take code anywhere and get it back int…

In MATLAB I run in debugger mode very frequently, and it allows you to step inside functions, and query variables. When encapsulated within functions, it also allows variable assignment at the prompt. This is pretty useful when writing data munging or analysis scripts; in that case, the code in the editor is the running canonical copy, while the current running environment is exploratory in nature.

Re: Programming in the Debugger

#74
post #37

This has been possible for 50 years at least, and the lisp, smalltalk, and functional programmers have been doing this for a long time now. After programming my whole life I have to say this industry is surprisingly math averse, regressive, and led by cargo cults. What wheel will we reinvent next week!? Stay tuned...

Yeah the article is a little bizarre. E.g. > This works exactly as intended! We were able to edit our program while it was running, and then re-run only the part that needed fixing. In some sense, this is an obvious result—a REPL is designed to do exactly this, allow you to create new code while inside a long-running programming environment. But the difference between Jupyter and a REPL is that Jupyter is persistent.…

just don't do something like:

q = 'foo and bar'

inside the pdb

Re: Programming in the Debugger

#75
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…

their is an acceptable third person pronoun. its been in use for centuries in English. some 19th century grammarians may have tried to intervene. it is my preferred usuage.

"her" doesn't bother me at all, or at least no more than "his". but, i guess, some people see the former as political or agenda driven, and the latter as neither. but i suppose that a white person's policy of always addressing a black man with the same honorifics as they would have addressed a white person, might have been considered agenda-driven and ideological by their peers.

Re: Programming in the Debugger

#76
post #59

Earlier quoted context omitted.

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.

I should probably not care, but i do: Emacs, not emails. I should also not write these on an iphone.

Re: Programming in the Debugger

#77
post #60
post #57

Earlier quoted context omitted.

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".

It's nothing to do with the fact that it's about software development, I don't think (or at least hope). I just find it jarring to see 'her' used as an 'abstract' gender neutral pronoun. In my mind, 'his' has two semantically distinct definitions, and 'her' has just one - and that's just how the English language works.

Re: Programming in the Debugger

#78

I use this kind of workflow all the time in Emacs. I write code in one window and have a Jupyter REPL in the other and send code to the REPL to test things live as I'm coding. I'll have "pdb" set up in Jupyter REPL so it drops into a debugger when I have an error with a function. In the case of a long running function I want to debug (like the video example at the end) I'll set local variables with the same names as…

i hate actually writing code in Jupyter. part of it is just that my muscle memory is all emacs. but its not just the muscle memory, its all the features missing that I usually use but are common in an IDE or good editor. Does anyone know whether emacs ipython notebook is still viable?

Yes Emacs IPython Notebook is alive and kicking [1]. I recently wrote a tool on top of it and found most everything to work, even as I was banging on it pretty hard at times.

- [1] https://github.com/millejoh/emacs-ipython-notebook

Re: Programming in the Debugger

#79
post #28

I use this kind of workflow all the time in Emacs. I write code in one window and have a Jupyter REPL in the other and send code to the REPL to test things live as I'm coding. I'll have "pdb" set up in Jupyter REPL so it drops into a debugger when I have an error with a function. In the case of a long running function I want to debug (like the video example at the end) I'll set local variables with the same names as…

What do you use for running the jupyter REPL in emacs? I haven't found a great way of doing so yet. Just running it in a comint buffer?

If you connect your code buffer to an jupyter notebook via Emacs IPython Notebook [1] then you can hit C-c C-o (ein:console-open) which will launch a jupyter REPL.

- [1] https://github.com/millejoh/emacs-ipython-notebook

Re: Programming in the Debugger

#80
post #12

My biggest issue with notebooks is that we're throwing aways years of best practices. Notebooks often lead to untested code with poor structure, frequent use of global variables and readability issues. Even using it as debugger is limited since there's no way to step into functions.

but who builds whole applications in a notebook anyway? most software dev best practices are really out the window when what you are doing is data analysis, or explication, or putting together reports.

I have built several dashboards with nothing but jupyter notebooks + jupyter widgets [1] with the help of jupyter-dashboards [2]. Granted they were little more than api calls followed by visualizations.

- [1] http://jupyter.org/widgets

- [2] https://github.com/jupyter/dashboards

Post reply on HN