Best programming language for beginners?

MattS-UK:
Python though...Is Devil spawn. Making indentation and white space syntactically significant sucks the very joy from life. I am pretty sure if I had been made to learn Python at school, I would have ended up with a completely different career.

Tosh. :slight_smile:

If someone learns to use indentation with Python and then applies the same style in their Arduino programs it makes them easy to read. How many times do you see requests here for people to use the AutoFormat tool? People brought up on Python would do the indentation automatically. The only thing that Python does not require is the equivalent of the closing }

...R

Yes, definitely saddle completely raw beginners with structure and a compiler. What was I thinking?

GoForSmoke:
Yes, definitely saddle completely raw beginners with structure and a compiler. What was I thinking?

That must be why Arduino has been such a huge failure with people new to programming. Oh wait...

Taking the question literally, I would say Pascal is the best language for a beginner to learn first.

I studied Latin in school. It's great, Today I can speak it with absolutely no one. It wasn't until I was an adult before I learned another language that is actually used (Spanish) somewhere other than the classrooms where it's taught (is it even anymore?).

Chinese... tough language to learn, well, except for the billion plus who started there!

Jump in and learn a useful language based on what you may feel you want to do!

There are places like this where people will help self-starters wanting to learn. I'm sure I could even find a Latin forum if I really wanted!

Computer programmers like to stand behind the scary, fiery wall like the Great Wizard of Oz. Warding off folks, lest they discover what's behind all that fire and smoke.... just some dude pulling levers.

Excellent beginner course. Stanford Engineering Everywhere | CS106A - Programming Methodology

pert:
That must be why Arduino has been such a huge failure with people new to programming. Oh wait...

I think you are mixing your apples and oranges.

IMHO the Arduino has been successful in spite of its programming language, not because of it.

Nobody in his right mind would use C or C++ if he did not have to. :slight_smile:

...R

tjones9163:
Is that the name of the language?

Yes.
Beginners
All purpose
Symbolic
Instruction
Code

it claims it's for Beginners but does not claim it's the Best which is part of the OP ask :slight_smile:

J-M-L:
it claims it's for Beginners but does not claim it's the Best which is part of the OP ask :slight_smile:

I never said it was. I was only answering the OP's question that I quoted.

Fair enough was just trying to make a joke

pert:
That must be why Arduino has been such a huge failure with people new to programming. Oh wait...

As long as you don't say ALL the people new to programming who try it because I don't see near 100% success on the forum but then I've only been here 5 years now.

By your "how many people" metric, BASIC has been an astounding success.

By what I've been saying, 20 or 30 hours with interpreter line-number BASIC can get fundamentals down that I've seen more than a few newbies with more time miss.

Take a break, sheesh.

Robin2:
Nobody in his right mind would use C or C++ if he did not have to. :slight_smile:

Call the men with the butterfly nets for me then.

BulldogLowell:
Computer programmers like to stand behind the scary, fiery wall like the Great Wizard of Oz. Warding off folks, lest they discover what's behind all that fire and smoke.... just some dude pulling levers.

There's a priesthood with jargon and all, and boy oh boy they HATE when outsiders fix their code and beat them to contracts.

