Welcome, Guest. Please login or register.
April 30, 2024, 10:18:17 AM

Login with username, password and session length

Search:     Advanced search
we're back, baby
*
Home Help Search Login Register
f13.net  |  f13.net General Forums  |  General Discussion  |  Topic: Scripting, where do I start? 0 Members and 1 Guest are viewing this topic.
Pages: [1] 2 Go Down Print
Author Topic: Scripting, where do I start?  (Read 5576 times)
Ratman_tf
Terracotta Army
Posts: 3818


on: December 19, 2012, 03:23:35 PM

I've done software testing for a long time, but I've only done black box stuff. Console and PC games. Grunt testing.
So where do I begin to learn scripting? What is useful when applying for software test positions? It came up in a phone call today about a job position, and I had to hem and haw. I don't like to hem and haw. I want to say "Yeah, I can do that!"



 "What I'm saying is you should make friends with a few catasses, they smell funny but they're very helpful."
-Calantus makes the best of a smelly situation.
Lantyssa
Terracotta Army
Posts: 20848


Reply #1 on: December 19, 2012, 04:08:23 PM

What kind of scripting?  There's as many or more scripting languages as there are programming languages.

Hahahaha!  I'm really good at this!
cironian
Terracotta Army
Posts: 605

play his game!: solarwar.net


Reply #2 on: December 19, 2012, 04:23:14 PM

Last I checked, Lua was still in fashion for game scripting, but for any programming topic it's more important that you know how to do stuff at all, rather than knowing one specific language. Languages are relatively fast to pick up once you have wrapped your mind around coding concepts in general. So learn something, anything, fun. And may god have mercy on your soul. why so serious?
Ratman_tf
Terracotta Army
Posts: 3818


Reply #3 on: December 19, 2012, 04:26:15 PM

Last I checked, Lua was still in fashion for game scripting, but for any programming topic it's more important that you know how to do stuff at all, rather than knowing one specific language. Languages are relatively fast to pick up once you have wrapped your mind around coding concepts in general. So learn something, anything, fun. And may god have mercy on your soul. why so serious?

I wrote some programs in VB6, and a hello world in Visual C many years ago.  Oh ho ho ho. Reallllly? Is VBScript a good place to start?



 "What I'm saying is you should make friends with a few catasses, they smell funny but they're very helpful."
-Calantus makes the best of a smelly situation.
Ghambit
Terracotta Army
Posts: 5576


Reply #4 on: December 19, 2012, 05:00:42 PM

Go learn C#/XNA and then pick a nice level editor to fuck around in.  Unity or UDK.  ~fin

edit: if you're aware of a company's needs then obviously you can go learn whatever scripting language they're using... javascript, lua, herowhatever, etc.  They're all different but all reliant on core OOP principles.  And eventually you'll want custom scripts, which will require you to code.


« Last Edit: December 19, 2012, 05:02:48 PM by Ghambit »

"See, the beauty of webgames is that I can play them on my phone while I'm plowing your mom."  -Samwise
Quinton
Terracotta Army
Posts: 3332

is saving up his raid points for a fancy board title


Reply #5 on: December 19, 2012, 05:09:06 PM

Yeah, it depends entirely what sort of scripting you're talking about -- for the kind of work I do (systems/os/etc), in the context of testing scripting often means python to drive test automation, but for gamesdev in-engine stuff you may be looking at lua or c# or whatnot.  At the end of the day basic programming skills translate pretty quickly from one language to the next -- finding something that you're interested in hacking on and getting comfortable doing some simple coding is a good start.  Best way to learn to code is to write code and the best way to stay engaged is to write code in some area that you have interest in.
Tarami
Terracotta Army
Posts: 1980


Reply #6 on: December 19, 2012, 05:44:23 PM

Do you still play WoW? It uses Lua for interface addons. Seems like a decent place to start, since you can fiddle with a popular scripting language in the environment of an external application (the WoW client). I think especially the latter might be valuable in a job interview, since scripting languages in themselves are not that useful. They're always incorporated into a larger application, in your case something like a test suite. The scripting is generally just a way to separate out bits of logic that have to be easy to change.

Plus, you can download some very small add-on look at how it's written, change it around a bit, then work your way up the food chain as you get more comfortable.
« Last Edit: December 19, 2012, 05:46:56 PM by Tarami »

