|
Archives
D Programming
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.ide
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger
D.gnu
D
C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows
digitalmars.empire
digitalmars.DMDScript
electronics
|
digitalmars.D.announce - D in the ix magazine about "programming today"
It is always interesting what the technical press writes about our
beloved D.
Today i read about D in the ix, a german IT magazine on the subject
"programming today" (see here:
http://www.heise.de/newsticker/meldung/iX-Special-Programmieren-heute-ab-sofort-am-Kiosk-875489.html)
Here are some quotes (freely translated by myself):
"And D [..] is not going to become big enough [..] cause there is no big
company backing it up"
- well this is quite a controversal statement
"D, the clean alternative to C++"
- i can not agree more
"According to the language designers D is inappropriate as a first
language for beginners"
- i strongly disagree to that
"In the near future D won't steal C++ the show but the potential is
certainly present"
- feature-wise i think D2.0 already steals C++ the show
Extrawurst wrote:
It is always interesting what the technical press writes about our
beloved D.
Today i read about D in the ix, a german IT magazine on the subject
"programming today" (see here:
http://www.heise.de/newsticker/meldung/iX-Special-Programmieren-heute-ab-sofort-a
-Kiosk-875489.html)
Here are some quotes (freely translated by myself):
"And D [..] is not going to become big enough [..] cause there is no big
company backing it up"
- well this is quite a controversal statement
D is also relatively new, I'm pretty confident once programs and
libraries written in D begin to get widely used big companies will stand
in line to get on the train.
"D, the clean alternative to C++"
- i can not agree more
Idem, not only is it a clean language, its also a practical one; I do a
lot of C++ these days and I often find that I need to use complex
libraries such as boost::bind to emulate something as simple as a delegate.
"According to the language designers D is inappropriate as a first
language for beginners"
- i strongly disagree to that
Well, D, just like any other systems language, it's not always easy for
programmers to begin with when compared to scripting languages such as
php or javascript.
However, with TDPL soon to hit shelves, this will definitely change for
the better.
"In the near future D won't steal C++ the show but the potential is
certainly present"
- feature-wise i think D2.0 already steals C++ the show
I agree, even C++0x won't beat D2.0 in terms of features. But the lack
of C++ bindings in D will slow down it's adoption until the libraries
have D equivalents.
Extrawurst wrote:
"According to the language designers, D is inappropriate as a first
language for beginners"
- i strongly disagree to that
Agreed. People who think D is not suitable for a first language don't
seem to have the hands-on experience of several years of teaching
several different languages as university-level introductory CS classes.
The fact that D has some advanced level concepts (functional
programming, meta programming...) does by no means hamper its usefulness
as a first language. On the contrary, the lack of obscurity, lack of
abysmal compliler error messages, lack of context sensitivity in
semantics and expressions, lack of gratuitios baggage, and (thank god)
lack of pretentiousness, all help in making this an approachable language.
However, what really constitutes the case for D as the first programming
language, is its starightforwardness. The language student is presented
with a language that lets you study the issues at hand, virtually
ignoring any idiosyncracies introduced by the particular language. In
its time, Pascal was a stab at precisely that. And a stab worthy of a
lot of merit, at that. But times have changed, and a lot of languages
have come and gone, since.
At the end of the day, there are only two top-priorities, that a first
language should present:
- It has to be compiled to genuine executable code. The psychological
weight of "knowing" what your code does, as opposed to a diffuse wish
"associated with your code to be interpreted, depending on the
interpreter at hand [as opposed to actually disassembling the executable
and seeing for yourself the actual result!]", simply can't be
underestimated. (I've really seen the difference with my students -- and
how they've later fared in this arena.)
- The abstraction of the physical computer has to be as thin as
possible. (Currently, no [processor independent] programming language
comes even close to C.) This is absolutely essential, if we are to teach
computer programming as such (as opposed to just writing a particular
computer language!) to students who are expected to spend their entire
career developing computer programs and concepts. D makes a reasonable
effort at this, while the motivation for it has lately been virtually
diluted by languages such as Perl, Python, and some others, unfortunately.
Georg Wrede wrote:
- It has to be compiled to genuine executable code. The psychological
weight of "knowing" what your code does, as opposed to a diffuse wish
"associated with your code to be interpreted, depending on the
interpreter at hand [as opposed to actually disassembling the executable
and seeing for yourself the actual result!]", simply can't be
underestimated. (I've really seen the difference with my students -- and
how they've later fared in this arena.)
When I learned programming, I never "got it" until I learned assembler
and started comparing the language source code with the assembler
emitted by the compiler.
== Quote from Walter Bright (newshound1 digitalmars.com)'s article
Georg Wrede wrote:
- It has to be compiled to genuine executable code. The psychological
weight of "knowing" what your code does, as opposed to a diffuse wish
"associated with your code to be interpreted, depending on the
interpreter at hand [as opposed to actually disassembling the executable
and seeing for yourself the actual result!]", simply can't be
underestimated. (I've really seen the difference with my students -- and
how they've later fared in this arena.)
and started comparing the language source code with the assembler
emitted by the compiler.
I know what you're saying. In general I never feel like I really "get" anything
until I understand it on multiple levels of abstraction. For example, it took
me
forever to understand object-oriented programming. The semantics just seemed
too
arbitrary. What made me finally get it was:
1. Reading about design patterns (moving up a level of abstraction).
2. Understanding vtables and function pointers (moving down a level of
abstraction).
Georg Wrede:
- It has to be compiled to genuine executable code.
This is a very interesting topic, but I don't agree with some of your ideas.
I think that today there are no languages really fit as first language. Every
language has downsides if you use for that purpose. And the sad thing is, if
you design a language for teaching, it probably comes out as a toy language
that no one wants to use anyway.
Said that, a teacher has to choose a language anyway. In my opinion the best
languages for such purpose are Python, D1 and Java. Other alternatives are
StarLogo (And its variants, like NetLogo), Processing, the Logo that can be
used to control Lego, and few others.
As a first language the need to be compiled to "genuine executable code" is
irrelevant, performance, assembly and binaries are not interesting for a person
that has to learn tell apart while from do-while and an array from a set.
StarLogo is good because it teaches GUI and multiprocessing from the beginning,
it helps develop some intuition regarding complex systems made of many simple
small parts that interact, can be used and shared online, and it has a quite
good visual feedback.
Java is good because it's a real language, with tons of libs. And its compiler
is very strict (stricter than the D compiler) so it helps develop good
programming habits, and it helps spot bugs quickly. Being statically typed and
being dumb (no type inference, etc) it helps learn to manage types in a manual
and correct way (but the student doesn't learn higher level concepts, like
higher level functions, functional programming, etc etc). It's simple enough
(but not very simple to use), a little fussy, and helps teach some OOP.
D1 gives more freedom, allows to learn pointers, linked lists, what a compiler
spits out, it's a way to use assembly (inlining it), and you can learn almost
as much OOP as with Java. It helps understand what the computer does when you
write code, because there's a more direct relation between code and asm. It
allows you to learn some C removing some of its disadvantages and in a safer
way, removing some of the time wasted hunting for bugs in C code. If can even
be used to learn a bit of functional programming (but not that much).
Python is easy to use, less fussy, easy to read, its syntax is natural and
usually such syntax doesn't get in the way. It's easy to learn and remember.
Its indentation is both natural enough, clean and teaches how to indent code
properly. It's flexible, it's a real world language with tons of libs
(including tons of libs that can be used to teach all kind of things), it's
practically useful for simple or complex tasks, it has enough C-like syntax
that can be later used to teach Java or other similar languages. It can even be
used to teach a bit of functional programming. It's not very good in teaching a
tidy understanding of types. Its shell is really good for a newbie.
To teach programming to students about 15-18 years old I think Python is
currently the best first language, for first introduction to programming about
6-18 months long. Later D1 language (once it's more diffused and it has libs
and its compilers are debugged, etc) can be useful to teach assembly,
compilation, types, pointers, manual memory management, unions, struct and
precise memory layout, to develop some intuition of the relation between
program code and resulting asm, some more advanced data structures, other
design patterns, etc. Java is not a real alternative to D1 here, because it
lacks several things, but D1 is not common and refined enough, so some people
may want to use Java as second language.
Older students, about university ones, if they already know a language, may
even start with Java as first language. But soon they need something different,
like C or D or some functional/parallel language (like Haskell or something) to
learn other paradigms.
Younger students, like 8-14 years old may find something like StarLogo (and
similar ones) as better than Python as first language (but here it's also a
matter of the characteristics of the single student. Probably there are 12
years old students that can program in Python in a good way. Other students may
need something simpler. Brains are different, so you can't teach everyone at
the same speed and the same way!). After a year or two Python can be
introduced. Another possibility is "Computer Science unplugged"
(http://csunplugged.org ), that's positive because it allows for more social
forms of "programming", and because it can teach more computer science ideas
and less key punching. It's not an alternative of real coding, but for students
about 5-11 years old it can be useful.
Bye,
bearophile
"bearophile" <bearophileHUGS lycos.com> wrote in message
news:hh76ur$1thp$1 digitalmars.com...
Georg Wrede:
- It has to be compiled to genuine executable code.
This is a very interesting topic, but I don't agree with some of your
ideas.
I think that today there are no languages really fit as first language.
Every language has downsides if you use for that purpose. And the sad
thing is, if you design a language for teaching, it probably comes out as
a toy language that no one wants to use anyway.
Said that, a teacher has to choose a language anyway. In my opinion the
best languages for such purpose are Python, D1 and Java. Other
alternatives are StarLogo (And its variants, like NetLogo), Processing,
the Logo that can be used to control Lego, and few others.
Java can be ok *only* if you start from an imperative standpoint and not an
OO standpoint. Years ago, I spent some time as a CS 101 tutor, and the
school (a Java school) had two CS 101 instructors: one (teacher "A") started
with imperative programming and taught flow-of-execution and flow control
and then functions, etc, (and glossed-over the "class MyApp{ static final
void Main() {} }" boilerplate) and only moved on to OO once the students had
a good grasp of the imperative stuff. The other teacher ("B") started
straight into OO, and only moved on to flow-of-execution late in the
semester.
I got a number of students from both teachers, but noticed an interesting
pattern: Every single one of the students I got from "A" already had a solid
grasp of the material. Their work was already completed and they had only
come to me to have it double-checked. I don't remember any of their work
ever being wrong. There were a few cases where I'd gave an extra little tip,
but they clearly knew what they were doing.
By contrast, every single student I got from class B was completely
bewildered, couldn't make head or tails of any of it, and essentially needed
to be completely taught again from the beginning. A number of them I had to
refer back to their teacher because they were so confused about it that the
only way I could have helped would be to develop a full CS 101 lesson plan
of my own, and #1, I felt that would be overstepping my bounds, and #2, at
minimum wage, that wasn't my f*ing job (actually, my real job there was
"computer lab monitor", but the CS dept noticed that I knew what I was doing
with code, so they asked me to help tutor while I was there. Of course, why
a private non-party college with high entrance standards felt that they
needed a hired babysitter was, and still is, completely beyond me, but hey,
I was more than happy to take their money while I did homework, after all,
they sure as hell were taking a fuckload of my money, and providing jack-all
in return.).
But, I'm not convinced that professional languages (not that I consider Java
professional in any way) should be used as a day-1 starting point. They
absolutely should be taught relatively early, and any advanced programming
concepts should be taught using them (or with psudo-code and implemented
directly in a real language). But for most beginners, those languages are
way too dry (and I don't mean "don't repeat yourself" DRY, I just
mean....dry.).
For most people, programming is like math, it's a bunch of boring abstract
formalities. To prevent people from being turned away right at the
beginning, I think it's best to start with something that has a very high
degree of immediate *and interesting* feedback, and with minimal effort and
trip-ups. In other words, something like BlitzBASIC or DarkBASIC, that do
very easy pictures, sounds, and games (But not flash, because #1,
ActionScript and the Flash IDE are absolute fucking messes in any version
and that's only going to serve to confuse them, plus, since Flash is,
unfortunately, used frequently for real-world-work, it's unlikely they'll
ever come to understand why Flash and ActionScript are pure shit). The other
nice thing about that sort of language is that there's a lot they're not
suited for, so it'll be easier to ween them off when the time comes to move
to a professional language (which should be done *while* explaining in
simple terms why certain things are harder or more work than what they'd
been doing before, and what that's ok, or even desirable). You don't start
cooking with blowtorches, gas burners, and double-boilers, you start with a
toaster and a microwave, *then* learn the how's and the why's of the
trickier-but-better tools.
A lot of people would probably disagree with much of the above because "You
can't unlearn something", but I've always felt that's a complete load of
bullshit. Of course you can, and painlessly too. I've done it plenty of
times. In kindergarten, I spelled "of" U-V. Obviously I unlearned that,
along with the bullshit claim about what sounds the letters O and F "always"
make in the english language. Anytime you've ever been corrected on
something, or corrected yourself on something - guess what? You've
unlearned!
Example:
First grade teacher: "You can't subtract a bigger number from a smaller one,
2-5 can't be done."
Student's internal knowledge: "Bigger numbers can't be subtracted from
smaller ones, 2-5 can't be done."
Fifth grade teacher: "Your first grade teacher was a liar: There are
negative numbers: 2-5 = -3"
Pop quiz, assuming there's no retardation involved (and I mean that word in
the clinical sense...which reminds me: "PC" police can kiss my ass) what's
the student's internal knowledge now?
A: "Bigger numbers can't be subtracted from smaller ones, 2-5 can't be done.
My teacher keeps saying 'blah blah blah blah blah' and his words are
nonsensical gibberish."
or
B: "I was mistaken, I *can* do subtraction like 2-5, the result is just
negative."
So to any programmer, engineer or scientist who's ever been taught in grade
school that subtraction of a greater number from a lesser one is impossible
(see, there's another thing successfully unlearned - values are "greater"
and "lesser", not "bigger" and "smaller"), don't ever try to tell me that
unlearning is difficult or impossible.
== Quote from retard (re tard.com.invalid)'s article
Quite many young Haskell experts started with Haskell when they were 9-12
years old. Having english as your native language and academically
educated parents has a tremendous effect on e.g. vocabularity at that
age. Some slumdog might only know ~3000 words at that age, child of a
highly educated family perhaps 25.000 words.
I'm not saying that everyone should learn Haskell, but I know it's
possible to learn stuff like Curry-Howard isomorphism, hylomorphisms,
monads, monad transformers, comonads, and analysing amortized costs of
algorithms at that age. It's just dumb to assume that young people can't
learn something as complex as static types!
I remember when I was that young, I used to play with QBasic. I knew very
well why 'DEFINT A-Z' made all programs faster and knew what IEEE
floating point looked like on bit level (well, at least mostly). I knew
how to do blits in graphics programming since I already had done them in
assembly on C-64. Had there been Haskell and all the modern tools
available like today there is, I would have probably spent more time on
them.
Yes, but you were probably exceptionally talented and/or motivated. From
experiences I have had getting friends through programming 101, I believe that,
when people teach programming, they tend to take for granted some very basic
concepts such as variable assignment, flow control and nesting. The first
programming language should be one that strikes a balance between allowing the
teaching of these basic concepts on the one hand and not being a completely
useless toy language on the other.
IMHO even Python's strong but dynamic typing is too complex for someone who has
literally never programmed before. I think weak typing a la PHP or Visual
Basic,
so that the student doesn't even have to think about types until he/she
understands variable assignment and flow control and has actually experienced
the
feeling of writing simple but useful programs, is the best way to start off.
Good
programming practices are useless if you end up totally lost on the variables
and
flow control level. Furthermore, I don't think good practices and well
structured
code can truly be appreciated until you've done it wrong first. Lastly, to most
absolute beginners automatic conversion, e.g. from strings to numbers, probably
seems like the least surprising behavior, since that is how it works in Excel,
etc.
dsimcha wrote:
== Quote from retard (re tard.com.invalid)'s article
Quite many young Haskell experts started with Haskell when they were 9-12
years old. Having english as your native language and academically
educated parents has a tremendous effect on e.g. vocabularity at that
age. Some slumdog might only know ~3000 words at that age, child of a
highly educated family perhaps 25.000 words.
I'm not saying that everyone should learn Haskell, but I know it's
possible to learn stuff like Curry-Howard isomorphism, hylomorphisms,
monads, monad transformers, comonads, and analysing amortized costs of
algorithms at that age. It's just dumb to assume that young people can't
learn something as complex as static types!
I remember when I was that young, I used to play with QBasic. I knew very
well why 'DEFINT A-Z' made all programs faster and knew what IEEE
floating point looked like on bit level (well, at least mostly). I knew
how to do blits in graphics programming since I already had done them in
assembly on C-64. Had there been Haskell and all the modern tools
available like today there is, I would have probably spent more time on
them.
Yes, but you were probably exceptionally talented and/or motivated. From
experiences I have had getting friends through programming 101, I believe that,
when people teach programming, they tend to take for granted some very basic
concepts such as variable assignment, flow control and nesting. The first
programming language should be one that strikes a balance between allowing the
teaching of these basic concepts on the one hand and not being a completely
useless toy language on the other.
IMHO even Python's strong but dynamic typing is too complex for someone who has
literally never programmed before. I think weak typing a la PHP or Visual
Basic,
so that the student doesn't even have to think about types until he/she
understands variable assignment and flow control and has actually experienced
the
feeling of writing simple but useful programs, is the best way to start off.
Good
programming practices are useless if you end up totally lost on the variables
and
flow control level. Furthermore, I don't think good practices and well
structured
code can truly be appreciated until you've done it wrong first. Lastly, to
most
absolute beginners automatic conversion, e.g. from strings to numbers, probably
seems like the least surprising behavior, since that is how it works in Excel,
etc.
Both Pascal and the original BASIC were strongly typed, and widely used
for beginners.
dsimcha Wrote:
Yes, but you were probably exceptionally talented and/or motivated. From
experiences I have had getting friends through programming 101, I believe that,
when people teach programming, they tend to take for granted some very basic
concepts such as variable assignment, flow control and nesting. The first
programming language should be one that strikes a balance between allowing the
teaching of these basic concepts on the one hand and not being a completely
useless toy language on the other.
I'm not sure I agree. Intro courses in the sciences are often intended to weed
out the people who won't be able to handle later material. I'm all for making
the courses more interesting to keep students motivated (ACM Communications
this month is all about integrating gaming topics into the core CS curriculum),
but less interested in trying to make the courses easier. If the problem is
simply one of explaining typed variables to someone with a maths background,
that's somewhat of a different problem.
Sean Kelly Wrote:
If the problem is simply one of explaining typed variables to someone with a
maths background, that's somewhat of a different problem.
Err... I meant "rebindable variables," thought I've never actually met a maths
person who had trouble grasping that aspect of imperative languages.
Sean Kelly wrote:
Sean Kelly Wrote:
If the problem is simply one of explaining typed variables to
someone with a maths background, that's somewhat of a different
problem.
Err... I meant "rebindable variables," thought I've never actually
met a maths person who had trouble grasping that aspect of imperative
languages.
I can't recall any problem grasping the idea of typed variables. It just
seemed patently obvious to me.
I had much trouble getting OOP.
"Sean Kelly" <sean invisibleduck.org> wrote in message
news:hhetss$26er$1 digitalmars.com...
Intro courses in the sciences are often intended to weed out the people
There's a *lot* of things wrong with the way schools work. Deliberate
"weeding out" is a clear red flag that a school cares more about their own
statistics (graduation ratio, etc) than actual education: For any
institution that claims to value education, trying to get someone to leave a
class, *especially* an introductory class, is completely inexcusable(^1),
and IMO should subject them to immediate revocation of their accreditation.
But, of course, accreditation itself is completely screwed up too...
1: Imagine if you got a book out at a library, and the library decided you
didn't understand it well enough and therefore tried to get you to return it
early and then prohibited you from getting out any other books on the topic.
It's the same fucking thing...except, with a school, you're paying them tens
of thousands of dollars to be told what knowledge you can and can't pursue.
And yet somehow, people insist in referring to college as, not only
"education" (which would be big enough of a joke), but "*higher* education".
Completely pathetic! People who work for, or even willingly go along with,
such a machine should be absolutely ashamed.
Nick Sabalausky wrote:
"Sean Kelly" <sean invisibleduck.org> wrote in message
news:hhetss$26er$1 digitalmars.com...
Intro courses in the sciences are often intended to weed out the people
There's a *lot* of things wrong with the way schools work. Deliberate
"weeding out" is a clear red flag that a school cares more about their own
statistics (graduation ratio, etc) than actual education:
That may be true for some schools. But there are incoming students who
simply don't belong, for a variety of reasons. I don't think it serves
those students to string them along with both the school and the student
pretending they can hack the material.
Have you ever watched the tryouts on the TV show "So You Think You Can
Dance"? They have some applicants who clearly just don't belong there.
They are often asked if they've had training, and they'll say they've
had 5 years of dance training. They cry when told by the judges that
they have no talent.
Apparently, none of their instructors told them this, they just
continued to take the tuition money and compliment the student on how
well he's doing.
It's like me going to basketball camp. I will never, ever be a good
basketball player, no matter how hard I try or how much coaching I get.
It will never happen. For a coach not to tell me this is doing me a
grave disservice, because I should be expending effort at something I
can succeed at.
Of course, if I then choose to take basketball anyway because I just
love the game, that's fine, too. But it would be unreasonable of me to
expect a top coach to be willing to coach me, even if I paid him $$$.
He'll want to be coaching people who can succeed at basketball.
"Walter Bright" <newshound1 digitalmars.com> wrote in message
news:hhgv3b$7cq$1 digitalmars.com...
Nick Sabalausky wrote:
"Sean Kelly" <sean invisibleduck.org> wrote in message
news:hhetss$26er$1 digitalmars.com...
Intro courses in the sciences are often intended to weed out the people
There's a *lot* of things wrong with the way schools work. Deliberate
"weeding out" is a clear red flag that a school cares more about their
own statistics (graduation ratio, etc) than actual education:
That may be true for some schools. But there are incoming students who
simply don't belong, for a variety of reasons. I don't think it serves
those students to string them along with both the school and the student
pretending they can hack the material.
Have you ever watched the tryouts on the TV show "So You Think You Can
Dance"? They have some applicants who clearly just don't belong there.
They are often asked if they've had training, and they'll say they've had
5 years of dance training. They cry when told by the judges that they have
no talent.
Apparently, none of their instructors told them this, they just continued
to take the tuition money and compliment the student on how well he's
doing.
It's like me going to basketball camp. I will never, ever be a good
basketball player, no matter how hard I try or how much coaching I get. It
will never happen. For a coach not to tell me this is doing me a grave
disservice, because I should be expending effort at something I can
succeed at.
Of course, if I then choose to take basketball anyway because I just love
the game, that's fine, too. But it would be unreasonable of me to expect a
top coach to be willing to coach me, even if I paid him $$$. He'll want to
be coaching people who can succeed at basketball.
See that's the thing, there's that middle-ground of sensibility right there
that schools just won't go near. If they want to have a chat with someone
about whether they think they're really on the right path, great. All
problems solved. But instead they just play these bullshit games behind the
students backs.
On 2009-12-28 12:53:28 +0100, retard <re tard.com.invalid> said:
I'm not saying that everyone should learn Haskell, but I know it's
possible to learn stuff like Curry-Howard isomorphism, hylomorphisms,
monads, monad transformers, comonads, and analysing amortized costs of
algorithms at that age. It's just dumb to assume that young people can't
learn something as complex as static types!
With respect to education: I think that exposing different programming
paradigms to students has a lot of merit. Each paradigm has different
structuring of data and execution, and is taylored to different
problems. Pick a language for each paradigm that is as simple as
possible, but still powerful enough to solve practical problems. This
will avoid students to be overwhelmed by the multitude of possible
construction combinations. E.g. a plausible language selection with
varying typing disciplines would be:
- Haskell or ML (functional programming, static typing)
- Prolog (declarative/logics programming)
- Python or maybe Ruby (object-oriented programming, dynamic typing)
While D2 is nice for people who want great performance without many of
the downsides of C++, I do not think it makes a good first language for
education. Various stumbling blocks I see include asymmetry of
struct/class, immutable (which tends to creep in everywhere, and can be
cast away with undefined behavior), static vs. dynamic arrays, use of
multiple paradigms (structured, OO, functional), and not so strong
typing. Besides availability of books, tools, and libraries of course.
Of course, some of the practical problems may be solved in short term,
if Andrei's book sparks more interest from the wider programming
community.
-- Daniel
Sun, 27 Dec 2009 03:47:23 -0500, bearophile wrote:
Georg Wrede:
- It has to be compiled to genuine executable code.
This is a very interesting topic, but I don't agree with some of your
ideas.
I think that today there are no languages really fit as first language.
Every language has downsides if you use for that purpose. And the sad
thing is, if you design a language for teaching, it probably comes out
as a toy language that no one wants to use anyway.
Said that, a teacher has to choose a language anyway. In my opinion the
best languages for such purpose are Python, D1 and Java. Other
alternatives are StarLogo (And its variants, like NetLogo), Processing,
the Logo that can be used to control Lego, and few others.
As a first language the need to be compiled to "genuine executable code"
is irrelevant, performance, assembly and binaries are not interesting
for a person that has to learn tell apart while from do-while and an
array from a set.
StarLogo is good because it teaches GUI and multiprocessing from the
beginning, it helps develop some intuition regarding complex systems
made of many simple small parts that interact, can be used and shared
online, and it has a quite good visual feedback.
Java is good because it's a real language, with tons of libs. And its
compiler is very strict (stricter than the D compiler) so it helps
develop good programming habits, and it helps spot bugs quickly. Being
statically typed and being dumb (no type inference, etc) it helps learn
to manage types in a manual and correct way (but the student doesn't
learn higher level concepts, like higher level functions, functional
programming, etc etc). It's simple enough (but not very simple to use),
a little fussy, and helps teach some OOP.
D1 gives more freedom, allows to learn pointers, linked lists, what a
compiler spits out, it's a way to use assembly (inlining it), and you
can learn almost as much OOP as with Java. It helps understand what the
computer does when you write code, because there's a more direct
relation between code and asm. It allows you to learn some C removing
some of its disadvantages and in a safer way, removing some of the time
wasted hunting for bugs in C code. If can even be used to learn a bit of
functional programming (but not that much).
Python is easy to use, less fussy, easy to read, its syntax is natural
and usually such syntax doesn't get in the way. It's easy to learn and
remember. Its indentation is both natural enough, clean and teaches how
to indent code properly. It's flexible, it's a real world language with
tons of libs (including tons of libs that can be used to teach all kind
of things), it's practically useful for simple or complex tasks, it has
enough C-like syntax that can be later used to teach Java or other
similar languages. It can even be used to teach a bit of functional
programming. It's not very good in teaching a tidy understanding of
types. Its shell is really good for a newbie.
To teach programming to students about 15-18 years old I think Python is
currently the best first language, for first introduction to programming
about 6-18 months long. Later D1 language (once it's more diffused and
it has libs and its compilers are debugged, etc) can be useful to teach
assembly, compilation, types, pointers, manual memory management,
unions, struct and precise memory layout, to develop some intuition of
the relation between program code and resulting asm, some more advanced
data structures, other design patterns, etc. Java is not a real
alternative to D1 here, because it lacks several things, but D1 is not
common and refined enough, so some people may want to use Java as second
language.
Older students, about university ones, if they already know a language,
may even start with Java as first language. But soon they need something
different, like C or D or some functional/parallel language (like
Haskell or something) to learn other paradigms.
Younger students, like 8-14 years old may find something like StarLogo
(and similar ones) as better than Python as first language (but here
it's also a matter of the characteristics of the single student.
Probably there are 12 years old students that can program in Python in a
good way. Other students may need something simpler. Brains are
different, so you can't teach everyone at the same speed and the same
way!).
Quite many young Haskell experts started with Haskell when they were 9-12
years old. Having english as your native language and academically
educated parents has a tremendous effect on e.g. vocabularity at that
age. Some slumdog might only know ~3000 words at that age, child of a
highly educated family perhaps 25.000 words.
I'm not saying that everyone should learn Haskell, but I know it's
possible to learn stuff like Curry-Howard isomorphism, hylomorphisms,
monads, monad transformers, comonads, and analysing amortized costs of
algorithms at that age. It's just dumb to assume that young people can't
learn something as complex as static types!
I remember when I was that young, I used to play with QBasic. I knew very
well why 'DEFINT A-Z' made all programs faster and knew what IEEE
floating point looked like on bit level (well, at least mostly). I knew
how to do blits in graphics programming since I already had done them in
assembly on C-64. Had there been Haskell and all the modern tools
available like today there is, I would have probably spent more time on
them.
"Sean Kelly" <sean invisibleduck.org> wrote in message
news:hhetss$26er$1 digitalmars.com...
Intro courses in the sciences are often intended to weed out the people
Ha, it appears they use this example to teach manipulation of arrays at
least in the Oxford University:
http://www.cs.tufts.edu/~nr/comp150fp/archive/richard-bird/sudoku.pdf
"The Sudoku problem provides an ideal classroom example with which to
illustrate manipulations of arrays as well as manipulation of programs.
Indeed, the pearl is more or less a straightforward transcription of two
lectures I gave to first-year undergraduates, omitting most of the
calculations «snip»"
"«snip» and this is the pedagogic value of the exercise, we have gone for
wholemeal programming, identifying these structures as complete entities
in themselves. There are other Sudoku solvers out there, but the present
one certainly seems one of the clearest and simplest."
So the typed, functional, scary babby eating Haskell solution is more or
less the clearest and simplest for 1st year students.
I'm guessing that 20 … 50% of D users cannot comprehend the solution.
Wed, 30 Dec 2009 13:13:07 -0500, Nick Sabalausky wrote:
"Sean Kelly" <sean invisibleduck.org> wrote in message
news:hhetss$26er$1 digitalmars.com...
Intro courses in the sciences are often intended to weed out the people
There's a *lot* of things wrong with the way schools work. Deliberate
"weeding out" is a clear red flag that a school cares more about their
own statistics (graduation ratio, etc)
In fact many schools have made the courses much easier nowadays to get
better statistics. The graduation ratio doesn't matter that much if it's
a public school - they get funding based on the amount of people who have
graduated. I think this model is much more common in Europe, at least.
"retard" <re tard.com.invalid> wrote in message
news:hhg67l$1ljq$2 digitalmars.com...
Wed, 30 Dec 2009 13:13:07 -0500, Nick Sabalausky wrote:
"Sean Kelly" <sean invisibleduck.org> wrote in message
news:hhetss$26er$1 digitalmars.com...
Intro courses in the sciences are often intended to weed out the people
There's a *lot* of things wrong with the way schools work. Deliberate
"weeding out" is a clear red flag that a school cares more about their
own statistics (graduation ratio, etc)
In fact many schools have made the courses much easier nowadays to get
better statistics. The graduation ratio doesn't matter that much if it's
a public school - they get funding based on the amount of people who have
graduated. I think this model is much more common in Europe, at least.
It all depends on things like what metric they're going for and how they
expect things to work, but it almost always (if not always) boils down to
being insincere or otherwise disrespectful to the students. A few examples:
1. Public colleges these days, at least in the US, want money, and thus
overbook and accept beyond their capacity (ex, when I was at BGSU, they
required all non-commuting freshman and sophomores to live in the
dorms...but they brought in more than they had room for and stuck the
"extras" in dorm lounge areas. And, of course, they charged them full
room+board and didn't relax the must-be-in-a-dorm requirement, because "all
our students live in a dorm for two years" is one of the things they like to
brag about - so yea, their ability to boast definitely outweighs basic
respect and living conditions for their own students.)
This large number of students means low entrance criteria (which I don't
necessarily have a problem with, but it depends on *what* the criteria is,
and the criteria used I often disagree with), and thus a high percentage of
students who don't have the slightest clue what they want to pursue. So, if
they weed out students in introductory classes, they hope that those
students (who are likely to be "undecided" majors anyway), will be pushed
towards the areas they can sail through the easiest (not necessarily what
they would actually like the most or be best served by), which maximizes the
throughput of their revolving-doors. Of course other things are used to
lubricate the revolving-doors too, for instance, extra credit and various
other forms of grade-inflation.
2. For "Ivy League", one of their primary goals is to maintain their
"Cadillac" status (and the astronomical tuition they can demand as a result
of that), so they don't want to "waste" any resources on students who aren't
guaranteed to sail through advanced material without the instructor having
to exhibit any higher-than-average teaching ability or effort (note also,
that they take much of their bragging rights from their research, and a
professor who's good at research may or may not be any good at teaching). So
for these schools, their bottom-line is, again, best served by as much
"weeding-out" as possible (ideally, anyone who doesn't already know the
material inside and out).
3. For a school that doesn't grossly overbook sardines (or at least doesn't
get enormous amounts of "undecided" majors), but also doesn't have "Ivy
League"-ish status, their revolving doors get greased by not doing any
weeding and hijacking quality by making grades and credits as easy to obtain
as possible.
"Nick Sabalausky" <a a.a> wrote in message
news:hhgac3$1vcm$1 digitalmars.com...
"retard" <re tard.com.invalid> wrote in message
news:hhg67l$1ljq$2 digitalmars.com...
Wed, 30 Dec 2009 13:13:07 -0500, Nick Sabalausky wrote:
"Sean Kelly" <sean invisibleduck.org> wrote in message
news:hhetss$26er$1 digitalmars.com...
Intro courses in the sciences are often intended to weed out the people
There's a *lot* of things wrong with the way schools work. Deliberate
"weeding out" is a clear red flag that a school cares more about their
own statistics (graduation ratio, etc)
In fact many schools have made the courses much easier nowadays to get
better statistics. The graduation ratio doesn't matter that much if it's
a public school - they get funding based on the amount of people who have
graduated. I think this model is much more common in Europe, at least.
It all depends on things like what metric they're going for and how they
expect things to work, but it almost always (if not always) boils down to
being insincere or otherwise disrespectful to the students. A few
examples:
1. Public colleges these days, at least in the US, ...
So, if they weed out students in introductory classes, they hope that those
students (who are likely to be "undecided" majors anyway), will be pushed
towards the areas they can sail through the easiest (not necessarily what
they would actually like the most or be best served by), which maximizes
the throughput of their revolving-doors.
This also allows them to get by easier with mediocre teachers.
Nick Sabalausky wrote:
"Nick Sabalausky" <a a.a> wrote in message
news:hhgac3$1vcm$1 digitalmars.com...
"retard" <re tard.com.invalid> wrote in message
news:hhg67l$1ljq$2 digitalmars.com...
Wed, 30 Dec 2009 13:13:07 -0500, Nick Sabalausky wrote:
"Sean Kelly" <sean invisibleduck.org> wrote in message
news:hhetss$26er$1 digitalmars.com...
Intro courses in the sciences are often intended to weed out the people
"weeding out" is a clear red flag that a school cares more about their
own statistics (graduation ratio, etc)
better statistics. The graduation ratio doesn't matter that much if it's
a public school - they get funding based on the amount of people who have
graduated. I think this model is much more common in Europe, at least.
expect things to work, but it almost always (if not always) boils down to
being insincere or otherwise disrespectful to the students. A few
examples:
1. Public colleges these days, at least in the US, ...
So, if they weed out students in introductory classes, they hope that those
students (who are likely to be "undecided" majors anyway), will be pushed
towards the areas they can sail through the easiest (not necessarily what
they would actually like the most or be best served by), which maximizes
the throughput of their revolving-doors.
This also allows them to get by easier with mediocre teachers.
It is different elsewhere.
In Australia, all universities are public, except one private university
which is named after Australia's most notorious corporate criminal.
Really bizarre - it's kind of like getting an Aviation degree from Bin
Laden Flying School. I'm not sure that I would have gone to university
if I'd lived in the US, and I'm certain my wife could not have -- it
seems like you need rich parents. Our tertiary education was virtually free.
Australian universities get their money by having astronomical fees for
overseas (Asian) students. There's a lot of pressure on academic staff
to get them to graduate, no matter how poorly they perform.
"Don" <nospam nospam.com> wrote in message
news:hhgho0$2e8o$1 digitalmars.com...
It is different elsewhere.
In Australia, all universities are public, except one private university
which is named after Australia's most notorious corporate criminal. Really
bizarre - it's kind of like getting an Aviation degree from Bin Laden
Flying School.
Heh, crazy :)
I'm not sure that I would have gone to university if I'd lived in the US,
and I'm certain my wife could not have -- it seems like you need rich
parents. Our tertiary education was virtually free.
In the US you can go afford college easily if you're either really rich *or*
if you're in poverty (or if you're a non-caucasian woman). If you're in
poverty you get everything paid for via all the scholarships and grants that
are out there (which is great). You also get pretty much a free ride on
grants and sholarships if you're a woman or a non-caucasian and doubly-so if
you pursue math or CS (not so great if you beleive in the "equality" that
most US citizens *claim* to value, even though most don't *truly* value it
as they wouldn't know true equality if it, ahem...well, you probably know
where I'm going with that). But if you're white or male (especially a white
male) and you're middle-class (especially lower-middle class), then you're
pretty much screwed. I made the mistake of going and it left me US$100,000
in debt. Stupidest thing I ever did by far.
Australian universities get their money by having astronomical fees for
overseas (Asian) students. There's a lot of pressure on academic staff to
get them to graduate, no matter how poorly they perform.
Yea, see, doesn't matter where you go, schooling is an absolute joke.
"Nick Sabalausky" <a a.a> wrote in message
news:hhhfd4$12tk$1 digitalmars.com...
"Don" <nospam nospam.com> wrote in message
news:hhgho0$2e8o$1 digitalmars.com...
Australian universities get their money by having astronomical fees for
overseas (Asian) students. There's a lot of pressure on academic staff to
get them to graduate, no matter how poorly they perform.
Yea, see, doesn't matter where you go, schooling is an absolute joke.
And the worst thing is, these so-called "educators" game their own students
as much as they can possibly get away with (which is a hell of a lot, given
that schools are such sacred cows), and then raise hell for any student that
tries to watch his own back (which I know from personal experience, many
times over). Nothing but a bunch of goddamn crooks.
Mon, 04 Jan 2010 18:46:54 +0100, Daniel de Kok wrote:
On 2009-12-28 12:53:28 +0100, retard <re tard.com.invalid> said:
I'm not saying that everyone should learn Haskell, but I know it's
possible to learn stuff like Curry-Howard isomorphism, hylomorphisms,
monads, monad transformers, comonads, and analysing amortized costs of
algorithms at that age. It's just dumb to assume that young people
can't learn something as complex as static types!
With respect to education: I think that exposing different programming
paradigms to students has a lot of merit. Each paradigm has different
structuring of data and execution, and is taylored to different
problems. Pick a language for each paradigm that is as simple as
possible, but still powerful enough to solve practical problems. This
will avoid students to be overwhelmed by the multitude of possible
construction combinations. E.g. a plausible language selection with
varying typing disciplines would be:
- Haskell or ML (functional programming, static typing) - Prolog
(declarative/logics programming) - Python or maybe Ruby (object-oriented
programming, dynamic typing)
Another possibility is to use an educational multiparadigm language such
as the Mozart/Oz system. I think it's much more a multiparadigm language
than e.g. D or C++. OTOH I'm not so sure whether it's good enough for all
practical applications.
|
|