Hacker News new | ask | show | jobs
by muxator 3157 days ago
Maybe I am old school, but the fact that text is easily version able and comparable means a lot to me. I use to code with two side-by-side windows, comparing the old and the new version of my program.

It's a sort of fluid evolution where I can always be in control.

It would be a hard time doing that via visual programming.

3 comments

I think you are right. It's much easier to compare old and new versions of a program if they are text. But we also should remember that we developed tools like diff to work with programming in text. If instead we were using a different paradigm we could explore the equivalent of diff in that model. Merge conflicts in text are often not real logic conflicts but just re-ordering things in a text file, or formatting changes. If we used a projectional editor, one that treats code as an AST instead of just flat text like lamdu - https://github.com/lamdu/lamdu we would need to create a new way to look at the evolution of changes in the code but it could be more meaningful than just looking at text.

Also you could have a timeline that shows you what got changed instead of comparing two text files. There can be lots of ways to achieve the same goal, understanding what changed and how, than just diffing two text files.

> text is easily version able and comparable means a lot to me.

Don't you really want to do more meaningful comparisons though? I think text is a poor form for versioning and comparison because you always have to mentally extrapolate the textual diff (lines added/deleted) to the syntactic diff (functions added/deleted/modified) to the diff in effect (which logic in which systems is modified). There is no reason other forms of programs cannot also do diffs, that could be more useful.

Visual does't have to mean flowchart boxes. Even a tree structure might be incrementally better than plain text.

Syntax-aware diff for text isn't hard, but it's just not usually worth the effort because line-oriented text diff is good enough and more generally applicable.
i think that's a little off. there is no reason why visual programming cannot be version-able and comparable, and in some cases it is. labview has some facilities for this, however, i will concede they could be better.

but there is no inherent reason why text is better at this than visual programs. it's just that people haven't done it, which is the issue. everyone just assumes text is the natural way to interact with a computer, but yet most people forget they went through a lot of training, formal or informal, to get to that perspective. and one could argue that comparing text is not as good as comparing the differences between visual programs because the latter actually contains structure and relationships of how things are called more readily.

what you describe with two side-by-side windows of the same VI (i.e., function or code block or whatever) is exactly something that i have done with labview. a better visual comparator is not beyond reach.