andyl
Posts: 265
Joined: Tue Jan 10, 2012 11:05 am

Re: Best first language choice

Tue Jan 10, 2012 7:55 pm

Tom Cole said:


There's a lot of discussion here about learning a language for the future, what works best in (x) environment, which one's going to 'get you in good habits' etc.

But the real issue that many of you are missing is motivation. The above post gets it much closer in looking at the resources available - you need a good book/course that is inspiring/interesting. To be honest, at the moment the Code Year/Codecademy project looks pretty key - who cares if it's in Javascript? Its a START.


Sorry I had a longer reply which was munched with a server blip (returned HTTP Status 500).

Anyway I agree with you that people need motivation and to be able to get some straightforward things done quickly.  However I feel the language shouldn't prematurely shut the door when it comes to more advanced development.

When I was a lad it was the home computer revolution.  We had magazines every month which we all read cover to cover - even the program listings - even for BASIC dialects different to our own computer (in fact I started reading those before I even had a computer and it was good enough to teach me BASIC).  These days code-reading, especially of good code, is recognised by many as a good way of improving one's own programming ability.

Now it would be quite easy to come up with a community site for those learning programming, but the big question is will people closely read any listings.  Will they type them in or just cut and paste.

akc42
Posts: 20
Joined: Tue Jan 10, 2012 7:01 pm
Contact: Website

Re: Best first language choice

Tue Jan 10, 2012 8:01 pm

I've been reading this thread with interest, having been thinking about this very issue for teaching a young distant relative of mine programming.

I became fascinated by computers when I was 11 (that was in 1962) when my father started reading up about them to prove (which he eventually did) that they could be used to control coal mines.  I first taught myself my own programming langauge - but the first true language I learn was Honeywell 516 assembler - which I did at 17.  My first professional (ie paid) programming work was a year or so later in Algol 60, although I also did some Basic.  Since then I have programmed in all sorts of languages, and am still programming professionally (in semi retirement).  My most recent professional coding (just today) was using Visual Basic (in Microsoft Access) and (if you can call it coding) SQL.  But yesterday I was working through some enhancements in one of my personal web site applications using PHP and Javascript.

I give that background because I was a generation before those of you who learnt low level programming on the BBC Micro/ZX Spectrum etc.  Nevertheless for me I fully understand the attraction - I just had access to my fathers mini computer which was the same sort of power (albeit in a box the size of two washing machines with a microwave on top).

Firstly - I think it hardly matters what programming language you use first. But what ever it is it should be extremely easy to achieve something visual in a few lines of code, and to have that run almost immediately.  That means (to my mind) a scripted rather than a compiled language.  Secondly, as soon as things move on to get a bit more than trivial, teaching the use of a debugger, with the ability to step through and examine what is happening would seem to me and important component in the learning process.  Thirdly I think that you should use a language where there is a community that the pupil can ultimately engage in and share both ideas and code with others).

It is also an important point that the language itself is not as important as the libraries that come with it.

