Hacker News new | ask | show | jobs
by peterwwillis 2099 days ago
> The big drawback for putting complex code in notebooks is that you can't debug it in your IDE.

I mean, that's one of the many drawbacks. Executing random independent snippets of code in different stages based on multiple variables leads to an insane amount of untestable code paths in an undefined an environment. I hope nobody depends on these for production.

Where it does seem to shine is as a sort of verbose user interface. You could use these to compose user guides to fill out forms and perform the tasks of complex workflows (in theory). But I think the snippets should still be one piece of code so you can actually develop/maintain/use it according to modern best practices.

POD documentation was good for this back in the day. Here's an example of using POD to actually define your program's input: https://metacpan.org/pod/Getopt::Euclid