- I'm giving you this one for free.
- Nothing's free in the waterworld.
Ratman_tf
Terracotta Army
Posts: 3818


Reply #7 on: December 19, 2012, 05:51:26 PM

Do you still play WoW? It uses Lua for interface addons. Seems like a decent place to start, since you can fiddle with a popular scripting language in the environment of an external application (the WoW client). I think especially the latter might be valuable in a job interview, since scripting languages in themselves are not that useful. They're always incorporated into a larger application, in your case something like a test suite. The scripting is generally just a way to separate out bits of logic that have to be easy to change.

Plus, you can download some very small add-on look at how it's written, change it around a bit, then work your way up the food chain as you get more comfortable.

That sounds accessible.



 "What I'm saying is you should make friends with a few catasses, they smell funny but they're very helpful."
-Calantus makes the best of a smelly situation.
Krakrok
Terracotta Army
Posts: 2189


Reply #8 on: December 19, 2012, 05:57:58 PM

Go with Adobe Flash. ActionScript 2 and 3 to be more precise. The syntax is almost the same as Javascript so you're basically learning two languages at the same time. Also Lynda.com videos.
Samwise
Moderator
Posts: 19226

sentient yeast infection


WWW
Reply #9 on: December 19, 2012, 06:21:54 PM

The vast majority of scripts I write (and, more importantly, the scripts I dearly wish more of my coworkers were capable of writing on their own) pretty much boil down to getting text from console apps, doing stuff with the text, and spitting out other text.  Any "basic scripting for dummies" tutorial for any language should cover this sort of thing -- reading from a file, using regexes to extract bits of data you want, using arrays to organize and sort that data, etc.


"I have not actually recommended many games, and I'll go on the record here saying my track record is probably best in the industry." - schild
Zetor
Terracotta Army
Posts: 3269


WWW
Reply #10 on: December 19, 2012, 10:25:01 PM

Yea, pretty much what Quinton said. Lua might be ok if you're strictly planning to test games with a scripting engine, but if you're planning to use a software testing harness/framework, almost all of the good ones are written in Python.

My company does software/hardware security testing among other things, and it's pretty much All Python, All The Time. (ok, the fuzz testing engine is written in C++ -- but testers don't need to worry about that)

craan
Terracotta Army
Posts: 108

... . ...br.. . ..br. . ...br


Reply #11 on: December 19, 2012, 10:35:06 PM

Shell scripting is a fun place to start if you have access to a *nix environment.  You can practice retrieving stuff from the console, etc etc as Samwise mentioned.  

Perl is really powerful and fun.  Very glue-like in being able to tie systems and processes together.  I think Larry Wall described it once as 'awk on steroids'.  But beware...the perl script you write today will likely be incomprehensible to you a week later.

Python has a lot of use as a scripting language and its pretty painless to learn and get into the swing of things.

Whatever you choose the main thing is having an idea of what needs to be done, as someone already mentioned.  So if you have the time I would recommend thinking something like 'Ok,   I want to be emailed when there is a process on the server that hits 90% memory usage so I can be the first to know of a problem'.  So with a scenario like that you'll be exposed to quite a bit of versatile scripting.  And if you have even more time I would recommend writing this same project in a few scripting languages to contrast and compare and get a taste of which one appeals to you.




PWYWWYFSWLSOCA
proudft
Terracotta Army
Posts: 1228


Reply #12 on: December 19, 2012, 10:49:24 PM

Put me in as an anti-vote for Actionscript.   I found it absolutely horrendous as far as silently executing without telling you what has gone awry and I imagine that would make using it as a learning tool quite frustrating.  

I don't have a pro- vote for anything, unfortunately.    Python seems pretty straightforward, though I've only puttered a bit with it.  It is certainly popular enough to be useful to learn for resume purposes.

Trippy
Administrator
Posts: 23623


Reply #13 on: December 20, 2012, 12:55:05 AM

Some recommendations:

* Dig up as many job descriptions as you can find for "white box" or non-"black box" game testers and see what programming skills are commonly required.

* Learn the fundamentals of procedural programming. Learning to write WoW Lua add-ons would be one way, as other people have mentioned, though that style isn't quite how you would normally write test scripts as WoW add-ons are usually event driven so the code flow is different than a program with a single entry point. Java is the standard teaching language these days in CS classes if you want to go that route and you can use it to learn object oriented programming after you learn the basics of procedural non-OO programming

