I agree, the whitespace issue is mad. My better half has been using Python to do some simple file/stats manipulation and she still hasn't really got her head round that 2/4/6/8 spaces makes a difference.
On top of the fact that it is indeed dog slow. What alternatives would have you suggested out of interest?
I think C and C++ are too difficult to jump into, possibly php would be easy but it can be quirky at times and have some limiting factors, however php-cli overcomes a lot of these such as permissions - but php would be nice as it lends to the web quite well which is a perfectly acceptable gui for a program these days.
Others include possily Ruby? But frameworks aren't usually the best thing to get someone into learning core programming...
Any suggestions?
My problem with this is that there's two things you need to be aware of:
- C programming is difficult, but for students learning how to program it would be my first choice. Since it's so low level you can teach the fundamental concepts of what is actually happening. Yes, they'll get annoyed at off-by-one pointer issues and pointers-to-pointers, but knowing what is going on behind the scenes is always the best way to learn something.
- RPi's main goal isn't as much to teach as it is to get kids interested in programming. In my opinion, Python is still too difficult to be any fun in this respect. Although in saying that, development for things like iOS and Android is actually quite popular with youngsters, even though Objective-C and Java are - at least in my opinion - quite difficult languages.
So for education purposes, I'd not even bother with RPi. I mean the point of having these really cut down devices used to be that you'd code them in raw ARM assembly to see what you could do.
Ruby isn't a framework though - it's a programming language as much as Python, Perl, or PHP.
In my opinion Python is a perfectly adequate introduction language, but I also think Ruby would be, if not more so. I'm slightly biased though - i really enjoy programming in Ruby, and haven't spent much time with Python.
Yep, poster was off the mark a bit here - saying Ruby is a framework because of Rails is like saying Python is a framework because of Django. My main gripe with Ruby is that if you're teaching it as a first-language is has a lot of syntactic sugar which would make it more difficult to apply the concepts you've learned to other languages. Perl is obviously worse for this.
Frankly those claiming Python is slow are missing the point. Well written Python code can be pretty speedy plus you also have the option of writing Python extensions in C or C++ which obviously perform better (assuming your algorithm is properly optimised).
You have the option of writing plugins for almost every language under the sun in an external language; this has
nothing to do with the performance of the host language. In fact, resorting to use another language as a plugin for performance reasons is akin to saying you've chosen the wrong language for the job. Admittedly, I've not really looked at Python for a number of years, and it looks like they've finally brought the performance of the language up to acceptable standards. I was once told by a Python programmer that I was doing String concatenation wrong because I was using the
built-in operator to do it, rather than the list comprehension operator. In my opinion, this was completely ridiculous. What is the point of having the built-in operator if you can do it faster another, much more obscure way? This sort of thing is where compilers rule the roost.
Ruby was my favourite example of this, the performance improvements between Ruby 1.8 and 1.9 were stupendous and achievable without changing the Ruby code at all.
Which brings me onto the main point, most slow programs are caused not by the language being inherently slow but simply because the programmer lacked the skills required to construct a suitably optimised algorithm to solve the problem.
I wouldn't disagree with this, but there are cases where you simply cannot implement something fast enough in a given language with known algorithms.
Anyway, back to the task at hand. Has anyone heard when the first batches are actually going to be delivered? Have they managed to fix the ethernet sockets yet?