View Full Version : Basic
NeuralControl
Dec 22, 2009, 10:31 AM
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.
old-wiz
Dec 22, 2009, 10:37 AM
there's an interesting resource.
http://www.nicholson.com/rhn/basic/
it also has links to resources for learning basic.
I didn't even know anyone still used it!
NeuralControl
Dec 22, 2009, 10:50 AM
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.
Detrius
Dec 22, 2009, 03:58 PM
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.
NeuralControl
Dec 22, 2009, 05:31 PM
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?
PoetCSW
Dec 22, 2009, 05:45 PM
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.
NeuralControl
Dec 22, 2009, 05:54 PM
How would you suggest I go about getting started with learning to program tailored to these specific needs?
Detrius
Dec 22, 2009, 08:14 PM
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."
NeuralControl
Dec 22, 2009, 11:12 PM
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.
lloyddean
Dec 23, 2009, 12:08 AM
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 (http://www.realsoftware.com/realbasic/) is available in a 90 day trial version (http://www.realsoftware.com/realbasic/trialkey/).
Available for Linux, Mac and Windows has it's own IDE.
xStep
Dec 23, 2009, 12:30 AM
Realbasic has a trial period (http://www.realsoftware.com/realbasic/trialkey/). 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.
Detrius
Dec 23, 2009, 09:06 AM
I think you should communicate with the research laboratory to see what tools they use.
I guess that's that's part of the point I was trying to make. Don't start from scratch in this field unless you absolutely have to.
chown33
Dec 23, 2009, 12:23 PM
I think you should communicate with the research laboratory to see what tools they use.
+1. You'll want to know exactly which version of Basic to learn.
http://en.wikipedia.org/wiki/List_of_BASIC_dialects_by_platform
http://en.wikipedia.org/wiki/List_of_BASIC_dialects
Cromulent
Dec 23, 2009, 12:33 PM
If they happen to use Visual Basic then you can use the Mono project (http://mono-project.com/) to compile and run Visual Basic code on the Mac.
Winni
Dec 23, 2009, 01:41 PM
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.
NeuralControl
Dec 23, 2009, 08:18 PM
Winni, thank you for your insightful comment. I was unaware of all the current use of Basic.
NeuralControl
Dec 23, 2009, 09:24 PM
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.
PoetCSW
Dec 24, 2009, 01:58 PM
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…
firewood
Dec 24, 2009, 04:04 PM
I've used Chipmunk Basic for Mac OS X, from the link above: http://www.nicholson.com/basic. It's an old-school plain Basic interpreter, but it's free, reasonably fast, and fairly cross-platform.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.