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 Nick Sabalausky
bearophile bearophileh...@lycos.com 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 on 

Dreadmoon Andromeda Release

2009-12-30 Thread Clay Smith

http://dreadmoon.com/index.php?option=com_contentview=categorylayout=blogid=3Itemid=14

http://dreadmoon.com/

This release is primarily intended to eliminate a major roadblock to 
the development of games and multimedia applications under Linux that is 
a consequence of the fact that many of the related software libraries 
are not available as installable packages.


These many libraries are the D libraries and programs required to have a 
build system on Linux. Tools are in developmental phase, as is the distro.


DM Andromeda currently sports the arc03 branch, also.. 
http://arclib.blogspot.com/2009/12/source-code-repository-moving-to-github.html


All ideas are welcome for the distribution. Email clay dot smith dot r 
at gmail dot com.


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 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, 
monads, monad transformers, comonads, and analysing amortized costs of 
algorithms at 

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 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 Nick Sabalausky
Sean Kelly s...@invisibleduck.org 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 Nick Sabalausky
retard r...@tard.com.invalid wrote in message 
news:hhg67l$1lj...@digitalmars.com...
 Wed, 30 Dec 2009 13:13:07 -0500, Nick Sabalausky wrote:

 Sean Kelly s...@invisibleduck.org 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 Nick Sabalausky
Nick Sabalausky a...@a.a wrote in message 
news:hhgac3$1vc...@digitalmars.com...
 retard r...@tard.com.invalid wrote in message 
 news:hhg67l$1lj...@digitalmars.com...
 Wed, 30 Dec 2009 13:13:07 -0500, Nick Sabalausky wrote:

 Sean Kelly s...@invisibleduck.org 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
Walter Bright newshou...@digitalmars.com wrote in message 
news:hhgv3b$7c...@digitalmars.com...
 Nick Sabalausky wrote:
 Sean Kelly s...@invisibleduck.org 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
Nick Sabalausky a...@a.a wrote in message 
news:hhhfd4$12t...@digitalmars.com...
 Don nos...@nospam.com 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.