News for hackers. Stuff that matters.
Re:REPL Driven Design by xapata on Thursday May 28, 2020 @12:19PM (#23339073)
That's the similar to the issue I have with coding in (Jupyter) Notebooks. It feels productive, but it discourages modularity.
Re:REPL Driven Design by lvh on Thursday May 28, 2020 @01:49PM (#23340207)
The REPL in (Lisp) driven development is generally attached to your editor, not like irb or ipython or whatever: so the thing you're building is either the resulting function, or something that mostly looks like a test already anyway and is easy to copy into a test module.
Re:REPL Driven Design by tchaffee on Thursday May 28, 2020 @06:16PM (#23343517)
Jeremy Howard developed the fastai library using Jupyter Notebooks and his nbdev tool[1]. I'm not saying that to disagree with your claim - I don't have enough experience with Jupyter Notebooks yet to have much of a strong opinion on whether or not it discourages modularity. Just that folks who want to have the best of both worlds might be interested in how it can be done. My first thought is that it looks like Donald Knuth's literate programming ideas put to practice, and it has me excited about programming again.

[1] https://github.com/fastai/nbdev

Re:REPL Driven Design by zelphirkalt on Thursday May 28, 2020 @02:52PM (#23340941)
Not sure it really discourages modular code. I usually write code modularly in Notebooks as well, but not sure how this is for most people.
Re:REPL Driven Design by Jtsummers on Thursday May 28, 2020 @03:03PM (#23341049)
I suspect the problem is less that it discourages than that it does not encourage.

Which gets back to the posted article. REPL-driven development permitted him to feel confident without doing his usual process, it didn't discourage decoupling, but it didn't encourage decoupling either. TDD, to be done well, almost requires decoupling your code to make it more testable.

The same may (I'm not sure I agree, but I've never used Jupyter notebooks) be true of using notebook-styled development approaches and modularity. If the workflow permits relatively easy (and mostly safe) development without encouraging modularity, then it's incumbent on the developer to bring that discipline into the workflow.

Re:REPL Driven Design by xapata on Friday May 29, 2020 @01:23PM (#23352787)
And unfortunately, most of the new crop of programmers don't have that discipline. I tell them to write tests and they eyeroll when they think I'm not looking.