OT: A better way to code, by Mike Bostock

178 views
Skip to first unread message

Matt Wilkie

unread,
Mar 14, 2018, 12:02:17 PM3/14/18
to leo-editor
I'm continually in awe of Mike Bostock's work, c.f. Data Driven Documents (d3.org). Impressive as that is, it's his power to clearly explain data, visualization and programming in cohesive bundle that transforms my thinking which impresses me most. I've not yet learned to do anything substantive in javascript, but reading Bostock's material has given me insight into own python projects. And a thirst to do more!

https://medium.com/@mbostock/a-better-way-to-code-2b1d2876a3a0

Just, wow.

Matt


Edward K. Ream

unread,
Mar 15, 2018, 3:44:56 AM3/15/18
to leo-editor

​I'm wary of flashy demos that don't actually involve programming.

Edward

Matt Wilkie

unread,
Mar 16, 2018, 12:43:16 AM3/16/18
to leo-editor

​I'm wary of flashy demos that don't actually involve programming.

Wariness on the internet is justified! Here's the real thing: https://beta.observablehq.com/

matt

Matt Wilkie

unread,
Mar 16, 2018, 12:44:40 AM3/16/18
to leo-editor

I'm continually in awe of Mike Bostock's work, c.f. Data Driven Documents (d3.org). ...

should have been https://d3js.org/

Edward K. Ream

unread,
Mar 16, 2018, 6:59:12 AM3/16/18
to leo-editor
On Thu, Mar 15, 2018 at 11:44 PM, Matt Wilkie <map...@gmail.com> wrote:

I'm continually in awe of Mike Bostock's work, c.f. Data Driven Documents (d3.org). ...

should have been https://d3js.org/

​Yes, d3 is cool.

Edward

Xavier G. Domingo (xgid)

unread,
Mar 17, 2018, 1:51:42 AM3/17/18
to leo-editor
Hi Matt, thanks for sharing this! 

It seems that Bostock is a strong follower of Bret Victor, which I've found always quite inspiring on better ways of programming. The work at observablehq.com seems strongly focused on intensive data manipulation and visualization, but the general idea of "live code" it's something I think we all should be after in some way, to make someday programming be a real joy for anyone. I'm on this quest also!

Xavier

Edward K. Ream

unread,
Mar 17, 2018, 5:50:28 AM3/17/18
to leo-editor
On Sat, Mar 17, 2018 at 12:51 AM, Xavier G. Domingo (xgid) <xgdo...@gmail.com> wrote:
Hi Matt, thanks for sharing this! 

It seems that Bostock is a strong follower of Bret Victor, which I've found always quite inspiring on better ways of programming. The work at observablehq.com seems strongly focused on intensive data manipulation and visualization, but the general idea of "live code" it's something I think we all should be after in some way, to make someday programming be a real joy for anyone. I'm on this quest also!

​As I understand him, Offray would agree with you.  It's a highly laudable goal.  I just don't want to give up python to accomplish it.

Edward

Xavier G. Domingo (xgid)

unread,
Mar 17, 2018, 8:11:11 AM3/17/18
to leo-editor
I have to admit that we are on the same boat here! After 30 years of programming, with 20+ programming languages including rare gems like CLIPPER and CHILL, I knew I was at home when I found Python. And I'm not going to change this, at least on this life! But I know that we can get the goal with Python (maybe with some help from the javascript world, but under control :-) ). My focus is NOT so much on the data visualization side of the question, but on the "talking code" side of it, to say it in some way.

The main limits to this goal are ourselves. Always!

I will be glad to have you in this journey for the live code! Do we start?

Xavier

Edward K. Ream

unread,
Mar 17, 2018, 12:36:56 PM3/17/18
to leo-editor
On Sat, Mar 17, 2018 at 7:11 AM, Xavier G. Domingo (xgid) <xgdo...@gmail.com> wrote:
I have to admit that we are on the same boat here! After 30 years of programming, with 20+ programming languages including rare gems like CLIPPER and CHILL, I knew I was at home when I found Python. And I'm not going to change this, at least on this life! But I know that we can get the goal with Python (maybe with some help from the javascript world, but under control :-) ). My focus is NOT so much on the data visualization side of the question, but on the "talking code" side of it, to say it in some way.

​An exciting goal.  I'll help you any way I can.

Edward

Xavier G. Domingo (xgid)

unread,
Mar 18, 2018, 4:15:04 AM3/18/18
to leo-editor
Great! Many thanks for your encouraging words. 

So I think I should try to explain first what I mean by "talking code". The idea is simple: when someone tells you that he is a programmer, he's telling you what he DOES. But that's not, by far, all he IS. There's much more he can tell you about him: how are his parents, where does he live, what's his recent history of life events, his preferences...

