News for hackers. Stuff that matters.
Re:TDD from the Factorio Team by rpastuszak on Friday June 18, 2021 @07:44AM (#27549380)
> The important notion here is that TDD is not about tests and correctness, but about development.

Yup, writing tests helps me sleep at night. TDD helps me manage my mental resources and iterate.

(another reason is communication--we code for our colleagues first, then for the machine: https://sonnet.io/posts/code-sober-debug-drunk/)

IIRC smalltalk had a workflow where you'd debug and write your program at the same time. You'd just reach a path that has not been implemented yet, break, implement it and continue.

Re:TDD from the Factorio Team by dgb23 on Friday June 18, 2021 @07:53AM (#27549419)
This „keeps working while it breaks“, does it have a name? It comes up in highly dynamic environments often like Smalltalk as you mentioned, but also Lisp, Erlang and others.
Re:TDD from the Factorio Team by dkarp on Friday June 18, 2021 @08:06AM (#27549487)
I think this may be "REPL driven development" popular in the lisp community
Re:TDD from the Factorio Team by dgb23 on Friday June 18, 2021 @09:55AM (#27550333)
I meant more at the system/vm level. You're going to use a REPL (of some sort) for this, but the system needs to accommodate failure and just keep going, while giving you the opportunity to fix and change things.

This has been implemented to varying degrees of reliability, granularity (in terms of preserving state) and utility. It's a common concept but I don't know the name for it!

Examples:

https://en.wikipedia.org/wiki/Continuation

https://en.wikipedia.org/wiki/Fault_tolerance

Maybe fault tolerance is the right word? But it doesn't imply that you actually modify and build the thing while it already runs.

Re:TDD from the Factorio Team by astrange on Friday June 18, 2021 @10:38AM (#27550827)
It's not a great idea because failure could mean anything, and so you can't necessarily fix it. It's better to start over from the beginning. This is what reliable systems like Erlang do.

https://en.wikipedia.org/wiki/Crash-only_software

Re:TDD from the Factorio Team by aiisjustanif on Saturday June 19, 2021 @01:07AM (#27557927)
In security of systems you would call the design “Fail open”. They are many systems that fail open.

An example of fail open design in the real world, is electronic magnetic locks at apartment complexes or business buildings. If the building loses power the doors demagnetize and unlock, then indefinitely remains open but failing because it is always open now. The opposite would be the building loses power and the doors fail close and lock the doors indefinitely when power is lost, and now people can’t escape.

Re:TDD from the Factorio Team by FigmentEngine on Friday June 18, 2021 @02:06PM (#27553111)
this could be many different concepts. fault tolerance is the most obvious, and self-healing and auto-rollback

a good read is ROC https://en.m.wikipedia.org/wiki/Recovery-oriented_computing

Re:TDD from the Factorio Team by mulmboy on Friday June 18, 2021 @10:37PM (#27557262)
> You'd just reach a path that has not been implemented yet, break, implement it and continue.

This is exactly what I do with the PyCharm - hit a breakpoint, write the code as it should be, and execute it in the debug REPL to do basic initial testing [repeat]. Extremely productive.