Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Which Programming Language?

Candide LeMay
Registered User
Join date: 30 Dec 2004
Posts: 538
02-04-2005 03:57
Of course I'm half a century late to this thread, but I would suggest anyone who starts with programming to pick a language/implemenation that has REPL (read-eval-print loop), i.e. something where you can interactively enter and run code.

The advantage is that you get this "it works!" feedback quickly, instead of spending minutes to edit files and then be frustrated when it doesn't compile. Having instant success helps to motivate immensely, especialy for people who are learning.

It's also somewhat similar to SL - you can create objects directly and interactively change them. Imagine how fun would SL be if you had to use external 3D program, model there, export to SL, check how it looks, back to 3D program to make changes ... repeat until bored.
Siobhan Taylor
Nemesis
Join date: 13 Aug 2003
Posts: 5,476
02-04-2005 04:44
From: Candide LeMay
Of course I'm half a century late to this thread, but I would suggest anyone who starts with programming to pick a language/implemenation that has REPL (read-eval-print loop), i.e. something where you can interactively enter and run code.

Try Delphi/Kylix then. It's Object Pascal with a very similar interface to VB. It lets you play around until it's done, then package it all up for a release version once you're satisfied.
Long term though, I'm with the other 'real programmers' here... Learn C at the earliest opportunity.
_____________________
http://siobhantaylor.wordpress.com/
Danny DeGroot
Sub-legendary
Join date: 7 Jul 2004
Posts: 191
02-04-2005 05:32
From: Candide LeMay
Of course I'm half a century late to this thread, but I would suggest anyone who starts with programming to pick a language/implemenation that has REPL (read-eval-print loop), i.e. something where you can interactively enter and run code.



The standard Ruby distribution comes with "irb", which stands for Interactive Ruby...um, Something. It's a nifty little utility that lets you do just this. I love it because I never can get the right syntax for a Ruby regex until I've dinked with it about fifty times.

== danny d.
Jessica Robertson
Registered User
Join date: 3 Dec 2004
Posts: 412
02-04-2005 06:17
For a first programming language? I would suggest C++, it is complex but learning it will teach you basically all of the concepts involved in programming.

I would recommend Ivan Horton's Microsoft Visual C++ by Wrox Press. Spend about 6 months working through that book. It will teach you basically every concept you will need to know about programming. It begins with an algorithmic approach and simple excersises and works through to fairly complex windows (event driven) Object Oriented Programming and covers everything in between.
Alondria LeFay
Registered User
Join date: 2 May 2003
Posts: 725
02-04-2005 19:00
You might laugh, but the language I probably gained the most "how to program" knowledge from is LPC, which was the language that old school LP text based muds were written in. Basically it resembles (most) of the syntax and calls of C, however it's interactive nature and virtual "physicalness" just was very simple to wrap my mind around at the time. Before that, I did do some dabling in AppleSoft basic, which probably has no relevence to anything now. I found after messing around with LPC learning C was simple as sin (basically just had to add on pointers - everything else was virtually the same). The interesting thing is I never learned another OO programming language since then (LPC was semi-OO... had concepts like inheritances and whatnot). A few times when I was beginning to work on a project and thought about learning C++, but I'd sit down, start reading stuff, and say heck with it, and just code it in good old C. I guess if it works, don't change. At work, primarily I use C and Perl (Perl is a wonderful language, IMHO. It can be rapidly developed, runs on nearly anything, great for any sort of textural work, and is flexible as sin. I would not recommend it for a first language though since well, Perl can be overly flexible to the point where one can pick up "habits" that just don't make sense in any other language...). Other languages I played with is 68000 ASM (which was good for an understanding of how a computer actual works, and at that time programmers could not be lazy with coding if they wanted any real speed. Gotta love MHz < 10). Lately I started dablng in Forth - partly because it reminds me of a slightly higher level ASM language (I often miss the "control" you have with ASM), partly because I knew no one whom used it (The new exploration thing), and partly because there is just something about cold booting into Forth from a floppy disk and have basically full access to 2800 MHz of power and 768MB of ram.
Strangeweather Bomazi
has no clever catchphrase
Join date: 29 Jan 2005
Posts: 116
02-04-2005 22:20
From: Agatha Palmerstone
Actually, I think C is the way to go. Not because it's a great language (though I love it in some ways - anyone try Objective C? It's neat-o). But because it is the root syntax of other languages, and rather simple. Hell, avoid pointers if you like (use arrays). But you will get familiar with doing basic stuff, without having to memorize a lot of specific, weird crap.


This is good advice for some scenarios. If you're learning programming because you want to learn programming, C is a great place to start. If you're learning programming because you want to make something, such as a web or desktop app, I'd recommend Java or C#.