The problem with BASIC is that it has little standardization. A modern BASIC (say, Microsoft Visual Basic, or RealBasic) has most of the features that a modern programmer should like, has a compiler that produces fast code, and has a good IDE with powerful debugging features.) But those tend to lack "embedded" features. Other BASIC compilers are specifically aimed at microcontrollers, but you're likely to think that you've been handed a completely different language than those "Desktop BASICs" (you have.) Parallax Stamp PBASIC is horribly primitive and slow, for instance (but they make up for it by including "embedded programming functions" as language keywords (like "shiftout")

Pascal was indeed designed as a teaching language. But that was back in the mid-1970s, and it's been a bit neglected since the 1980s. To be useful, it needs "extensions" beyond the basic language, which are somewhat poorly standardized. I became disenchanted with Pascal when I realized how much it cheats - the language has features and syntax that a user can't duplicate (at least, not without more 'extensions.') And the extent to which it seemed to deliberately limit itself to be ONLY a "teaching language" (not that that lasted. For a long time, a lot of the Apple system and application software was written in a Pascal-like language.)

When considering a "learning language", you need to consider the teaching and learning resources available. And your "goal" - a lot of "learn XXX in 5 weeks" sort of programming instruction (including Arduino) is about learning to do some useful things as quickly as possible. That's great, but you miss out on principles. A lot of "University introductory Computer Science" classes are big on principles and theory, but essentially only prepare you to take the next class, where you'll learn more details (and eventually, how to do something more useful than a class assignment.) (and the truth is, that even after getting through a 4-year CS degree, your actual programming skill may be "meh" by industry standards, especially if you haven't forced yourself to do some major "projects" outside the scope of the usual assignments.) And University teach different languages depending on whether you're going into theory (CS) or into actual problem solving (EE, ME, Most of the sciences, etc.) (At one of the colleges my daughter looked at, they were still teaching Fortran! To Physics or ME majors, IIRC.

So... universities today seem to be teaching Java, Python, and C++ as their "intro" languages. I've take a bunch of online classes (MOOCs.) There have been some very good classes using Java and Python. The only C++ class I took was ... pretty awful. There was also the UTexas "Embedded Systems" class that used C (and taught some "embedded C constructs, but expected you to already know the basics.)

There's also the fact that "beginning" classes are NOT going to teach you everything there is to know about a language. One of the complaints about all three of those languages is that they're HUGE, with MANY FEATURES and EVEN MORE LIBRARIES. (as opposed to, say, C, which is really tiny (but still has lots of libraries.)) Some of the features seem to be obscure nods to some tiny corner of some unknown discipline, rarely used unless YOUR PROFESSOR happened to like them (or someone where you work.) The way you learn about these generally involves coming across them in published code, and going "WTF?" and then figuring them out...) Then you can either decided that they're useful, or the product of a deranged mind who shouldn't have been allowed near a compute. (There was a post recently where someone had used C++ operator overloading such that "a = b + c;" changed b and c. Shudder.)

Finally, it doesn't really matter all that much. If you learn C++, but the next class you take is "Data Structures and Algorithms using Java", you'll have a few things to catch up on, but you're not going to be completely lost. There are a lot of similarities between languages; you find pieces that you like better, pieces that you like worse, in one or another, and it may influence what you choose to use for your personal programming. But professionally, you're more likely to have that dictated by your employer, and it won't be THAT uncommon for an prospective employer to expect their language choice to be irrelevant. If you've done GPS data logging in C# for Windows Phone, the "GPS data logging for a phone" is likely to be a more important piece of the hiring decision than the "C#" part; you'd be expected to be able to do something similar in Java for Android phones without too much additional effort.

x=3.14159
print x
3.14159
i%=x
print i%
3

Sometimes it's just about playing with the blocks directly, getting to know the shapes.
Structure? There are concepts that don't even need code to demonstrate directly, instantly.

We do get people on the forum who are semi-clueless mimes when it comes to variables despite writing scores of lines of well it runs code. That's just success waiting for help to happen, right? It it wasn't waiting, it would have happened.

westfw:
Pascal was indeed designed as a teaching language. But that was back in the mid-1970s, and it's been a bit neglected since the 1980s. To be useful, it needs "extensions" beyond the basic language, which are somewhat poorly standardized. I became disenchanted with Pascal when I realized how much it cheats - the language has features and syntax that a user can't duplicate (at least, not without more 'extensions.') And the extent to which it seemed to deliberately limit itself to be ONLY a "teaching language" (not that that lasted. For a long time, a lot of the Apple system and application software was written in a Pascal-like language.)

I still have my 1985 Byte issue where Niklaus Wirth wrote that to get a program right you write it twice and throw the first one away. Then he wrote that Pascal is that first one, Modula is the one to keep. And who am I to argue? I've helped fix Pascal homework because logic is logic but I swear that language is more anal-retentive than COBOL. I never tried the next step into that.

GoForSmoke:
I never tried the next step into that.

Sheesh - I was getting all psyched up for your Modula introduction :slight_smile:

...R

Sometimes it's just about playing with the blocks directly, getting to know the shapes.

I dunno. Can you actually do loops and stuff "interactively"? Certainly not in some of the microcontroller BASICs.
BASIC was my first language, and I've even written BASIC for work (a long time ago) (ok: BASIC and x86 machine language!) I don't remember ever doing much with "interactive mode" (debugging perhaps?) - maybe the interpreters I used didn't have that feature? In any case, that's just a glorified calculator - part of programming is planning the whole thing ahead...

(I had to look at i%=x for quite a while before stopped thinking "modulus? BASIC doesn't do THAT!" :slight_smile: )

(Hopefully you don't have to do LET x=3.14159 )

(Heh. LISP and FORTH have fine interactive interpreters as well, but I'm not going to recommend them either. Python does pretty well as an interactive interpreter:

>>> x=3.14159
>>> print x
3.14159
>>> i = int(x)
>>> print i
3
for i in [x/6, x/4, x/3, x/2, x]:
...   print sin(i)
... 
0.499999616987
0.707106312094
0.866024961519
0.999999999999
2.65358979335e-06
>>>
)

westfw:
Python does pretty well as an interactive interpreter:

You can do the same sort of thing with Ruby and many of the introductions to both languages use the interactive interpreter. However I have never been able to see the point of it myself.

If I want to do calculations I have a calculator.

If I want to write a program then I want to save it in a file so I can use it over and over - or amend it if I've got it wrong.

...R

BulldogLowell:
I studied Latin in school. It's great, Today I can speak it with absolutely no one.

Apples and oranges. The first commercially useful program I wrote was in BASIC and VB is probably the language I have made most money from. I did some assembler and C/C++. Then I had to do a couple of projects in Delphi and it brought clarity, to what I had been hacking away at for years. Type, scope and OOP particularly, made so much more sense. When I went back to C++ it was so much easier to write clear, bug free code, first time around. When I switch to another language or dialect, the important lessons are carried from Pascal and just have to learn some new keyword and fit within the syntax of the constructs provided.

Robin2:
Tosh!

Sounds like the 1950s classroom where Python belongs. Where kids were punished for writing with their left hand, just because. Indentation has no computational value. It should not cause a compiler to choke. Indentation is for humans and should remain in the human domain. If it is that important, have the editor impose it automatically. While you are still trying to learn what a variable is, worrying about whitespace is a distraction nobody needs. Clearly this is a personal opinion :wink: