Shop OBEX P1 Docs P2 Docs Learn Events
I know SPIN and some PASM: What would be the easist language to build off of th — Parallax Forums

I know SPIN and some PASM: What would be the easist language to build off of th

MicrocontrolledMicrocontrolled Posts: 2,461
edited 2010-01-30 18:11 in Propeller 1
I was thinking hard today (something I rarely do) and I thought that I should learn a more "common" programming language because it would look better on a college resume. I am wondering: using my good knowledge of SPIN (sitll learning PASM) what would be the easiest language to learn off of that? Thanks in advance.

Micro

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Computers are microcontrolled.

Robots are microcontrolled.
I am microcontrolled.

SX Spinning light display·

http://designedbymemicros.blogspot.com/

Comments

  • BradCBradC Posts: 2,601
    edited 2010-01-29 01:54
    My recommendation would be Pascal, but if you are looking for a language purely to bolster your CV, then learn C.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Life may be "too short", but it's the longest thing we ever do.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-29 02:28
    Pascal is a good choice, additionally given Parallax's open source initiative, which will focus somewhat on a Pascal/Delphi derivative called Lazarus:

    ····http://forums.parallax.com/showthread.php?p=875973

    Also, take a look at Python. It's indentation-delimited like Spin. My personal favorite desktop language is Perl, but I wouldn't recommend diving into that until you have some other languages under your belt.

    -Phil
  • RossHRossH Posts: 5,519
    edited 2010-01-29 02:39
    @All

    << LANGUAGE WAR ALERT ... LANGUAGE WAR ALERT ... LANGUAGE WAR ALERT >>

    You don't learn C to bolster your CV (that's what C++ and C# are for). Even better, for a more "academic" look to your CV you could learn Ruby, Python, PERL or even Eiffel.

    You learn C if you want to actually do stuff.

    Intersting link here. Even after nearly 40 years, C is still at number 2 overall (Java is number 1, and Pascal is still there - but at number 17).

    However, look closer at the first graph - C's only near competitor is Java, and Java is losing ground (along with C++) while C just cruises along as it has always done - if anything, C is gaining in popularity.

    Also keep in mind this is across all platforms. In the embedded space, Java (and C++) are both non-starters. I'd estimate C has well over 50% of the embedded market.

    Conclusion: If you want to do embedded work, learn C. For non-embedded work, learn Java. To just make yourself look academic, learn Eiffel.

    << END LANGUAGE WAR ALERT >>


    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • atlstangatlstang Posts: 20
    edited 2010-01-29 03:16
    I recommend python. Its great and what i primarily use to help speed along things. Im no programmer, but i can easily create gui application to talk serially with my microcontroller projects very easily.. Like objects in the object library they have modules that you "import", so i can use pyserial for communication etc. Once i collect all my data from the controller, i usually have python open up excel and autofill the tables for me. Or i can have python plot the graphs using matplotlib or the other numerical computation packages. Its a really easy language thats very very powerful. If there is something like sending emails or something you want to do in your program, there is a module for that.

    I knew python before jumping in the prop in december. Picked up spin very very fast because of it. Its eerily similar, and amazing as i love both these languages now. The dynamic whitespace etc is pretty much the same in both languages.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-29 03:18
    It's a shame, for the sake of software reliability, that a language without dynamic dimensioning and automatic garbage collection can still rank #2. As long as people continue to use C, there will be buffer overflows and memory leaks. C is to the 21st century what Cobol was to the 1980s. I'm just saying ...

    -Phil
  • AlsowolfmanAlsowolfman Posts: 65
    edited 2010-01-29 04:05
    I imagine that, for applying, if you are writing a personal statement you would be better off being able to talk about something that you have done with real passion. Something that demonstrates that you really understood what you were doing, and followed through, in any language. If you demonstrate a passion for programming you will interest them, not a claim that you know the language. If you spend a lot of time learning c just so you can say that you know it you would have been better off doing an elaborate project in spin and asm that you can talk about at length.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My head is pasming!
  • jcwrenjcwren Posts: 44
    edited 2010-01-29 04:33
    As a long time C programmer, I will state flat out: You are wrong. You can write crappy code in any language.

    I could (and just might, when it's not 11:00pm and I have to go to work in the morning) write a long diatribe about task vs language suitability. C is not the answer to everything; I won't write web apps in C. I also won't write embedded stuff in Perl. I won't write ANYTHING in Python, because Python sucks monkey butt (in 30 years of programming, I have only ever grown to hate two languages: Python and COBOL. And I will admit that COBOL has a place, I just don't like the language).

    In short, dynamic dimensioning and automatic garbage collection are not panaceas.
    Phil Pilgrim (PhiPi) said...
    It's a shame, for the sake of software reliability, that a language without dynamic dimensioning and automatic garbage collection can still rank #2. As long as people continue to use C, there will be buffer overflows and memory leaks. C is to the 21st century what Cobol was to the 1980s. I'm just saying ...

    -Phil
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-29 05:13
    jcwren said...
    You are wrong.
    Actually, nothing you've said directly contradicts me. I never claimed that dynamic dimensioning and automatic garbage collection were panacaeas or that they prevented crappy code, only that not having those features can lead to reliability issues that might otherwise have been avoided. And you're right: every language has its place. It's not that C is a bad language. The point I was trying to make is that C is too low-level for many of the apps that are written in C. And the result, in many cases, has been reliability issues stemming from misapplication of the heap manager, lack of explicit bounds checking, and sloppy pointer use.

    -Phil
  • mctriviamctrivia Posts: 3,772
    edited 2010-01-29 05:53
    micro I would learn several languages.

    Web Apps:
    *Front End: javascript, css, xml(all not 1 of 3)
    *Back End: PHP or Ruby I like PHP

    MicroControllers:
    *C

    Cell Phones:
    *Java(If you can write Black berry apps life is good)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    24 bit LCD Breakout Board now in. $24.99 has backlight driver and touch sensitive decoder.

    If you have not already. Add yourself to the prophead map
  • Nick McClickNick McClick Posts: 1,003
    edited 2010-01-29 06:17
    PHP. This whole internet thing is probably going to catch on - and programming internet applications is useful. I prefer PHP, but there are other useful languages out there.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Forums RSS Feed!

    Gadget Gangster - Share your Electronic Projects
  • ericballericball Posts: 774
    edited 2010-01-29 16:36
    What is your target? Embedded systems? Pick up an AVR or PIC and learn C and it's native ASM. Linux hacking? Learn C and x86. Academic? Learn Effiel or Pascal. Application programming? C# / C++ or Java. Web programming? PHP, Python, Ruby.

    Of course, whatever you learn today will be obsolete tomorrow.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Composite NTSC sprite driver: Forum
    NTSC & PAL driver templates: ObEx Forum
    OnePinTVText driver: ObEx Forum
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2010-01-29 18:28
    The reason I asked is simply because I can write real good programs in SPIN and I will even go so far as to say I am good at it, but I like learning new languages with the same passion that I like to program the Propeller with. I spent 3 years programming in PBASIC, and still didn't write really good programs, but I have written in SPIN for exactly 1 year and know all the ins (preferably INA smile.gif) and outs of the SPIN language. I have started writing in PASM recently and have enjoyed the learning experiance, getting that first program to work, but it is not as fun a language to write in as SPIN. PBASIC was fun but I have advanced beyond that now and it is too easy. I like the space indent of SPIN for loops and IF..THENs but would be willing to give that up if I could write interesting programs for other chips. I don't own a single IC that Parallax dosn't make, excluding some logic chips, and I would like to get into another chip that may be more useful for certian things then the Propeller would be. I was originally not going to do this but with the EOLing of the SX I now have no super-cheap microcontroller that will do things like check for input, decode a seven segment, or work as a slave chip for a Propeller. I would also be interested in writing programs for various devices or a PC because then I could have them interface to a microcontroller or just do a useful/cool function. Although microcontrollers are my main interest, I have become interested in some other options that I might enjoy or might not, I have simply never tryed them.

    In short, I am wishing to expand my options and see what I enjoy the best, although I think I will stick with microcontrollers as they do what I like most, connecting with the world beyond computers and devices, and the ability to use any hardware you want instead of building to program to comply with the current hardware, and this is why I will always have microcontrollers as my priority. But, I still want to be able to experiment with some other devices and see how that is, for being able to do more then one thing is great. Thanks for the help so far,

    Micro

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Computers are microcontrolled.

    Robots are microcontrolled.
    I am microcontrolled.

    SX Spinning light display·

    http://designedbymemicros.blogspot.com/
  • John AbshierJohn Abshier Posts: 1,116
    edited 2010-01-29 18:42
    I would look at the class descriptions of you top two target classes. What languages do they use? The college Advanced Placement exam uses Java.

    John Abshier
  • RossHRossH Posts: 5,519
    edited 2010-01-29 23:50
    Hi Microcontrolled,

    It might be a good idea to just poke about for a while and learn a bit about about the various types of programming language there are out there - since you already know one procedural language (i.e. SPIN) pick an object-oriented one next (e.g. Java). Or choose a declarative one (e.g. Prolog) or an imperative one (e.g. Forth). The reason we have so many languages (and language types!) is that they are all good at solving different problems.

    But learn C as well. I still maintain that C is the obvious choice for microcontrollers/microprocessors, since it is a low-level language (with high level features) in which it is very easy to do direct hardware manipulation. It shares that with SPIN, and you will find the transition from SPIN to C fairly easy. Also, the good thing about C is its ubiquity - you can be fairly confident that every microcontroller will have a C compiler (I'd say 'absolutely confident' - but knowing this forum someone would immediately find the only one in the world that doesn't smile.gif).

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • mctriviamctrivia Posts: 3,772
    edited 2010-01-30 00:09
    microcontrolled I have a MSP430 you can have for free if I can find it. Would be a good 16bit chip for you to learn as it is uber low power and very cheap.

    You would need to learn C and there assembly to program it. It is a traditional RISC processor with all the fun interrupts associated with that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    24 bit LCD Breakout Board now in. $24.99 has backlight driver and touch sensitive decoder.

    If you have not already. Add yourself to the prophead map
  • mctriviamctrivia Posts: 3,772
    edited 2010-01-30 00:16
    Just found all 4 of them. I will send 1 to you and the programmer. Would like the programmer back some day though.

    pct_f2013.jpg
    pct_t2012.jpg

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    24 bit LCD Breakout Board now in. $24.99 has backlight driver and touch sensitive decoder.

    If you have not already. Add yourself to the prophead map
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2010-01-30 02:01
    Oh, that is nice of you, mctrivia, but I think I'll learn C first. Besides, I might lose your programmer. :-(
    It looks like a good place to start, though. What would you recommend for learning C? Or Java?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Computers are microcontrolled.

    Robots are microcontrolled.
    I am microcontrolled.

    SX Spinning light display·

    http://designedbymemicros.blogspot.com/
  • mctriviamctrivia Posts: 3,772
    edited 2010-01-30 02:03
    C is better for micro controllers. Java is better for mobile phones and PCs. Your choice.

    P.S. the programmer is only $20 if you lose it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    24 bit LCD Breakout Board now in. $24.99 has backlight driver and touch sensitive decoder.

    If you have not already. Add yourself to the prophead map
  • mctriviamctrivia Posts: 3,772
    edited 2010-01-30 02:10
    if you wish to learn java here is a good blackberry simulator:

    http://na.blackberry.com/eng/developers/javaappdev/javadevenv.jsp



    For your computer the JDK is available free here:

    http://java.sun.com/javase/downloads/index.jsp





    For C you will find all kinds of code examples and the MSP430 IDE at:

    http://www.ti.com/corp/docs/landing/mcu/index.htm?DCMP=MSP430&HQS=Tools+OT+ez430



    If you wish to learn PHP download xampp:

    http://www.apachefriends.org/en/xampp.html

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    24 bit LCD Breakout Board now in. $24.99 has backlight driver and touch sensitive decoder.

    If you have not already. Add yourself to the prophead map
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2010-01-30 04:03
    Cool!! I will try out the chips and the blackberry. However since all my work has been done with mircocontrollers so far I will learn Java (first) and start programming PC's and phones. (which seems to be a popular market) This will in no way stop or slow me from programming the propeller, though. Nothing will ever beat being able to customize your creation to the maximum, but I will still learn Java just for the educational curve to it. I will always hold the prop as my favorite, though. Thanks for the help.

    Micro

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Computers are microcontrolled.

    Robots are microcontrolled.
    I am microcontrolled.

    SX Spinning light display·

    http://designedbymemicros.blogspot.com/
  • mctriviamctrivia Posts: 3,772
    edited 2010-01-30 04:33
    I can lend you a copy of

    Data structures and problem solving using java

    If you pay shipping

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    24 bit LCD Breakout Board now in. $24.99 has backlight driver and touch sensitive decoder.

    If you have not already. Add yourself to the prophead map
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2010-01-30 16:15
    Ok! Will you be at UPEC? I could return it there.
    Does it review the Java language in general or just that inperticular subject assuming you already know Java?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Computers are microcontrolled.

    Robots are microcontrolled.
    I am microcontrolled.

    SX Spinning light display·

    http://designedbymemicros.blogspot.com/
  • mctriviamctrivia Posts: 3,772
    edited 2010-01-30 16:37
    I will have to check. Will also see if i have my course work book.

    Other texts I have that you may be interested in:
    PHP in a Nutshell
    CSS For Web Designers Only
    Javascript in easy steps

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    24 bit LCD Breakout Board now in. $24.99 has backlight driver and touch sensitive decoder.

    If you have not already. Add yourself to the prophead map
  • mctriviamctrivia Posts: 3,772
    edited 2010-01-30 18:11
    Upec would be fun but i don't think I will make it. Going to try to get California this year.

    The first 4 chapters give java basics. The book does not cover java applets though.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    24 bit LCD Breakout Board now in. $24.99 has backlight driver and touch sensitive decoder.

    If you have not already. Add yourself to the prophead map
Sign In or Register to comment.