"Beginners" put off...


298 posts   Page 11 of 12   1 ... 8, 9, 10, 11, 12
by gritz » Thu Jan 03, 2013 2:57 pm
mikerr wrote:The fall in hobbyist programmers happened at the same time as the decline of basic .... coincidence ?

Everyone should read this long but excellent article:

"Why Johnny can't code":
http://www.salon.com/2006/09/14/basic_2/


Int'resting, but like so many articles, forum threads and blog posts on the subject it's tech centred, not people centred. More pertinent questions might include:

"Why doesn't Johnny want to code?" and:

"Is the way that dad learned to code (maybe thirty years ago) still relevant?"

Coding for the sake of coding is dull. Sorry, but there it is. But engineering (as in "building the things you want from the stuff you can lay your hands on") isn't quite so bad. It's still a bit of a stretch to convince folks that making something might be a viable alternative to just hitting "download", but if you don't bore them to tears in the first five minutes then maybe you'll have a chance.

I note that many of the people in this discussion are of a similar vintage to me. Much has changed in my lifetime - computers are now so ubiquitous (and frankly mundane) that it's easy for younger people to forget that someone has to actually has to create and maintain the applications that they use every day. It's simply not science fiction any more, so don't be surprised if kids aren't enthralled in the same way that we were. Perhaps it's our generation's fault for making it quite so crashingly dull in the first place. ;)

Still, I have a terrible feeling that this thread will veer back to "Basic versus Python versus whatever" and continue to miss the wider point completely. :roll:
Posts: 449
Joined: Sat Jan 28, 2012 2:33 am
by Nipper » Thu Jan 03, 2013 4:53 pm
You can still program Windows by using the Command Prompt which is more than you can with the Pi with no index posted of the commands used on the command line. There is an index online of the commands for Bash in Linux but not all of them work on the Pi. :cry:
User avatar
Posts: 39
Joined: Tue Dec 25, 2012 4:55 pm
by Nipper » Thu Jan 03, 2013 5:38 pm
An A-Z Index of the Bash command line for Linux.
http://ss64.com/bash/
Last edited by ShiftPlusOne on Thu Jan 03, 2013 5:48 pm, edited 1 time in total.
Reason: No point taking up the whole page with something you can just link to.
User avatar
Posts: 39
Joined: Tue Dec 25, 2012 4:55 pm
by MrBunsy » Thu Jan 03, 2013 5:42 pm
What exactly of them doesn't work on the pi?
User avatar
Posts: 179
Joined: Mon Feb 20, 2012 1:48 pm
Location: Southampton, UK
by richardp » Thu Jan 03, 2013 5:44 pm
For bash programming... rather look

http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
RaspberryPi's galore
Solid run CuBox
ODroid U2
Posts: 117
Joined: Thu Jan 12, 2012 11:46 am
by pygmy_giant » Thu Jan 03, 2013 7:44 pm
Tried BASH - confused the hell out of me. I found it too picky about spaces and not at all fun.

Johnny doesn't want to code because he's too busy fragging seven bells out of his mate on an xbox 360. His mate however has already decided that he wants to become a games writer when he grows up and therefore wants to code.

Fast forward 10 years and Johnny's mate did not fulfill his dream but instead works in the City of London designing high frequency trading solutions, has a slight drink porblem and is on his second marriage.

How can we stop this from happening?

What language are games written in - is it more similar to Python or BASIC or nothing like either of them? I've heard its still C++ - is that true? Isn't that also the language that banks use? I guess thats more like Python than BASIC because of its OOPyness. OOPyness and cross platform compatibility are the main advantages I can think of Python over BASIC.

I guess OOpy Python is overtaking C++ because of its ease of use. Are there Python compilers and are they still trumped by C++ in general purpose performance critical applications? My very illinformed and prejudiced opinion is that C++ is still the daddy.

I guess in addition to not being put off beginners need to be enticed by feeling that they are learning something that can lead to useful paid employment, rather than just being an intellectual exercise, and in the big wide world thats more like BASIC than Python.

Practically speaking however, if you are going to go interprted and use the Pi as a machine in its own right rather than as an educational platform, I suspect that BASIC on RISC OS would be faster than Python on Raspbian for comparable tasks.

