views:

631

answers:

9

Does anyone know of any scripting / programming languages that are targeted at (or would be suitable for) use by non-techies?

I have an application that I want non-technical users to be able to extend with simple scripts, however I'm struggling to find a suitable language to use, in particular:

  • It should be forgiving to users (for example it probably shouldn't be case sensitive)
  • It should make it difficult to shoot yourself in the foot (definitely no threading! I also wondered if making everything immutable would make it easier to grasp what is going on)
  • Ideally I'm also after an easy to use editor
  • There definitely needs to be an easy debugging process and intuitive error messages so that users are able to understand the logic behind a script and figure out what went wrong.

Although there are plenty of excellent and powerful scripting languages out there suitable for embedding into an application, most of the popular ones have flaws that make them difficult for non-techies to use:

  • Python's sensitivity to whitespace makes it too easy to break your script without realising why.
  • JavaScript is case sensitive, and can be very cryptic about error messages at times
  • VBScript has 3 different types of Null!

I'm definitely not interested in any visual languages or any rubbish like that - what I'm after is a proper programming language, just one that is forgiving to the needs of non-technical people.

Update:

Just to clarify, the sort of logic / scripts that I'm talking about are things like:

  • Setting some string value based on whether a boolean value is true or false
  • Looping through a collection and adding up the values of some attribute whenever some other attribute is true
  • Some simple string manipulation
  • etc...

The langauge needs to be able to cope with objects and collections, and I need to be able to add some simple functions that hook into some application specific logic, however none of these scripts are going to reach any real level of complexity.

I wanted to avoid creating a domain specific language because its a lot of work and effort, and would end up being a lot poorer in quality than using an existing language. Also the logic is nearly 100% focussed around simple functionality provided by just about every existing langauge out there.

Also to address concerns over technical skill: These people are Smart, theyre just not programmers - although very capable of dealing with logic the average user will be unfamiliar with most programming concepts and (more importantly) will have absolutely no interest in learning syntax or programming concepts beyond the absolute minimum required to achieve the desired effect.

+2  A: 

Any proper language has some rules to abide too. Imho for non-technical users it all depends on the editor that is used.

The BASIC languages were originally designed to be easy and clear but have become a little outdated for my taste.

So personally my vote would still go to Python. Yes, it's case sensitive and yes it's not forgiving about whitespace. But once you know those basic rules (and some editors like Pydev warn you about breaking the rules) it is an easy language to work with. I know multiple non-techies that can easily read basic Python and can write a little bit too. So I know for a fact that if someone is atleast a little bright, that he/she can do it.

WoLpH
Is there some machine that generates these "use python" answers?
anon
The Internet makes it difficult to tell whether WoLpH is a machine or a wolf or a hot chick or a stud programmer or maybe even Alan Turing.
duffymo
so, you expect a non-techie to understand object oriented concepts and "you need to count your spaces on each line"? I think python is a horrible choice for a non-techie language. Python's a fine language, but not for non-techies IMO.
Bryan Oakley
@Bryan Oakley: Python is fairly easy to read and I know several non-techies that can read and write basic Python. And if you don't explain it as "you have to count the spaces" but as "put everything that should be together at the same column" than it is easy to grasp. Either the people I know are exceptionally bright or it's not as hard as you think it is.
WoLpH
@WoLpH: If only "at the same column" was all it took. I guess if you take away their tab key that's easy enough. I just don't like the thought of them getting perplexed because they have the wrong number of invisible characters. Yes, a good editor can help. I still think people have better things to do with their time than deal with whitespace (and I've been doing professional python for a couple years now so I'm not exactly a python bystander).
Bryan Oakley
@Bryan Oakley: the question is "able to extend with simple scripts". Not "object oriented concepts". The spacing "issue" is specious -- everyone indents every programming language (including assembler).
S.Lott
+4  A: 

VBScript has a track record of being usable by non-programmers. I've seen a lot of people able to make something in Excel and Access using VBA. I'd give that a second look.

Lou Franco
+1 ... there is also a community of "non-programmers" (I suppose, who can still help with Excel scripting).
Hamish Grubijan
If they used a programming language, I'd say they were programmers.
anon
@Neil Butterworth: If I use a hammer does that make me a carpenter?
Bryan Oakley
@Bryan If you also use a nail and a piece of wood, in today's world I would have to say "yes".
anon
@Neil Butterworth: sweet! Time to update up the ol' resume! :-)
Bryan Oakley
+5  A: 

I would suggest investigating domain-specific environments. What is it that you /really/ want to do?

If you want to do electrical design, then use tools dedicated for that. If you want to specify testable requirements for a software products, then use tools dedicated for that. (Eg, cucumber).

Arafangion
Always a good idea when we're talking about "non-technical" people of a well defined persuasion.
dmckee
Tcl, Groovy and Ruby are all pretty decent at making domain specific languages.
Bryan Oakley
+1, if your environment allows your users to leverage their experience in their domain to drive the logic, then you're accomplishing your goal. It has little to do with the technicalities of the language, which are really only of interest to coders-by-trade. It has everything to do with naturally expressing your intentions, using a language that clearly and concisely describes your solution to a problem. Ladder logic (one of the visual languages) is ugly to a coder, but was perfect for allowing EE guys to use their skills to create software replacements for their electrical relay systems.
Dan Bryant
A: 

A non techie who wants to learn a programming language would not be a non-techie forever, is 't that right? Its just like the first day in a computer science class. Everybody doesn't know anything in the beginning.

If you want to specifically search for one that is only meant for non-techie, it would be difficult, as every language has its pros and cons. What he/she can really do is

  1. learn how to program,
  2. learn the rules of the language,
  3. get a tutor or go to class if possible
  4. ask if in doubt and
  5. practice practice and more practice.
ghostdog74
+1: "non-technical users" would not remain non-technical if they had scripting capabilities.
S.Lott
A: 

BRMS solutions might suit your needs. A programmer designs the domain in java say, then the BRMS tools allow the mapping of these classes to natural language. Contraints, templates and decision flows can also be designed to assist the business users. When this is all in place they it can be handed over to the business to maintain. Test cases can be executed, deployment managed etc. There are a number of solutions out there, one that has just been taken over by IBM is JRules.

James
+12  A: 

Programming is a technical skill. There is no getting away from it. You stand as much chance of farting your way to the moon as getting non-technical (and more importantly non-interested) people to write programs.

Edit: To be a bit more helpful (?), I wouldn't be so dismissive of graphical programming - drag a few things around and connect them up with the mouse - what's not to like? To see what is probably the apotheosis of this approach, take a look at BYOB. But to use even apparently simple tools like BYOB, you have really got to understand the basics of programming - flow control and functions.

anon
Amen, brother. Why do companies keep trying to get admins and janitors to do the IT work? I know they're cheaper, but who really wants to get excited about SVN versus GIT besides technical people?
duffymo
Todays n00bs are tomorrows job security.
OMG Ponies
Although I agree with you, it never hurts to try ;)But I have to admit, watching my sister trying to learn SQL for her accountancy education (why is still a riddle to me) was quite painful.
WoLpH
how does this answer help answer the question that was asked?
Bryan Oakley
@Bryan Q: How do I create a perpetual motion machine. A: You can't - don't waste your time trying.
anon
I completely agree that programming is technical, but there's isn't a line where you can suddenly say "this is programming" - even using a calculator can be considered a form of programming. I'm talking about simple chunks of logic not whole applications - many people who have no interest in programming are perfectly capable of expressing even fairly complex logic when it benefits them to do so.
Kragen
Neil, Try actually answering the question instead of using SO as a forum for venting your opinions on the state of programming.
Ash
You seem to be responding to the question suggested by the title rather than the one precisely specified by the text of the question. "Technical" or not has nothing to do with it.
ShreevatsaR
@Kragen: "many people who have no interest in programming are perfectly capable of expressing even fairly complex logic when it benefits them to do so" Really? Do you have a **specific** person in mind? My experience is the opposite. Remarkably few people can express logic with any clarity at all. Even among professional programmers, there are precious few that are "able to extend with simple scripts"
S.Lott
Exactly - the big skill in programming is not memorising minutiae of syntax but seeing every edge case and corner case before someone can say "...so it should be pretty simple."
detly
+6  A: 

