Live Debugging in Smalltalk
Channel:jarober · Length:2:50 · Published:2008-09-18 · Views:1231
Summary
A brief demo of the Smalltalk debugger, including defining a method that doesn't exist yet while the program is stopped mid-crash.
Why HN recommends it
HN cites it as a concise demo of live debugging and editing code in a running Smalltalk environment.
That's a demo of a Smalltalk environment with the programmer deliberately writing some code that crashes, going into the debugger, adding the method on the fly — HN, 2017
Testing, debugging & developer tools · GUI, HCI & interface history
Subtitles (excerpt)
welcome to Small Talk daily for Wednesday September 17 2008 this morning I'd like to go through how you can write code in the debugger even though you're in the middle of fixing something that didn't really exist yet what do I mean by that well let's take a look at this small class here counter instance variable of count and an initialized method that sets the count to zero all right that looks fine let's go ahead and test that out counter new add more one now the add one method doesn't exist yet right so we'll go ahead and we'll do an inspect to see what the answer that comes back from that is and as expected we get a debugger so we'll go through bring this up and now what we'll do is something interesting if we go here to correct you'll notice there's a Define method option so we'll go ahead and select that notice what it does now it goes ahead and puts an add one method in my class for me and asks me to start writing it so let's just write that to self count self count plus one now let's go ahead and hit that and sure enough it now completes and finishes up by giving me the answer so that's interesting let's go ahead and we'll write another method let's go ahead and write subtract one and we'll make a common kind of error
On Hacker News
Smalltalk has a meta API that is designed to allow introspection and modification of both static and dynamic code entities [1,2]. Static entities such as classes and methods (and depending on your Smalltalk implementation namespaces and object versions) can be modified at runtime, i.e. while your program is running you can make a change and get an immediate effect. This is now known as "live" pro… — robertkrahn01, 2017-12
This may have been posted in 2008, but the tech it is demoing was decades (yes, plural) old by then: [VIDEO] This video is a simple demonstration of very mature tech, not a demo of something hot and new. That's a demo of a Smalltalk environment with the programmer deliberately writing some code that crashes, going into the debugger, adding the method on the fly, and then having the original metho… — jerf, 2017-10
A small example of refactoring running code is at [VIDEO] And a more lengthy example of writing tests first, letting the code fail, and fixing things in the debugger: [LINK] This is kind of like writing code that doesn't exist or doesn't work, and letting the type checker guide you through the things you need to fill in. The difference is that Smalltalk is actually executing your code, so you can… — tree_of_item, 2012-05
Related videos
- RailsConf 2014 - All the Little Things by Sandi Metz · Confreaks · 38:47
- "Testing Distributed Systems w/ Deterministic Simulation" by Will Wilson · Strange Loop Conference · 40:20
- 🚀 TDD, Where Did It All Go Wrong (Ian Cooper) · DevTernity Conference · 1:03:55
- Bret Victor - Inventing on Principle · Rui Oliveira · 54:20
- Bret Victor The Future of Programming · Joey Reid · 32:55
- Solving Problems the Clojure Way - Rafal Dittwald · Clojure/north · 1:02:26
- Debugging Under Fire: Keep your Head when Systems have Lost their Mind • Bryan Cantrill • GOTO 2017 · GOTO Conferences · 52:34
- "Performance Matters" by Emery Berger · Strange Loop Conference · 42:15
- A Tour of the Acme Editor · Russ Cox · 23:16
- Tech Talk: Linus Torvalds on git · Google · 1:10:15
- Alan Kay's tribute to Ted Nelson at "Intertwingled" Festival · TheTedNelson · 17:33
- "How NOT to Measure Latency" by Gil Tene · Strange Loop Conference · 42:59
- Ruby Conf 12 - Boundaries by Gary Bernhardt · Confreaks · 45:55
- Using Python to Code by Voice · Next Day Video · 28:17
- How to Do 90% of What Plugins Do (With Just Vim) · thoughtbot · 1:14:02
- The Mother of All Demos, presented by Douglas Engelbart (1968) · Marcel · 1:40:52