RE: "Is the way that dad learned to code (maybe thirty years ago) still relevant?" - yes if he's helping you with his homework or supporting you in programming the pi outside of school.
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am
by Sleep Mode zZ » Thu Jan 03, 2013 8:23 pm
pygmy_giant wrote:What language are games written in - is it more similar to Python or BASIC or nothing like either of them? I've heard its still C++ - is that true? Isn't that also the language that banks use? I guess thats more like Python than BASIC because of its OOPyness. OOPyness and cross platform compatibility are the main advantages I can think of Python over BASIC.

I guess OOpy Python is overtaking C++ because of its ease of use. Are there Python compilers and are they still trumped by C++ in general purpose performance critical applications? My very illinformed and prejudiced opinion is that C++ is still the daddy.

I guess in addition to not being put off beginners need to be enticed by feeling that they are learning something that can lead to useful paid employment, rather than just being an intellectual exercise, and in the big wide world thats more like BASIC than Python.


From http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html long time trends of the most popular programming languages:
Image
Objective-C have overtaken C++ :shock: Java's popularity is declining. C is the real daddy :D
Posts: 200
Joined: Sun Aug 19, 2012 5:56 am
Location: Finland
by Mortimer » Thu Jan 03, 2013 8:26 pm
WOW! Look at the trajectory of Objective-C! Is this the legendary Apple halo effect?
User avatar
Posts: 718
Joined: Sun Jun 10, 2012 3:57 pm
by ShiftPlusOne » Thu Jan 03, 2013 8:27 pm
I am slightly colour blind so that chart is just a nightmare D=

Interesting though. Not quite what I expected.
Forum Moderator
Forum Moderator
Posts: 1964
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy
by gritz » Thu Jan 03, 2013 8:53 pm
ShiftPlusOne wrote:I am slightly colour blind so that chart is just a nightmare D=


I'm not colourblind, but it looks like an explosion in a paint factory to me too! Too much information at too high a samplerate for one wee graph! Interesting though, so long as the "Beginners put off" thread doesn't become a "who can wee the furthest" competition, 'cos that's guaranteed to put beginners off...
Posts: 449
Joined: Sat Jan 28, 2012 2:33 am
by rurwin » Thu Jan 03, 2013 9:02 pm
1. If RaspPi BASH does not agree with the man page, that's a bug. There is only one BASH.

2. If you think BASH is picky over spaces and stuff...
There was once a probe that missed Venus, so the story goes. It was programmed in FORTRAN, which was a very early compiled language with some decidedly dodgy syntax. Among it's quirks is that variables don't have to be declared and their names can include spaces. The "for" loop looks like this:
Code: Select all
        DO I, 10 = 1,100

The first coma is optional. What happened to the multi-million ruble probe is that someone typed
Code: Select all
        DO I 10 = 1.100

which is a legal variable assignment, and not a "for" loop.

On the other hand, try writing a commercial program with spelling mistakes and missing spaces (or, God help you, a Grocers' Apostrophe) in the user interface.

Learning to be picky over spaces and stuff is a good thing.

3. I don't do C++ because it is too inefficient and non-deterministic. If you need to be efficient, in games or elsewhere, you write in C. On the other hand, if you want your game out on sale before the Christmas rush, you use a language like Python, which can be finished while the C (or C++ or Java or BASIC) programmer is still debugging their data structures. Pragmatically you use both: Python for the stuff that doesn't have to be fast, and C for the stuff that does.

On the other hand, high frequency trading solutions are probably written in C++.

4. You don't get to chose what language you use until you've been in the industry for the best part of a decade, if then. Languages that are popular today are not going to be popular in ten or fifteen years but ancient, strange languages and operating systems will always be prevalent. It doesn't matter what language kids learn. It does matter what that experience teaches them. When they walk into their first job to be confronted with MUMPS running under OS/X, Coral-60 running under VMS or PL/1 running under z/OS, are they going to be prepared? (In the case of a games programmer, their first task will probably be to learn the in-house, bespoke programming language that is used to script the games.)

---
GOD is real (unless declared integer) -- Old FORTRAN joke.
User avatar
Forum Moderator
Forum Moderator
Posts: 2933
Joined: Mon Jan 09, 2012 3:16 pm
by W. H. Heydt » Thu Jan 03, 2013 9:18 pm
rurwin wrote:1. If RaspPi BASH does not agree with the man page, that's a bug. There is only one BASH.

2. If you think BASH is picky over spaces and stuff...
There was once a probe that missed Venus, so the story goes. It was programmed in FORTRAN, which was a very early compiled language with some decidedly dodgy syntax. Among it's quirks is that variables don't have to be declared and their names can include spaces.


yes... In FORTRAN II, variable names starting with 'I' to 'N' were INtegers. All others were floating point.

GOD is real (unless declared integer) -- Old FORTRAN joke.


See above for why.

Did I mention that the first two languages I learned were FORTRAN IID and SPS IID, both on an IBM 1620 in 1964? Anyone else here remember things like record marks and FANDK directives?
Posts: 1685
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)
by Sleep Mode zZ » Thu Jan 03, 2013 9:25 pm
joan wrote:I don't know the history of Python but it wouldn't surprise me if it is also committee designed. BASIC is (to my mind) more intuitive and if you have a code example easier to extend.

