Programmers! What language for a total novice?

Programmer here. Prolog and Lisp are fun (in truth, a lot of fun), but they are less useful for basic programming. If you want to put together a little application of your own, you’ll be much better off with a more general purpose language that has a little of most. Java is good. C#.NET is good. JavaScript can be frustrating to debug, but is otherwise a pretty good beginner language.

Avoid ColdFusion, it’s bizarrely unlike almost anything else.

Prolog and Lisp are really helpful when you want to do complex algorithmic processing and are really great for writing programs that PLAY games (not writing games, but writing software that observes the game and makes play decisions). Don’t start with this, you’ll get frustrated fast if you don’t have the academic background to understand the theory (A CS curriculum would give it to you).

What? Prolog and Haskell have very little in common with each other. In particular, mentioning constraint programming in the context of Haskell makes absolutely no sense. What specific problem is Haskell designed to solve? It’s a general purpose language. Contrary to what you claimed, Haskell is a very good beginners language for numerous reasons (hence why it is used so widely as a teaching language in universities): it hides the details of the machine from you, it is fantastically easy to define complex data structures, it’s syntax is highly regular and has very few lexical elements, the language “just works” how you expect it to, with few corner cases, the language is extremely strict in layout and with the type system, and the skills you learn in Haskell are absolutely relevant to other languages (just ask those doing monadic programming in LINQ on .Net).

I’ve been looking at tons of resumes lately, and none of them mention Haskell, which is a language I’ve never heard of in the 40 years I’ve been programming. I’ve got to wonder when hiding the details of the underlying machine from you is listed as an asset - besides word length, which modern language doesn’t?

Thanks all. Not looking for a career change, I’d just like to understand some of the principles behind programming and see if it’s something that I might want to persue.

I am right at the beginning, so something like Python does sound like it will get me thinking like a programmer… that’s the bit I struggle to get my head around when I contemplate how it all works, it sounds like it’s a different way of approching the world.

We have a few guys who use java at work, so if I get on well with python I might well move onto that in due course.

If it makes any difference our firm runs a big Oracle HRMS system - are there likely to be particular languages that suit that environment (this is something I will ask a friendly member of our dev team too)?

The Oracle world seems heavily oriented towards Java (and of course Oracle now owns Sun, who developed Java). I don’t think there’s any theoretical reason why you couldn’t use any language you like in an Oracle environment, but in practice Java seems to be the preferred language, and you sure see a lot of ads for Oracle/Java developers.

Hardly any programming language around is as abstract as Haskell. Even “high-level” languages like Java are still pretty low level, imploring you to think in terms of “allocate memory for this”, “this goes on the stack”, “this goes on the heap”, etc. Haskell frees the programmer from this, allowing them to express the program cleanly. Typical example (sorting a list):



sort [] = []
sort (x:xs) = sort small ++ (x : sort large)
  where
    small = [y | y <- xs, y <= x]
    large = [y | y <- xs, y > x]


Infinite list of number ones:



ones = 1 : ones


etc.

BASIC. This is what it was designed for. Not the old “10 GOTO 200” kind of BASIC, but one of the newer versions, like Visual Basic. It’s really easy to pick up, and it continues to be useful as you get more advanced. Lots of places use it as an easy prototyping tool, for example.

I started on Basic, very much the “10 GOTO 200” old-skool type, then I moved on to newer more streamlined versions of Basic. I taught myself C, and have tried to learn C++ on and off. I had to learn FORTRAN for an undergrad project. I learned the bash shell (more of a scripting language than a programming language, but the distinction isn’t all that clear cut anyway) so I could start doing powerful stuff with Linux. For my bioinformatics studies I had to learn Java, Perl and R. I’ve also dabbled in J but that’s purely for masochistic purposes.

Out of all those, I think I’ve been most productive in Perl, with Yabasic and C being respectable runners-up. For me Perl has seen the shortest time between thinking of some task I needed the computer to do, and turning the key and watching it go!

C++ and Java both really need an understanding of the object-oriented way of life, and I don’t see that a novice needs or wants that.

So I’d say Perl or Yabasic.

