15 ms·
Ask HN: How would a programming language look if designed by non-programmer
Since it's hard to find such a person, who understands CS/Math/can program machines but never used "normal" programming languages
I do wonder how it'd be designed, maybe current approach sucks?
OOP is beautiful itself, it *enables normal people* to model complex systems that'll be running on computers, but can we get even better?
- kbob 5y agoGo look at some of the programming languages from many years ago, when most of the good stuff we like hadn't been thought of. A good starting point is the video, 50 in 50, by Guy Steele and Richard Gabriel. It reviews 50 programming languages from the first 50 years of computing.
- omgmajk 5y agoI found that vid on vimeo but the quality is awful. Do you know of any better source of this talk?
- thehappypm 5y agoLabView or a similar visual GUI would be my guess. I always found it to be pretty intuitive.
- skadamat 5y agoRequired viewing is Bret Victor's excellent talk "Humane Representation of Thought": https://vimeo.com/115154289 https://vimeo.com/115154289
- tlb 5y agoIt'd be a fascinating experiment. The languages we use all have a great deal of shared history. Essentially all modern languages were designed by people who were good enough programmers to implement compilers/interpreters/runtimes in a language like C, so it's hard to avoid some intellectual crossover. You'd need to have a separate team implementing the design proposed by this outsider.
- jcun4128 5y agoJust commenting: before I really I got into web dev, I dropped some time on this Microsoft platform called Touch Develop. It was interesting but I was glad I did not get locked into that way of thinking. I could see the appeal of something like voice and copilot.
- j-pb 5y ago50 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 and logicians The ugly: SPSS, R, two languages done by statisticians, and they are absolutely abhorrent, and often missused. If we reinvented programming today my guess is that it would be a lot less text driven and a lot more data oriented.
- cube00 5y agoThe ugly: SAS
- mothsonasloth 5y agoSiebel CRM
- clircle 5y agoDespite constantly reading on this website that R is bad or wrong, I somehow manage to get all of my data work done quicker and with fewer headaches than excel, sas, or Python.
- qqqwwweeerrr 5y agoI hear the complaint that R is a terrible language mainly from professional programmers. I'm sure it is poorly designed from a computer science perspective, but there is no programming language out there which makes it so easy to run any model under the sun as does R.
- Someone 5y agoI think that’s not a feature of the language, but of its libraries. R is popular for similar reasons why it’s so hard to replace python. In Python’s case, the language isn’t bad, but the implementation is horrible for performance. It sits on the back of lots of fast C/Fortran/whatever code, and polished the (relative) turd a lot, making the end result quite usable, but the “sitting on top of part” also makes it hard to improve the performance of the implementation. For both R and python the end result is good, but they still are local optima in the space of what is possible.
- danpalmer 5y agoIt 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 abstractions to get your head around before you can start work. (There have been "visual programming languages", but these often look like graph editors and I think that's a complex enough abstraction that it complicates the process). From this we've then seen a whole load of tools that are trying to be "smarter" spreadsheets. Things like Airtable. Is it a spreadsheet? Is it a database? Is it a no-code application? Is it a project management system? Is it a calendar? Well, yes. Retool, and others also fit into this. They all have a lot of spreadsheet like functionality.
- bellyfullofbac 5y agoYou 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 https://en.wikipedia.org/wiki/DRAKON
- danpalmer 5y agoWow never knew that! Very interesting. I don't know of many visual programming languages like this that have production uses. I've seen things like node based editing in Quartz Composer, various game engines, 3D modelling software, etc, but it's almost always only really for pipelines of graphical values rather than truly general purpose programming (even if they might be Turing complete).
- sterlind 5y agoI tried unsuccessfully to sell my team on DRAKON when we were consolidating workflow engines/schemas. It seems really neat.
- NinjaViking 5y agoCOBOL was supposed to be just that. It is not considered a nice or beautiful language generally.
- charcircuit 5y agoHere's a simple one: You write out the requirements of the program in English and it spits out a program that implements it all.
- open-source-ux 5y agoOne possibility: the non-programmer is more open to designing a language that is more than just text. Programming in plain text (in a monospace font) hasn't changed for decades. It doesn't look like it will change for the foreseeable future either. This isn't because plain text is inherently superior. We're still relying on clumsy, cryptic syntax determined by the limited characters available on a keyboard. The simplicity of text is very appealing to developers. But arguably, it's modern IDEs that make dealing with plain text tolerable - without them, the simplicity of text would rapidly lose its shine. And modern IDEs are enormous in their complexity and millions of lines of code. So new programming ideas may come from unexpected quarters. And maybe less likely from developers conditioned by existing languages and tools.
- mettamage 5y agoA programming language is rarely only about the language. Culture, tooling, standard library, testing practices, 3rd party libraries and other things carry significant weight. I find it a stretch to claim that we are dealing with a monospaced text. As you mentioned, it is more than that. The text we deal with is at least: monospaced linted color-coded hypertext. Basically in hand-wavy terms: the more self-aware the text is, the better.
- unsigner 5y agoPlain text is inherently superior for collaboration (versioning, diffing, merging, blame etc.), maturity of tools (I'm thinking Sublime/vi here, not IDEs), and interoperatbility with other tools (e.g. how easy it is to generate/consume).
- timbit42 5y agoMaturity and interoperability of tools isn't a valid excuse. New tools will be written and they will mature.
- Calavar 5y agoIMO, you have that backwards. We have lots of tools for plain text languages because it's easier to write tools for a language when it's plain text. Plain text is a blessing, not a curse.
- etu 5y agoLaTeX I love the output it gives, but the language is quite horrible.
- mkl 5y agoDo you really think Donald Knuth [1] and Leslie Lamport [2] are non-programmers? [1] https://en.wikipedia.org/wiki/Donald_Knuth https://en.wikipedia.org/wiki/Donald_Knuth [2] https://en.wikipedia.org/wiki/Leslie_Lamport https://en.wikipedia.org/wiki/Leslie_Lamport
- yrizos 5y agoIt's not uncommon for programmers - even for the great ones - to produce code that looks like it was written by non-programmers...
- etu 5y agoI would also argue that it's quite hard to determine from a Wikipedia article if a person were a good programmer at the time of creating a certain thing about 40 years ago. If my memory serves me correctly, Leslie Lamport [1] created TeX because he wanted to write a book on math but there were no good systems to write math, so he made TeX. So to me, it sounds like he were a math teacher at that time, I have no idea if he actually knew programming when starting to work on TeX. [1]: https://en.wikipedia.org/wiki/Leslie_Lamport https://en.wikipedia.org/wiki/Leslie_Lamport
- stevesimmons 5y agoYour memory doesn't serve you correctly! Most parts of your post are factually incorrect... Lamport didn't make TeX. It was Don Knuth. Lamport wrote the LaTeX macros for TeX to simplify typesetting books and articles. > I would also argue that it's quite hard to determine from a Wikipedia article if a person were a good programmer at the time of creating a certain thing about 40 years ago. Ironically, the informative and relevant article you linked does answer this: Leslie Lamport was a computer scientist from 1970 to 1985. He released LaTex in 1984. So he was a full time computer scientist for more than 14 years before LaTeX. This (plus of course his subsequent career including winning the Turing Award) suggests he was a "good programmer" for most common usages of "good" and "programmer". Lamport was only a math teacher (at Marlboro College) from 1965 to 1969, 15 years before LaTeX. He was a computer scientist for his entire post-PhD career.
- knbknb 5y agoTYPOScript, a Domain-Specific Language (DSL) for customizing the TYPO3 Content Management System. Typoscript is not a turing-complete language. For starters, TYPOscript has very odd semantics for terms like "Object", "datatype", "register", and so on. You can have lines of code like "page = ", or "page < ". Typoscipt was designed in the late 1990s, then by an autodidact or very young CS student(s). I don't know exactly, and I don't want to blame anyone. (nothing personal). However, as a consequence, as a TYPO3 user I have countless files in my work-related directories that have a ".ts" filename extension - now used by TypeScript a well designed language for which rich toolsets exist. So when I open a TYPOscript .ts file, practically every word on every line has these red squiggly lines from the linter ... very scary. TYPOscript has its strengths, though.
- tiborsaas 5y agoIt would look like GPT-3, you enter text and the system translates that to code machines can understand. A programming language will never be a solution for people who can't program, break down problems to smaller chunks and be able to generalize and create abstractions. Think about someone who can't drive. To them no matter how good a car is, a car alone will never be the solution to move around (ignore self driving cars for now since you are still required a driving license). For these people one solution might be a taxi driver who can translate commands to actions to move the car to the destination.
- snarkypixel 5y agoAn improved version would be for GPT-3++ to ask clarifying questions when designing/building the app, rather than merely receiving commands
- petra 5y agoLanguages are not usually aimed at no-programmers. But low-code tools are aimed at them. They're done by well funded companies, so I assume a lot of work(by very skilled people) has be done at understanding the answer to OP's question, and so a lot could be learned from them.
- onion2k 5y agoPerhaps something like the node editor in game engines - a visual system for connecting inputs to outputs and transforming the data as it goes through the graph. Non-technical users seem understand the analogy very intuitively.
- thom 5y agoPerhaps like Inform: http://inform7.com/ http://inform7.com/ Although I suppose in the age of GPT-3 that will probably take over.
- cranium 5y agoCoding is organizing and modifying information. If you didn't code before, you cannot comprehend all the subtleties and will end up squeezing new concepts in your language as you start understanding them. Classical recipe for delicious spaghetti code and we all started there! Through iterations and deliberate design choices, you may end up with a workable language. But you are no longer a non-programmer by then.
- knbknb 5y agoPrincipia A work from the early 20th century, mathematics, logic. I think some expert called Bertrand Russell's and A.N. Whitehead's "Principia Mathematica" initiative a "bizarre" piece of work, when seen from the perspective of a programming language designer. I can't make a qualified statement about this, as I am neither a mathematician nor a language designer. And I cannot find the exact quote on the internet, sorry. Just saying. In code? See for yourself : https://www.principiarewrite.com/ https://www.principiarewrite.com/ or https://github.com/LogicalAtomist/principia/blob/master/PL.v https://github.com/LogicalAtomist/principia/blob/master/PL.v
- ModernMech 5y agoI’ve actually posed this question to non programmers. The language they come up with usually resembles natural language English. Alternatively it looks like a box/line drawing. It almost never looks like programming as we conceive it.
- Jtsummers 5y agoIt's also not a general-purpose language in many cases. To the extent that I have made languages (mostly re-implementations or extensions) that were meant to be used by others (usually engineers doing analysis, or operators of a complex system), they had developed a bespoke DSL that represented their problem domain. They tended to fall into two modes: command oriented with mutation, declarative query languages. The declarative query languages were often the most consistent and uniform throughout. Not totally, but no "Wait, why are we changing the model in the middle of this?" question arose. The command languages tended to be more ad hoc. Like they'd have procedures that changed things and looked more like conventional procedure calls, but suddenly there's a print statement or a query that looks very different than the rest. Like it was multiple languages jammed together, which in a way it was. Taken as a whole it's inconsistent, but taken in context different people wanted the queries than wanted the commands. An operator wanted the commands, an analyst wanted the queries, and the way they spoke to the initial developers resulted in a mishmash design. At one point they may even have been two different products that get combined because analyst/operators were increasingly common (also, automation, why automate via two tools when you can do the same job with one?).
- ModernMech 5y ago> The declarative query languages were often the most consistent and uniform throughout. Declarative query languages are where it's at for non programmers IMO. SQL + Excel + Matlab is the sweet spot IMO. Why? Because non-programmers have the most success with these languages! No need to explain Excel. SQL is known by all kids of non-programmers. For example, my father in law sells directory ads. He is one of the least knowledgeable people about computers, and even he knows SQL. Matlab and other array languages also have quick uptake by non-programmers in my experience.
- Smithalicious 5y agoVersion 1 might look odd but version 3 would look an awful lot like a normal programming language. There is no special "programmer" phenotype of person, there's only people who program. All of our current programming languages ultimately trace their history to non-programmers.
- thrower123 5y agoQBASIC
- bsenftner 5y agoPerhaps I'm grumpy, but questions like this irk me. A programming language designed by a non-programmer would simply not work. It would have non-logical magic the non-programmer expects us programmers to create, things like the "do what I mean" function. One would have to seek out someone with a nearly programming language formality in their logical thinking, such as a mathematician, or linguist. Whatever such a non-programmer would create, it would have giant logic holes they never imagined, rendering the toy "language" unusable for anything beyond the toy concepts the non-programming imagined, and those would require that "do what I mean" function to work at all.
- ModernMech 5y ago> One would have to seek out someone with a nearly programming language formality in their logical thinking, such as a mathematician, or linguist I’ll give you some examples of people who possess the kind of logical mind you describe here yet lack programming ability: - lawyers work with legal code trying to figure out ways to hack it to help their clients. Say what you will about lawyers, but they are good at finding and exploiting holes in logic. - doctors debug and apply patches to complex, opaque, nonlinear systems. As a programmer, I can relate. - teachers break down complex subjects into small digestible chunks that when consumed, produce a desired result. You have to be very literal and precise when giving children instructions; they tend to do what you say, not what you mean. These three professions are removed from coding but it’s not hard to find analogues to programming in what they do. I think with the right language these people could integrate coding into their work the same way they do writing. And in many cases, with Excel they are. Show me a teacher who doesn’t use a spreadsheet or similar tool to manage their class. You can’t!
- bsenftner 5y agoI completely agree the professions you provide would be people capable of a creating logical critical paths and therefore a programming language. Lawyers would be quite adapt at it, doctors as well, as would be educators - the examples you cite all exhibit professions that require critical analysis to achieve the basics of their profession. However, at the same time I might suspect the attorney would be the best of these three, followed by the educator. My reasoning for why these two would be better than a doctor at creating a programming language is because doctors do not need to work through the understandings of others, while both attorneys' and teachers' work requires the collective understandings of others to agree and that agreement is through the effort of the attorneys and teachers. That logical indirection required by attorneys and teachers is the insight that would enable them to create a programming language capable of use by others. Doctors would create some illegible scribble.
- efitz 5y agoIt would look like HyperTalk. I still get a kick out of a programming language that feels like English, prepositions and all.
- OJFord 5y agoAppleScript is sort of an attempt at that isn't it? I got there by thinking 'probably not that far off python, but even more pseudocodey, a load of redundant keywords like `for every item in` instead of `for v in`' -- and such constructs probably wouldn't bind variables, you'd repeat yourself referring to `the item` or something. I also think there'd probably be a lot of focus on (high school) mathematical functions (since that would be the expectation of what computers must be like) and graphics (because that's what computers look like). So everything would be about identifying pixels on the screen and colouring them, locating the cursor by position, that sort of thing.
- lamontcg 5y ago> So everything would be about identifying pixels on the screen and colouring them, locating the cursor by position, that sort of thing. Logo Bring back the turtle.
- timbit42 5y agoTurtle graphics are only one part of Logo, which is a powerful Lisp with a syntax that reduces parentheses.
- JackMorgan 5y agoI'm not sure I'd agree that OOP is beautiful. It's just nouns with verbs inside, which doesn't seem particularly better than nouns with verbs outside. I definitely would not agree that it "enables normal people to model complex systems". Not once in my entire career have I seen a business person provide anything of any value to a software's architecture. Even thinking they could is so strange to me I don't even know where to start to unpack it. Software architecture is so different to the processes it models, it would be nonsensical to even have them try. Like asking someone illiterate to organize a book. Wasn't that whole concept just marketing by Sun to sell Java and OOP to the world? These days everyone using Java uses so much spring and xml I'm not sure it even makes sense to call it OOP anymore. It's more like AOP+DI with a little OOP thrown in. If anything, I'd think trying to have a customer design your objects would result in a tremendous mess. The nouns and verbs they would think of are going to be extremely limiting once you add in the common needs like caching, parallelism, network boundaries, async processing, auth, logging, monitoring, protocol formatting, API versioning, etc. The hard parts we need help on from business people are understanding the business models completely, not where X function should live and if it should be in a class or not. And even if they did have strong opinions about that, logic is actually much easier to test when it's not in OOP, and I'd rather have automated unit tests.
- tester34 5y agoImma clarify: By "normal" here I meant that you don't have to be some kind of genius in order to model real world using OOP. And we have shitton of programmers that everyday model real world complexities using OOP >Wasn't that whole concept just marketing by Sun to sell Java and OOP to the world? These days everyone using Java uses so much spring and xml I'm not sure it even makes sense to call it OOP anymore. It's more like AOP+DI with a little OOP thrown in. Well, on the other hand C# doesn't have all of that XML fetish/Annotation Oriented Programming (@Transactional :P)/Aspect Oriented Programming magic, so it's not like there's only one interpretation and implementation of OOP and it must be Java's
- t-3 5y agoWell, I'm not a programmer/have never worked with computers for a living and have no formal education in computing, and I have recently been designing my own language as a learning/fun exercise. It looks a lot like forth and ksh had a baby that grew up to become a state machine.
- m4r35n357 5y agojavscript!
- karjudev 5y agoDefinitely like a glorified Matlab
- jasonhong 5y agoYou will be very interested in my colleague Brad Myers' work on Natural Programming. http://www.cs.cmu.edu/~NatProg/ 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 editor Allen Cypher, see here http://acypher.com/wwid/ http://acypher.com/wwid/. Another book in this space, Your Wish is My Command, is also published online https://web.media.mit.edu/~lieber/Your-Wish/ https://web.media.mit.edu/~lieber/Your-Wish/ Both of these are collections of research papers showing how people can demonstrate what they want to a computer, and have the computer figure out what they want. There's a more recent book on programming by demonstration, but I don't recall the title. But definitely check out the first link on Natural Programming, Brad Myers is one of the world experts on this topic.
- invisiblerobot 5y agoDo you have a link for the pacman behaviours? Can't find it
- yesenadam 5y agoI found one: https://www.academia.edu/download/51057466/Studying_the_language_and_structure_in_n20161226-4486-m0b1s9.pdf https://www.academia.edu/download/51057466/Studying_the_lang... It's the 2nd top result by citations on Pane's google scholar page https://scholar.google.com/citations?user=cOeUEwEAAAAJ&hl=en https://scholar.google.com/citations?user=cOeUEwEAAAAJ&hl=en Thanks GP for the lead - I looked at a few of his papers studying how average people use and talk about program features, all very interesting stuff. Just started to check out the Natural Programming site - the rock-based acronyms alone are so awesome hehe.
- tyingq 5y agoEarly languages might be good examples, since there wasn't really a defined path of programmer. COBOL, for example, has the feel of a smart, but not traditional programmer approach. Grace Hopper was a mathematics PhD.
- timbit42 5y agoI'm not sure that feel is due to Grace Hopper. She wasn't on the team that created it but she had indirect influence on it. Source: https://en.wikipedia.org/wiki/COBOL https://en.wikipedia.org/wiki/COBOL
- depaya 5y agoTake a look at Ladder Logic: https://en.wikipedia.org/wiki/Ladder_logic https://en.wikipedia.org/wiki/Ladder_logic I don't think this was necessarily created by non-programmers, but it was certainly created for them. The language is designed to mimic electrical schematics with the idea being electricians, electrical engineers, etc can easily program and debug in the language. I'm a software engineer who has worked extensively programming PLCs with Ladder Logic and I must say it can be quite fun to work with.
- tester34 5y agooh shit I've spend probably 20-40 hours with those and I must say that I like "normal" programming more
- depaya 5y agoYes I certainly do too, but working with ladder logic can force you to think very differently and solve interesting problems in different ways. You can monitor exactly how the code is running at any given time, you can directly edit it while it's running, and you set the value of any variable at any time.
- ksec 5y agoIt will be more like Pascal and Ada than something like C or Rust. I think Non-programmers would want programming to be more graphical, Diagram Dataflow and Graph-like with the help of "script" / functions describing actions. Something like the how current Game Engine are structured. May be Game Engine should be programming engine.
- Jtsummers 5y agoI think it would only be like Pascal or Ada on the surface. They both have too consistent of a model to be designed by a non-programmer. Pascal, for instance, is more like Scheme: Reduce a procedural language to its core concepts and build on top of that. No non-expert would design something meant to used to compositionally like that, it requires a particular mental model they'd lack. Ada had an advanced (especially for when it was developed and for a procedural language) type system, a comprehensive module system, generics, a task system, and protected objects (thread safe objects) from the start. All of those are things you'd have to recognize a need for and how they would be used which a non-expert would likely not come up with (though an expert may come up with as an answer to a non-expert's requirements). Probably the only thing coming from Ada that a non-developer may think of (and they'd be brilliant for it) would be the ability to use an arbitrary range for indexing into arrays, including arbitrary discrete types (I actually hate that no mainstream language permits this). They might also come up with ranged types like being able to specify Alphabet as 'a' to 'z' (or 'A' to 'Z').
- Tozen 5y agoI agree with you. It would look more like Pascal and Ada because of readability. Many languages look like or are way too easy to turn into cryptic chicken scratch, that even confuses the person that wrote it when they return to it after a few weeks or months. The IDEs for it would be more like Delphi (without the price tag) or Lazarus (open source). Way more likely to want WYSIWG GUI designers. They can't go no code (total visual programming), if they want a more useful language, but would want it to be low code. In addition, very helpful to use IDEs and fast compilers (like Pascal/Object Pascal has).
- pmelendez 5y agoPerl comes to mind, given the fact that was trained as a linguistic: https://en.wikipedia.org/wiki/Larry_Wall https://en.wikipedia.org/wiki/Larry_Wall
- charlieyu1 5y agoEither it is abondoned in the middle, or it would become something like it were developed by a programmer. People thought writing code is the hard part. It is not. It is the underlying problem that is hard. And no language can really help you about that
- jerf 5y agoIt's very hard to provide any interesting answer to that. I know programmers like to be all egalitarian and stuff, but... What if we ignored all the road workers and asked non-construction people who kinda know how to build some stuff in their house to design & build a highway instead? What if ignored all the architects and asked a non-architect who has put up a couple of sheds from scratch to build the next skyscraper? What if we ignored all the doctors and asked a random person who knows some biology to treat cancer? I think this may make it more obvious how this would go. You may, very rarely, get some sort of interesting insight out of such things. I won't claim the probability is a flat mathematical zero. But it's not a very rich vein of insights. There's much richer veins available.
- ballenf 5y agoDoing a professional's job or a tradesman's job is different from designing the tools they use to do these jobs. So it would be asking a non-carpenter to design whatever tool they need to get nails to go into wood. You'd probably end up with some caveman looking rock strapped to a stick and then it would evolve into something very similar to a hammer. The claw on the back to remove nails may or may not be combined with the hammer.
- kangnkodos 5y agoIt would look like the Rockstar language. https://www.youtube.com/watch?v=gdSlcxxYAA8&t=2959s https://www.youtube.com/watch?v=gdSlcxxYAA8&t=2959s
- exogenousdata 5y agoI believe this aphorism applies to programming languages, "everything should be as simple as it can be, but not simpler". And at the risk of not answering the question, the reality is that no one language would ever be sufficient because a programming language is a tool, not a solution. And different jobs/goals require different tools. Therefore, to paraphrase from Malcom Gladwell, there is no such thing as the perfect programming language for non-programmers, only the perfect programming languages. From there I'd imagine the best thing we can do is discuss features/tools that are used today that would be good for non-programmers. As many commenters have suggested, this will probably appear like the existing suite of tools that non-programmers use. First, maybe an interactive graphical component that allows a users to define the flow of data. Something like Visio to allow users to draw data & input/output, mixed with a component like MSAccess to define the data model. Then a natural language tool that would take normal language and apply rules on the data (Hypercard). Finally, a visual component (like Excel) to validate that the data is correct and potentially generate reports for other non-programmers.
- 999900000999 5y agoPython is pretty close. I would pay good money to watch random people try to do something like get all the names from a CSV file in different programing languages. Have them on a zoom with a Senior Software Engineer. But said Senior Engineer is not allowed to write any code directly. In this hypothetical game show, I'd imagine most software engineers would pick python to try and teach remotely. Although it would be funny to see the same exercise with Rust.
- mikewarot 5y ago>I would pay good money to watch random people try to do something like Check out the answer threads in r/AdventOfCode, you'll not get the real-time sense of things, but you will see many different ways a problem gets solved in many languages.
- t-3 5y agoPython is easy enough to teach in schools, but on the fly to someone with no experience? You'd want a language without syntax, like Forth.
- Jtsummers 5y agoAd hoc, it would be The Homer of programming languages if allowed to grow unfettered. Short of that, it would be a DSL oriented towards their particular needs. Possibly graphically oriented. Meaning something more like LabView or perhaps Excel, with a heavy visual component that lends itself well to people who are not experienced enough to visualize a complex abstract system or who need to communicate the graphical model to others. For instance, a friend worked in "manpower" (operations research work, trying to understand and improve the workflow of a 15k person industrial workforce). One of the tools was a hybrid of a graphical model + R-kin language. The model looked like any ordinary flowcharting kind of thing, though the data attached were numbers like throughput, reliability, etc. And when "executed" it would produce a report based on real or modeled data about expected results. The graphical model lended itself well both for the users (would you want to write out thousands of lines of: engine removed -> load engine on cart -> move cart to workroom -> clean engine -> ...?) and the people it was meant to communicate with ("Is this really your workflow? Do we have a detail wrong?"). The R-kin language was something that she made use of, but mostly for generating reports and it was, to her, "math" not "programming".
- sidpatil 5y ago> Ad hoc, it would be The Homer of programming languages if allowed to grow unfettered. For those who don't get the reference: https://www.youtube.com/watch?v=WPc-VEqBPHI https://www.youtube.com/watch?v=WPc-VEqBPHI
- Jtsummers 5y agoThanks, I meant to link that but got distracted by work. Darn the work.
- mikewarot 5y agoActually, it wouldn't be hard to find out, it would just take some funding, or someone who can write a compiler/repl/IDE/wherever volunteering time to follow the direction of a layman.
- logicalmonster 5y agoVisual 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.
- tmaly 5y agoI could imagine a declarative style language like Prolog could fit this.
- lamontcg 5y agoCFEngine never caught on, everyone generally hated it and wrote shellcommands to perl scripts.
- pcthrowaway 5y agoI hear that R is a good example of domain-specific programming that's largely used by non-programmers
- vb6sp6 5y agoIt 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 :)
- hzlatar 5y agoI 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.
- Jtsummers 5y agoOr 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.
- 8K832d7tNmiQ 5y agoI've seen lots of journal papers in my field that use labVIEW to write an application that uses a node-based model or data-flow coding, similar to how Blender handles Shader nodes. In general, it helps students to write a quick application and focus to the important part at the cost of limiting the environment to labVIEW.
- TT-392 5y agolabview is kinda terrible in my experience, and in the experience of most of the people in my EE class. That is why I find the blender node system so impressive, it is a graphical programming language, but it is actually really nice. (also, blender now has geometry nodes, which are really poweful and fun to play with)
- mesozoic 5y agoProbably something like you see in visual programming for kids training type things.
- wodenokoto 5y agoMy lazy response: If designed by a well educated philosopher or linguist, probably similar to some 70s or 80s language. If by someone with no prerequisites then it would be full of ambiguity - just like natural languages.
- Arete314159 5y agoA programming language for "normal" people would not start counting at 0. For starters.
- 0-_-0 5y agoat first
- BrandoElFollito 5y agoAh, if we just have started to count years from 0 and not one - so many issues cross have been avoided (centuries, year 2000, or was it 1999, or 2001?)
- saltyfamiliar 5y agoOne thing I've noticed always seems to amaze non-programmers as they're taking their first foray into using computers in more advanced ways (programming, scripting, even just using a command-line) is how little room there is for typos. I've frequently heard things like, "if you forget a single semicolon the whole thing doesn't work!" To me, it just seems obvious that if you make a mistake, the computer won't know what to do with your code. But maybe it doesn't really have to be that way. So my guess is that a programming language created by a non-programmer would be extremely tolerant to typos. References to non-existent variables and functions would resolve to the nearest existing options. Semicolons, commas, parentheses and brackets would be strictly optional. This seems to be closer to the way people naturally use language.
- ryankrage77 5y agoClearer error messages would go a long way too. Python is often considered beginner friendly, but it usually can't even tell you which line a syntax error is on.
- mikewarot 5y agoOne thing to do would be Rich source text, with embedded graphics, video, etc. directly in the source, instead of external files. You could also support inline literal values, etc. similar to Color Forth.
- Koshkin 5y agoLike CMake.
- AnimalMuppet 5y agoI worked with an artist to design user interface menus for a video graphics system. I'd design a menu that did what was needed. It was ugly. The artist would look at it, and say "That's like picking your nose with boxing gloves on." Then he'd draw this beautiful menu. And I'd say, "How does it know that you want to do X instead of Y?" We'd go back and forth, and wind up with something that was both graphically good and also unambiguous. If you just have the non-programmer doing the design, I worry that it would stop at the "ambiguous" stage. There's a level of technical rigor that is needed, and non-programmers may find it hard to achieve it.
- TT-392 5y agoSo, not made by non programmers, but definitely made for non programmers. The blender node system, it is a graphical programming language that is actually very usable.
- 32gbsd 5y agoOOP is trash. Its the patadox you face in which "normal" people are forced to think in a box that limits their way of thinking about abstract concepts. Everything is not an object. Once you remove oop you will be able model much more.
- aristofun 5y agoIt would look like Ruby