Re: D in the ix magazine about "programming today"

2010-01-04 Thread retard
Mon, 04 Jan 2010 18:46:54 +0100, Daniel de Kok wrote:

> On 2009-12-28 12:53:28 +0100, retard  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.


Re: D in the ix magazine about "programming today"

2010-01-04 Thread Daniel de Kok

On 2009-12-28 12:53:28 +0100, retard  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



Re: D in the ix magazine about "programming today"

2010-01-01 Thread Nick Sabalausky
"Moritz Warning"  wrote in message 
news:hhlcd1$223...@digitalmars.com...
> On Fri, 01 Jan 2010 12:41:30 -0500, Nick Sabalausky wrote:
>
>> "hello there"  wrote in message
>> news:hhl737$1pg...@digitalmars.com...
>>>  (dsource.org is messed up, some library is alpha, beta, abandoned,
>>> incomplete, not compile etc).
>>>
>>>
>> There's an update to dsource.org in the works that will make it a lot
>> easier to sort out the active stable stuff from everything else.
>
> Is this coming soon or just old news?

*Should be* coming soon.

The only things we still wanted to take care of before launching the updated 
site were some updates to the statistics (which someone else has been 
helping Brad with, and I think he's finished now) and getting the forums 
moved over (I recently updated the tool to do the forum conversion, and it 
seems to work fine now, but I haven't been able to actually test its output 
since I've been having trouble getting TracForums set up on my local system, 
so unless I get that sorted out it'll be up to Brad to test it). Beyond 
that, the only thing left to do, AFAIK, is to actually push the updates 
live.




Re: D in the ix magazine about "programming today"

2010-01-01 Thread Moritz Warning
On Fri, 01 Jan 2010 12:41:30 -0500, Nick Sabalausky wrote:

> "hello there"  wrote in message
> news:hhl737$1pg...@digitalmars.com...
>>  (dsource.org is messed up, some library is alpha, beta, abandoned,
>> incomplete, not compile etc).
>>
>>
> There's an update to dsource.org in the works that will make it a lot
> easier to sort out the active stable stuff from everything else.

Is this coming soon or just old news?


Re: D in the ix magazine about "programming today"

2010-01-01 Thread Nick Sabalausky
"hello there"  wrote in message 
news:hhl737$1pg...@digitalmars.com...
>  (dsource.org is messed up, some library is alpha, beta, abandoned, 
> incomplete, not compile etc).
>

There's an update to dsource.org in the works that will make it a lot easier 
to sort out the active stable stuff from everything else.




Re: D in the ix magazine about "programming today"

2010-01-01 Thread hello there
this is what i think about D.
I don't mean to insult people.
thanks.



Re: D in the ix magazine about "programming today"

2010-01-01 Thread hello there
hi, i am c# programmer. i am still junior compare to all of you guys. 
i've been monitoring d for 1 year. who knows I will use it too.

Extrawurst Wrote:

> "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 big language. 
but :
1. it's library support is not. (dsource.org is messed up, some library is 
alpha, beta, abandoned, incomplete, not compile etc). 

to make D big enough , people must abandon or combine their own project and 
make ONE standard library(gui, network, container, web support, logging, and 
soon) and ship with compiler. so application developer even a beginner like me 
can start using it.

2. binary support is not.
D binary must be able to call at least D binary cleanly.
dll call dll. 
i think there must be no such this :
fp = GetProcAddress(h, "D5mydll10getMyClassFZC5mydll7MyClass");

remember i am a junior compare to you. 


Re: D in the ix magazine about "programming today"

2009-12-30 Thread Nick Sabalausky
"Nick Sabalausky"  wrote in message 
news:hhhfd4$12t...@digitalmars.com...
> "Don"  wrote in message 
> news:hhgho0$2e8...@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. 




Re: D in the ix magazine about "programming today"

2009-12-30 Thread Nick Sabalausky
"Walter Bright"  wrote in message 
news:hhgv3b$7c...@digitalmars.com...
> Nick Sabalausky wrote:
>> "Sean Kelly"  wrote in message 
>> news:hhetss$26e...@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.




Re: D in the ix magazine about "programming today"

2009-12-30 Thread Nick Sabalausky
"Don"  wrote in message 
news:hhgho0$2e8...@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.




Re: D in the ix magazine about "programming today"

2009-12-30 Thread Walter Bright

Nick Sabalausky wrote:
"Sean Kelly"  wrote in message 
news:hhetss$26e...@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.


Re: D in the ix magazine about "programming today"

2009-12-30 Thread Don

Nick Sabalausky wrote:
"Nick Sabalausky"  wrote in message 
news:hhgac3$1vc...@digitalmars.com...
"retard"  wrote in message 
news:hhg67l$1lj...@digitalmars.com...

Wed, 30 Dec 2009 13:13:07 -0500, Nick Sabalausky wrote:


"Sean Kelly"  wrote in message
news:hhetss$26e...@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.


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.


Re: D in the ix magazine about "programming today"

2009-12-30 Thread Nick Sabalausky
"Nick Sabalausky"  wrote in message 
news:hhgac3$1vc...@digitalmars.com...
> "retard"  wrote in message 
> news:hhg67l$1lj...@digitalmars.com...
>> Wed, 30 Dec 2009 13:13:07 -0500, Nick Sabalausky wrote:
>>
>>> "Sean Kelly"  wrote in message
>>> news:hhetss$26e...@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.




Re: D in the ix magazine about "programming today"

2009-12-30 Thread Nick Sabalausky
"retard"  wrote in message 
news:hhg67l$1lj...@digitalmars.com...
> Wed, 30 Dec 2009 13:13:07 -0500, Nick Sabalausky wrote:
>
>> "Sean Kelly"  wrote in message
>> news:hhetss$26e...@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.




Re: D in the ix magazine about "programming today"

2009-12-30 Thread retard
Wed, 30 Dec 2009 13:13:07 -0500, Nick Sabalausky wrote:

> "Sean Kelly"  wrote in message
> news:hhetss$26e...@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.


Re: D in the ix magazine about "programming today"

2009-12-30 Thread retard
> "Sean Kelly"  wrote in message
> news:hhetss$26e...@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.


Re: D in the ix magazine about "programming today"

2009-12-30 Thread Nick Sabalausky
"Sean Kelly"  wrote in message 
news:hhetss$26e...@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. 




Re: D in the ix magazine about "programming today"

2009-12-30 Thread Walter Bright

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.


Re: D in the ix magazine about "programming today"

2009-12-30 Thread Sean Kelly
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.


Re: D in the ix magazine about "programming today"

2009-12-30 Thread Sean Kelly
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.


Re: D in the ix magazine about "programming today"

2009-12-30 Thread Don

dsimcha wrote:

== Quote from retard (r...@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.


Re: D in the ix magazine about "programming today"

2009-12-30 Thread retard
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, 
mona

Re: D in the ix magazine about "programming today"

2009-12-30 Thread dsimcha
== Quote from retard (r...@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.


Re: D in the ix magazine about "programming today"

2009-12-30 Thread Nick Sabalausky
"bearophile"  wrote in message 
news:hh76ur$1th...@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 
meandry.).

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

Re: D in the ix magazine about "programming today"

2009-12-30 Thread dsimcha
== Quote from Walter Bright (newshou...@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.)
> 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.

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).


Re: D in the ix magazine about "programming today"

2009-12-30 Thread bearophile
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


Re: D in the ix magazine about "programming today"

2009-12-25 Thread Walter Bright

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.


Re: D in the ix magazine about "programming today"

2009-12-21 Thread Georg Wrede

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.


Re: D in the ix magazine about "programming today"

2009-12-07 Thread Jeremie Pelletier

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-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 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.


D in the ix magazine about "programming today"

2009-12-07 Thread Extrawurst
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