Live data from Hacker News

Ask HN: How would a programming language look if designed by non-programmer

news.ycombinator.com

91–100 of 132 posts

Re: Ask HN: How would a programming language look if designed by non-programmer

#91
Visual programming approaches are fascinating, but something like Applescript with its syntax that resembles natural language is probably the most realistic attempt at something non-programmer friendly.

This is more of a fantasy answer, but I think Star Trek: TNG characters describing a desired holodeck scene to the ship's computer is probably an example of what the ultimate programming language would look like. No memorization of syntax required: computers are just magic tools that always understand what you intend.

Re: Ask HN: How would a programming language look if designed by non-programmer

#94
It would look like english (or whatever language you speak)

"show me orders placed today in Excel"

"send an email to bob@company.com with the order details"

"backup the database to my dropbox account and do it every monday"

"setup a server in new york"

Non-technical people do this all day, giving these simple instructions to the programmers and letting them figure out the details :)

Re: Ask HN: How would a programming language look if designed by non-programmer

#95

Earlier quoted context omitted.

Like I said, children can be just as pedantic as computers, especially when they’re trying. Anyway, the language you describe wouldn’t work well as a tool, but not all programming languages are tools and are still worth making. Using your example, this language could be a fun DSL for interacting with pictures. “Find all cars and make them red” I could imagine a backend tied to machine learning algorithms and a databa…

>Like I said, children can be just as pedantic as computers, especially when they’re trying. Yes, but what are the chances that they make their new language that is not influenced by any other programming related knowledge to be specified at the right abstraction level using abstractions that are easy to implement? A language that they come up with is not going to be good. Similarly if you were to ask a non engineer…

> that is not influenced by any other programming related knowledge to be specified at the right abstraction level using abstractions that are easy to implement?

Why do they need to be easy to implement? We're talking about design. A lot of PL design is hard to implement. And why does it need to be programming related knowledge? We shouldn't restrict them to things that are easy to implement because then we'd restrict them to a very small subset of possible languages.

So when you say "A language they come up with is not going to be good", then I have to ask how are we measuring good? Because if you think that a teacher would not write a good programming language to write programs in, then I would probably agree with you, because writing programs is not something teachers do.

But like I said, not all programming languages are used to make programs. Most people use a programming language to do things that decidedly don't look like programming to you and I. For example a lot of developers consider Excel to be a not good language for writing programs. Programmers usually lament that Excel users would be better served by a "proper database", but they neglect to appreciate that making this change would quite literally ruin the tool for them. But there are more Excel programmers than all other developer-centric languages combined.

I think a teacher who uses Excel to to manage their classes could design a very compelling DSL for classroom automation.

> I personally do not even think a kid is going to come up with some revolutionary concept

We were talking about teachers designing the language. The children came into the picture because they would provide teachers a model for relating to the pedantic nature of computers.

Re: Ask HN: How would a programming language look if designed by non-programmer

#96

It would probably look a lot like Excel. Most people I work with who are non-programmers but who could benefit from coding spend a lot of their working life in Excel. When we teach them SQL and give them access to our data warehouse, a lot of the time the explanations that stick are thinking of it like a big spreadsheet with lots of pages and columns/rows. Spreadsheets are fundamentally very visual, and have few abst…

You mentioning visual languages makes me think of DRAKON, which was good enough for the Russian copy of the space shuttle project: https://en.wikipedia.org/wiki/DRAKON

I tried unsuccessfully to sell my team on DRAKON when we were consolidating workflow engines/schemas. It seems really neat.

Re: Ask HN: How would a programming language look if designed by non-programmer

#97
I have an anecdote. Back then when I was studying CS on the exam for computer architecture class, we got a problem to solve: "Define the instruction set for your imaginary CPU and then use it to write a program for managing an elevator."

They expected us to imagine a simple instruction set with 7-10 commands. But one clever guy wrote this: "My CPU has only one instruction - manage_elevator. The code for elevator management is: "manage_elevator". He passed with A.

I guess that is how a non-programmer would imagine a programming language.

Re: Ask HN: How would a programming language look if designed by non-programmer

#98
post #42
post #5

50 years ago, these people were quite common. There were only mathematicians and engineers, but programmers didn't exist yet. The good: Excel, Dataflow Diagrams (commonly found in game, music and arts), SQL, Declarative Dataflow Paradigms in general. Mutablity is counterintuitively counterintuitive if you don't have a model of the underlying execution system. The weird: Prolog, APL, languages done by mathematicians a…

I'm of the age that I also consider 50 years ago to be the dawn of computing. Turns out it's closer to 75. :-) It has been said that non-programmers used to catch on to APL quite quickly back in the day. Faster than regular programming languages in fact. The designers, Ken Iverson, didn't even design the language to be run on computers but rather as a mathematical notation. Someone else mentioned Excel, and that is a…

> It has been said that non-programmers used to catch on to APL quite quickly back in the day.

This is still true today. I used to run a program for kids where they coded with robots. We used C for a while and we spent the whole time teaching C, never really getting to cool robot activities. Then we switched to Matlab, and it was like night and day. They took to Matlab so quickly, and I think you are right that the array nature of the language is the main reason. Others include the ubiquitous table datatype, and a REPL interface.

Re: Ask HN: How would a programming language look if designed by non-programmer

#99
post #97

I have an anecdote. Back then when I was studying CS on the exam for computer architecture class, we got a problem to solve: "Define the instruction set for your imaginary CPU and then use it to write a program for managing an elevator." They expected us to imagine a simple instruction set with 7-10 commands. But one clever guy wrote this: "My CPU has only one instruction - manage_elevator. The code for elevator mana…

Or an engineer. I briefly worked with a team doing radar systems, their CPU basically had every mathematical function you could want available as an assembly instruction. Want to work with complex numbers? It's in the instruction set. Want to convert between coordinate representations? It's in the instruction set.

Re: Ask HN: How would a programming language look if designed by non-programmer

#100

You will be very interested in my colleague Brad Myers' work on Natural Programming. http://www.cs.cmu.edu/~NatProg/ In particular, one of his PhD students John Pane did a number of studies looking at how people would naturally describe the behaviors in Pac Man. It was really nice work. You should also take a look at Programming by Demonstration. One book, Watch What I Do, is published online in its entirety by the e…

Do you have a link for the pacman behaviours? Can't find it
Post reply on HN