Re: Digital Twin applied to Software

Eliot Miranda <[email protected]> Sat, 3 Dec 2022 11:42:35 -0800
Newsgroups gmane.comp.lang.smalltalk.vwnc
Message-ID <[email protected]>

_,,,^..^,,,_ (phone)

> On Dec 3, 2022, at 10:18 AM, Cesar Rabak <[email protected]> wrote:
> 
> 
> As a counterpoint to slide 13, which says as a consequence of the reasoning about the Twin "Smalltalk is readable...". by asserting:
> Smalltalk is no more readable tha Greek for a Greek person, if one does have a clue in what the system is supposed to do, even the knowledgeable smalltalker can be caught in a puzzle to solve to understand how a legacy system works.

While well-written Smalltalk is usually more readable than the best written Java/C++/C# et al, IME it is its support of introspection and reflection that makes systems implemented in it comprehensible; it is easy to instrument Smalltalk systems, and do so while a system is running. Access to execution state via thisContext lifts it head and shoulders above other systems as far as explorability and hence comprehensibility.

The deeper point is that we tend to write systems as complex as, or rather a little more complex than, a given development platform allows.  So we can dig deeper holes in Smalltalk than we might elsewhere, and hence lean in its debugging facilities all the harder.  But still, it is not hyperbole to state that from compile time to run time, Smalltalk *is* more comprehensible than systems lacking full introspection and reflection.


> In fact to prove my point I would like to recall that even seasoned experts in Smalltalk propose tools to "reverse engineer" Smalltalk code:
> Squeak Reverse Engineering which the author makes a case in the article:
> The Case for Readable Code

There’s a lot of really badly written Smalltalk out there.

> I recommend more papers of Trygver's pen, which see, is one of the pioneers in OO and created Simula [67], etc., if not possible, at least one more named "The Common Sense of Object Orientation".
> 
> As Koh's presentation pushes towards Pharo, I also recommend the papers about A. Bergel's Roassal "Agile Visualization", which is a response to the needs we have to understand, specially legacy, code be it in Smalltalk as well!
> 
> Since we're at this slide, the assertion about the probability of the same bug is nothing when a shop has to figure out the probability of different bugs in each implementation and the need to solve in two approaches to have the "Twin" attain the SISO aim.

IME with the opensmalltalk-vm most (over 95%?) bugs reported in the production system reproduce exactly in the simulator and are hence amenable to quick fixes.

> It would be necessary to assess if any business case can be done so management can find this a risk or an investment.

The evolution of the BTTF VM (Squeak/Pharo VM) is an existence proof that it can be a valid investment.  But I think it only generally applies when one is constrained by performance to deploy on other than Smalltalk.  If one can deploy directly upon/within Smalltalk then one should do so (see explorability above).
 
   my $0.02

> 
> my 0.199999.... 
> 
> 
> 
> 
> 
> 
> 
>> On Wed, Nov 30, 2022 at 4:07 AM Aik-Siong Koh <[email protected]> wrote:
>> I have updated my slides based on the many feedback.
>> Digital Twin is better defined and how that helps productivity is elaborated.
>> Thanks.
>> https://urldefense.com/v3/__http://askoh.com/twin/DigitalTwinsCppSt20221129.pdf__;!!DZ3fjg!5uTurQ_75RkalGnCSNEjgUKR2bjLtlZZiIES_rS5eh51ZqFH_o9QBYmMvINDs0q7b56YvlNMPjZYbsuemWw38LQ$ 
>> 
>> Aik-Siong Koh wrote:
>>> Hi:
>>> 
>>> I have a novel idea: "Digital Twin applied to Software". See abstract and link below.
>>> It points to the future of improved programming productivity and reliability.
>>> Let me know what you think.
>>> 
>>> Thanks,
>>> Aik-Siong Koh
>>> https://urldefense.com/v3/__http://askoh.com__;!!DZ3fjg!5uTurQ_75RkalGnCSNEjgUKR2bjLtlZZiIES_rS5eh51ZqFH_o9QBYmMvINDs0q7b56YvlNMPjZYbsuewtA83Iw$ 
>>> https://urldefense.com/v3/__http://ar-cad.com__;!!DZ3fjg!5uTurQ_75RkalGnCSNEjgUKR2bjLtlZZiIES_rS5eh51ZqFH_o9QBYmMvINDs0q7b56YvlNMPjZYbsueFZpiKio$ 
>>> 
>>> 
>>> Abstract 
>>> 
>>> Digital Twin applied to Software
>>> Aik-Siong Koh
>>> 
>>> https://urldefense.com/v3/__http://askoh.com/twin/DigitalTwinsCppSt20220923.pdf__;!!DZ3fjg!5uTurQ_75RkalGnCSNEjgUKR2bjLtlZZiIES_rS5eh51ZqFH_o9QBYmMvINDs0q7b56YvlNMPjZYbsueTf2C8xU$ 
>>> 
>>> There has been a major dichotomy in computing right from the beginning: Statically Typed vs Dynamically Typed programming languages. The former languages produce fast executables but are inflexible to program in. The latter are just the converse. This dichotomy has been frustrating to programmers who always feel they have to make sacrifices when making a choice. It also often leads to futile language wars. The Digital Twin concept was introduced in engineering where a physical system is modeled digitally in geometry, simulation and other information. The concept has proven so successful that it is being applied to almost everything in engineering from simple mouse traps to complex whole cities. It occurred to the author that this concept can be extended to software too. For example, execution in C++ is famously fast. But development in C++ is notoriously difficulty because of language complexity and long build times. A flexible digital twin can be a program written in Smalltalk which is famous for live programming. "Development at the speed of thought" is the motto and is real. What is gained by this duplication? Firstly, the flexible twin can be use to explore new algorithms, features, solutions and fix bugs quickly. Only desired codes are translated to C++ manually or automatically. Secondly, the two programs can check each other so that bugs are reduced significantly. These two gains will define future programming productivity and quality. The Digital Twin concept will also drive the automatic translation of the flexible language to the fast language.
>>> 
>>> 
>>> Bio
>>> 
>>> Dr Aik-Siong Koh has a PhD from The University of Texas at Austin where he programed in FORTRAN to simulation mechanical systems. While teaching at Texas Tech University and Nanyang Technological University, he developed interest in Multibody Dynamics. To develop his own Multibody Dynamics simulator, he researched for the most productive programming language and discovered Smalltalk. The live programming capabilities of Smalltalk permitted him to build a successful simulator which he then proceeded to commercialize. His later experience with C++ at Mechanical Dynamics and MathWorks gave him the idea of Digital Twin for Software.
>>