Python, like Linux, is developed by a benevolent dictatorship. One boss at the top makes the final decisions of what goes in and what stays out.

So, there is a open communal argumentative process - take a look at the PEPs - Python Enhancement Proposals.

And then there is the Dictator of Python:
Image
Posts: 200
Joined: Sun Aug 19, 2012 5:56 am
Location: Finland
by jamesh » Thu Jan 03, 2013 9:36 pm
Nipper wrote:You can still program Windows by using the Command Prompt which is more than you can with the Pi with no index posted of the commands used on the command line. There is an index online of the commands for Bash in Linux but not all of them work on the Pi. :cry:


As someone said, BASH is BASH (and it's much more 'sophisticated' than the Windows command line). BASH on the Pi should be the same as BASH anywhere. We don't make any changes to it for the Raspi.

I personally think BASH is a complete nightmare syntactically, but hey ho!
Volunteer at the Raspberry Pi Foundation, helper at Picademy September and October 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11967
Joined: Sat Jul 30, 2011 7:41 pm
by plugwash » Thu Jan 03, 2013 10:09 pm
I suspect that the "online list of bash commands" is actually an online list of linux commands some of which may be built into bash but most of which are seperate programs which may vary between linux systems.

Also make sure that if you explicitly want bash you use #!/bin/bash . #!/bin/sh is likely to give you a different shell (dash on modern debian based systems) which has different behaviours.

IMO though while shell script has it's uses it's not a good starting point for teaching programming mainly because it's so easy to screw up handling of strings containing spaces.
Forum Moderator
Forum Moderator
Posts: 2359
Joined: Wed Dec 28, 2011 11:45 pm
by pygmy_giant » Thu Jan 03, 2013 11:13 pm
When I said:

I guess in addition to not being put off beginners need to be enticed by feeling that they are learning something that can lead to useful paid employment, rather than just being an intellectual exercise, and in the big wide world thats more like BASIC than Python.


I got the words Python and BASIC mixed up.

That graph hurts my eyes :shock: It's nice to see that C is still the Daddy (and always will be?). I learned C++ once and then forgot it all and now just use C. OOPyness would be handy though. Should I learn Objective C? Wikipedia says:

Originally developed in the early 1980s, it was selected as the main language used by NeXT for its NeXTSTEP operating system, from which OS X and iOS are derived.[1] Generic Objective-C programs that do not use the Cocoa or Cocoa Touch libraries can also be compiled for any system supported by GCC or Clang.


Is that true - can GCC compile Objective C?

It's reassuring to hear that the world of commercial programming is as idosyncratic as the rest of the world in general. I gues any kids doing any programming in any language is good.

Sorry to keep going off topic - as you were.
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am
by plugwash » Thu Jan 03, 2013 11:43 pm
pygmy_giant wrote:Should I learn Objective C?

do you plan to program iphones/ipod touches/ipads?

if so then you will be pretty much forced to learn objective C
if not then I wouldn't bother.
Forum Moderator
Forum Moderator
Posts: 2359
Joined: Wed Dec 28, 2011 11:45 pm
by gritz » Thu Jan 03, 2013 11:49 pm
pygmy_giant wrote:When I said:

I guess in addition to not being put off beginners need to be enticed by feeling that they are learning something that can lead to useful paid employment, rather than just being an intellectual exercise, and in the big wide world thats more like BASIC than Python.


I got the words Python and BASIC mixed up.

That graph hurts my eyes :shock: It's nice to see that C is still the Daddy (and always will be?). I learned C++ once and then forgot it all and now just use C. OOPyness would be handy though. Should I learn Objective C? Wikipedia says:

Originally developed in the early 1980s, it was selected as the main language used by NeXT for its NeXTSTEP operating system, from which OS X and iOS are derived.[1] Generic Objective-C programs that do not use the Cocoa or Cocoa Touch libraries can also be compiled for any system supported by GCC or Clang.


Is that true - can GCC compile Objective C?

It's reassuring to hear that the world of commercial programming is as idosyncratic as the rest of the world in general. I gues any kids doing any programming in any language is good.

Sorry to keep going off topic - as you were.


(Emboldening mine)

TBH I think you're doing a pretty good job of trying to keep this thread on topic. :)
Posts: 449
Joined: Sat Jan 28, 2012 2:33 am
by rurwin » Fri Jan 04, 2013 12:09 am
pygmy_giant wrote:Should I learn Objective C?

Only if you want to write iPhone apps I think. I don't know if Dalvik (ie Android) is included in the Java figures, I suspect it is. And although Java overall is falling, I suspect it will be buoyed up in the longer term by Android developers so that Java and Objective-C meet in the middle. On the other hand if you want to add an object-oriented C to your toolkit, it's looking better than C++.

Python may be falling, but very slowly, and it's looking better than PHP and Ruby. But as I said earlier, the choice of which language to teach kids should not be about the job market, but about the opportunities they provide to teach computer science.

Scratch is at number 29. I don't see that as a problem either, in fact it is astonishingly good. LabView for instance is a lot lower down and would be good to have on a CV.
User avatar
Forum Moderator
Forum Moderator
Posts: 2933
Joined: Mon Jan 09, 2012 3:16 pm
by pygmy_giant » Fri Jan 04, 2013 12:17 am
I like PHP because its like C++ and has loads of handy GREPy RegEx things built in - you can have loads of fun with that! RISC OS comes with PHP ready installed and raring to go...
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am
by dr_d_gee » Fri Jan 04, 2013 2:30 pm
The vast majority of games away from the Apple platform are developed in C++ (at least those developed by organisations rather than individuals). Python is sometimes used to script games, but it has the reputation of being relatively slow for a scripting language; Lua is probably the most popular scripting language for games at the present time though there are quite a few others.
Posts: 79
Joined: Fri Jan 04, 2013 1:30 pm
by pluggy » Fri Jan 04, 2013 3:43 pm
I love BASH, and as Jamesh says, it is way more flexible than the DOS command line. Yep, its picky about spaces, but you soon get used to its foibles. I just love the way you can try bits of your code directly at the command line.
Don't judge Linux by the Pi.......
User avatar
Posts: 2639
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
by williamhbell » Fri Jan 04, 2013 10:37 pm
Hi,

BASH is great as a "gaffa tape" language, handling external commands and text files. For example, to zip every .ps file in the present working directory:

for file in $(ls *.ps); do zip $file; done

Or to convert eps files to png files:

for file in $(ls *.eps); do convert $file ${file/.eps/.png}; done

There are many more useful tricks than this though. In case the currently available BASH documentation is not enough, a BASH programming series will appear shortly in the MagPi.

Regards,

Will
User avatar
Posts: 260
Joined: Mon Dec 26, 2011 5:13 pm
by mikerr » Sat Jan 05, 2013 10:40 am
Mortimer wrote:WOW! Look at the trajectory of Objective-C! Is this the legendary Apple halo effect?
Objective C is horrible, and only really used because you *have to* if you're doing any iPhone/iOS programming.

Interesting that the top 5 are all C variants (I might be shot for that)
Got a Pi Camera? View it in my android app - Raspicam Remote ! No software required on the pi
User avatar
Posts: 1263
Joined: Thu Jan 12, 2012 12:46 pm
Location: NorthWest, UK
by pygmy_giant » Sat Jan 05, 2013 12:18 pm
dr_d_gee said

Python is sometimes used to script games, but it has the reputation of being relatively slow for a scripting language; Lua is probably the most popular scripting language for games at the present time though there are quite a few others.


there is a Lua available for RISC OS: http://www.wra1th.plus.com/lua/ but I have not tried it on the Pi.

The website says:

What has been unique about the evolution of Lua has been its founders' determination to keep it simple. That has made it an appropriate language for beginners. It is also one of the most popular languages in the commercial games programming community; experience with Lua has become a marketable skill. In August 2007 Lua rose for the first time into the ranks of the top 20 most popular programming languages; in June 2011 it entered the top 10.
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am