* Learn a "glue" scripting language, preferably on a Unix platform. These languages are very good at processing strings and text files and interfacing with other programs and services (like HTTP APIs). These include languages like Perl, Python, and Ruby. A lot of white box testing requires coding in the language the game engine(s) uses itself like C++ but there are other types testing that work at a higher level like integration testing (testing that separate systems are talking to each other properly) where writing the tests in a glue language is often the way to go. My preferred glue language these days is Ruby but Python is a fine choice. I would avoid Perl unless you see it as a common requirement for the types of jobs you are interested in moving up to.

* If the job requirements require writing Windows automation scripts you may have to learn VBScript which would be...unfortunate...but I would still try and learn a real language (read: something with a C-like syntax) first.

* The scripting language du jour is JavaScript but that's not likely to be commonly used to gaming testing unless you are testing Web pages which often include JavaScript in them so I wouldn't recommend that as the first language you try and learn.
Salamok
Terracotta Army
Posts: 2803


Reply #14 on: December 20, 2012, 07:09:52 AM

If you adhere to the philosophy that your mind is shaped by the tools you use then I would suggest python.
Baldrake
Terracotta Army
Posts: 636


Reply #15 on: December 20, 2012, 07:51:13 AM

If it's for test automation, pick up Perl.

If it's for fun, do JavaScript in Unity.
cmlancas
Terracotta Army
Posts: 2511


Reply #16 on: December 20, 2012, 08:07:26 AM

Python/Ruby, JavaScript, jQuery.

Lua to do fun things.

The only objections I have are AS2/AS3.  Waste of time with HTML5 and goddamn they have funky libraries.

f13 Street Cred of the week:
I can't promise anything other than trauma and tragedy. -- schild
Quinton
Terracotta Army
Posts: 3332

is saving up his raid points for a fancy board title


Reply #17 on: December 20, 2012, 08:10:46 AM

I'd advise against starting with perl unless you know there's a specific need for it, especially if a side-goal is to learn some general programming skills.   perl is pretty strange, punctuation-heavy, beginner-unfriendly, and probably has the least in common with the other popular scripting languages mentioned here (lua, javascript, python, etc).  It also seems to have largely fallen out of favor (at least in my observation) compared to more modern alternatives.

I'll echo the Unity suggestion -- it seems like a pretty nice environment if you want to play with scripting-in-a-game-engine with fairly modern tools.  I'd suggest checking out C# in Unity, as something with more long-term value for "real" projects, but javascript may be more approachable.   There are a lot of tutorials out there for getting started with either C# or javascript in Unity.

Lua-in-WoW feels like an awkward place to get started -- do they have anything by way of debugging tools?
K9
Terracotta Army
Posts: 7441


Reply #18 on: December 20, 2012, 08:20:10 AM

Here in academia Perl is going pretty strong in certain circles, it's what I use most of the time and for many tasks it's bloody great.

That said, if I was starting again I'd go with Python. It's just a more user-friendly and more well-rounded language, and the resources to learn it are great.

I love the smell of facepalm in the morning
Lantyssa
Terracotta Army
Posts: 20848


Reply #19 on: December 20, 2012, 09:26:42 AM

Fortran is only starting to fall out of favor in parts of academia.  Not really a glowing endorsement. tongue

Hahahaha!  I'm really good at this!
cmlancas
Terracotta Army
Posts: 2511


Reply #20 on: December 20, 2012, 10:00:34 AM


Lua-in-WoW feels like an awkward place to get started -- do they have anything by way of debugging tools?


I teach Javascript I to master's students and one of their biggest complaints is show me something practical.  By even looking under the hood of the addons, you'd gain a lot of value.

I see where you're going with the debug stuff, but simply tinkering and seeing how the pieces fit together would be value added, I think.

f13 Street Cred of the week:
I can't promise anything other than trauma and tragedy. -- schild
Quinton
Terracotta Army
Posts: 3332

is saving up his raid points for a fancy board title


Reply #21 on: December 20, 2012, 10:24:49 AM

That's why I was thinking Unity might be nice -- there are existing games / gamelets you can tweak, tutorials if you want to start from scratch, and assorted tools for inspection / debugging / etc.  Lots of opportunity for hands-on doing-real-things experience.

