Live data from Hacker News

We need visual programming. No, not like that

blog.sbensu.com

411–420 of 505 posts

Re: We need visual programming. No, not like that

#411

Earlier quoted context omitted.

Designing the state machine was hard. The implementation of that state machine was not that bad, because I'd spent so much time thinking through the algorithm that I was able to implement it pretty quickly. The implementation difficulty was optimizing the uncontended case - I had to do things like duplicate code outside the main CAS loop to allow that to be inlined separately from the main body, structure functions s…

From what I've seen when code is generated from formal specs it ends up being inflexible. However, do you think it would be valuable to be able to verify an implementation based on a formal spec?

People do that, and find very tricky bugs. One person did it by line-by-line translating C code into TLA+, another by representing the state machine in Coq and checking for predicates validating it in the source. But I don't think a visual representation of the state machine would have diagnosed the bugs the formal checkers did.

https://probablydance.com/2020/10/31/using-tla-in-the-real-w...

https://probablydance.com/2022/09/17/finding-the-second-bug-...

https://archive.is/sEXqu

Re: We need visual programming. No, not like that

#412

Earlier quoted context omitted.

Honest question as a java lover-- do rust and TS have slow compile times or something? Because java has a robust type system and yet I've never had any issue with it's compile times. And the parsing in the IDEs is so fast and good I can pretty much get all the feedback in real time. Ah, that's the luxury of using a battle tested language that other people have invested billions of dollars of effort into optimizing. D…

> Ah, that's the luxury of using a battle tested language that other people have invested billions of dollars of effort into optimizing. Making your compiler fast is easy when it doesn't do any work. The Go one seems to be even faster than Javac.

Point well taken, golang feels painful to use compared to java due to its weak type system (to be fair, I have NOT used it since generics were added, so I don't know if that helped a lot -- that was always my main pain point, it made collections kinda useless -- it's not a coincidence that java added generics (1.5) soon after it added collections (1.2))

Anyway, I'm not sure if this is a situation where the extra power of Rust's type system could not possibly be made more performant and it's just a natural tradeoff, or whether it's a thing where it's a matter of time before Rust (or some competitor) catches up and we can have it all

Re: We need visual programming. No, not like that

#413

Earlier quoted context omitted.

A quick overview of Interface Builder is Steve Job's demo for NeXT --- perhaps: https://www.youtube.com/watch?v=dl0CbKYUFTY where they discuss how dragging/drawing allows one to make 80% of the app, and the balance of 20% is one's own code.

> What we found a long time ago was, the line of code that a developer can write the fastest, can maintain the cheapest, that never breaks for the user, is a line of code the developer never had to write. > The goal here is to literally eliminate 80% of the code that every developer has to write for their app - because it's in common with every other app. And let them focus on just the 20% of their code that's unique…

If you haven't seen it, the Interface Builder got its inspiration from this Interface Builder written in Lisp: https://vimeo.com/62618532 The version in the video actually ran on a TI MicroExplorer Lisp Machine NuBus board in a Mac. There were other ports which ran directly on the Mac in Lisp.

The thing was shown to Steve Jobs and he hired its main developer, Jean-Marie Hulot.

Re: We need visual programming. No, not like that

#414

Earlier quoted context omitted.

Eventual or gradual typing could leave everyone happy. On the premise of the article, maybe the key to representing a program visually is a very expressive (and strong) type system. There could be a way to derive some Visual Types from good old regular types, and diagram the visual types in any level of granularity one desires.

Instead, gradual typing seems to always make everybody as unhappy as they can get. Just like visual programming, it looks like we are doing gradual typing very wrongly.

If Typescript counts as gradual typing, which i think it does, then many seem to be very happy using it. I have skimmed over more than 1000 blogs of HN, didn't see any posts about disliking Typescript, and many people use it.

Doesn't Typescript offer seamless interoperability with vanilla Javascript?

Re: We need visual programming. No, not like that

#415

Earlier quoted context omitted.

A quick overview of Interface Builder is Steve Job's demo for NeXT --- perhaps: https://www.youtube.com/watch?v=dl0CbKYUFTY where they discuss how dragging/drawing allows one to make 80% of the app, and the balance of 20% is one's own code.

> What we found a long time ago was, the line of code that a developer can write the fastest, can maintain the cheapest, that never breaks for the user, is a line of code the developer never had to write. > The goal here is to literally eliminate 80% of the code that every developer has to write for their app - because it's in common with every other app. And let them focus on just the 20% of their code that's unique…

Let's not do the usual thing of allowing Jobs to get away with claiming other people's advancements. VB and Delphi by '97 already had that sort of interface builder - arguably much better ones. NEXT was trying to catch up with what Microsoft had already done on Windows by then.

Re: We need visual programming. No, not like that

#416

I think we need to differentiate: Visualize a program vs. Visually program. This post seems to still focus the former while an earlier HN post on Scoped Propagators https://news.ycombinator.com/item?id=40916193 showed what's possible with the latter. It specifically showed what's possible when programming with graphs. Bret Victor might argue visualizing a program is still "drawing dead fish". The power of visual prog…

