0
$\begingroup$

This question already has an answer here:

I have some students that are from medical background and have no concept of programming. So, which language I should teach to them to make their basic concept of programming perfect?

$\endgroup$

marked as duplicate by Kevin Workman, heather, ItamarG3, thesecretmaster Jul 6 at 8:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ First teach problem solving, then programming, then a language: So have them write programs for them to run on each other. Clear instructions to do something like make a jam sandwich, or to draw a picture. Then teach them snap, the a more useful language (the first one is about learning, but they can transfer what they learn). $\endgroup$ – ctrl-alt-delor May 11 at 11:36
4
$\begingroup$

Actually, this depends much more on the teaching methodology you use rather than the language. The best answer might just be the language that you, yourself, are most productive in. But if you aren't a programmer yourself, it may be very difficult for you to teach them.

But, if I had to name a language that is (a) fairly modern and (b) fairly forgiving of beginners and (c) widely used and (d) a useful tool for people with other interests, then it would probably be Python. If you give up one or more of my criteria there are many other choices.

But the teacher needs to be proficient in the language and its use. Programming is a way of thinking, not just knowledge of the features of a language. I worry that, just because you are asking this question, that you may not have the required background to do a good job of this.

However, all is not lost. I asked a question of my own here a while ago that might provide some guidance to you if you are, indeed, a novice programmer yourself. See the question and at least my answer to How do you teach something when you don't know it yourself. The short version is you admit your lack of knowledge and learn it along with the students. But first you need to find good tools and resources.


If you use Python, make sure you use V3 and not the earlier and incompatible V2. It isn't any harder to start with the current version.

$\endgroup$
  • 1
    $\begingroup$ If you have poor knowledge of the language (excepting particularly weird languages like prolog and awk) this is not a problem for teaching, learning and lesson construction just so long as you have some CS proficiency including programming in another language. The difficulty will be when you come to mark the work and more particularly in lab practicals where you will need to quickly spot errors in student code. $\endgroup$ – Jon Guiton May 9 at 20:19
2
$\begingroup$

I have used pascal, python, VB and C. Each have their own advantages/disadvantages.

pascal - was designed as a language for learning programming but it is quite old and uses an LL(1) type syntax (left associative grammar) that is rarely used today i.e. one writes X : integer; rather than int X; Generally pascal has a 'clunky' feel when compared with modern languages.

python - seems to be the popular choice but there is a major problem in that you will have to use some kind of IDE. tab and space space space space space look very much the same when a student's program won't compile. The problem with the IDE is that the learner can get confused between language features and IDE features. Python is also a functional programming language so better suited to learners who have done functions in maths. Beginners will find procedural languages easier.

VB - I would not recommend VB as it is integrated into an IDE in which IDE
features and language features overlap. The programming paradigm of event driven programming is also bad for learners. However it is easy to get quick results which motivate some learners.

C - My learners found C the hardest language but the C classes produced the best programmers in the end. Some learners however found it difficult to make progress at all.

Maybe there is an argument for a project to develop a new language which is LR like C. possibly a subset of C or a version of C with additional string support and a simplified expression syntax! Perhaps D fits that bill somewhat.

I would advise that the choice of environment and compiler is also really important. You will want to concentrate on language not compilation issues.

Also forget to mention LOGO turtle graphics. This is a surprisingly sophisticated programming language that allows an accessible introduction to the basic concepts of sequence, iteration, condition and function call. I often used this for the first couple of lessons with total beginners to get the concepts behind programming embedded before moving on to a more 'serious' language.

$\endgroup$
  • 1
    $\begingroup$ Sorry, but you have a profound misunderstanding about grammars and especially LL(1). The "int x" convention is no harder to parse with LL(1) than the pascal convention. But if your grammar is not LL(1) it is, in principle, harder for humans to parse than if it is. Most compilers use LR techniques (at least) but that is due to efficiency, not the nature of the language. An LR parser needs to evaluate more of a statement to make a prediction about the meaning than is necessary with an LL(1) language. Don't confuse the structure of the language with the type of compiler typically used. $\endgroup$ – Buffy May 9 at 20:26
  • 1
    $\begingroup$ But yes, Pascal is old and has a few flaws. Being LL(1) (mostly) isn't one of them. In fact, a language that has "dangling else" issues isn't LL(1) which is why it requires special rules to match else clauses. It is also why nested if statements often confuse students. It is also why I require students to always fully brace every such "if" and "else" clause. Modula 2 is LL(1) but avoids this issue by requiring "end" for such clauses. But, again. LR is an advantage for compiling efficiency, but NOT - definitely NOT - for understanding. $\endgroup$ – Buffy May 9 at 20:30
  • $\begingroup$ The left or right factoring affects the feel of the language syntax and most programmers today will be using languages with right factored grammars because the compilers they use will have been constructed using automatic tools which rely on the LR parsing algorithm. I am pointing to this fact to explain why pascal has a "clunky" feel for learners used to right factored grammars having been invented before the LR algorithm was known. $\endgroup$ – Jon Guiton May 9 at 21:05
  • 2
    $\begingroup$ Actually, I taught compilers for 20 years. I also taught language principles for the same amount of time. There are automated tools for LL parsers also. The "single lookahead" is actually a massive advantage for a human reading a program. It is less important for an automated tool. If you can read a program one token at a time (rather than needing to backtrack) you have a big mental advantage. Again. languages should be LL(1), preferably. Compilers should be efficient. $\endgroup$ – Buffy May 9 at 21:05
  • $\begingroup$ Actually, the historical if not typical type of compiler for Pascal is hand made recursive descent parsing. $\endgroup$ – Michel Billaud May 25 at 10:56
1
$\begingroup$

Once upon a time, a lot of medical professionals picked up Mumps and Basic all by themselves.

Simple interactive command line Basic, not even requiring a programming editor or IDE to complicate things.

$\endgroup$
0
$\begingroup$

The best programming language for me is Java because it is now used in most of the programming tools. I am also a Bachelor student and learning Java, and you are talking about the new one so according to this you can start from any programming language.

$\endgroup$
0
$\begingroup$

I think to learn programming language for beginner then you have to tell him/her Java because it is used in Android Studio and in other tools. And most important it depends on you how you teach him/her. Because he/she know nothing about programming so can start their programming from any programming language but my prefer is Java.

$\endgroup$
0
$\begingroup$

My opinion on that is Java. At the end I will explain why.

As already mentioned above: Python can be confusing due to the tab/spaces. Besides that, you aren't always aware of which data type you are using.

C/C++ can be a pain, due to memory management/pointers. This can lead to frustration very quickly.

Advantages of Java:

  • You are always aware which data type you are using because it is necessary to declare variables with data types.
  • You don't have to take care of memory management due to Garbage Collection.
  • Java is one of the most used programming languages, i.e. you have a huge community to ask if problems occur.
  • It runs on every platform.
$\endgroup$
  • $\begingroup$ The Python tab/space problem is not really an issue. Use a good text editor, and this will be managed for you. If you use vim, putting set et and set tabstop=4 willrationalize everything $\endgroup$ – ncmathsadist May 23 at 15:21
  • 1
    $\begingroup$ Python makes you confront the tab/space think now. For Java it may be a while before you realise that you can't read your own code. $\endgroup$ – ctrl-alt-delor May 25 at 9:56
  • $\begingroup$ Anyway, properly indented code is always required from students (at least I hope so) even in free from languages, so indenting is a part of the job in all cases. Python mandatory indentation avoids redundancy/inconsistence. $\endgroup$ – Michel Billaud Jun 27 at 12:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.