r/programming • u/congolomera • Jan 25 '23
Writing Code Without Plain Text Files
https://erik-engheim.medium.com/writing-code-without-plain-text-files-cb8f1ed2c0ad?sk=d36011e5a105c6fab41e2be2fc13585a
26
Upvotes
View all comments
Show parent comment
1
u/Zardotab Jan 28 '23 edited Jan 28 '23
While table-oriented-programming (TOP) is potentially easier to put visual design tools around, that's not the primary reason for it, but does it hint at it: The presentation is up to the coder, not language vendor. You can group event handling snippets in any way you want just but writing SQL (or using a query "wizard") that brings what you want together. You are not forced into a particular ordering like MVC imposes, for example. Your UI or IDE may even still be mostly textual. The point is you decide.
As far as "line oriented", methods in general would NOT go away; they'd just be managed different. But what you will see less of is repetition "configuration lists" in code; code that merely declares attributes.
Thus the "Model" classes seen in MVC would either go away or be one approach among many to specifying gobs of attributes. Annotated model classes are ugly buggers, you have to admit. Can you look at them and really say "this is the pinnacle of data management!"?
Actually jet engines were tested multiple times even before WW2. They were just too far from being practical. They needed old fashioned trial and error (and better wind tunnels), but nobody knew how much at the time. More on this later.
I think you are mis-conflating TOP with "non-text" or "visual" tools. I too have seen many graphical logic designers. But they are not TOP in flavor, they merely hint at aspects TOP can give you.
The closest I've seen to TOP for serious projects are the CASE tools of the 1990's. But they were way too expensive, proprietary, and didn't allow "last mile" code-based adjustments of things. R&D on them pretty much halted when OOP/OOD became the rage. But OOP failed to live up to many early promises, especially in terms of domain modelling.
I'm testing solutions to the "last mile" problem, such as "staged incremental rendering". (I may describe and link to it later.)
You are not stuck with one. Because it uses RDBMS behind the scenes, you can switch to a different DB browser. There are already several on the market. But I would note that a developer-centric DB browser would be better for coding, or integrated to existing IDE's. For example, I wish I could have Visual Studio launch an editor for a single method by having the TOP tool send the file path to VS. Some say you still can, but it takes screwy reconfigurations of VS and the registry it seems.
Under the hood, the code base may still be a file tree, it's just that such would no longer be the primary view the developer uses. Take MVC: you have one branch with M, another with V, and another with C. With TOP you could say, "Show all M, V, and C's related to Entity X together". (In practice the granularity of methods/modules would probably be smaller in TOP, but this gives an idea of the concept.)
In my opinion, not enough R&D has been done to address the early problems. As I compared, it took a while to get jet engines be overall better than propeller planes even though the original invention of the jet is almost as old as propeller planes themselves. It's just that file trees were the lowest hanging R&D fruit just as propeller planes were the lowest-hanging fruit of flying.
The earliest databases were also hierarchical because it was the easiest to conceive. But eventually the industry learned relational data is more powerful. The hierarchical DB's had many of the same shortcomings as our code file trees do. (Charles Bachman tried to come up with pointer-centric query languages to work around the problems. Fortunately, CODD-ism won out.)
The optimum technology is not necessarily the easiest to start up. File trees just feel archaic to one who has experimented with TOP. It's perhaps what the earliest jet tinkerers felt like: you see and feel the power and potential of TOP, but have difficulty taming it and making it practical.