Try Lua. It combines simple procedural syntax with powerful data description constructs (see about Lua). It was originally designed for people that are not professional programmers though I couldn't call them non-technical, really: they were for instance engineers and geologists.

lhf
I'm not disagreeing with you, but *why*? What makes Lua good for non-programmers' programming?
David Thomas
@ricebowl: I've edited my answer.
lhf
And +1 for the edit =)
David Thomas
+2  A: 

I suggest Tcl. It has a very easy "command arg arg" syntax for everything. No special quoting rules to learn, no magic special characters ala perl, etc. The whole of the language can be described on a single man page (though that's not suitable to give to non-techies). It' all very straight forward.

Yes, it has its idiosyncrasies, but mostly the people who are tripped up by them are programmers who refuse to give up their traditional way of thinking how languages should work.

As a side benefit, Tcl was designed from the ground up to be embedded in other applications.

Bryan Oakley
I wouldn't wish tcl on anyone. It does, indeed, start easy. But try to do something substantial with it...
dmckee
I like to think I can pick up languages easily, but tcl... no. My immediate (and lasting) question about it was - "but why?" And if you want minimalist languages, try Scheme or Smalltalk.
anon
@dmckee: I've done many substantial things with it (depending on your definition of "substantial"). Commercially successful apps in the medical field, for tracking satellites, doing a web portal framework, commercial software development tools, as well as many internal projects both big and small. Overall, 100's of thousands of lines of code. That's not the point, though. The original question isn't about doing substantial things but rather "simple scripts" and Tcl's really good for simple scripts. No OO overhead, no worrying about brace styles or indentation, no threading, etc.
Bryan Oakley
@Neil Butterworth: scheme and smalltalk are not good for the types of things the question is asking about. As to why Tcl -- there are great answers for that but this isn't the place. One must assume, though, that Tivo, Cisco, Oracle, IBM, NIST, JPL and Pixar all had good reasons for using Tcl in some of their products, to drop just a few names.
Bryan Oakley
The most basic TCL scripts are quite easy to read/write. As soon as you get a little further it gets harder and harder. Just looking at some of the examples on the TCL wiki makes me wonder why you would ever recommend it to a non-techy: http://wiki.tcl.tk/460
WoLpH
@Bryan my question was not why the language is useful, which it is - I (very occasionally) use a couple of apps written in it, but why the horrible syntax.
anon
@Neil Butterworth: horrible is subjective. There's a lot of beauty and power in Tcl's simplistic syntax. There are no special cases, no reserved words, very, very few arbitrary limitations. All of that is why I think it makes for a good embedded, non-programmer language.
Bryan Oakley
@Bryan Of course it's subjective - I see no beauty at all (unlike in Scheme, for example) but you obviously do. We must agree to differ.
anon
@dmckee: I on the other hand wish all programming language is as easy to understand, write in and maintained as Tcl and can't for the life of me understand why programmers don't get it. All my personal stuff are written in tcl because I don't have a team of programmers at my disposal to maintain my programs: I need a language that allows me to easily express and two years later read and understand the intent of my code. Javascript (strangely enough) comes in as a close second for this purpose.Granted, some of the code other people write in Tcl can be horrifyingly unreadable.
slebetman
@Neil: Tcl has beautiful semantics and syntax. It's the builtin functions that are horribly inconsistent. Scheme and Lisp on the other hand has horrible syntax but beautiful semantics and good looking library of standard functions (especially Scheme).
slebetman
Don't underestimate the power of the `command arg arg...` syntax. Almost everyone gets it on first sight.
slebetman
A: 

You mite try a new language called LOLCODE.

Hello World Example

HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE
  • HAI and KTHXBYE are the start and stop block delimiters.
  • CAN HAS is a feature request, like require or include.
  • VISIBLE is a print statement.

You can find more information @ http://lolcode.com/home

Roge
There appears to be a machine that posts these answers too.
anon
I'm not a machine, i'm Mr. Wonderful
Roge
@Roge/@Mr. Wonderful. Please do not have multiple accounts under different names. We **hate** that. Please close one and use the other.
S.Lott