Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Which Programming Language?

Rysidian Rubio
Ruby Red Head
Join date: 14 Jan 2004
Posts: 263
06-30-2004 00:37
I'm sure this has been asked before in th eold scripting forums but I wanted to ask it again and from my point of view.

Before SL I had only ever programmed in BASIC years ago when I was younger. LSL is the first programming language that I have learnt and I love it! I love being able to imagine something then write the script to do it. Unfortunately LSL only works in SL (doh!) and I want to try more things.

What Programming Language do you suggest I start learning to help quench my programming thirst? I want something useful (as I have no idea what I want to do yet) and I'm not terribly worried how complex it is as I am willing to try my best.

Please don't argue about which language is "better" as that won't help at all. Please just let me know which direction you think my second step should be in.

TY :)
Essence Lumin
.
Join date: 24 Oct 2003
Posts: 806
06-30-2004 03:52
It's a loaded question but while you are considering your options you might check into Python. It's a powerful language with a fairly clean syntax and without some of the unneccesary complexities of some other languages.
Catherine Omega
Geometry Ninja
Join date: 10 Jan 2003
Posts: 2,053
06-30-2004 04:41
Yeah, go for Python. It's nice and straightforward, plus you can do quite a bit with it. BitTorrent is written in Python. Most of Eve Online's server is written in Python.

Check it out.
_____________________
Need scripting help? Visit the LSL Wiki!
Omega Point - Catherine Omega's Blog
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
06-30-2004 05:00
Basic sucks. Python rawks. LSL is... well, I'll just shut up before Cory sends me a letter bomb :)
Grim Lupis
Dark Wolf
Join date: 11 Jul 2003
Posts: 762
06-30-2004 05:33
If you already have some background in Basic, you might consider Visual Basic .Net or C#
_____________________
Grim

"God only made a few perfect heads, the rest of them he put hair on." -- Unknown
Camille Serpentine
Eater of the Dead
Join date: 6 Oct 2003
Posts: 1,236
06-30-2004 06:59
My dad, after a look at the LSL, says its most like C. (He programs in it all day). So now I have tons of books to read. :D
_____________________
Jack Digeridoo
machinimaniac
Join date: 29 Jul 2003
Posts: 1,170
06-30-2004 07:25
Python or Perl for console fun,
Delphi for some gooey fun.
Tcoz Bach
Tyrell Victim
Join date: 10 Dec 2002
Posts: 973
06-30-2004 07:42
C# (on Windows, no Mono etc.).

- Fully OOP, and elegantly.
- Vast similarity to Java-C type languages.
- Great books/docs.
- No bloat (yet).
- VERY Internet/XML friendly (uniquely so).
- Any kind of app. Console, Rich GUI, web app, mobile app, web service, etc. One language for them all.
- Community RAD tools available
- Integration with major web dev technologies (Dreamweaver lets you author C# ASP.Net projects, and Flash web service integration leverages .Net coding examples extensively).
- FREE! The only thing that costs money is Windows itself, and VS.Net, which you don't need).

I highly recommend it for anybody setting out to learn programming. Java is great too, problem is, there are a number of back versions and coming versions, and a HUGE amount of bloat in the libraries, that can make learning it as an initial language challenging.

Stay away from VB.Net. Although it's OOP now, the syntax and many of the structures are unique to VB, and it lacks some of the higher end capability of C#. Learn C# and you can pick up Java, or any language like it, with a book and a week or two. I used to teach both languages, but now will only do VB.Net if I have nothing else on the burner. The biggest misconception allowed to go on regarding .Net is that VB.Net is easier to learn. It is not.

Python is a strong utility language. I would, however, not recommend it as an initial programming learning experience. As a secondary language it is a VERY strong tool, but I'm pretty sure any serious programmer that knows Python learned it after their primary language. I've also heard horror stories of what's going on with Eve.

And of course, if you don't know anything about programming at all, get a programming fundamentals book, which will probably show the examples in something C-like. I get a lot of "I want to learn to program in C#" from people that have no idea what a variable is.

(Grim...Basic & C#? I don't get it).
_____________________
** ...you want to do WHAT with that cube? **
Rysidian Rubio
Ruby Red Head
Join date: 14 Jan 2004
Posts: 263
06-30-2004 08:26
Thanks everyone for the replies!!
I think I'll take Tcoz's advice and give C# a serious try.

When I said basic programming, I was about 12 and learned a bit about the basics of programming using the BASIC programming language at school.

hehe I definately know what a variable is, but perhaps Programming fundamentals would help since I'm sure there are basic things that I don't know.

Programming isn't completely foreign to me as I have played with HTML, javascript, Flash's actionscript and probably a few other things in the past, but I think LSL has given me the confidence to seriously learn a programming language :)

Thanks again!!
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
06-30-2004 08:39
C#=Microsoft=Evil
Camille, I can teach you scripting if you want. I dont charge anything for it either.
Camille Serpentine
Eater of the Dead
Join date: 6 Oct 2003
Posts: 1,236
06-30-2004 08:50
thanks Eggy, I may take you up on it.
Been slowly learning - modifying small scripts mostly.

Moved in RL recently so I haven't had the time to sit down and actually learn.

:)
_____________________
Eddy Stryker
libsecondlife Developer
Join date: 6 Jun 2004
Posts: 353
06-30-2004 08:57
Assembly language. Harvard has started teaching assembly as it's introduction language, and the book used is under a copyleft license. I downloaded and printed it out and had it bound for a few bucks, or you can buy a real copy online.