Bret Victor might argue visualizing a program is still "drawing dead fish".

The power of visual programming is diminished if the programmer aims to produce source-code as the final medium and only use visualization on top of language.

I disagree. We frequently break up large systems into chunks like modules, or micro-services, or subsystems. Often, these chunks' relationships are described using diagrams, like flowcharts or state transition diagrams, etc.

Furthermore, quite often there are zero direct code references between these chunks. Effectively, we are already organizing large systems in exactly the fashion the op is proposing. Inside each chunk, we just have code. But at a higher level viewpoint, we often have the abstraction described by a diagram. (Which is often maintained manually, separate from the repo.)

What exactly are the disadvantages here?

Re: We need visual programming. No, not like that

#417
When something needed does not evolve, it helps to understand why, and address that.

Yes, visualizing the expected programming model helps with programming. Tech leads should convey the programming model somehow, and graphics can help. The highest-traffic use is onboarding people, but because that's rare (we hope), there's little investment in optimizing that, and it doesn't happen.

Yes, it would be nice to have live views of the system, so we can see if the actual system is what we expect. That's hard enough that it's only done for high-traffic operational issues (typically after they bite, hard).

But that hints at the real issue.

The question is really about decision support for code/design issues, graphical or otherwise.

And like all decision-support questions with non-trivial domains, what's needed depends primarily on what you're trying to decide, not the domain. So there's no one or even few diagrams that will support all decisions for a given code base or operational behavior. Performance tools show hot spots, not logic errors. However, knowing it's about decisions, you can start to enumerate stakeholders and use-cases, looking for common or critical features as the high-value targets.

Yes, the domain makes for different results, e.g., for react+js vs elixir. (I'd argue that the bulk of the benefit from type/memory-safe languages and devops comes from the issue they foreclose -- the degrees of freedom and risk they remove.)

But if you're trying to track some programming model, you end up needing recognizable/literate code, i.e., metadata for whatever your time slice (design, prototype, analysis, compile, runtime, first-failure data capture, historical trends...). And since the various levels of compilation/assembly often efface the original model, that problem becomes not only system-wide but stack-deep. It sounds intractable in the general case.

In my experience one quick strategy provides most of the benefit: an easy stakeholder-driven interface for experiments.

That means things like a REPL for language, code navigation, a generated REST API web page, tests, Go's quick performance test wrapper, a full-text search of the live model, span/tracing displays, etc. Reducing the cost of asking questions is the best thing you can do to support decisions of whatever type.

When people have different perspectives on the proverbial elephant, I wouldn't start by arguing how to draw different models but by adding more people/perspectives. Once the sources stabilize, then you can integrate them, so you'll want to make sure there are common touchpoints in each that make integration possible.

Re: We need visual programming. No, not like that

#418
post #415

Earlier quoted context omitted.

> What we found a long time ago was, the line of code that a developer can write the fastest, can maintain the cheapest, that never breaks for the user, is a line of code the developer never had to write. > The goal here is to literally eliminate 80% of the code that every developer has to write for their app - because it's in common with every other app. And let them focus on just the 20% of their code that's unique…

Let's not do the usual thing of allowing Jobs to get away with claiming other people's advancements. VB and Delphi by '97 already had that sort of interface builder - arguably much better ones. NEXT was trying to catch up with what Microsoft had already done on Windows by then.

That's great that VB and Delphi had one in 97, but the Interface Builder for NeXT was released in 1988.

Re: We need visual programming. No, not like that

#419
post #68

Anyone who mentions visual scripting without mentioning the game industry just hasn't done enough research at all. Its actually a really elegant way to handle transforming data. Look up Unreal blueprints, shader graphs, procedural model generation in blender or Houdini. Visual programming is already here and quite popular.

One major difference I’ve seen in shader graph type tools is that they are stateless, or almost stateless. The output of the shader graph is a function of time and some fixed parameters, and there are rarely feedback loops. When there are feedback loops in shader graphs, they are represented explicitly via nodes like TouchDesigner’s feedback TOP.

This way of expressing computations lends itself well for shader programming where the concurrency of the GPU discourages manipulation of arbitrary state.

In contrast, business logic programmed for the CPU is generally more stateful and full of implicit feedback loops. IMO these types of computations are not expressed well using node based visual programming tools because the state manipulation is more complex.

Re: We need visual programming. No, not like that

#420

I think we need to differentiate: Visualize a program vs. Visually program. This post seems to still focus the former while an earlier HN post on Scoped Propagators https://news.ycombinator.com/item?id=40916193 showed what's possible with the latter. It specifically showed what's possible when programming with graphs. Bret Victor might argue visualizing a program is still "drawing dead fish". The power of visual prog…

The power of visual programming is diminished if the programmer aims to produce source-code as the final medium

Why would that be true?

It would be much more interesting to investigate "visual first" programming where the programmer aims to author, and more importantly think, primarily in the visual medium.

What advantages would that give? The disadvantages are so big that it will basically never happen for general purpose programming. Making a brand new language make any sort of inroads in finding a niche takes at least a decade, and that's usually with something updating and iterating on what people are already doing.

Post reply on HN