back

by david927·4y ago·view on hn ↗
I couldn't disagree more.

You don't buy a drill, you buy a way to get a hole in, say, wood. That's the core product.

The core product of 'programming' is a software solution. So far, the best way to approach it is text.

But... text is an incredibly poor model! It's almost literally an accounting system of "Jake spent fifty dollars." It's text which is "actively harmful," and we see it all around us in the absence of maintainable systems. Yes, currently, it's the best way we've found; just as horse and buggy was the best current form of travel 150 years ago. But it takes very little imagination to expect we'll find better.

1 comments
Programs are ideas that need to be understood, modeled, and manipulated by humans. Text is the best available way to incept ideas into the minds of humans.
> Text is the best available way

I said exactly that. I added that it's horrific and it's not hard to imagine that we will find a better way.

I can't see how it's horrific. It's got an incredibly strong historical record.
> strong historical record

So did the medical practice of bleeding out a patient. It's been the only way but being the only book in the library doesn't qualify how good the book is.

The problem with text is that it's not structured and therefore very difficult to manage. If you're going to create data for an accounting system, do you open up a Word document and start typing words like "Jimmy owes A/R five hundred?" Of course not because while you can search that, you can't query it. When was the last time you queried your code? Exactly.

Horrific.

And we can see it in our lives. When was the last time you jumped into someone else's code and could clearly see what was going on? Probably about the same time you last opened the middle of a novel and understood what was going on.

> So did the medical practice of bleeding out a patient. It's been the only way but being the only book in the library doesn't qualify how good the book is.

Bloodletting hasn't been performed for hundreds of years. We still use writing to convey ideas.

> The problem with text is that it's not structured . . .

Text is as structured as the author makes it.

If that were true, text books wouldn't contain any diagrams. So I think it's fairly uncontroversial to say that there are cases when text is not the best way to incept ideas. So why should we be confined to just text when writing code? Should we not be free to choose the best tool for the job?
You should check out IDEs :)

IDE takes plain old text as input, and lets the coder to interact with the model of the program.

1. Various graphical hints in text (highlighting keywords, selections, …)

2. Visualisation tools (draw database and class diagrams)

3. Navigation capabilities (go to implementation, definition etc)

4. Refactoring capabilities (“rename, “extract variable”, …)

In my view, IDE is already “book with diagrams”. (“Diagrams” can still be improved, but concept is really there)

True, but IDEs are currently severely limited by nature of textual sources (e.g. macros are notoriously tricky to deal with). It's much easier to start from a good model for IDE and derive textual reprentation and input method from that.
No, it is not the case that if the thing I said was true, then textbooks wouldn't contain diagrams.
If GPs statement were true, textbooks would be called text books instead of diagram books.