Live data from Hacker News

Ask HN: Why is programming editing text?

news.ycombinator.com

61–70 of 79 posts

Re: Ask HN: Why is programming editing text?

#61
post #27

Just as an experiment give scratch a try: https://scratch.mit.edu/ I think you might find out why test is pretty handy. I can hammer out a one liner with a bunch of methods to do a thing(s) pretty fast. Dragging stuff around, much much slower and IMO it's harder to understand what is actually going on.

Snap! (https://snap.berkeley.edu/) has a Scratch like UI that can be almost entirely navigated and edited by keyboard, Unreal Blueprints allows for a lot of keyboard based editing as well. The reason I mention this is one of the criticisms of visual programming is that it is inherently mouse based, and mouse interactions are inherently slower than keyboard.

Re: Ask HN: Why is programming editing text?

#62
post #28
post #6

Previous related discussions that may contain insights: https://news.ycombinator.com/item?id=6964369 https://news.ycombinator.com/item?id=9495836 https://news.ycombinator.com/item?id=10099611 https://news.ycombinator.com/item?id=13578256 https://news.ycombinator.com/item?id=13773813 https://news.ycombinator.com/item?id=14278605 https://news.ycombinator.com/item?id=14609215 https://news.ycombinator.com/item?id=1516003…

how do you keep track of these things for future reference? Browser history or something more involved than that?

There’s also a public BigQuery dataset with all HN posts and comments from nearly all time you can write SQL queries against.

Re: Ask HN: Why is programming editing text?

#63

The question presupposes that there is a rational _why_ behind the situation a large group of people have gotten themselves into over a period of incremental steps over decades. It is heresy to say, but of course writing programs primarily as simple text files is ridiculous. It’s also ridiculous that we write web pages in HTML etc rather than using elegant WYSIWYG editors, and that we use LaTeX for designing visual a…

>Imagine if engineers built bridges or engines or satellites by writing XML rather than using CAD tools and modelling suites.

There’s actually a move inside engineering of physical objects towards code generated shapes. For better aerodynamics, lighter weight, etc. Your optimization code spits out a 3D file and you just go in and clean up artifacts.

Re: Ask HN: Why is programming editing text?

#64
Top-down, left-right flow in reading and writing text is an under-appreciated order. We learn it from a very young age and use it everyday in writing English.

Replacing our natural order to process language with a visual scripting environment doesn't really work. The flow control format needs to match the coding requirement, otherwise the default written text style is much better.

The best visual editors I've seen amplify the top-down, left-right structure and sometimes are not saved even then.

Organising ideas into a communicable stack of information has always been the realm of language. The move from pictographs to alphabets was a technology that allowed masses of people to be literate and spread the associated language far and wide, spreading the host civilization with it. Going back to pictographs for coding.. is a deep challenge.

Re: Ask HN: Why is programming editing text?

#65
I have thought about and wanted exactly this when refactoring on a branch. I later want to perform the same refactoring upon rebasing to a newer point on master. There have even been times where I've done this manually by either making mental notes, or explicit bullet points of operations as I perform them. It works great but is tedious and is easy to imagine that the IDE could do this, or the IDE provide an API that can run a script of transformations. JetBrains and their set of tools is the closest place where I can imagine this could be achieved. Perhaps in combination with the language being edited represented in MPS[0] form (of which I have no knowledge).

MPS does present a different aspect in the examples shown. It is still text editing, but not the linear word by word syntax we're used to. We can make up 2D, tree, or any other structure that can conceptually and compactly represent our thinking.

One more point I have on this is that the editor itself can recognize 'edit units' that are not mere characters inserted/replaced/deleted. As edits are made, it can make higher level 'checkpoints' whenever a unit is recognized. The examples in this post are great examples: function declaration, renaming, invocation. Then the undo/redo can show text operations as low-level points as well as higher level ones identifying larger logical units. Having that, one could perhaps select a range of these and cut them to be replayed at a later point. This is similar to how I'll make small local git commits and later reorder, squash or drop commits or make them into separate PRs.

[0] https://www.jetbrains.com/mps

Re: Ask HN: Why is programming editing text?

#66
Back in the late 90's, there were several CRUD web app generators that were quite good. I used a commercial one, and was demo'ed an internal one used by a small Michigan design house (govt. contractor.) They said it was their secret sauce, and I believe them.

Currently, there are several database ETL tools (Talend, Pentaho, etc.) which are graphical (think shitty like Labview), but anybody serious uses python or perl scripts.

Today I would look at Zapier or publishing a Google sheet.

https://zapier.com/learn/forms-surveys/best-online-form-buil...

In the 2000-2005 era, there was national advertising by those sketchy diploma-mill universities like U. of Phoenix to turn military veterans into C++ programmers because the Visual Studio IDE "did all the work for you."

Those TV ads were truly eyebrow-raising to me, since I learned all that the hard way (ie. paid development projects) and couldn't recall the IDE every writing a function for me.

The lightest-weight and most powerful text form builder is likely Perl's CGI::FormBuilder module. I've used it for several years and it is remarkable for building CRUD apps.

Apple's Resedit and Adobe's internal dialog layout editor both allow visual layout that saves to text resources.

OpenAPI has tools for generating a server API skeleton, but I think it has the same problem as all code generators: when you want to substantially change it, you'll want to check it in to git and hand-edit, like always.

Re: Ask HN: Why is programming editing text?

#67
post #46
post #36

Earlier quoted context omitted.

With titles and dates: Lamdu - towards the next generation IDE (peaker.github.io) Dec 25, 2013 https://news.ycombinator.com/item?id=6964369 Programmer Tooling Beyond Plain Text (joelburget.com) May 5, 2015 https://news.ycombinator.com/item?id=9495836 Prune: A Tree-Based, Home-Row-Oriented Code Editor (facebook.com) Aug 21, 2015 https://news.ycombinator.com/item?id=10099611 Why Don't We Have a General-Purpose Tree Edi…

Did you do this manually?

Yep

Re: Ask HN: Why is programming editing text?

#68

The question presupposes that there is a rational _why_ behind the situation a large group of people have gotten themselves into over a period of incremental steps over decades. It is heresy to say, but of course writing programs primarily as simple text files is ridiculous. It’s also ridiculous that we write web pages in HTML etc rather than using elegant WYSIWYG editors, and that we use LaTeX for designing visual a…

Check out the work they are doing on glamoroustoolkit:

http://gtoolkit.com

Re: Ask HN: Why is programming editing text?

#69

The question presupposes that there is a rational _why_ behind the situation a large group of people have gotten themselves into over a period of incremental steps over decades. It is heresy to say, but of course writing programs primarily as simple text files is ridiculous. It’s also ridiculous that we write web pages in HTML etc rather than using elegant WYSIWYG editors, and that we use LaTeX for designing visual a…

>Imagine if engineers built bridges or engines or satellites by writing XML rather than using CAD tools and modelling suites. There’s actually a move inside engineering of physical objects towards code generated shapes. For better aerodynamics, lighter weight, etc. Your optimization code spits out a 3D file and you just go in and clean up artifacts.

code generated /= text. Most html web pages are still largely written _by hand_ in a text editor. The closest thing to this that exists now is OpenSCAD, a usability nightmare.

Re: Ask HN: Why is programming editing text?

#70

The question presupposes that there is a rational _why_ behind the situation a large group of people have gotten themselves into over a period of incremental steps over decades. It is heresy to say, but of course writing programs primarily as simple text files is ridiculous. It’s also ridiculous that we write web pages in HTML etc rather than using elegant WYSIWYG editors, and that we use LaTeX for designing visual a…

Now try to express the exact same ideas from your comment without using text.

There can be specialized tools that are useable but nothing beats text in the general case.

Post reply on HN