Products > Programming

Missing a new kind of programing

(1/4) > >>

As a non-software developer, the type of programing languages looks like this to me, from simple to complex:

- 1. Machine level, where one puts numbers into a machine's memory,  then the machine interpret those numbers as instructions or data.  Nobody does this any more.

- 2. Assembly level, where one can write text mnemonics to be translated one to one into machine level, by a helping program called assembler.  Mnemonics are easier to use than putting numbers in a memory.

- 3. Higher level programming languages, where one can use certain English words as keywords of the given programming language.  The keywords are broken down into mnemonics by a compiler interpreted, depending the language.

At this point I'm tempting to split point 3. into
- 3.a. Procedural programming
- 3.b. Object oriented programming
- 3.c. Functional programming (I have never tried this yet)

However, from the perspective of a non software-dev, I do not care at all about programming languages, or programming paradigms, or other things like that.  I only care about solving the problem I need to solve, but with the help of a computer.  I'll put this as

- 5. Natural language description of how to solve the given problem

To give an example, it's very easy to use level 5, the natural language, and write something like:

Water-meter logger program:
- place a webcam to watch the water-meter under the sink
- at every minute take a snapshot of the water-meter
- use image recognition to identify the numbers captured in each photo
- turn the OCR digits into a number
- attach the timestamp to the reading and log that in a file

In natural language (level 5) it looks trivial, but to convert this into a program (level 3), it's not trivial, in the sense that translating from level 5 to 3 will need a lot of tedious work of handling all the details, and then it will need a lot of programming skills to implement, test and debug it all for a reliable level 3 program.  When something is tedious or repetitive, it also means it can be handled in an automated way, by a computer.

There is a need for a level 4 that right now is missing, something to help with the automated translation between the natural language (level 5) and the programming level (level 3).

For now, instead of a level 4 language, we have armies of software devs, but it looks like all this translation from level 5 to 3 should be possible to be done in an automated way, just like the other automated translations between higher and lower levels of detail.

From what I see, there is a current attempt to skip a level 4 "language" entirely by using machine learning.  The pitfall about this is ML produces fuzzy results, they need piles of data and in the end they can still mistake too often.

- Are there any other attempts for a language in between the natural language (level 5) and the programming language (level 3)?
- If not, what to use, or how to solve the translation from natural language once and for all (without externalizing the task to somebody else)?

If you have all the underlying programs or subroutines, you can program this with BASH or BAT, and pipe the output of one program to another. Or use any scripting language to do that. The only issue is that you need to translate this to something that the computer understands. And that should be fine. If we create a natural computer language, it will be ambiguous. And open possibilities of not working properly, because the user will say:
"Yo, Computer do a picture with the webby and doodle up what the numbers on that means, you know what I'm sayin"

I don't really thing your hierarchy of program level is particularly illuminating.

The thing that makes higher level languages higher level is not that they use more english words as keywords.  It is that they allow expressing higher level concepts directly.  For instance:

"decrement register cx and jump to the start of the loop block unless c is zero"

is still very low level akin to assembly langauge even though it is written in english.

--- Code: ---for (idx=0; idx<N; idx++) {

--- End code ---

Is (very) slightly higher level despite having more syntax and less natural-language like.  Registers are abstracted by variables and the structure of the loop body is supported by the language natively

--- Code: ---foreach idx in [0..N-1];

--- End code ---

Is higher level yet: the loop increment and comparison operators are no longer explicit/arbitrary code, but invoke the concept of an iterator: this implies some sort of range object that encapsulates the "get next element" and "I'm done" behaviors, and the foreach syntax can then use any iterator to perform a loop.

Higher level language constructs allow applying operations directly on containers instead of using a loop, such as numpy ndarray operations that are automatically broadcast to match size.  In this sense, shell programming (bash / csh / zsh) is very high level because it allows composing operations on entire files or data streams.  Another way to go higher level is with object oriented programming where you can apply a generic operation such as "convert to string" to an object or a collection of objects and it is done in a data dependent fashion.

So your proposed level 5 program can be looked at in different ways. I would tend to ignore the natural language part of that, I don't think that is actually important.  You have outlined 5 basic procedural steps.  If those steps themselves have existing implementations, then you can already write code like this today.

What I think you are getting at is that you don't want to go and locate existing implementations of "configure the camera driver", "take a snapshot with the camera", "run OCR", and "log to file" but you want the compiler to figure that out and fill in the details.  That is, of course, exceedingly hard, and it is hard whether you write the program in natural language or not.  You are asking the computer to fill in the details from context and prior experience -- exactly what expert systems try to do with ML.  I don't really understand what you think it should be doing *other* than ML for this task?  Can you give an example of how programming with a proposed L4 language would work without being equivalent to ML?  I can't see how the result would be anything but "fuzzy" given the ambiguity of the input?

Where there is some mechanical types of tasks in programming, the vast majority of it is not mechanical. Mathematicians have been studying computation before electronic computers exist.

Natural language: computer, determine if the collatz conjecture is true.
Natural language: computer, given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city?

Or how about:
Natural language: Give me a video editing program that is better than Adobe
Natural language: Give me a slack competitor that is easier to use

Most of programming is either engineering or math. No one has figured out how to automate this. While ML is incredible, ML doesn't do this either.

Nominal Animal:
You want to work at the level of ideas.

Problem is, ideas are just the end result.  All the art is in the implementation and logic.  You want the end result, but not learn the art, because you don't think there is anything worth your effort there.

"Do what I want" is not a program.  It is a desire.  Even "Webcam, take a picture" is a nontrivial command, if you have multiple webcams connected to the same computer.  And even with a single webcam, what resolution should the webcam use?  What compression settings?  Brightness, contrast?  Should 50Hz/60Hz mains flicker filtering be enabled?  Where should the image be saved?

Or should 640k of RAM the defaults suffice for everybody?

It saddens me that the true art, the beauty and art of crafting the structure and logic one can rely on, regardless of exact programming language or paradigm used, is so relegated to "useless stuff a computer should be able to handle" status.  Seriously.

Also explains why most "programmers" today know nothing about software engineering, and are simply monkeys throwing spaghetti at the wall to see what sticks, leaving the end users to deal with the resulting mess.  As long as it looks shiny and "artistic", they're happy.

Here, have a banana on me.


[0] Message Index

[#] Next page

There was an error while thanking
Go to full version