http://savannah.nongnu.org/projects/pgubook/

http://www.cafeshops.com/bartlettpublish.8640017

It's a lot to take in at first, but the book does an excellent job and it will have much more value than learning Microsoft's latest fad (who remembers J++ or the MFC?). Second to that I would say Java since it's used by most CS departments to teach object oriented programming.
Cienna Rand
Inside Joke
Join date: 20 Sep 2003
Posts: 489
06-30-2004 09:02
Most of programming has nothing to do with the language you write it in. Unlike spoken languages, it's really pretty easy to pick up a new language as the majority of the constructs are the same, the only differences are in the specific syntax. (And even then, I'd say a large majority of things use C style syntax).

The major difference is going to be in the provided libraries to Do Things with. There's a varying degree of what you have to implement yourself or what someone's provided for you. Personally if you're interested in being a serious programmer, learn C/C++ first. It's the hardest, but it's also the deepest, and it's easier to forget things than to learn to do them.. memory management in particular.

If, however, you have no interest in being a career programmer and just want to learn how to program, something interpreted like Perl, Python, or Ruby is a good start, although they have less transportable syntax sets. (But Python will drill good indentation into your brain) I personally would recommend Java as a learning language. You can get the JDK and some good IDEs free, and there are a lot of learning resources available as well. Plus it's been doing everything C# does for longer. ;)
_____________________
You can't spell have traffic without FIC.
Primcrafters (Mocha 180,90) : Fine eyewear for all avatars
SLOPCO (Barcola 180, 180) : Second Life Oil & Petroleum
Company
Landmarker : Social landmarking software
Conversation : Coming soon!
Essence Lumin
.
Join date: 24 Oct 2003
Posts: 806
06-30-2004 09:11
From: someone
Originally posted by Eddy Stryker
Assembly language.