Well, any code we see is normally telling us what it DOES (at least in imperative programming languages). Sometimes, if the programmer has taken the care and time to add comments, it will tell you WHY it does it, it's INTENT and maybe even some reasons WHY it does it in the way it does. But I want it to tell me also about it's recent past history (git commits), all it's parents (commit authors), who is using it (callers), how well is it doing what it does (profiling), what kind of data it uses to handle and so on. We have tools to gather all that info, but the point is that I want the code itself to tell me this all the time, in a natural way.

OK, enough poetry. Let's go to the Vision: my ideal IDE is the one that tells you all the info related to the code at hand in a non-intrusive, expressive, a click-away manner, all the time. The main info I would like to have "shown around the code" includes, amongst others:
  • Comments, by author
  • Git info (git log, git blame)
  • Tests that test that code
  • Examples of input and output data
  • Type info
  • Callers and uses
  • Bugs that have impacted the code, by severity, date
  • Benchmarks
  • Profiling
 (the list above is in no particular order of preference)

The IDE should have to handle the different levels of granularity needed (module, class, method, function) and show the info accordingly.

The key feature here is the density of information without cluttering up the visual space. That's probably the most tricky part. And that's the "visual side" of the question: the best the IDE can show all this info in a visual expressive way, the better. My idea is that the IDE shows summaries of the relevant info (visually or textually) around the code and a hover and/or click takes you to the details. Of course, the idea is not "new" in any sense. IDEs are already doing some of the above with mixed success, but I would like to bring it to Leo.

Do you think that something like this will be possible with Leo? 

Please, your comments Amigos! ;-)

Xavier

Terry Brown

unread,
Mar 18, 2018, 10:28:53 AM3/18/18
to leo-e...@googlegroups.com
On Sun, 18 Mar 2018 01:15:04 -0700 (PDT)
"Xavier G. Domingo (xgid)" <xgdo...@gmail.com> wrote:

> OK, enough poetry. Let's go to the Vision: my ideal IDE is the one
> that tells you all the info related to the code at hand in a
> non-intrusive, expressive, a click-away manner, all the time. The
> main info I would like to have "shown around the code" includes,
> amongst others:
>
> - Comments, by author
> - Git info (git log, git blame)
> - Tests that test that code

https://github.com/leo-editor/snippets/blob/master/utils/pytest_switch.py

is an example of how Leo can help bring a function and its unit test
closer together. That code could be made smarter, in particular it
should search upwards for an existing tests folder better, but just
pointing it out.

You do feel very virtuous when you write the test for a function before
the function :-)

Cheers -Terry

Xavier G. Domingo (xgid)

unread,
Mar 18, 2018, 6:03:33 PM3/18/18
to leo-editor
Great Terry! For me it's a meaningful first step, just in the perfect moment! Thanks a lot for sharing. Amongst all the infos I would like to "have close", it is probably one of the most importants.

What I would like to have for tests would be something like this (but nicer, of course):


So when the drop-box is clicked, it will show something like this:



And selecting one test from the list will take you to the test code or whatever we define.

What do you think? Is something like this possible in any way?

As you probably remember, I already asked for something similar in the past related to an easy way to visualize node tags in the headlines. Well, this goes in the same direction regarding the "extension of Leo's outline rendering capabilities"... or how would you call that to give it a proper name?

Xavier

Offray Vladimir Luna Cárdenas

unread,
Mar 19, 2018, 8:50:38 PM3/19/18
to leo-e...@googlegroups.com

Hi,

On "talking code", I have not found nothing better that Smalltalk, specially current incarnations (like Pharo[1]) that feed on a long tradition of live coding[1a], mainly because you can create custom tools with custom presentations that can accommodate to your work flows and needs investing just half and hour or less. See for example a moldable objects inspector in [2][3], a customized and powerful playground with live objects preview[4], where you play with objects[5] or see your whole software project as a graph[6]. Other examples, about such moldable environment that made the "code talk" can be found at [7]

[1] http://pharo.org/
[1a] https://www.quora.com/What-is-the-essence-of-Smalltalk/answer/Dimitris-Chloupis
[2] http://scg.unibe.ch/research/moldableinspector
[3] http://www.humane-assessment.com/blog/the-moldable-gtinspector-deconstructed
[4] http://www.humane-assessment.com/blog/introducing-the-gtplayground/
[5] https://vimeo.com/channels/ndc2014/97315968
[6] https://vimeo.com/94724841
[7] https://feenk.com/

I still remember the day when, just three months after using Pharo and its ecosystem, I was able to prototype an outliner with live coding [8] nodes, something I was proposing/trying with Leo + IPython without much advancements for years [9] (that post is older that the original idea).