From: Agatha Palmerstone
Avoid Java until you no longer can. It's like C++ for lazy people. Which is a good thing sometimes, but again not so much for beginners.


A lazy programmer is a productive programmer. :-)
Siobhan Taylor
Nemesis
Join date: 13 Aug 2003
Posts: 5,476
02-05-2005 03:38
From: Alondria LeFay
You might laugh, but the language I probably gained the most "how to program" knowledge from is LPC, which was the language that old school LP text based muds were written in.


I remember that, lol... way cool... and obscure too these days.
_____________________
http://siobhantaylor.wordpress.com/
Mike Zidane
Registered User
Join date: 10 Apr 2004
Posts: 255
02-05-2005 14:16
Assembly is an idiotic suggestion, sorry. What operating system are you using again? Windows, that's right. Try writing a windows application in assembler sometime.

This is soooo dumb, I don't know why people put the wear and tear on their wrists to type it. Do you really understand what you are saying? Or are you just trying to sound like a tech snob?

I like vb myself. People will tell you that you can do more in C++, and this is true. The problem with that argument is that you can do a lot of stuff in VB. The vast majority of software that is written in C++ could be written in VB too, with identical performance as far as the end user is concerned.

People will say i'm wrong because they are language bigots, but it's still an easier language to write code in, and you can do anything you are ever gonna need to do in it.

