Solved

Programming language for reaction-time program -- need advice

Posted on 2011-09-19
13
683 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
  • 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 85

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
 
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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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 85

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 85

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 85

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you 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…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

912 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now