Basic

Discussion in 'Mac Programming' started by NeuralControl, Dec 22, 2009.

  1. NeuralControl macrumors 6502a

    Joined:
    Dec 3, 2009
    #1
    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.
     
  2. old-wiz macrumors G3

    Joined:
    Mar 26, 2008
    Location:
    West Suburban Boston Ma
    #2
  3. NeuralControl thread starter macrumors 6502a

    Joined:
    Dec 3, 2009
    #3
    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.
     
  4. Detrius macrumors 68000

    Joined:
    Sep 10, 2008
    Location:
    Asheville, NC
    #4
    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.
     
  5. NeuralControl thread starter macrumors 6502a

    Joined:
    Dec 3, 2009
    #5
    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?
     
  6. PoetCSW macrumors newbie

    Joined:
    Oct 26, 2009
    Location:
    Pittsburgh
    #6
    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.
     
  7. NeuralControl thread starter macrumors 6502a

    Joined:
    Dec 3, 2009
    #7
    How would you suggest I go about getting started with learning to program tailored to these specific needs?
     
  8. Detrius macrumors 68000

    Joined:
    Sep 10, 2008
    Location:
    Asheville, NC
    #8
    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."
     
  9. NeuralControl thread starter macrumors 6502a

    Joined:
    Dec 3, 2009
    #9
    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.
     
  10. lloyddean macrumors 6502a

    Joined:
    May 10, 2009
    Location:
    Des Moines, WA
    #10
    RealBASIC is available in a 90 day trial version.

    Available for Linux, Mac and Windows has it's own IDE.
     
  11. xStep macrumors 68000

    Joined:
    Jan 28, 2003
    Location:
    Less lost in L.A.
    #11
    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.
     
  12. Detrius macrumors 68000

    Joined:
    Sep 10, 2008
    Location:
    Asheville, NC
    #12
    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.
     
  13. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #13
  14. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #14
    If they happen to use Visual Basic then you can use the Mono project to compile and run Visual Basic code on the Mac.
     
  15. Winni macrumors 68030

    Winni

    Joined:
    Oct 15, 2008
    Location:
    Germany.
    #15
    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.
     
  16. NeuralControl thread starter macrumors 6502a

    Joined:
    Dec 3, 2009
    #16
    Winni, thank you for your insightful comment. I was unaware of all the current use of Basic.
     
  17. NeuralControl thread starter macrumors 6502a

    Joined:
    Dec 3, 2009
    #17
    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.
     
  18. PoetCSW macrumors newbie

    Joined:
    Oct 26, 2009
    Location:
    Pittsburgh
    #18
    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…
     
  19. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #19
    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.
     

Share This Page