View Full Version : How are students learning programming in a post-Basic world?
ErosOlmi
27-06-2011, 23:14
Interesting article:
http://www.computerworld.com/s/article/9217820/How_are_students_learning_programming_in_a_post_Basic_world_
danbaron
28-06-2011, 06:24
I'm not sure whether or not the article had a point, or was just a space filler.
To me, learning usually requires work. If someone is motivated enough to learn something, then, usually he can find a way to do it.
On the other hand, if a person demands that all learning be entertaining and require no work, then, who can help him?
Some first graders can probably begin using Haskell. Some eighth graders will have difficulty with Basic.
That's why students are separated according to their abilities.
If you require that there be one language that every child is capable of using, then, that language will be very simple.
So, in a way it doesn't make sense to assume that there should be just one standard language which is taught to all school children.
No one I know of demands that there be one math curriculum taught to all school children. The curricula diverge almost immediately according to talent and motivation.
Why should the situation be different with respect to computer programming?
On the other hand, I do see the current fascination with Python, as mostly a fad - a manifestation of the herd mentality.
Previously the fad was for Java, and before that for C++.
Who can show that Python is objectively better than Java, or that Java is objectively better than C++.
To me, if a language is Turing Complete (link), then asking which language is better, is like asking which color is better.
http://en.wikipedia.org/wiki/Turing_completeness
On the internet, you learn that people will argue about anything and everything, and it seems especially about programming languages. Apparently, to me, some people would marry their particular favorite programming language if they could. Other languages they avoid like HIV. And then there are also the people who realize that, there is a difference between virtual reality and real life.
:evil: :twisted:
(I do see the fact that computers no longer include any programming environment at all (I think they should include a complete environment for some relatively easy language, including all of the documentation.), as an obstacle to children who want to learn computer programming by themselves. And, this obstacle will loom largest (like almost all of life's obstacles), for poor children. Of course, if all children had equal access to education, then, the upper class could not maintain its advantage over the masses of peasants, serfs, slaves - and who would ever want that?!)
Charles Pegge
28-06-2011, 14:10
I think Basic could easily make a comeback. There is no rigid specification. It is more of a style of programming.
One of its most important characteristics is that it can be used by beginners - even eleven year olds who have mastered the computer keyboard should be able to get something interesting out of it, or at least make it go quack!
Thinking of the early home computers, it needs built-in sound, speech output and graphics as well as printed output. Maybe a few games already written, with some variables at the top of the program which can be safely altered to change the behaviour of the program.
On the maths side, instant graphs and charts, and statistical functions. For physics: simulations of gravity and other forces.
But the most important thing is to be able to create very simple programs that do something for the student, with a minimum of knowledge.
Charles
John Spikowski
28-06-2011, 20:03
I think Basic could easily make a comeback.
I'm confident that if OxygenBasic continues its current path, that reality is already unfolding.
Charles Pegge
28-06-2011, 22:24
We can go quite a long way eliminating "dims" and the need to specify variable types but it is quite hard to make a safe compiler. Performance is closely related to lack of safety :), and compilers get extremely tetchy even when minor errors are made. So for those starting out in programming, it may well be that an interpretive Basic is the best way to go.
But we need to make library functions highly accessible, so that the user can key in for example, "bar chart" and the function appears on the page with a full set of default parameters ready to go.
Even for experienced programmers searching around for the right functions or classes, is one of the biggest and most tedious of chores.
Perhaps in the future, there will be less emphasis on specific languages and more on the database/accessibility side. Am I reinventing .net here?
Charles
danbaron
29-06-2011, 05:41
I do think that Basic is the most straightforward and intuitive language that I know of.
(But, I cannot determine how much my opinion was influenced by the fact that Basic was the first language I was exposed to.)
If I am correct, it is an imperative language, --> Do A. Then do B. Then do C, etc.
It functions exactly like a person making a list of things he wants to do the next day. He writes down all of the items, and he orders them to indicate their sequence.
Additionally, Basic's command structure is simple.
I think that in most cases, people beginning in programming do not need or want additional layers of abstraction between them and the task they want to accomplish.
Who wants to have to have to instantiate all kinds of classes in order to print "hello" in a console window?
I can remember becoming very frustrated by various languages and environments, when I continually failed in being able to perform the simplest of tasks.
I think people beginning in a new area, especially one in which they are doubtful if they can succeed, need early success. Often they will not continue to fail again and again, instead, they will quit.
--------------------------------------------------------
Here is an example of what was for me, frustration.
I was playing with Haskell.
I wanted to time a process.
There is a function, getCPUTime.
I had to divide its value to convert the time into seconds.
But, I couldn't do it.
When I tried to do the division, Haskell told me I was using incompatible types, the type of getCPUTime was, "IO Integer", and the type of my divisor was, Integer.
I found a way to do it (link), but so far, I don't understand it.
http://www.haskell.org/haskellwiki/Timing_computations
Fortunately for me, I don't need to use Haskell. If I was in school and I had to use it for some class assignment, I would want to murder it.
What easier way is there to make someone quit, when he is just starting?
:evil: :twisted:
Charles Pegge
29-06-2011, 08:10
My notion of simplicity is to eliminate as much excess syntax as possible and provide all the necessary type conversions automatically. This is not easy to do internally. The compiler has to be a lot smarter than say a C compiler. Making many more inferences about the intentions of the code.
In contrast to Lisp, (which is extremely simple to parse), I find that it is possible to eliminate about 90% of brackets in a program. They are only needed to resolve ambiguities or make an expression easier to read in some cases.
'A complete program:
print "Hello!"
'Adding numbers together
print 1 2 3 4 5 1.25 2.25 1.5e6
'a multiline program with variables
tot= 1 2 3 4 5 1.25 2.25 1.5e6
avg= tot/8
print "total " tot " average " avg
'what type of variable was it using?
print typeof tot 'double precision
Charles
Charles Pegge
29-06-2011, 09:47
Dan,
You said that Basic as an imperative language, carries out its instructions like a shopping list.
I've been working on multi-threading recently, which becomes important at the higher end of programming, where several tasks have to be carried out at the same time. For instance audio, video, and internet communications cannot be rigidly synchronised so must be run in parallel to avoid bottlenecks.
Due to some of the technical language used, this is quite hard to grasp. But I propose something really simple for Basic:
together procedure1,procedure2, procedure3 ...
these procedure calls are automatically placed in separate threads. And the program does not proceed beyond this statement until all the procedures have completed.
In multi-threading, the operating system itself decides when and where each thread is processed, according to how many cores are available and how the priorities are ranked. This is generally not a prime concern for the coder.
Charles
zlatkoAB
29-06-2011, 11:25
I was wondering who is behind this that constantly push basic into
second place and this same people push python everywhere.
From my point of view python is piece of junk.
John Spikowski
29-06-2011, 17:55
It doesn't matter if the language is worthy or not as long as there is enough sustainable hype for it to take hold. Ruby is another WTF language programmers migrated to. Looking for the holy grail of languages seems to be an ongoing pastime.
MikeStefanik
29-06-2011, 20:49
I've been working on multi-threading recently, which becomes important at the higher end of programming, where several tasks have to be carried out at the same time. For instance audio, video, and internet communications cannot be rigidly synchronised so must be run in parallel to avoid bottlenecks.
Due to some of the technical language used, this is quite hard to grasp. But I propose something really simple for Basic:
together procedure1,procedure2, procedure3 ...
these procedure calls are automatically placed in separate threads. And the program does not proceed beyond this statement until all the procedures have completed.
In multi-threading, the operating system itself decides when and where each thread is processed, according to how many cores are available and how the priorities are ranked. This is generally not a prime concern for the coder.
Yes, the operating system is responsible for scheduling thread execution. However, remember that each of those threads shares the global data and object references in the process, and without some synchronization mechanism (mutexes, critical sections, interlocks, etc.) then you're going to end up with a program that has a bunch problems that can be very difficult to reproduce consistently. The only way I can see this working is if you have some keyword that tells the compiler or interpreter than any access to the variable must be automagically synchronized across threads (or have it infer this based on what variables those thread entry points reference). While I suppose that's workable, a "one size fits all" kind of solution like this can really impact performance in a negative way.
Bottom line, to design an efficient multi-threaded application, I think the developer really does need to be aware of how it all works and how it impacts the fundamental design of their software. Making it simpler to create and manage threads can be a good thing, but I suspect that black-boxing it to the extent that you're talking about would likely create more problems than it solves.
danbaron
29-06-2011, 21:47
Perl was created by Larry Wall. Python was created by Guido Van Rossum. Ruby was created by Yukihiro Matsumoto.
I think that from the beginning, each one was open source.
The creators wanted other people to help the languages grow.
And, independent minded programmers were willing and able to make them grow.
What is more powerful than an open source language being constantly developed over years, by many smart and devoted people?
Over time, more and more of the bugs naturally disappear, and more and more features are added.
Books begin being written, and more and more people become aware of the language.
The language becomes like a snowball rolling downhill, it begins to generate it own momentum.
At some point, there is seemingly nothing that the language can't do. Then, can come the time when it begins to die, from bloat. Maybe that is why C has survived for so long - no bloat. (Languages also die just because they are no longer novel. Just like with cars, average people always want the latest model, regardless if it is better.)
It seems to me that, at least for now, the era in which people will flock to proprietary languages, especially those from large corporations, is gone.
A long time ago, Microsoft executives used to constantly crow about how they produced, "insanely great software".
Independent minded computer science students had a different opinion of Microsoft products (Microsoft Word was/is great? Does anyone believe that?), and did something about it. I haven't heard Microsoft gloating in quite some time.
There is no reason that Basic cannot undergo a resurgent success. There is nothing fundamentally different between it and Perl, Python, and Ruby.
I also do agree, that when a language becomes so popular that the mainstream media begins to promote its "wonders", then, it may begin to dominate the market for institutional use, like Python seems to be doing now at universities and in corporations. But, I think that phenomenon is almost solely due to the fact that the people who decide what language to adopt, are almost always ignorant bureaucrats - they choose what others have chosen, that is almost always the safest choice - another example of, "hiding in the herd". The wolf attacks the sheep who strays, yes or no?
John Spikowski
29-06-2011, 22:51
Bottom line, to design an efficient multi-threaded application, I think the developer really does need to be aware of how it all works and how it impacts the fundamental design of their software. Making it simpler to create and manage threads can be a good thing, but I suspect that black-boxing it to the extent that you're talking about would likely create more problems than it solves.
If you want to see a good example this working well, check out the ScriptBasic sbhttpd webserver. It's multi-threaded, shared variables (http://www.scriptbasic.org/docs/mt/mod_mt_toc.html) among threads, (single process) running as a service with in memory session support.
Charles Pegge
29-06-2011, 22:57
Hi Mike,
I agree that multi-threading is very tricky, and I am studying it very closely from ground level. One of the main problems for me is Basic string management and garbage collection. But fortunately threading is not the only form of parallelism. It is not difficult to emulate parallel processing at various levels, and this may be the best solution for those procedures that handle Basic strings. At the other end we also have the OpenCl technology, using the graphics hardware for very high performance array crunching.
It would be great to leave all this stuff for the compiler / OS to select the most efficient means.
Charles