Eddy has a point though it isn't the easiest way to go, After timex/sinclair basic I learned Z80 assembly language and it has helped me ever since. If you want to learn by making web pages or visually fun things it might not be the way for you.
Grim Lupis
Dark Wolf
Join date: 11 Jul 2003
Posts: 762
06-30-2004 09:11
From: someone
Originally posted by Tcoz Bach
(Grim...Basic & C#? I don't get it).


Well, I've always considered C# to be a hybrid of VB and C++.

Sure, you have to get familiar with code blocks instead of End If (or one-line if statements, depending on how long it's been.) But you don't have to worry about function declarations, pointers, pointers to pointers, memory allocation/deallocation.

And although it will impact performance, you really don't have to clean up your objects when you're done with them. Sooner or later the garbage collector will get around to it, even if you forget.

The only real similarity I've ever noticed to Java more so than any other languages was the framework library. But the same can be said of VB.Net and managed C++. (As well as COBOL.Net, FORTRAN.Net, etc.)

Actually, what I did as a former Basic/VB6 developer (primarily) was do a project or two in VB.Net to get familiar with the framework, then switched completely to C# after a couple of months.
_____________________
Grim

"God only made a few perfect heads, the rest of them he put hair on." -- Unknown
Grim Lupis
Dark Wolf
Join date: 11 Jul 2003
Posts: 762
06-30-2004 09:19
From: someone
Originally posted by Cienna Rand
Most of programming has nothing to do with the language you write it in. Unlike spoken languages, it's really pretty easy to pick up a new language as the majority of the constructs are the same, the only differences are in the specific syntax. (And even then, I'd say a large majority of things use C style syntax).


I agree with this, and Tcoz's similar statement.

A good, solid programmer can develop in almost any language, given a couple of good reference books and a little time to familiarize themselves with the language specifics.

A poor programmer (not financially) will not be able to write a solid program in any language.

I would, however, highly recommend that you avoid OOP at the beginning, and concentrate on procedural programming. Trying to learn a language, fundamentals, procedural programming, and OOP all at once is just asking for frustration.

Besides, the best way to learn OOP is to work for/with someone else that has strong OOD skills. Otherwise you're just learning bad habits.
_____________________
Grim

"God only made a few perfect heads, the rest of them he put hair on." -- Unknown
Rhysling Greenacre
Registered User
Join date: 15 Nov 2003
Posts: 132
06-30-2004 09:28
Try Ruby.
Tcoz Bach
Tyrell Victim
Join date: 10 Dec 2002
Posts: 973
06-30-2004 12:26
The analogy of foreign languages only works if you have successfully mastered a second language...after that, it is true that other languages come more easily. But you would be best served by learning a "first" secondary language that maps directly to common constructs and practical training methodologies...ergo, your selection of first programming language does indeed matter very much. If you have ever taught a roomful of neophytes to program over the course of several weeks, you will know this beyond a doubt. There is a reason colleges recommend Spanish to students that need to fill a requirement but have no real interest in foreign languages. There is also a sharp rise in academic institutions looking for C# teachers because the OOP is so clean.

I'm not entirely certain I agree with "don't learn OOP first or at the same time"...anymore, that is. As I deal with more students, I see that there is no reason not to show the context of objects and how they relate while introducing the basic concepts of programming. The trick is in how you deliver the concepts, and when. OO can be introduced as generic mental exercises, which develop/evoke a mental state of readiness to learn programming topics...and later obviously relate to them. In a sense...never teach (or just downplay) procedural programming as the core paradigm; I'm simply not convinced that it's the best way to learn. I started experimenting with this months ago at a school in NYC after finally realizing, "all the books say that people think in terms of abstraction and objects naturally...so now that we have languages that can leverage this predisposition, why not teach to it?" The "learners" are responding overwhelmingly in the positive, primarily because OO is far more stimulating. The school is even letting me rework the curriculum around this style of teaching (to a point).

VB.Net requires a variety of keywords for things like overloading and so forth which ordinarily are distinguished by method signature, and even refers to them alternatively (i.e. "shadows";). VB.Net is also not case-sensitive which can cause naming collisions in a variety of OO patterns if you are interoperating with code written in any other language, and it does not have the same access to PInvoke. And...you see the point.

And .Net is by no means a latest fad. In my experience, that is the response of somebody who has either never used it meaningfully and does not understand what it does well, has run out of technical arguments regarding it, or is just religiously opposed to MSFT. Even the JDJ and Java Report speak highly of it, and realize they better get back to the drawing board. One may as well call C++ or COM a fad...which they undoubtedly did, once.

Sure it's wise to not put all your eggs in any technical basket. I clearly remember when they called Java and XML fads...but I still learned 'em. But talk to all the Rhapsody or OS/2 (what tragedies) developers and see what they're doing. The more you do learn, the more you will learn. But avoid .Net? You may as well say you know a great deal about modern music but refuse to acknowledge the impact of hip hop.
_____________________
** ...you want to do WHAT with that cube? **
CoCoNoNo Anubis
Skylark Mechanic
Join date: 28 Jun 2004
Posts: 40
06-30-2004 14:20
I suggest a LISP or a LISP derivative like Scheme. Mastery of such a language means you're pretty hardcore. it also gives you a serious understanding of the fundamentals of a programming language.
Tinker LaFollette
Dilettante
Join date: 6 Jan 2004
Posts: 86
06-30-2004 14:54
I second the Python recommendation, and add that it's very easy to pick up the fundamentals, especially given the tutorial included with the software. Download from Python.org or ActiveState. The included tutorial is excellent, but the reference material is kind of thin. I'd recommend supplementing it with O'Reilly's Python in a Nutshell and Python Cookbook.

After that, I'd work on either Java or C#; there's not a whole lot of difference between the two, and if you pick up one, you should be able to learn the other easily. I'd favor Java, since you can get a good set of development tools for free. The core Java 2 Standard Edition Software Development Kit (J2SE SDK, also known as the J2SDK or JDK) is available from here. Supplement that with the superb (and free, open source) Eclipse IDE. The Java Tutorial is online at java.sun.com; and most of O'Reilly's Java offerings are excellent.

From there, you'll want to learn the Mother Tongue, C/C++. I learned these so long ago that I no longer know what good books to recommend. I used K&R's The C Programming Language, H&S's C: A Reference Manual, and Stroutrup's The C++ Programming Languages, but aside from H&S, I'm not sure I can recommend these whole-heartedly. As for free tools, Microsoft and Borland have made their command-line C/C++ compilers available for free, and some alternatives are listed here.
forestrock Flower
insignificant rock
Join date: 14 Nov 2003
Posts: 120
06-30-2004 16:13
I say, use C++. It would make Bjarne happy. Also, it rules. Get a book on C++ and STL and rule the world.

Java is neat in that memory management becomes nigh non-existant, but still present. C#, in my opinion is just an MS knock-off of java though it has the advantage of being easily nativley compiled.

Eiffel, is supposed to be interesting, but I've never tried it. Pre and post assertion conditions on functions and stuff like that make this language unique.

LISP and its cousins Scheme and T are interesting languages that make you count parenthesis a lot and learn recursion properly. :) Functional languages have some advantages and disadvantages that can help broaden your understanding of languages.