I may be wrong, but I suspect that WoW is probably a little distracting as far as an environment to work in, and that the edit/test cycle for WoW UI plugins may not be the most approachable thing in the world. 
naum
Terracotta Army
Posts: 4262


WWW
Reply #22 on: December 20, 2012, 12:56:30 PM

No need for Perl, Ruby is all that is Perl and more, plus cleaner and sane OO.

Javascript, Ruby, Lua, Python are the immediate, logical choices.

But depends on what you want to with your scripting. Web development v. HTML 5 games v. game scripting.

If you want to experiment with art + design, I would recommend processing, a programming language/platform built on top of Java special built for artists and designers. And your "sketches" (what is termed a "program" or "app" or "script" there) can be exported to Javascript (web app) or even Android (look Ma, no Eclipse needed) in addition to video files / image files / desktop app-lets.

Or if you try Dart, Google new web development platform -- can create server/client apps, integrated. And if you want to deploy an app it all will compile to Javascript!

The ActionScript I would not bother with, given it's going the way of the dodo -- due in large part to mobile platforms (phone, tablet) for which it not a viable scripting alternative -- native apps or HTML5 (which you can even create desktop apps for now).

"Should the batman kill Joker because it would save more lives?" is a fundamentally different question from "should the batman have a bunch of machineguns that go BATBATBATBATBAT because its totally cool?". ~Goumindong
Yegolev
Moderator
Posts: 24440

2/10 WOULD NOT INGEST


WWW
Reply #23 on: December 20, 2012, 01:39:54 PM

If you adhere to the philosophy that your mind is shaped by the tools you use then I would suggest python.


Why am I homeless?  Why do all you motherfuckers need homes is the real question.
They called it The Prayer, its answer was law
Mommy come back 'cause the water's all gone
Evil Elvis
Terracotta Army
Posts: 963


Reply #24 on: December 20, 2012, 02:34:41 PM

I'd go with either Lua or Python.  Lua may be easier to pick up for a novice.

Pick one and go.  You don't even need to install a compiler/interpreter to get started:
http://codepad.org/
Salamok
Terracotta Army
Posts: 2803


Reply #25 on: December 20, 2012, 04:54:00 PM

Of course I was serious.  If the goal is to learn to program in general as opposed to just completing a specific task then python is a great choice.  If the web is of interest then django is available as well.  I would think perl a horrid choice if the result you are looking for is to learn proper programming techniques.  I would also suggest steering clear of JavaScript, ActionScript and PHP.  Pretty much the entire m$ stack is out as well as interpreted languages are not exactly their speciality.
« Last Edit: December 20, 2012, 08:02:01 PM by Salamok »
Ratman_tf
Terracotta Army
Posts: 3818


Reply #26 on: December 20, 2012, 05:01:16 PM

I wish I could be more specific. I don't know what scripting language they are using.
Python and Lua sound like decent places to start. I'll take a look see.



 "What I'm saying is you should make friends with a few catasses, they smell funny but they're very helpful."
-Calantus makes the best of a smelly situation.
Krakrok
Terracotta Army
Posts: 2189


Reply #27 on: December 21, 2012, 12:24:15 AM

I'd pretty much recommend only JavaScript/ActionScript/PHP. ActionScript compiles straight to iOS/Android/Blackberry/Web. Same codebase. Actionscript and Javascript are practically the same syntax and if Unity (which also compiles straight to iOS/Android/Web) can use Javascript that is just one more tool in your warchest. HTML5 runs on Javascript so again basically all the same script syntax.

Yes, if you want to automate Unix shells some of the other languages might be useful.
Bann
Terracotta Army
Posts: 448


Reply #28 on: December 21, 2012, 04:03:10 AM

I've been working on a project at work to automate part of our registration process for next year. (During registration week, Parents come in and fill out a 14 page packet, then someone (me) manually types that information into a spreadsheet and we use the spreadsheet to import to our relevant student information systems. This is crazy. There are way to many spots where the data can get messed up.) What I did was all based in google drive. I created a form that asks questions which get reported on to a spreadsheet and a emergency contact template document with placeholders for all the unique information. I then found a script via the script gallery that sort of did what I was looking for and was able to modify it to my purposes - now when a parent completes the online form, their answers are populated into the template, its converted to a .pdf, and emailed to myself and whoever filled out the form.

