views:

217

answers:

6

Let's say a tester is to do some programming to create automated tests ... is Lua really easy to learn for someone who is not a developer?

+4  A: 

It depends on the particular non-developer in question. Some people will utterly block on any programming language at all. Some will easily grok many languages and basic programming concepts. There is no silver bullet for putting the power of programming in the hands of someone who is untested on it.

That being said, my personal feeling is that Lua is as good of a place to start as any other programming language.

Adam Crossland
A: 

It probably is becausee its very similar to Python:

The number of universities using Python in there introductory Comp Sci courses is probably the highest of any language (empirically through google). Second probably being Java and Scheme.

The number of Python libraries is astronomical. And the number of people that know the language is quite high thus if you hire a new person there is a good chance they have seen the language before.

Ironically I have grown to not like the language so I am not saying this because I am python fan boy.

Adam Gent
I've never liked it when someone says that there is a better question than the one I asked. I specifically chose to ask the question I did and not the one you are suggesting. This is negative posting and got a -1 from me.
Brian T Hannan
Yeah I probably deserved it. I wish I could retract the answer all together.
Adam Gent
I gave you your point back for updating the post.
Brian T Hannan
+4  A: 

The Lua language has an active and usually novice-friendly community. It has a long history of use on the boundary between non-programmers and programmers. The language reference manual and standard text book are among the best written examples I've seen in my career. The full text of the reference manual is online, and the first edition of Programming in Lua is as well, although the second edition of PiL reflects the differences in the language that happened after PiL was first published and is well worth the investment to purchase.

One of Lua's strengths is the ease with which it can be integrated into an existing system to construct a configuration and scripting interface to an application. That makes the development cost to adopt it relatively low. Its small size makes the impact on an application release remarkably low as well. Thus getting an existing system to the point where it can be scripted enough with Lua to use Lua as a basis for testing will likely be a straightforward task with few hidden obstacles.

RBerteig
+2  A: 

Lua is very forgiving which many people associate with "easy". You do not have to enter semi-colons, you do not have to scope variables, you can write all of your functions in the global scope. Of course doing these things only make your life easier when writing. When debugging even a new programmer may soon see why taking these short cuts is not such a good idea.

I also believe that you can write very simple, easy to use APIs in Lua and you could also create very complex APIs, which may involve object oriented concepts (such as the difference between . and :) or functional APIs with closures and passing around functions as function arguments, etc. Whether the user is able to properly use and understand the language to do the task at hand depends largely on the API as much as or more so than the language.

Nick
+2  A: 
Pessimist
+1  A: 

As long as you clearly explain to the testers the pitfalls that they may face when debugging in LUA it shouldn't be harder than learning the programming basics of any other language.

What goes through my mind is the situation where the tester made a typo and wrote a different, yet almost unnoticeable, name for a variable. The new variable will be created with the given value but the old variable won't be modified. That sort of thing can be pretty hard to debug when people are not extremely aware of it.

Isaac Remuant
I agree. Implicitly null variables is definitely a Lua wart.
caspin