The one guy is correct though... a lot of structures are specific to vb. C style syntax tends to reduce things to the fewest possible characters. IMO, this only serves to make it harder to read.
_____________________
I'm only faking when I get it right. - CC
Alondria LeFay
Registered User
Join date: 2 May 2003
Posts: 725
02-05-2005 14:56
VB, however, is very limiting on the platform it will run on (i.e. various forms of Windows, including CE) while C is pretty much universal (I have yet to find something that does not support C). Now I will give you that the "limiting" platform does encompas 95% of all computers. ASM does still have some use, although probably not on the normal desktop PC. ASM is still useful in coding for PDA's, embedded systems, and in developing "appliances". I agree though it is definately not a good choice for a first langauge, and probably most people will never truly have a use for it. Only reason I learned ASM is once upon a time machines were slow, so one had to actually hand optimize things. These days, computers are fast so it allows programmers to become lazier. (And thus part of the reason my Athlon 2800+ boots slower than my old 7.14 MHz Amiga).
Mike Zidane
Registered User
Join date: 10 Apr 2004
Posts: 255
02-05-2005 15:34
Sigh... yeah, it's too bad amiga didn't make it :(

They did so much more with so much less... I wish new computer manufacturers would get a clue.
_____________________
I'm only faking when I get it right. - CC
Nogard Codesmith
Second Life Resident
Join date: 24 Nov 2004
Posts: 191
02-05-2005 16:02
Ahh forget all this. Just go get yourself an old Commodore 64 and learn commie BASIC, its all you'll ever need. ^_^
Siobhan Taylor
Nemesis
Join date: 13 Aug 2003
Posts: 5,476
02-05-2005 16:32
From: Mike Zidane
They did so much more with so much less... I wish new computer manufacturers would get a clue.
Oh, but they do... nobody's forcing you to use Windows.
_____________________
http://siobhantaylor.wordpress.com/
Mike Zidane
Registered User
Join date: 10 Apr 2004
Posts: 255
02-05-2005 20:03
Siobahn.... hardware doesn't have a lot to do with the operating system. Good try though.

What I was referring to was Amigas use of dedicated processors. Sure, graphics cards have GPUs now (that's graphics proccessing unit), but it seems like we had to go way back into the dark ages and start over to get where we are now.

My point is... we would probably be a lot farther along if amiga had made a better OS. Alas, they didn't. Microsoft came in, made a workable OS and some good business deals. I don't have to use windows... I suppose all the computing power I need is in my digital wristwatch. Those are a pretty neat idea, no? But anyways, no one is writing software for digital watches, linux, or macintosh... so I'll stick with the OS that makes my PC useful.

Why do you people bash MS anyway? That's so silly. Buncha bandwagon jumpers. I love you anyway.

P.S. actually, that wasn't my point. It really doesn't make any sense... that argument there. The real point is... macintosh isn't what created the PC revolution, Windows is. Like it or not. I don't really have an opinion because I just wanted to see PC's popular. And windows is good enough for me. Believe me, if it were not for windows, we probably would not be having this delightful conversation right now :)

PPS, In the intrest of equal time, my dad disagrees, not that he's an MS basher. But he says if Microsoft hadn't done it, someone else would have. I dunno if I agree, cuz the mac os, I think, is older than windows. Certainly older than windows 3.0 (which was the first that mattered). But anyways, that's not how it worked out. The way it worked out is, if you use a non-windows os, you spend a lot of time in front of your puter wishing you could do more. Unless, that is, you own ANOTHER pc that has windows. I've got 3 and a half (or two and three quarters, if I want to be a snob), and all run windows.

God, that's like four edits. Ok, I'm done now.
_____________________
I'm only faking when I get it right. - CC
Cory Bauhaus
Valued Member
Join date: 9 Aug 2004
Posts: 52
02-06-2005 08:48
From: Grim Lupis
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.

Yes, yes, and no.

Alan Kay (father of OOP) said that programming is something that happens at a different level than the programming language, much like story telling is more than arranging words in the correct syntactical order. A good programmer can work in almost any language because she thinks in terms of iteration, recursion, objects, etc, and not in terms of what the language does. "Calculate the average value of a list of numbers" is a task that can be done many different ways, and isn't available as an innate part of most languages. But a good programmer thinks at that level of abstraction, not at the level of syntax.

As for languages, I'm shocked no one has suggested Smalltalk. Smalltalk was originally created to be a learning language, but turned out so good it was used for real world applications. I programmed in Smalltalk for many years, worked on a virtual machine, extended the class libraries, etc. It's the best development experience I've ever had.

Let me back up. I'm a big language geek. I've worked on Smalltalk and Java virtual machines, I've helped develop new languages, etc. I wish I could make money doing that sort of thing cause it's what I like most. Anyway, I think any programmer worth his salt should be able to work in a dozen languages and pick up a new one in a few days. I can usually start programming in a new language in an hour or two, and in a couple days am being productive. I learned PERL and PHP and implemented a project from scratch in just a week. If you have a good foundation, picking up a new one is cake.

If you are just learning, having a good development experience is important. It's so frustrating to have an idea you want to express or investigate and not have a good tool to help you. In the early 80s, Smalltalk-80 had the best development environment in the world, and I've still not seen one that can really compete with it. Everything is integrated, you get instant turnaround on compiles, and debugging is extremely cool. Most good Smalltalk programmers do most of their programming in the debugger, because you are writing code in the actual runtime environment of the code, so you can do cool experiments to see what works and what doesn't.

Smalltalk also has a 100% object-oriented language. Everything is an object, including things like numbers and characters. Smalltalk cheats to get away with that, but it doesn't get caught the way Java does. I won't go on about the rest of the language features, but if you like LSL you'll probably like Smalltalk a lot.

In the mid-90s Alan Kay and some other OOP luminaries started the Squeak project to create a free, cross-platform open-source implementation of Smalltalk. Check out http://squeak.org/ and download your own copy. You will get a LOT for your trouble, though I'm not sure what the beginner experience is like these days.

Alan Kay once told me about the original Smalltalk education project. They used Smalltalk to teach programming to young children, back in the 70s. All of the kids picked it up pretty quickly (not surprising these days, but back then it was a big deal), except for two kids. Turns out both those kids had fathers who worked for HP and had learned BASIC playing on HP computers. Those two kids were never able to break out of the BASIC mindset to grasp the abstractions of OOP, and their Smalltalk code was a painful effort to try to emulate BASIC, but without GOTOs or line numbers. Years later I saw college students do the same thing, writing Fortran, Pascal and BASIC code in Smalltalk syntax.

So while a good programmer can pick up a new language easily, picking up new concepts can be a challenge even for an experienced programmer. If you are still learning, I think it's better to work in a language where the concepts are easily accessible, and where you focus on the concepts you think are most important.

I'd recommend a few languages to cover the basics:

OOP: Smalltalk-80 / Squeak
Functional: Scheme (a simplified variant of LISP)
Logic: Prolog
Mathematical: APL
Procedural: C

In today's world you'll likely never use any of those languages except for C for writing production code, but you will have a sufficient grounding to work in almost any language from C++ to XSLT.
_____________________
the right perspective is worth 40 IQ points
Ulrika Zugzwang
Magnanimous in Victory
Join date: 10 Jun 2004
Posts: 6,382
02-07-2005 23:08
From: Eggy Lippmann
Basic sucks. Python rawks.
We were talking about Python today! :D

We're all taking an advanced biology refresher course and we were discussing how chunks of RNA fold up on themselves and are omitted during protein synthesis. Someone mentioned that it's like a white-space-sensitive programming language and a couple of us said at the same time, "like python"! I think this just goes to show that evolution is undeniable. If God(s) actually existed, protein synthesis would be more analogous to "perl". ;)

We were also discussing that because the information to build an organism is stored in DNA using only four base pairs, it means that life as we know it uses a linear chemical chain with base-four numbering system. Compare this to a serial tape drive that stores data using a base-two numbering system. :D

~Ulrika~
_____________________
Chik-chik-chika-ahh
1 2 3