2 weeks ago, I didnt really understand what a script actually was. I think the process of finding a script in the script gallery and then bending it to make it do something you want to do give s a nice balance of seeing how things are done and leaving you with a tangible result. If you would like a specific starting point,this is the tutorial clip that unlocked alot of ideas for me.

http://www.youtube.com/watch?v=OdoDuZfP6a0

Yegolev
Moderator
Posts: 24440

2/10 WOULD NOT INGEST


WWW
Reply #29 on: December 21, 2012, 07:14:38 AM

Of course I was serious.  If the goal is to learn to program in general as opposed to just completing a specific task then python is a great choice.  If the web is of interest then django is available as well.  I would think perl a horrid choice if the result you are looking for is to learn proper programming techniques.  I would also suggest steering clear of JavaScript, ActionScript and PHP.  Pretty much the entire m$ stack is out as well as interpreted languages are not exactly their speciality.

I generally agree with all that, especially about Perl, but I find myself sliding towards the "it's evil" side of the Python Whitespace slider and I couldn't remember where you were on that.  Would it be OK if Python was my first language?  Can't say.

Why am I homeless?  Why do all you motherfuckers need homes is the real question.
They called it The Prayer, its answer was law
Mommy come back 'cause the water's all gone
Zetor
Terracotta Army
Posts: 3269


WWW
Reply #30 on: December 21, 2012, 07:18:27 AM

I read the other day that LISP is supposed to be a really easy and logical language to learn... if you aren't tainted by preconceptions from inferior languages, that is. But going down that road leads to "vi vs emacs", "eclipse vs netbeans", "object DB vs object-relational DB" slapfightholy war territory, so yeah.  why so serious?
« Last Edit: December 21, 2012, 07:27:00 AM by Zetor »

Quinton
Terracotta Army
Posts: 3332

is saving up his raid points for a fancy board title


Reply #31 on: December 21, 2012, 07:27:35 AM

I generally agree with all that, especially about Perl, but I find myself sliding towards the "it's evil" side of the Python Whitespace slider and I couldn't remember where you were on that.  Would it be OK if Python was my first language?  Can't say.

The syntactic whitespace side of Python is probably not going to kill anyone, and as a beginner language it's not too bad.  I suspect making the transition from scope-by-indentation to scope-by-braces or scope-by-begin/end wouldn't be too hard, and all the other things you'd learn translate easily enough.

My main concern (if the goal is to build some solid coding basics) is the kind of kitchen-sink approach to data structures and libraries -- but that's common to most scripting languages (except the designed-to-be-embedded stuff like Lua) and has some upsides too (all kinds of useful goodies in the box).

LISP is neat in a lot of ways, but if your goal is to pick up practical scripting/coding skills, there are far fewer LISP shops than even Perl shops.

I'm an old fart who started when I was very young with BASIC and 6502 assembly before moving on to a variety of languages (high and low level) and settling on C/C++ for most of what I do, so probably worth taking my opinions with a grain of salt or two.
Salamok
Terracotta Army
Posts: 2803


Reply #32 on: December 21, 2012, 07:30:19 AM

I read the other day that LISP is supposed to be a really easy and logical language to learn... if you aren't tainted by preconceptions from inferior languages, that is. But going down that road leads to holy wars, so yeah.  why so serious?
lol - I suppose if you are really comfortable with the calculus then lisp might be a good choice as a first language.  I'm more of a see problem->solve problem kind of guy rather than a see problem->build an entire world where problem no longer exists type.
Salamok
Terracotta Army
Posts: 2803


Reply #33 on: December 21, 2012, 07:35:11 AM

I'm an old fart who started when I was very young with BASIC and 6502 assembly before moving on to a variety of languages (high and low level) and settling on C/C++ for most of what I do, so probably worth taking my opinions with a grain of salt or two.

According to Dijkstra your exposure to Basic as a first programming language ruined you for all time.  This is sort of the angle I was taking by proposing Python as a 1st lingo.
« Last Edit: December 21, 2012, 08:09:56 AM by Salamok »
Lantyssa
Terracotta Army
Posts: 20848


Reply #34 on: December 21, 2012, 07:40:01 AM

Why does learning with BASIC make us eternally broken coders?

Hahahaha!  I'm really good at this!
Pages: [1] 2 Go Up Print 
f13.net  |  f13.net General Forums  |  General Discussion  |  Topic: Scripting, where do I start?  
Jump to:  

Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC