September 30, 2008
Chris R. Miller wrote:
> Sean Kelly wrote:
>> Chris R. Miller wrote:
>>> Sean Kelly wrote:
>>>> == Quote from Chris R. Miller (lordsauronthegreat@gmail.com)'s article
>>>
>>>>> At a certain point you have to pedagogically ask the student to take
>>>>> certain things on faith until you can better explain it all.
>>>>
>>>> Fair enough.  But the amount each student is willing to take on faith varies.
>>>
>>> It doesn't matter what they're willing to take.  You are the instructor.    In due time you will make all things known.  For now they need to just shut up and do what they're told.
>>
>> And some will become frustrated and change majors, fail out, etc.
> 
> Probably a better thing for them.  If they can't deal with approaching a new and foreign concept by gently probing into it, they probably won't fare well in the rest of Computer Science as well.
> 
>>> Yes, standardized education for nice little standardized children!
>>
>> If children were all the same then this wouldn't be a problem, as you're clearly aware :-)
> 
> I have several classic quotes (of my own invention!) related to that topic, perhaps my favorite of which:
> 
> School is like a trash compactor: we stick our kids in and expect to have nice little rubbish cubes come out that stack nicely with the rest of the stinking trash heap we like to call "modern society."
> 
>>>> Some will accept pretty much anything as magic, while others want to know
>>>> how a function call works mechanically (or in some cases conceptually, if
>>>> they're math geeks) before they feel comfortable actually calling functions.
>>>
>>> I have seen many different kids from all three ends of this triangular spectrum do just fine with Java.  I got curious and started experimenting with it, trying to make my own classes at month 4. Eventually I figured out how they worked syntactically so I could use multiple classes in my programs (the files were getting too big for my tastes, I just wanted to split stuff up).  Later on the explanation of why and how they worked came and I had this great big "ah hah!" moment and I was ruined as  a Java pro ever since.  It's been four long years of deprogramming myself to get off of Java, so I'm doing well.  ;-)
>>
>> In my experience, students with a math background often tend to do better with functional languages, since the way they work is a bit closer to the mathematic definition--immutable variables, no global state, pure functions, etc.  My wife is one such person, and between that and her need to know the details behind how things worked before she could apply the concepts she was pretty much the antithesis of the standard approach to teaching CS.  Once she got to the more theoretical or low-level classes like computer architecture, algorithm analysis, compiler design, AI, etc, she had no problem at all.  But those first few programming courses were incredibly frustrating for her.
> 
> I think that part of computer science is appreciating the proverbial "black-box" of architecture and learning how to use an abstracted system that you don't know how the whole thing works.  To a degree you need to train yourself to ignore the dead zones in your understanding and to do the best with what you have.
> 
> She must be really fond of closed-source proprietary APIs that hide everything about their implementation, eh?  ;-)


Somehow my sarcasm senses tickle. Somehow.
September 30, 2008
bearophile wrote:
> Chris R. Miller:
>> Probably a better thing for them.  If they can't deal with approaching a new and foreign concept by gently probing into it, they probably won't fare well in the rest of Computer Science as well.
> 
> From what you say you are an awful teacher :-]

Ironically not.  Just goes to show that people with poor opinions can still become semifunctional members of society.  ;-)

> I'm glad to have had teaches way better than you.

Hence why I don't try and teach.  I just don't think that it's a good idea to force a student to learn something that they might not have any real aptitude with.  As my old saxophone teacher used to note, there are two quantities in students that make success.  The first is talent, the other is determination.  A student with talent and little determination fails, but a student with little talent and all the determination in the world succeeds.

I suppose I over-simplified in my original statement.  There are (many) more variables that I would want to factor in before recommending that someone continue exploring other career/hobby opportunities.
September 30, 2008
Sean Kelly wrote:
> Chad J wrote:
>> Hmmmm, now this may be of zero interest to the OP, but I the appearance of yet another programming pedagogy thread has caused me to spawn a crazy idea.
>>
>> Disclaimer:  This is probably a bad idea.
>>
>> So what if one of the ways to institutionally teach beginning programming was to just institutionalize the way I learned how to program?  You set up an Ultima Online server.  Customize it to cater to macroing/botting.  So it's kind of like robocode, but more RPGish and with some obligatory grindy numerical crap that has to be done before you are actually good at the game.
> 
> In my wife's AI course the students built simulated robots which competed in various contests (navigate the maze fastest, etc).  I think it was a fun way to get students interested in the material and think about how to apply it in a practical manner.  This is my succinct way of agreeing with your idea of making courses fun for the students :-)

It works.  I learned Java in a similar manner:

http://pclc.pace.edu/~bergin/KarelJava2ed/Karel%2B%2BJavaEdition.html

I've been itching to write a DWT incarnation just for kicks.  Imagine...

Karel D. Robot.  Stronger.  Faster.  On the whole more delicious than a cookie!

I thought it could help showcase the power of D as a real programming language.  Then I got roped into another project so I had to shelf the idea.  :(
September 30, 2008
<de-lurk>

I know BASIC and Microsoft are probably scorned here, but in this situation Visual Basic might be worth considering at least. Students can download the Express Edition for free ( http://www.microsoft.com/Express/VB/ ) and have a complete development environment. And there are some tutorials there to get started.

I wouldn’t recommend future developers bother with it. But since these students are biologists and not future software engineers, it may not be so important that they avoid a “bad” language that they will have to unlearn later. In the future they’ll just want something that they can use to quickly and easily get something done. A lot of people use VB to get things done.

Having said that, I haven’t actually tried VB Express Edition to see how easy it is. But I use Visual Studio every day for C++ and some C# and it’s a decent environment. In the old days, before C became popular, BASIC was one of the first languages I used and I don’t think it screwed me up too badly (although I guess that’s open for argument :-) ) In any case, it’s probably a good idea to use a dynamically-typed language.

I used Scheme for a while in college many years ago and while it’s a good thing to teach programmers, at the time I found it hard to debug. We had no step debugger for it. Maybe things have improved since then. But I think the tools and environment you have to work with can be important too, not just the language itself. It’s harder to learn something in a limited amount of time when you have to struggle with the tools.

Jim

</de-lurk>

September 30, 2008
If there was no D, I would argue for Java as the first language. However, D has a well defined subset (called SafeD) which is almost isomorphic to Java, except that it doesn't force OO on you (main is not an object, writeln is not anybody's method, you don't have to box integers, etc.).

When you introduce classes, you don't have to worry about private/public. This comes later, when you teach modules (separate source files). Even types are easier to teach because of some built-in type inference (the keyword "auto"). So SafeD has a very gentle learning curve.

D's standard library is quite adequate for teaching basic data structures and algorithms. It's also very easy to write a programs that list directories, read and write files, etc.

The only major problem with D is the lack of good programming/debugging environment. There's nothing that explains the functioning of a program better than single-stepping through it under a symbolic debugger.

--Bartosz

Nicolas Sicard wrote:
> Hi,
> 
> I am new to D, and I think I have discovered a programming language close to my ideal one...
> 
> On the web site, it is said: "Who D is Not For [...] As a first programming language - [...] Java is more suitable for beginners.".
> Is this based on experience?
> 
> I am a teacher in a field where my students don't know what a programming language is! I need a language for a first approach of programming. I would say that Pascal, or BASIC even if a bit outdated, or even D would fit, but not Java.
> 
> I can imagine my first lesson with Java:
> 
>     public class HelloWorld {
>         public static void main(String[] args) {
>             System.out.print("Hello world!");
>         }
>     }
> 

In D it's simpler. Simpler even than in C (no need for \n):

import std.stdio;

void main()
{
    writeln("Hello world!");
}

From which you can progress easily to:

writeln("The number is: ", 16);

Although, how this works is a bit of advance magic ;-)

> I would have to explain what a class is. What a method is. What a public or private visibility means. What a static method is. What the dots in "System.out.print" mean... :) Then how to compile it. Why you can't run it without a virtual machine. A virtual what?
> 
> It seems the main argument why Java is a good first language is that it lacks complexity (namely C++ complexity). I think it also lacks simplicity for absolute beginners. D can be both simple and complex, and it shares other features with Java that could make it a language for beginners: object-oriented, no pointers necessary, garbage collection, strict type checking, portable...
> 
> What feature would make D a worse choice than Java for a first language?
> 
> Nicolas
September 30, 2008
On Tue, 30 Sep 2008 20:08:18 +0200, Sean Kelly <sean@invisibleduck.org> wrote:

> Chad J wrote:
>> Hmmmm, now this may be of zero interest to the OP, but I the appearance of yet another programming pedagogy thread has caused me to spawn a crazy idea.
>>  Disclaimer:  This is probably a bad idea.
>>  So what if one of the ways to institutionally teach beginning programming was to just institutionalize the way I learned how to program?  You set up an Ultima Online server.  Customize it to cater to macroing/botting.  So it's kind of like robocode, but more RPGish and with some obligatory grindy numerical crap that has to be done before you are actually good at the game.
>
> In my wife's AI course the students built simulated robots which competed in various contests (navigate the maze fastest, etc).  I think it was a fun way to get students interested in the material and think about how to apply it in a practical manner.  This is my succinct way of agreeing with your idea of making courses fun for the students :-)
>
>
> Sean

We're currently doing robocode (http://robocode.sourceforge.net/) in my AI classes.  Loadsa fun.

-- 
Simen
October 01, 2008
Chris R. Miller wrote:
> 
> I think that part of computer science is appreciating the proverbial "black-box" of architecture and learning how to use an abstracted system that you don't know how the whole thing works.  To a degree you need to train yourself to ignore the dead zones in your understanding and to do the best with what you have.

Agreed.  It may have simply been an issue for her because she was in a learning environment and so had different expectations than she would have otherwise.

> She must be really fond of closed-source proprietary APIs that hide everything about their implementation, eh?  ;-)

*snicker* :-)


Sean
October 01, 2008
Bartosz Milewski wrote:
> If there was no D, I would argue for Java as the first language. However, D has a well defined subset (called SafeD) 

Defined where? All I've seen is one blog post. I don't think we can recommend something which doesn't exist yet.
(Though I agree that when it does exist, it could be a great teaching language).

October 06, 2008
Sean Kelly wrote:
> Walter Bright wrote:
>> bearophile wrote:
>>> So beside asking the age of your students, a second important
>>> question to ask you is the kind of things you want to teach, and the
>>> kind of students you have. If your purpose is to teach just
>>> programming, then Java may be better. If your purpose is to teach
>>> some math too, to think in a flexible way, logical thinking,
>>> recursivity, functional programming, parallel thinking, and so on,
>>> then maybe Scheme is a better choice, despite it's almost useless
>>> compared to Java.
>>
>> That's a very good point. If my students intended to become top professionals and had a keen interest, I'd start them with assembler, and follow up with D. If they were 9 year old kids wanting to toy around, I'd probably start with a language with instant gratification, like javascript.
> 
> Also, different people learn best in different ways.  Some can't focus on high-level issues unless they understand what's going on under the covers, while others are the opposite.  If I were to design a curriculum I'd suggest the bottom-up approach (ie. architecture to assembler to D), but leave students the option of doing the reverse as well.  At least insofar as these first few courses are concerned.
> 
> 
> Sean

Starting programming in C/C++ without having assembler or processor architecture knowledge is indeed probably not the best. But truly high-level languages should shield (abstract) you from that, so that you can start programing right away without having to learn a lot of low-level stuff first.

In my university, the curriculum is designed so that one starts learning from both ends (top and bottom). The first semester has an introductory programming course with Scheme where you learn the basics of programming and data abstraction, and on the other end a Digital Systems course (flip-flops and boolean logic, not yet programming). On the second semester the students have courses on assembler programming (and microprocessor architecture), and on C programming. Only on the third one there is a course about Java and Object Oriented programming.

-- 
Bruno Medeiros - Software Developer, MSc. in CS/E graduate
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
1 2 3 4 5
Next ›   Last »