Learn Prolog for a complete waste of time or if you like painful logic deductions.

Assembly is fun, though I suggest gettting a simulator like SPIM which has a good entry level instruction set.

... but because I'm easily baised, don't look a Perl, you can do some cool stuff in it, I know, but the syntax hurts me. Python is a suitable replacement for Perl.
Francis Chung
This sentence no verb.
Join date: 22 Sep 2003
Posts: 918
06-30-2004 16:35
Heh, I see a lot of "flavour of the day" languages here :)

I still gotta say that everyone out there who considers themselves a serious hacker/programmer/developer should know C .

Knowing C will never go out of style. There's a C compiler for pretty much every platform out there, and every platform out there probably has some C code in it somewhere. Barrier to entry is low - there are a few free compilers out there. I like GCC myself.

To my knowledge, I haven't met a programmer that I respected professionally who didn't have a working grasp of C.
_____________________
--
~If you lived here, you would be home by now~
Darwin Appleby
I Was Beaten With Satan
Join date: 14 Mar 2003
Posts: 2,779
06-30-2004 16:38
LSL = C+Java. It's Cava.

But yeah, go for Python. And if you want to torture yourself and never program again, try Java.
_____________________
Touche.
Grim Lupis
Dark Wolf
Join date: 11 Jul 2003
Posts: 762
06-30-2004 16:51
From: someone
Originally posted by Tcoz Bach
I'm not entirely certain I agree with "don't learn OOP first or at the same time"...anymore, that is. As I deal with more students, I see that there is no reason not to show the context of objects and how they relate while introducing the basic concepts of programming. The trick is in how you deliver the concepts, and when. OO can be introduced as generic mental exercises, which develop/evoke a mental state of readiness to learn programming topics...and later obviously relate to them. In a sense...never teach (or just downplay) procedural programming as the core paradigm; I'm simply not convinced that it's the best way to learn. I started experimenting with this months ago at a school in NYC after finally realizing, "all the books say that people think in terms of abstraction and objects naturally...so now that we have languages that can leverage this predisposition, why not teach to it?" The "learners" are responding overwhelmingly in the positive, primarily because OO is far more stimulating. The school is even letting me rework the curriculum around this style of teaching (to a point).


I can understand this, and to a point believe it. (I used to teach intro VB6 at a local community college.)

But the environment you're talking about is structured, and involves an instructor. I've been operating under the assumption that Rysidian was going to self-teach. My suggestion not to try to jump straight into objects full-tilt was based on my own recollection of trying to teach myself C++ some years ago, but skipping C.

I've since gone back with some decent textbooks, and taught myself C, then C++ (in a classroom, though. The instructor was basically there to answer the occasional question that was beyond the normal scope of the course, as far as I was concerned.) I found it much easier to learn this way, by doing pure procedural C/C++ first, then folling with objects later.
_____________________
Grim

"God only made a few perfect heads, the rest of them he put hair on." -- Unknown
Grim Lupis
Dark Wolf
Join date: 11 Jul 2003
Posts: 762
06-30-2004 17:04
From: someone
Originally posted by Tinker LaFollette
From there, you'll want to learn the Mother Tongue, C/C++. I learned these so long ago that I no longer know what good books to recommend.


I have some suggestions along these lines. Personally, for a textbook for self-teaching, I think I prefer C How to Program, C++ How to Program, and C# How to Program. (Yes, I know they're expensive. They're textbooks, they're always ridiculously expensive.)

For reference books, once you start to get comfortable with C/C++, I recommend

C/C++ Programmer's Reference, C++: The Complete Reference, and C#: The Complete Reference.
_____________________
Grim

"God only made a few perfect heads, the rest of them he put hair on." -- Unknown
1 2 3