Solved

Programming language for reaction-time program -- need advice

Posted on 2011-09-19
13
688 Views
Last Modified: 2012-08-13
I need to write a program that will be used for a psychology experiment.  The program will display a series of very simple math problems, such as these two:

9 - 7 =
2 x 4 =

The answer is always a single digit.  The program will keep track of the amount of time it takes the user to hit the correct key.  The number of problems will be specified at the beginning of the run.  At the end of the run, the program will create a text file that contains the problems answered, whether the correct answer was given, and the reaction time.

It's very important that the program give accurate results.

I'm not a programmer, but I took some programming courses in college (mostly in PL/I but also in Pascal and APL).  I'm looking for recommendations for a programming language that is free, reasonably easy to learn, and runs under Windows 7.

I don't much care about things like the ability to create a fancy user interface.  The program will not be sold.

Thanks in advance.
0
Comment
Question by:chernavsky
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
  • +3
13 Comments
 
LVL 2

Accepted Solution

by:
aviran earned 50 total points
ID: 36563542
definitely java or C#

if you choose java, use eclipse for development/
if you choose c#, you can use visual studio express which is also free
0
 
LVL 19

Assisted Solution

by:Thommy
Thommy earned 50 total points
ID: 36563645
You can use FreePascal, which is available for multiple platforms.
Windows-version supports Win 7...

Download Page
http://www.freepascal.org/download.var
0
 
LVL 86

Assisted Solution

by:Mike Tomlinson
Mike Tomlinson earned 100 total points
ID: 36563831
...or the other free IDE from Microsoft, Visual Basic.Net Express:
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-basic-express

You can make a Console or Form based app with it.
0
Increase your protection from Zero Day threats!

Running two Antivirus' is never a good idea.
Taking advantage of Multiple Security layers on the other hand can often save your hide.
See which top notch security software brands have been proven to happily coexist together.
Reduce your chances of becoming a statistic.

 
LVL 13

Assisted Solution

by:5g6tdcv4
5g6tdcv4 earned 50 total points
ID: 36564043
0
 
LVL 2

Expert Comment

by:utapyngo
ID: 36564870
New to programming? Python is free, and easy to learn:
http://wiki.python.org/moin/BeginnersGuide

And it runs perfectly under Windows 7.
It has a built-in interactive shell which you can use as a calculator:
>>> 9 - 7
2
>>> 2 * 4
8

Open in new window

I also recommend installing IPython. It is a very good extension to the built-in Python shell.
0
 

Author Comment

by:chernavsky
ID: 36566434
Thanks for all the tips.  Does anyone have an idea about how to verify that the reaction-time measurements are accurate?  I wouldn't even know how to approach this.
0
 
LVL 13

Expert Comment

by:5g6tdcv4
ID: 36566463
Here is some very simple code that starts a timer before each question and ends the timer after each question. It is measuring in Milliseconds

the test.txt is the compiled exe for the code I attached, just rename to test.exe
MsgBox(0,"Test","Your Test will start when you click Ok")
$begin = TimerInit()
$1value = InputBox("Question", "9 - 7 =  ?", "", " M2")
$1dif = TimerDiff($begin)
$begin = TimerInit()
$2value = InputBox("Question", "9 + 7 =  ?", "", " M2")
$2dif = TimerDiff($begin)








MsgBox(0,"Time in MS to answer question 1",$1dif)
MsgBox(0,"Time in MS to answer question 2",$2dif)

Open in new window

test.txt
0
 
LVL 86

Assisted Solution

by:Mike Tomlinson
Mike Tomlinson earned 100 total points
ID: 36566824
"...and runs under Windows 7"

As a multi-tasking operating system, anything you do will not be accurate at the millisecond level!
0
 

Author Comment

by:chernavsky
ID: 36567005
@Idle Mind: So how do I get around that problem?  I really need the data to be accurate.  The typical reaction time is somewhere on the order of 200 milliseconds.
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 36567043
...don't use Windows for a system that needs accuracy down to the millisecond level?  =\

Normal operating system ~actions~ can add 50+ milliseconds to the time.

One way to reduce the problem is to give the test multiple times and then average the results.

Also, make sure that you don't have things like virus scanners, backup systems, scheduled updates, etc set to run when the system is supposed to be used.  Turn off desktop background switching, etc...
0
 

Author Comment

by:chernavsky
ID: 36567298
@Idle Mind: What about doing it in Ubuntu, or some other flavor of Linux?  Would that give better results?
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 36567408
I don't have any experience with them sorry...but I'm guessing you probably have more control over what is loaded at any given time.
0
 

Author Closing Comment

by:chernavsky
ID: 36582188
Thanks for all the helpful information.  Will have to spend some time investigating options.
0

Featured Post

Increase your protection from Zero Day threats!

Running two Antivirus' is never a good idea.
Taking advantage of Multiple Security layers on the other hand can often save your hide.
See which top notch security software brands have been proven to happily coexist together.
Reduce your chances of becoming a statistic.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MS Access VBA How To Properly Set Up A multipart/related HTTP Request 13 136
MySQL programmer starter 25 62
HP Laserjet Pro MFP M126nw 3 56
Downgrade to Windows 7 Clean 4 62
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question