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?
Through what basic programming language can beginners easily get the concept of programming? [duplicate]
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.
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$ May 9, 2019 at 20:19
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.
2$\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$ May 9, 2019 at 20:26
2$\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$ May 9, 2019 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$ May 9, 2019 at 21:05
3$\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$ May 9, 2019 at 21:05
1$\begingroup$ Actually, the historical if not typical type of compiler for Pascal is hand made recursive descent parsing. $\endgroup$ May 25, 2019 at 10:56
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.
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.
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.
snap, the a more useful language (the first one is about learning, but they can transfer what they learn). $\endgroup$