Jump to page: 1 2 3
Thread overview
D in the ix magazine about "programming today"
Dec 07, 2009
Extrawurst
Dec 08, 2009
Jeremie Pelletier
Dec 22, 2009
Georg Wrede
Dec 26, 2009
Walter Bright
Dec 27, 2009
dsimcha
Dec 27, 2009
bearophile
Dec 27, 2009
Nick Sabalausky
Dec 28, 2009
retard
Dec 29, 2009
dsimcha
Dec 29, 2009
Don
Dec 30, 2009
Sean Kelly
Dec 30, 2009
Sean Kelly
Dec 30, 2009
Walter Bright
Dec 30, 2009
Nick Sabalausky
Dec 30, 2009
retard
Dec 30, 2009
retard
Dec 30, 2009
Nick Sabalausky
Dec 30, 2009
Nick Sabalausky
Dec 30, 2009
Don
Dec 31, 2009
Nick Sabalausky
Dec 31, 2009
Nick Sabalausky
Dec 31, 2009
Walter Bright
Dec 31, 2009
Nick Sabalausky
Jan 04, 2010
Daniel de Kok
Jan 04, 2010
retard
December 07, 2009
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
December 08, 2009
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.
December 22, 2009
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.
December 26, 2009
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.
December 27, 2009
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
December 27, 2009
== 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.)
> 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).
December 27, 2009
"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.


December 28, 2009
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.
December 29, 2009
== 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.
December 29, 2009
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.
« First   ‹ Prev
1 2 3