So, a functional programming language? Like APL? I can assure you, it hasn’t exactly caught on. I have an issue with these, because when my adviser, who really pushed clear and structured programming long before it became universally popular, the first memorial lecture was by Alan Perliss, who talked about APL programs as literature. Literature that would make Finnegan’s Wake seem lucid. Absolutely the opposite of what Don taught.

This is the worst advice ever given in the history of mankind.

If you’re using Windows I’d suggest Visual Basic.net for 5 main reasons
1: It has a simple intuitive syntax
2: It can get you started right away with gui stuff which is a lot more fun than the console stuff you’d be working with in most programming languages at the beginning
3: It has very fast compile times, at least for the simple programs a newbie would be working with, so you can recompile constantly to see if the code you wrote does what you wanted it to.
4: It’s easier to debug than other languages that I’ve used(not that I’ve used that many)
5: It’s not case sensitive. Not a big deal but it’s the only language I’ve worked in where this is the case and case sensitivity seems like nothing but an invitation to typos to me.

#2 is the main reason though. When I first started to learn to program I tried a few different languages but all the beginners guides I used would wallow about in console stuff seemingly forever and I found it hard to picture how any of that really related to modern computing and so would get bored and quit. But with Visual Basic you jump right into the gui stuff which makes it much easier to stay interested. For me at least.

From what I’ve seen the distinction between scripting and programming languages is that the former is interpreted the latter is compiled. And if I’m not mistaken both PHP and Python are (usually)interpreted and so both are scripting languages.

Not that the distinction matters as you program in either type of language essentially the same way.

That would be a good description of the situation. ‘Scripting Language’ has no specific definition. Many of the interpreted languages are actually compiled to an intermediate code, as are many of the ‘compiled’ languages. The ‘compiled’ languages are usually associated with static typing while the ‘interpreters’ are associated with flexible typing.

Obligatory link to ESR’s “How to be a Hacker”. Read “Learn how to program” in the section “Basic Hacking Skills”. Also read the essay “Teach Yourself Programming in Ten Years” linked there.

No, not like APL, which is an array-programming language, where everything is an array. Judging all FPLs by one 40 year old abomination is like judging all imperative languages by the original Fortran.

Besides, what has “caught on” got to do with anything (not that I agree , as I said, C# is essentially becoming a functional language, Scala is popular on the JVM and Microsoft now ships F# with Visual Studio. Not surprising, given that Haskell is essentially developed by Microsoft)? We’re talking about programming for beginners. Pascal never caught on, but it’s still a better language for the beginner than most of the suggestions in this thread.

Nope, Haskell is better suited to the beginner programmer than every other language suggested in this thread barring Python. FFS, people are suggesting PHP and C++ as a language for the beginner! Do you want to scar them for life!?

What’s the difference?

When I first saw your snippet, I thought you were joking and making fun of Haskell. Then I re-read it and realized you were trying to present this syntax as easy for beginners… ? :confused:

How is that easier than PHP’s “sort($x);”? Maybe I’m completely misunderstanding what you were trying to say.

APL was considered a functional programming language at the time. I’m certainly not going to disagree about its awfulness, though.

Pascal certainly did catch on (thought it is now fairly dead.) At the time a fair chunk of CS undergrads got exposed to it, until C and UNIX took over. I agree that it is an excellent language for beginners. I taught it in two lecture sessions to our undergrads who had a first programming class, and they got it. I agree that it is a better one than the suggestions, if only it were still used. Which is the problem with Haskell. Functional programming languages have never quite caught on, despite lots of work in the past 40 years.

Why are you conflating a function call with a function definition? How does the definition of sort look in PHP? Here’s how you call sort in Haskell:



sort x


Even a function call in Haskell has less lexical noise than the equivalent in PHP. What is $, other than the mark of a stupid interpreter? Why the need for brackets?

Yeah, and now a good chunk of CS undergrads are exposed to Haskell as a first language.

Flash programming is a lot of fun. You can make advanced animations quite easily, and combine them with programming to make graphical programs and small games really quickly. It’s also a fully featured programming language, not that different from Java.

Scripting IS programming.

Logo!

Wait, what year is it?