Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

NeuralControl

macrumors 6502a
Original poster
Dec 3, 2009
921
38
Many research laboratories in the field I am interested write their own programs in Basic. From what I have been told, they are generally simple applications used to aid in statistical analysis and record data.
I have recently been accepted into a research laboratory as an undergraduate. I would really like to learn to program in Basic (and eventually other languages) so that I can potentially aid the team. I have always been interested in programming and this past summer I worked a bit with Xcode and did some simple applications (Hello World, Text to Speech, Currency Converter).
I finished my last final and am free for winter break and I would love to put this time to good use. How would I go about learning Basic on a Mac? What are some good resources, both web and print, that I can get my hands on? Thanks for the help.
 
Thanks for that link. There is a lot of information on it that I have to sort through.
I know I know, Basic is so antiquated! But it'll be beneficial if I give it a good go.
 
You didn't specify your field, but your alias includes "Neural." There *are* a few programs that will help in that field. A few include SuperLab (Mac or Windows), E-Prime (Windows), and Psyscope (Mac), but there are more. In this field, timing matters, and it makes a difference if the OS decides to delay telling you about something for twenty milliseconds.
 
Detrius, you are correct. I'm working in a behavioral neuroscience laboratory. Do those program measure action potentials? I'm sure they do much more than that, but I am not very knowledgeable with programs run in laboratories just yet.
Do you work in psychology or neurology?
 
I know a few people in the sciences use REALbasic (seriously) because the pro level has decent database access. If you use MySQL or PostgreSQL, for example, you can manipulate data before dumping to JMP, SAS, or something like SPSS. I study autism and used RB, FileMaker (seriously), JMP, and SPSS for data on adults with autism disorders. Worked well for me.

I used the standard edition of RB, which supports SQLite, and then imported the data to MySQL before doing the final analyses.

Honestly, I wish there were alternatives to RB, mainly because I'd rather have a Cocoa/NIB interface or plain text. RB is sort of Carbon+. On the PC, I still use PowerBASIC because nothing, not even C++, matches the speed (seriously, check the benchmarks). However, the code is "console mode" not GUI.
 
How would you suggest I go about getting started with learning to program tailored to these specific needs?
 
Detrius, you are correct. I'm working in a behavioral neuroscience laboratory. Do those program measure action potentials? I'm sure they do much more than that, but I am not very knowledgeable with programs run in laboratories just yet.
Do you work in psychology or neurology?

Actually, I'm between jobs. I'm a programmer whose hobby is psychology, and I helped develop one of the programs. You could say that I've worked in a related field. :cool: Despite this (or maybe because of it), I'm not the best person to talk to about *which* program would be best for you. I know most everything there is to know about one of the programs and very little about the rest. That makes my point of view rather biased (which is why I haven't specified which one--though it's probably close to obvious with us being on a Mac site).

There are more options available than just the three I listed. Some allow/require programming while others are GUI-oriented. Regardless which way you go, they are all geared toward (at least most of) the equipment you're likely to use, and they are all implemented with accurate timing in mind. You'd probably be better off at least looking down the path of what tools have already been created for you, as I can tell you from experience that it's not easy to get all of the things you want working together (e.g. real-time priority on the Mac, learning an API for a National Instruments IO card, digging up documentation on how to write code for RS-232 serial ports on the Mac, getting response boxes to work properly in spite of the undocumented problems they might have).

While the vast majority of the options out there are Windows-based, I should say I had better luck with precision on OS X. Maybe I wasn't doing something right on Windows (entirely possible), but I could never get the kind of precision out of it that I got on the Mac (it didn't help that the best clock Windows provides counts in milliseconds, while the mach kernel counts in nanoseconds). Neither is a real-time operating system, and they take different approaches to how they define "real-time priority."
 
Ah I see. Thanks for the help. Would you know how I could try to run through some Basic code on a Mac? Xcode does not work with Basic if I recall correctly.
 
Realbasic has a trial period. It says it allows you to run your programs for 5 minutes. It does not say it is limited to 90 days of use. For learning purposes, this is probably fine.

I think you should communicate with the research laboratory to see what tools they use.
 
I know I know, Basic is so antiquated! But it'll be beneficial if I give it a good go.

No, only the people who think that are antiquated and haven't looked at today's Basic dialects. You see, even the widely known and accepted Python programming language could pass as a modern Basic dialect.

Visual Basic.NET probably is the most popular Basic language out there -- and it is functionally EQUIVALENT to Visual C#. Whatever you can code in C# can also be coded in VB.NET and the other way round. Those languages just use a different semantic, that's all. And nobody in his right mind would say that C# is an antiquated language.

On the Mac, you can also take a look at the BlitzMax programming language. The company makes a huge mistake with marketing BlitzMax as a game development language; I know people who have written multi-platform (Mac & Windows) business applications with it, and I've seen a lot of other rather advanced stuff that was developed in BlitzMax that has nothing to do with games. BlitzMax is a very fast and productive language with full support for OOP, multi-threading and multi-platform development (OS X, Windows, Linux). And it does not even cost much.

Personally, I am not a big fan of REALbasic. I don't like the fact that the IDE does not allow you to see and edit the full source code at once, it only allows to click through the methods and functions one at a time. REALbasic also lacks some components that I would expect from a development tool that's aimed at (database-driven) desktop applications. For example, there's no real data browser component in REALbasic; if you need it, you have to buy a third party library for that.
 
Winni, thank you for your insightful comment. I was unaware of all the current use of Basic.
 
I will find out more information from the lab after the New Year. I know for a fact that they do not use Visual Basic. The professor made it clear it was Basic.
 
I will find out more information from the lab after the New Year. I know for a fact that they do not use Visual Basic. The professor made it clear it was Basic.

One thing I hadn't considered, but I have used, is FutureBASIC. FBtoC is the new free version, which creates Xcode projects in C/Objective-C after translating from BASIC.

http://4toc.com/fb/index.htm

Free is always good. There is a Wikibook project and manuals are being updated.


Some of the science work in REALbasic:

Peter K. Stys, MD
Professor of Medicine(Neurology), Senior Scientist
Ottawa Health Research Institute, Div. of Neuroscience

There is a long discussion at:
http://www.mail-archive.com/realbasic-nug@lists.realsoftware.com/msg12615.html

From:

http://www.realsoftware.com/community/serialcloner.php

Franck Perez didn't know he was going to be a software developer. Perez is a Cancer Researcher at the Curie Institute, a hospital that treats and researches cancer, in Paris, France. With a PhD in Genetics and Cell Biology…
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.