• Create Account

Banner advertising on our site currently available from just $5! # Programming experiments/surveys (games)? Old topic! Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic. 6 replies to this topic ### #1xmorphicx Members - Reputation: 104 Like 0Likes Like Posted 12 January 2014 - 05:23 PM Hi everyone, I'm interesting in identifying and then learning a programming language that can meet a few requirements. I'm a graduate student in psychology and am looking for a language that can be used for experiments in a research setting. I think that what I'm looking to do would fall under the category of games from a programming standpoint. Several examples of what I'm looking to do are: 1. Generate several nonsense words and assign them values. Ask the participant about relationships between the nonsense words based on their values (hidden), and give feedback based on correct or incorrect answers. Keep track of response time per trial. Export things like participant identifier, score, and time to a CSV or excel file. 2. Flash stimuli (pictures, words) on the screen quickly (milliseconds - the participant wouldn't be able to report what they were) followed by a question to see if the stimuli will "prime" a particular response, or make it more likely. (e.g., does flashing the word "green" on the screen make it more likely the participant will answer the question "What is your favorite food?" with a green food, even though they can't tell you what word they saw?) 3. Other various tasks, such as presenting participants with a series of questions and recording their answers, or playing a brief movie and asking questions about it afterwords. 4. I'd like to be able to use point-and-click interfaces - my learning experience with Python has limited me to text so far. Hopefully that gives you a good sense of the types of things I'm looking to do. Being that I'm a graduate student in a field other than programming, I need a language that can give me the biggest bang for my buck with regards to difficulty and time investment. So far, I've spent a decent amount of time learning Python - I've done all of the Codeacademy lessons, read "The Quick Python Book" cover to cover, and have learned enough to cobble together code to create a text-based version #1 above (all keyboard, no mouse). I guess my question is - based on my needs, do you think I'm learning the right language? Or should I consider this time well spent as an introduction to programming and dive into something else like C++, Java, Objective C...? I've searched the forums, but would find an answer to my specific questions helpful. Thanks in advance! Sponsor: ### #2Khaiy Crossbones+ - Reputation: 1696 Like 1Likes Like Posted 12 January 2014 - 05:38 PM Any language can do the things you're describing without much fuss. Python can do it, but you'll also have to do code an environment (like a window that has clickable buttons). That shouldn't be too hard to do though. I'm sure someone here can recommend a library that will take care of most of that for you as well (I would, but I don't use Python and don't really know resources to use with it very well). If you're interested in switching to a new language, I'll recommend C#, namely because you can use WinForms with it to make programs that run in windows and can do point-and-click input already. But you don't need to use something different to do what you're looking for, so if that's your only reason for considering a change I would suggest sticking with Python. ### #3minibutmany Members - Reputation: 1900 Like 0Likes Like Posted 12 January 2014 - 05:53 PM I will second C# (C-sharp). With Visual Studio Express, you can design your windows forms quickly, in a drag and drop interface, and then use code to make it all work. "Flashing stimuli" is very straight forward with C#s graphics libraries. But for the most part you will constrained to running your programs on windows. I can see where making these applications web based can be an advantage, because it will run on windows, mac, or a tablet if you need portability. So in that case, you may also consider learning HTML5/javascript. I haven't used Python either, but I believe the Pygame library is fairly popular for doing graphics related things. Another option that I personally like is Processing. It is kind of a simple version of java, and makes 2d graphics and audio really easy. Stay gold, Pony Boy. ### #4NoAdmiral Members - Reputation: 729 Like 1Likes Like Posted 12 January 2014 - 06:36 PM This is something I have done. I used C#. Using C#, it's really easy to set up standard windows forms that are both intuitive and familiar to many participants. Also, I just had the results output to text file which allowed me to monitor variables that I might not be able to if the task was given to participants using pen-and-paper. Most (if not all) languages can do these things, but C# (like minibutmany said) has an intuitive and versatile form-design component in Visual Studio. Oh, and there's an excel wrapper for C# that would suit data-collection well (I haven't used it extensively, but it only took me about 5 minutes to figure out how to use it to read/write an excel file). Edited by NoAdmiral, 12 January 2014 - 06:39 PM. Inspiration from my tea: "Never wish life were easier. Wish that you were better" -Jim Rohn herwrathmustbedragons.tumblr.com ### #5d4n1 Members - Reputation: 507 Like 1Likes Like Posted 12 January 2014 - 08:16 PM Or you can do this in HTML which means its portable and easily accessible via the web, this is super simple and can be done painlessly using JavaScript; in fact JQuery would be able to do a lot of neat stuff for you out of the box. Using C# is easy but there is much more to learn than simply using HTML. ### #6TheUnnamable Members - Reputation: 834 Like 3Likes Like Posted 12 January 2014 - 09:32 PM I'd second HTML, it has a really simple syntax, easy to learn. You can make it interactive with JavaScript. With some programming knowledge ( judging by your post, I think you have it ) it's not hard to learn its syntax. jQuery ditto. Still, I'd like to add that to store any kind of data, at least you would need PHP*. You can get away with simply learning a few file functions ( fopen, fwrite, fread, fclose, maybe flock ) and basic syntax ( you don't declare variables just use them, and they start with$, eg. $foo=2;). To be able to run PHP, you need hosting. Lots of free hosts are available. To show videos you'd get a free flash solution ( flowplayer? didn't do this kind of stuff in a while ), which is basically copying a few files over and pasting a piece of code. Flashing images for really short whiles can be done with JavaScript. * - Well, technically you can indeed get away with pure HTML+JS by setting up a node.js server. But I don't think you'd want to do that as a beginner Edited by TheUnnamable, 12 January 2014 - 09:42 PM. ### #7d4n1 Members - Reputation: 507 Like 1Likes Like Posted 13 January 2014 - 08:54 PM I'd second HTML, it has a really simple syntax, easy to learn. You can make it interactive with JavaScript. With some programming knowledge ( judging by your post, I think you have it ) it's not hard to learn its syntax. jQuery ditto. Still, I'd like to add that to store any kind of data, at least you would need PHP*. You can get away with simply learning a few file functions ( fopen, fwrite, fread, fclose, maybe flock ) and basic syntax ( you don't declare variables just use them, and they start with$, eg. \$foo=2;). To be able to run PHP, you need hosting. Lots of free hosts are available.

To show videos you'd get a free flash solution ( flowplayer? didn't do this kind of stuff in a while ), which is basically copying a few files over and pasting a piece of code. Flashing images for really short whiles can be done with JavaScript.

* - Well, technically you can indeed get away with pure HTML+JS by setting up a node.js server. But I don't think you'd want to do that as a beginner

HTML5 also has containers of its own.  Check out http://en.wikipedia.org/wiki/File:HTML5-APIs-and-related-technologies-by-Sergey-Mavrody.png for a nice list of what HTML5 has and its status's.

More specifically, check out WebStorage

Edited by d4n1, 13 January 2014 - 08:54 PM.

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

PARTNERS