As a suggestion (since I said it doesn't really matter) but assuming we are talking on a RaspPi I would start with Javascript.  I would set up Apache to serve a prepared web page from the users home directory that loaded a javascript file also from this directory.  Start simple with preprepared document.ready function that starts empty and which the pupil can fill in with stuff.  Then start with a simple alert box and move on from there.  Pretty quickly he should be able to move on to visual manipulation of the html.

I would pre-prepare the web page to also load something like JQuery and a simple sets of <div> elements (there are plenty of examples around JQuery tutorials that can then demonstrate visual effects).  So whilst you are at it teach some html/css as well.

To debug I would either show Firefox with Firebug loaded, or Chrome which has its own debugger built in.

I think longer term I would start to add PHP - showing how to pre-manipulate what gets loaded in the browser, and also to demonstrate that are different languages out there with similar but different characteristics and different libraries that often do the same things.

andyl
Posts: 265
Joined: Tue Jan 10, 2012 11:05 am

Re: Best first language choice

Tue Jan 10, 2012 8:02 pm

l8night said:


andyl said:


l8night said:


which every language you pick, pick one with an integrated debugger and debug you programs and look at what they are actually doing, this will teach you more than you would get by just writing more code without the proper understanding.


I disagree with this quite a bit.  If you are learning a language by poking about in an interactive debugger you aren"t learning it efficiently.  I"ve seen people who write programs like that (professionally) always stepping through their code, making a change, rinse, repeat, until it runs.  They show very little real understanding of good programming IMO.


I think you misunderstand, I"m not saying you can program like that, I"m saying that its a good way to learn how a program works and how to program by looking at the effects you code is having by stepping through it and watch the locals change etc. (god forbid ever doing that as a way to program commercially)


I don't mind people poking around when they get stuck with a bug.  But generally if people learn like that I feel they will use it as a crutch.  A lot of problems beginners have is not being clear in their own minds about what they are trying to achieve, and not chopping things up into small and simple enough functions (which being small and simple are easier to write and get correct).

roelfrenkema
Posts: 105
Joined: Sat Jan 07, 2012 5:17 pm

Re: Best first language choice

Tue Jan 10, 2012 8:11 pm

akc42 said:

As a suggestion (since I said it doesn't really matter) but assuming we are talking on a RaspPi I would start with Javascript.  I would set up Apache to serve a prepared web page from the users home directory that loaded a javascript file also from this directory.  
That might be not such a good thing to do considering apaches memory requirements and all. Anyway java as well as Php run fine in a console environment and don't really need a webserver to accomplish nice things. But I think I still favour Python.

patrickhwood
Posts: 26
Joined: Wed Aug 31, 2011 2:12 am

Re: Best first language choice

Tue Jan 10, 2012 8:18 pm

Unless you plan on doing a lot of web page development, I wouldn't start with JavaScript, as it requires more infrastructure to set up just to start writing simple programs.  I'd start with something that either has an integrated IDE or an interpreted console mode so you can focus on learning how to program and not setting up Apache.

akc42
Posts: 20
Joined: Tue Jan 10, 2012 7:01 pm
Contact: Website

Re: Best first language choice

Tue Jan 10, 2012 8:28 pm

andyl said:


I don't mind people poking around when they get stuck with a bug.  But generally if people learn like that I feel they will use it as a crutch.  A lot of problems beginners have is not being clear in their own minds about what they are trying to achieve, and not chopping things up into small and simple enough functions (which being small and simple are easier to write and get correct).


I hope you don't mind me adding a comment into this conversation, but surely debugging is something you do after you have written the code.  By necessity interactive debugging is considering the issue of what is happening over a few lines of code - structuring code into sensible functions is both looking the whole from a different perspective and happens at an earlier stage. I can't quite see how you can use one as a crutch for the other.

I personally, as my earlier first post to this forum mentioned, am in favour of having a debugger available to get a detailed understanding of what is happening. I remember vividly (and it was over 40 years ago now and the debugger was the lights on the front panel of the computer) the excitement of seeing the results of an xor as the then very simple computer loaded one memory location into the accumulator register and then xor'ed in the value from another.  I see the Pi as a vehicle to get some young people to experience that very same excitement I got all that time ago.

akc42
Posts: 20
Joined: Tue Jan 10, 2012 7:01 pm
Contact: Website

Re: Best first language choice

Tue Jan 10, 2012 8:37 pm

roelfrenkema said:


akc42 said:


As a suggestion (since I said it doesn't really matter) but assuming we are talking on a RaspPi I would start with Javascript.  I would set up Apache to serve a prepared web page from the users home directory that loaded a javascript file also from this directory.


That might be not such a good thing to do considering apaches memory requirements and all. Anyway java as well as Php run fine in a console environment and don't really need a webserver to accomplish nice things. But I think I still favour Python.


You'd be surprised.  I rented a virtual machine with 256MB running Debian about I year ago – not only could I run Apache serving multiple web sites on it it also easily ran MySQL AND a Postgress Database Server and a full email server as well. They did, halfway through my rental, double the memory allocation to 512MB – but it wasn't necessary.

akc42
Posts: 20
Joined: Tue Jan 10, 2012 7:01 pm
Contact: Website

Re: Best first language choice

Tue Jan 10, 2012 8:40 pm

Pat said:


Unless you plan on doing a lot of web page development, I wouldn't start with JavaScript, as it requires more infrastructure to set up just to start writing simple programs.  I'd start with something that either has an integrated IDE or an interpreted console mode so you can focus on learning how to program and not setting up Apache.


It does need a minimal setup - I wouldn't expect the pupil to do that. (at least not initially).

pvgb
Posts: 51
Joined: Sat Oct 15, 2011 9:53 pm

Re: Best first language choice

Tue Jan 10, 2012 10:00 pm

Funny isn't it. I have been listening to and taking part in the debate of "which is the best language" and "which is the best first language" for over twenty years now, and I am possibly less sure now than I was then. ( I used to be indecisive, but now I am not so sure ... )

Perhaps this lack of agreement is part of the problem of why people aren't doing programming any more !

On reflection, most of the argument is on a technical level, in that language "A" has this particular feature whereas language "B" doesn't.

It actually goes deeper than that, because I think that people buy into a philosophy of programming - structured programming ( I still want to shout at people and tell them its *block* structured programming) , object based programming,  functional programming, declarative programming et. al.

The truth is that people prefer what works for them - and how anybody can object to that I don't know. That we have such a bewildering array ( or other composite type of your choice) of languages should be taken to mean that we are all different, and I think that most of us knew that already.

It may turn on something like learning styles - perhaps read/write learners prefer functional programming systems while visual learners prefer procedural. I haven't even thought about it much - and we don't even have consensus whether learning styles exist anyway.

I agree that motivation/reward is a big part of the process, and my observations lead me to suggest that fear of failure is also part of the problem - In order to learn to program you have to try things out, and see if they work or not. It dents the confidence if all you see is error messages !  Once your confidence is dented enough, you stop, having convinced yourself that programming is not for you. Most learners take error messages as an indication that they are doing something wrong - turn it round, and suggest that the messages are there to help you *find* the errors.

By this token, we need a language system that:

Gives results quickly ( Low overhead, probably interpreted )

Gives helpful diagnostics ( a polite euphemism for error messages )

An environment that doesn't get in the way ( Some of the IDEs around scare me !)

Remember, we are looking for a good first language to learn, not necessarily the best language ever.

12+11 ( Quickly writes small program to calculate ) = 23


pvgb
Posts: 51
Joined: Sat Oct 15, 2011 9:53 pm

Re: Best first language choice

Tue Jan 10, 2012 10:30 pm

Dazzler said:


No trying to provoke an argument (I am not well armed in programming knowledge ) but there seems very little Darwinism in coding.

A Bit of Wiki"ing:

Java 1995

Javascript 1995

PERL 1987

Python 1991

C 1972 C++ 1983 C#2001

PHP 1995

Surely some of these must die out through obsolesence, most are 20+ years old.  Is there no new languages about to replace/improve them?  Or is the key to it a "language" – i.e. it adapts and evolves.  Or is it most languages have a niche and that"s that?


Good point. You have probably missed the era when we did see some meme migration between different languages (  Fortran 77 looked a lot more like Algol than Fortran 4 )

I sometimes think that we are in an era more like the Cambrian Explosion, with all sorts of things evolving – how long will some of them last ? When will the Pliocene extinctions happen ?

In defence, many of the languages mentioned above are subject to revision and do change over time. ( And that might be part of the problem as well … )

Perhaps there is a link between the decline in the introduction of new languages and the decline in interest in programming …

pvgb
Posts: 51
Joined: Sat Oct 15, 2011 9:53 pm

Re: Best first language choice

Tue Jan 10, 2012 10:41 pm

Ollie Barbor said:


It"s happened again, no one has agreed on anything. lol

Python and Java has came up a lot so i will most likely pick them two. I have already done about 10-12 hours of work with python and have learn quite a bit.

I was thinking

Python —> C —> C++ —> C#

Would this actually work or is there to much of a jump between some of them? Also is there anything else i should build into it for example Java? PHP?

I want to mainly be able to develop Android apps and things to do with that platform.

Thanks for all the feedback! <3


Good to see that you have made the decision and have made a start. I would suggest that you stick with Python and get comfortable with it before picking up a second language. ( If you want to do Android, then Java is probably the next place to go )

I can clearly remember one sentence from the first ever programming lecture I ever attended "The only way that you will ever get good at this is by practice."

Stick with it and good luck !

BarryK
Posts: 36
Joined: Thu Dec 08, 2011 12:47 am
Contact: Website

Re: Best first language choice

Wed Jan 11, 2012 8:13 am

Regarding Python and Java ...no. Read my intro to Genie for reasons:

http://bkhome.org/genie/

In my search for a very fast and small (compiled and no run-time interpreter) and direct access to all the shared libraries (without translation layer as Python requires), a Python-like language that I discovered is Genie. It would be my second recommendation after BaCon.

I gave it a good shot but I just don't like OO. Maybe it is just my age and background, but I moved on to BaCon. Others will probably like Genie very much though, probably Vala too.

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Best first language choice

Wed Jan 11, 2012 9:53 am

I started programing in (Dartmouth) BASIC on a 110 baud teletype in 1974, learned some assembler like MIX, then went to University and learned Pascal. Out in the real world I taught myself C from the manual and real assembler by dint of hard work. One day I happened to mention in an interview that I had dabbled with Forth on the BBC Micro, and got stuck writing in it for ten years. Somewhere there I successfully taught a teenager programming using Lisp. (She'd used Logo previously.)

A year or two ago I decided I needed a new language for hobby use and selected Python.

Personally I have never managed to get Java working. It seems incredibly difficult to get a working environment built, and there are no tutorials on doing it. Maybe it is just me, maybe I have a blind spot. It is also far too similar to C++, which is an OO language designed like a camel.

There are many arguments for and against each language. An introduction to programming though, does not have the same requirements as day-to-day programming. Learning programming as a self-taught course, has different requirements again. (A teacher could create a friendly environment for the student.) So while I might use something else for a day-job, I'd say Python was probably the best choice for the OP's situation, with Pascal close behind it.

Within reason, bloat and execution speed do not matter for this purpose. It needs to be available, friendly, easy to learn, and it needs to instil good coding style. It also needs to have some utility outside learning. (We don't teach children Esperanto because it's easier to learn as a first language.)

In my view:

BASIC is easy to learn, but it does not instil good style.

Java is difficult to approach and over complicated.

Pascal instils good block-structured style, but does not have rich data types or object orientation.

Javascript does not instil good style.

C does not have rich types, and is too terse to be learned easily.

C++ is over-complicated.

The problem with Python is that it is too abstract. It needs layers of libraries that compiled languages do not. That limits its utility in two cases: access to the hardware, and access to windows. On the Raspberry Pi, the GPIO is accessible using files, so the first is no issue. There are libraries that allow windows programs to be built, but documentation is a bit scarce. In a tutored course that would not be a problem, and if the OP is willing to make do with text-based programs for a while, (something a teenager might have problems with, but an adult probably wouldn't,) then windows stuff can be added once the basics of the language have been absorbed.

The best introduction to programming I have seen for a while is available free: Python For Informatics by Charles Severance

andyl
Posts: 265
Joined: Tue Jan 10, 2012 11:05 am

Re: Best first language choice

Wed Jan 11, 2012 11:13 am

akc42 said:


andyl said:


I don't mind people poking around when they get stuck with a bug.  But generally if people learn like that I feel they will use it as a crutch.  A lot of problems beginners have is not being clear in their own minds about what they are trying to achieve, and not chopping things up into small and simple enough functions (which being small and simple are easier to write and get correct).


I hope you don't mind me adding a comment into this conversation, but surely debugging is something you do after you have written the code.  By necessity interactive debugging is considering the issue of what is happening over a few lines of code - structuring code into sensible functions is both looking the whole from a different perspective and happens at an earlier stage. I can't quite see how you can use one as a crutch for the other.


Well true - if you look at debugging as the removal of bugs.  Some people look at the debugger as normal procedure for getting a program to work properly and rely on that rather than trying to get things right in the design and writing of code.  They often write code with large, flabby, confusing functions that they don't understand.  They then trace through those functions correcting errors (by adding sticking plasters all over, or by a matter of trial and error) as they find them resulting in functions that they still don't understand, and that are difficult for others to work out and refactor.

Knowing how to use the debugger is important.  However people shouldn't rely on it.  Knowing the syntax of a language is not enough to be a good programmer, knowing the language's idioms isn't enough.  You need to know good programming practices and principles as well.

andyl
Posts: 265
Joined: Tue Jan 10, 2012 11:05 am

Re: Best first language choice

Wed Jan 11, 2012 11:30 am

rurwin said:

In my view:

BASIC is easy to learn, but it does not instil good style.

Java is difficult to approach and over complicated.

Pascal instils good block-structured style, but does not have rich data types or object orientation.

Javascript does not instil good style.

C does not have rich types, and is too terse to be learned easily.

C++ is over-complicated.



The problem with Python is that it is too abstract. It needs layers of libraries that compiled languages do not. That limits its utility in two cases: access to the hardware, and access to windows. On the Raspberry Pi, the GPIO is accessible using files, so the first is no issue. There are libraries that allow windows programs to be built


Generally that summary of the languages are reasonably accurate - although Java isn't over-complicated to my mind, just complicated.  I don't agree about your summary of Python.  Very few of the other languages have good access to hardware.  Anyway on linux most things are done through files.  As for windows (and by that I think you mean graphics) requiring libraries - that is the case for nearly everything.  Java is the only case with a standard graphics layer - but that is in a library.  Some BASICs might have graphics/windowing commands but it isn't part of the language.  As for the documentation, then unfortunately the documentation isn't as good as it should be in all cases.  The big advantage of Python for the young 'uns might be the pygame library.  It gives them a leg up into creating their own simple games.

tomo
Posts: 19
Joined: Mon Dec 12, 2011 12:50 pm

Re: Best first language choice

Wed Jan 11, 2012 12:13 pm

akc42 said:


but assuming we are talking on a RaspPi I would start with Javascript.  I would set up Apache to serve a prepared web page from the users home directory


Of course, that"s if you want to teach web programming. However, to use and program in JavaScript, one does not need a web browser, nor server, nor any other web stuff. Just a stand-alone JavaScript interpreter. But – last time I checked – the stand-alone JavaScript hasn"t offered much in terms of libraries, system integration and maturity that Python etc. offer. However, the idea of a stand-alone JavaScript isn"t new. And it"s quite appealing, if you ask me.

I guess, one advantage of JavaScript over Python might be that children would later find the "industry standard" languages kind of familiar, due to rough similarities of it"s C-ish syntax. It"s the same argument I have for promoting the Arduino "language" over BASCOM as a beginner"s language for microcontrollers (Arduino "is" basically C++ already and, as such, it"s a step from C and two steps from Java… of course, JavaScript is a step or two more). That, obviously, can"t be the key or the only reason for choosing a language. But, it"s nice.

sonickev
Posts: 8
Joined: Wed Jan 11, 2012 3:00 pm
Contact: Website

Re: Best first language choice

Wed Jan 11, 2012 3:24 pm

I have literally only just joined this forum and this will be my first post.

The first thing that interested me was - what languages are people using to program this?

I've been programming for 32 years and in that time have used many languages but have done some significant amounts of programming in (date order) BASIC, PASCAL, CORAL-66, COBOL (and SQL if that counts), ADA, C++ and JAVA (and derivatives)

To muddy the waters, I would say that any serious project on the Raspberry is going to need at least a preliminary design - even if that is on the back of a napkin. It is this design and the way it is conceived that is going to be the biggest influence on the language used.

I wrote a whole game from scratch in BASIC, with very little design as such. BASIC is good for this, for hacking and creating something in a suck it and see way.

The biggest issue today is that to create anything of any real worth, you need libraries. Games use graphics engines, Smart devices use floating point, most useful things use Input/Output and many projects on here will use protocol stacks. All of these things need to have an interface so that you can easily access the library.

Interpreted languages (typically Pascal and BASIC) will not be very good at using libraries and therefore will miss one of the biggest points of modern embedded computing. You don't need to re-invent the wheel.

For this reason alone, I would suggest that K&R 'C' is going to be the most useful start to programming this device. I am not biased in any way as far as I am aware, but my experience is that anyone that has even the most basic concept of 'what' they are trying to build can break it down into parts and program it in 'C'.

However, back to my first point, I would very much encourage object based design for anyone starting out in programming. Conceptualising the problem as a collection of objects that interact is probably the most obvious way of getting a youngster to understand how vast software projects are accomplished and how people like the XBMC project are able to work together across the world.

I could keep writing, but this is my first post and of course I risk being flamed for being too outspoken so early on.

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Best first language choice

Wed Jan 11, 2012 4:42 pm

I would be disappointed if you were flamed.

This thread is primarily aimed at suggesting a first language for the original poster, who I assume is an adult. That is subtly different than choosing a first language for a child, or choosing the best language for a particular job.

While C is probably a very useful language for programming the RPi for some tasks, this is a powerful enough computer that it is by no means clearly the best in every case. The RPi would make a very nice personal web-server, or an educational platform for web programming, for which C would be a very bad choice. It is very definitely not a good choice as a first programming language. For instance strings might be of interest to a beginning programmer, but the syntax for passing a string as the argument to a function is arcane, and is totally different from how a string variable is declared or used. Not to mention that in most dialects, an out-of-range index will not be trapped.

One feature of Python is that although it is interpreted and it does need help to use libraries, in the vast majority of cases, that work has been done and the python libraries are available.

I would also characterise the arguments over OOP as being over and won. Maybe the fight now is between richly typed languages and older languages with framework-provided rich types.

JohnoFon
Posts: 22
Joined: Tue Nov 15, 2011 4:22 pm

Re: Best first language choice

Wed Jan 11, 2012 4:45 pm

rurwin said:


I would also characterise the arguments over OOP as being over and won. Maybe the fight now is between richly typed languages and older languages with framework-provided rich types.


Can you explain that, please?

sonickev
Posts: 8
Joined: Wed Jan 11, 2012 3:00 pm
Contact: Website

Re: Best first language choice

Wed Jan 11, 2012 5:28 pm

JohnoFon said:


rurwin said:


I would also characterise the arguments over OOP as being over and won. Maybe the fight now is between richly typed languages and older languages with framework-provided rich types.


Can you explain that, please?


@rurwin

Can I also clarify that I referred to Object based design rather than Object Oriented Programming...the two are significantly different issues. An object based design is easily implemented in 'C'. Object based languages like C++ can help with implementation, but Object Oriented languages like Ada can be far too complex for a novice to learn (Polymorphism is definitely not something that I would expect someone learning to program to even consider or know about)

I generally disagree with your comments about 'C' and see learning Python as a waste of time...i.e. once you have learned to program in Python, then what? It's not relevant to a programmer, the same as ICT classes at school currently teach 'programming' in HTML.

I would never recommend python to anyone other than someone that anticipated using python for a serious project in the future.

My personal suggestion would be to restrict programming to those languages that are compiled rather than interpreted, but that is mainly because of my background and what I personally think needs to be understood by a computing student (processor, instruction set, registers, etc.)

K&R ANSI C with its long established book is an excellent language to learn with a very well known and well respected book that has taught many children and adults how to program for the first time. Once learned, the next step into Java, script, C#, visual C, etc. etc. is logical and easy.

As first stated, I am not a fan of any particular language, but from a practical and useful point of view I would disagree with your above comments and any recommendation by anyone toward Python.


andyl
Posts: 265
Joined: Tue Jan 10, 2012 11:05 am

Re: Best first language choice

Wed Jan 11, 2012 6:02 pm

sonickev said:


JohnoFon said:


rurwin said:


I would also characterise the arguments over OOP as being over and won. Maybe the fight now is between richly typed languages and older languages with framework-provided rich types.


Can you explain that, please?


@rurwin

I generally disagree with your comments about 'C' and see learning Python as a waste of time...i.e. once you have learned to program in Python, then what? It's not relevant to a programmer, the same as ICT classes at school currently teach 'programming' in HTML.
I would never recommend python to anyone other than someone that anticipated using python for a serious project in the future.


Why do you say that?  I'm a software developer and I don't see python as irrelevant.  Most of the problem is learning to program, not learning a language.  Education shouldn't all be vocational.

However python is used in many places.  Google, NASA, Youtube.  It is also embedded into other apps both open-source and commercial (even some games).  There are many open source apps too - many which I (and thousands of others) use everyday.  It is also used quite a bit on the web too.  Looking around python is also used a fair bit in the bio-informatics field.

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Best first language choice

Wed Jan 11, 2012 6:23 pm

JohnoFon said:


rurwin said:


I would also characterise the arguments over OOP as being over and won. Maybe the fight now is between richly typed languages and older languages with framework-provided rich types.


Can you explain that, please?


Certainly.

I am maintaining that Object Oriented Programming is better than block-structured (procedural) programming. There are many advantages to OOP and, to my mind at least, BSP only has one: better documentation. OOP allows a programmer to write more powerful applications with less code.

Another thing that allows a programmer to do more with less, is a richer set of basic data types, such as lists, trees, stacks, queues, sets, dictionaries, smart Unicode strings and so forth. Languages such as Python support those out of the box. Languages such as C++ and Java support them by using add-on class libraries. It is not yet clear which approach is optimal. There will always need to be class libraries for some types, since nobody can foresee all needs when designing a language. But C++ and Java have had several different and incompatible class libraries over the years, requiring the programmers to unlearn their skills and learn new ones.

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Best first language choice

Wed Jan 11, 2012 6:53 pm

I wont go over the ground covered by andyl, but this link to Python success stories might underline it. Python is not a toy language.

sonickev said:

My personal suggestion would be to restrict programming to those languages that are compiled rather than interpreted, but that is mainly because of my background and what I personally think needs to be understood by a computing student (processor, instruction set, registers, etc.)
K&R ANSI C with its long established book is an excellent language to learn with a very well known and well respected book that has taught many children and adults how to program for the first time. Once learned, the next step into Java, script, C#, visual C, etc. etc. is logical and easy.


I doubt we are going to agree, but I wholly disagree with your sentiments here. Just because a language is interpreted it does not mean that it is necessarily further from the hardware in a pedagogical sense. I learned the concept of assembler programming with a synthetic assembler language called MINI. Once I had the concepts straight I could go on to a real assembler or, in my case, real machine code on the SC/MP. I would judge that that is a far better approach than trying to mark the relationship between a specific high level language and the real assembler of a specific processor.

I feel strongly that we must make a student's first experience of programming as obvious, painless and joyful as possible. Most children will not be driven to learn; for them computing will be just another subject that is being thrust down their throat, and most of them will not make a career in IT. Understanding is far more important than a saleable skill-set. The teachers, parents and so forth who are coming here to learn are not about to make a career in IT either; they likely already have a career in some other field. They want to learn programming to help their children or as a hobby.

The children are five, ten or more years from the industry. The landscape will change in that time. Languages and paradigms will change, processors will come and go. It is useless for schools to teach the skills that are in demand now, because in the next decade an entirely new set of skills will be required. Schools need to teach a broad skill-set that can be applied to acquire new skills.

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Best first language choice

Wed Jan 11, 2012 7:18 pm

Double-post

JonB
Posts: 220
Joined: Tue Nov 29, 2011 9:26 pm

Re: Best first language choice

Wed Jan 11, 2012 7:55 pm

Hmm. Start with flowcharts and a small instruction set; a pseudo machine language like CESIL (Google it). Then after the basics of flow control are more or less mastered, switch to something more advanced, say BASIC. That's how we did it in the '80s – why should it be any different now?

Problem to my mind is that any machine with modern capabilities is going to come with distractions. Internet access. High resolution graphics. Hi def video & sound. Gazillions of libraries, IDEs, configuration of tool chains, the lot. By the time you have all that set up, you''re getting bored, or lost.

I personally don''t see much difference between RPi and A.N.Other modern computer (apart from price). People learning to program don''t need these capabilities, they need a focussed environment that gives them the basics, just like we had in the 80's.

How about a Fignition? See here: http://www.bbc.co.uk/news/tech.....y-13201254

Hmm, well it is cheap, has a very limited dev environment but it uses Forth which, due to RPN syntax is a little too arcane for the beginner, in my opinion (I do have one of these myself and I have tried it, but the chorded keyboard is too restrictive).

On the other hand… a BBC Micro. This has been tried in a class room as a sort of experiment, and it was highly successful as a learning exercise. Read about it here:

http://www.bbc.co.uk/news/tech.....y-10951040

So (and sorry about the rambling, but I think I should justify my point upfront), use BBC Basic. You can learn the advanced stuff later – walk before you try to run (otherwise you''ll come a cropper, trust me).

Return to “General programming discussion”