[8] https://twitter.com/offrayLC/status/500803908424712192
[9] http://mutabit.com/offray/static/blog/output/posts/on-deepness-and-complexity-of-ipython-documents.html

Comparing the fluency and momentum I get with Pharo with Python or Javascript or similar file based and indirect techs, is difficult to invest time in learning them deeply (I was kind of an ethernal newbie on them). But I really like the idea of live coding and making code talk being explored in different technologies. I think there is a lot to learn from crosspollination of ideas and communities. At least, that's what I'm trying with Grafoscopio, mixing ideas from Leo, IPython, Smalltalk and some of my own harvest.

Cheers,

Offray
--
You received this message because you are subscribed to the Google Groups "leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+...@googlegroups.com.
To post to this group, send email to leo-e...@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Edward K. Ream

unread,
Mar 20, 2018, 5:02:46 AM3/20/18
to leo-editor
On Mon, Mar 19, 2018 at 7:50 PM, Offray Vladimir Luna Cárdenas <off...@riseup.net> wrote:

I still remember the day when, just three months after using Pharo and its ecosystem, I was able to prototype an outliner with live coding [8] nodes, something I was proposing/trying with Leo + IPython without much advancements for years

​Excellent. Such memories extremely rare.  There are really only three or four similar memories in Leo's entire history.​
 

Comparing the fluency and momentum I get with Pharo with Python or Javascript or similar file based and indirect techs, is difficult to invest time in learning them deeply

​I'm glad you are exploring the Pharo world.  The world doesn't especially need more Python or Javascript programmers ;-)
 
I really like the idea of live coding and making code talk being explored in different technologies. I think there is a lot to learn from cross
​ ​
pollination of ideas and communities.
At least, that's what I'm trying with Grafoscopio, mixing ideas from Leo, IPython, Smalltalk and some of my own harvest.

​Please continue to keep us informed. What I would like to see from you is a demo as thrilling as Joe Orr's LeoVue demo.  Make that only link you send us, so we will be sure to follow it ;-)

Edward

Offray Vladimir Luna Cárdenas

unread,
Mar 20, 2018, 11:30:48 AM3/20/18
to leo-e...@googlegroups.com

Hi,


On 20/03/18 04:02, Edward K. Ream wrote:

Comparing the fluency and momentum I get with Pharo with Python or Javascript or similar file based and indirect techs, is difficult to invest time in learning them deeply

​I'm glad you are exploring the Pharo world.  The world doesn't especially need more Python or Javascript programmers ;-)

I totally agree :-).


 
I really like the idea of live coding and making code talk being explored in different technologies. I think there is a lot to learn from cross
​ ​
pollination of ideas and communities.
At least, that's what I'm trying with Grafoscopio, mixing ideas from Leo, IPython, Smalltalk and some of my own harvest.

​Please continue to keep us informed. What I would like to see from you is a demo as thrilling as Joe Orr's LeoVue demo.  Make that only link you send us, so we will be sure to follow it ;-)


I don't have such demo, at least not easily consumable as just pointing to a web page, like in Joe's case, because web is not my primary focus now (I think that web kind of sucks as a programming platform and is really convoluted as a publishing one, but has the big advantage of ubiquity). But we have some demos.

And this semester we are preparing some Twitter Data Selfies project... so yes, I will keep you informed. At least with some ideas I can give back to a community that has been so welcoming and inspiring like this one.

Cheers,

Offray


Offray Vladimir Luna Cárdenas

unread,
Mar 20, 2018, 12:15:32 PM3/20/18
to leo-e...@googlegroups.com

Of course, the advantage of Joe Orr's Leo Vue demo is that it provides a single link to follow, which is what happens with most of the web native apps, with nothing to install, just a link and you're done (provided that you have good connectivity, which doesn't happen in a lot of places of the world, for example just two hours away of here or even in some parts of capital cities in the Global South).

But neither Leo or Grafoscopio can provide a single link experience. Demos are just full of text, instructions to follow and software to install and update, as happens with most of desktop apps, that works well without connectivity. Fortunately not having a single link to experience Leo (without reading, downloading, installing, executing and going to the community for more learning) was not a prerequisite for current users to experience Leo. We would never know about it, with such prerequisite.

Cheers,

Offray

Matt Wilkie

unread,
Apr 13, 2018, 8:18:56 PM4/13/18
to leo-editor
What a richness of thoughts and links in this thread. Another project to draw inspiration from: Glitch Rewind.
https://medium.com/glitch/reinventing-version-control-with-glitch-rewind-914c350da442

"...with Rewind, you can see every change, every commit, and walk backwards in time through all those edits, just by scrolling back on the timeline. It’s as easy as rewinding a video on YouTube"

matt

Reply all
Reply to author
Forward
0 new messages