.NET Forum / Languages / C# / January 2008
General question to other developers...
|
|
Thread rating:  |
RvGrah - 17 Jan 2008 20:55 GMT I've been writing in C# for about 4 years now, coming from VB.net and VB6 before that, in which I know I'm not alone. I found learning C#, at least to the extent that I use it in developing database front- ends, to be rather painless. The language and VS ide seemed comfortable pretty quickly.
Some of the enhancements that have come along in the last two updates (via VS 2005 and 2008) like Generics and now Linq and anonymous types etc, are really nice, but seem to have made the learning curve a bit steeper. I'd like to see my son learn coding, but where I used to tell him he could get off the ground in a few months, that now seems more like two or three years. After all, how would you use Linq to Sql if you didn't understand T-Sql yet? And WPF seems like it has great potential, but that's another layer again.
Anybody have thoughts they care to share on this?
Bob
Jon Skeet [C# MVP] - 17 Jan 2008 21:18 GMT > I've been writing in C# for about 4 years now, coming from VB.net and > VB6 before that, in which I know I'm not alone. I found learning C#, [quoted text clipped - 12 lines] > > Anybody have thoughts they care to share on this? I don't think C# is an ideal first language, to be honest - particularly not C# 2 and 3. I've heard good things about Squeak, a Smalltalk variant often used for education.
 Signature Jon Skeet - <skeet@pobox.com> http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet World class .NET training in the UK: http://iterativetraining.co.uk
JTC^..^ - 17 Jan 2008 22:15 GMT Jon Skeet [C# MVP] <skeet@pobox.com> wrote in news:MPG.21f9d68e1969a79b7c6 @msnews.microsoft.com:
>> I've been writing in C# for about 4 years now, coming from VB.net and >> VB6 before that, in which I know I'm not alone. I found learning C#, [quoted text clipped - 16 lines] > particularly not C# 2 and 3. I've heard good things about Squeak, a > Smalltalk variant often used for education. It's difficult to argue my case as C# is my first and only language - next to T-SQL. I started learning about 2 years ago. I passed my 70-316 Window Applications exam after 1 year. Before that I'd already done 70-229 Sql Server 2000 Design and Implementation, so I had a head start I guess.
I didn't work as a programmer. I was (and still am) a tester working in a small development team, looking to give my self that little bit more to prove myself. I've recently started work along side the developers in the team on a C# application; two of which are VB6 developers. I'm acting as a mentor to get them using C#. From the start I've always concentrated on the concepts of OOP, so I simply think that way when I'm programming; trying to pass those concepts and my idea on the VB6 programmers is interesting and frustrating for both. They just struggle to grasp the OOP concepts.
IMHO, with the possible exception of the functions provided in .Net Framework, C# is just another programming language. Encapsulation and inheritance etc are powerful concepts with OOP, otherwise is there really that much of a difference? Yet as I said before "It's difficult to argue my case as C# is my first and only language".
Jon Skeet [C# MVP] - 17 Jan 2008 22:53 GMT <snip>
> IMHO, with the possible exception of the functions provided in .Net > Framework, C# is just another programming language. Encapsulation and > inheritance etc are powerful concepts with OOP, otherwise is there really > that much of a difference? Yet as I said before "It's difficult to argue my > case as C# is my first and only language". Yes, there are massive differences between different types of programming language. Have a look at things like Haskell or Lisp, and then compare them to C# again. Even consider "pure" SQL (rather than say T-Sql etc) - it's a different world.
 Signature Jon Skeet - <skeet@pobox.com> http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet World class .NET training in the UK: http://iterativetraining.co.uk
Ignacio Machin ( .NET/ C# MVP ) - 18 Jan 2008 14:44 GMT Hi,
>> Anybody have thoughts they care to share on this? > > I don't think C# is an ideal first language, to be honest - > particularly not C# 2 and 3. I've heard good things about Squeak, a > Smalltalk variant often used for education. In my university the classes were teached first in Pascal and now they use Java. This is the introductory curse, after that you use C++ for the most part.
IMHO you can use C# as a learning language and simply left out the most "tricky" features, after all you can still use "goto" in C# :)
But still for a complete picture you need to move out and explore other languages like C++ to deal with memory management and if possible a functional language too.
 Signature Ignacio Machin http://www.laceupsolutions.com Mobile & warehouse Solutions.
Edwin van Holland - 17 Jan 2008 21:20 GMT Bob,
The learning curve for basic .NET 2.0 is not that hard. Even if your son has little to none experience in coding he should be able to create console / form applications in no time. When using form applications he immidiately sees what he has created so its a good motivation to continue. When he has basic knowledge of C# it might be wise to show him some sql before letting him work with linq. the step will be small from there as the basics of linq aren't to difficult to understand with some sql knowledge.
Finally WPF: I can't say I've tested a lot of WPF features but what i've seen indeed has great potential. The only problem is that the components have different attributes and methods then the normal c# components so that development was not as easy as I hoped. Also, when deploying wpf over the internet as an xbap application all king of security issues come up.
Hope this information could be of any help
Edwin
> I've been writing in C# for about 4 years now, coming from VB.net and > VB6 before that, in which I know I'm not alone. I found learning C#, [quoted text clipped - 14 lines] > > Bob Peter Duniho - 17 Jan 2008 21:42 GMT > [...] > Some of the enhancements that have come along in the last two updates [quoted text clipped - 7 lines] > > Anybody have thoughts they care to share on this? I agree with Jon that C# is probably not a good choice for a first computer language.
Frankly, I think that someone first getting into programming, especially at a young age, should probably not even start out with an OOP language. For all its flaws as compared to other high-level languages in common use in the industry, BASIC still remains IMHO a very good introduction to the basic ideas of data storage, flow control, and i/o. There's a reason the word "beginner" is in the name. :)
And I'm not talking about an OOP variation of BASIC like VB or VB.NET either. Just plain old BASIC. Though, properly managed I think one could use a VB-based environment to introduce someone to programming. You'd just need to be careful to provide all of the non-BASIC goop for that person.
Another good starting language is Logo. Granted, it's a little more object-oriented and even a bit functional in nature, but IMHO it's still at its heart a straight-forward procedural language. It's also inherently graphical, which can make it a bit more fun to play with than BASIC (though frankly, when I was a child learning BASIC, it never once occurred to me that I might not be having fun even when the only output I could do was text).
I also think that Lisp can be a good starting language. It's actually a relatively powerful language IMHO, but it's fairly simple to describe at its most basic. Of course, the downside is that learning Lisp doesn't really give you much of an introduction with respect to the procedural environments that are the bread-and-butter of the software industry. But at least it helps a person start thinking in a more structured, computer-friendly way (which IMHO is an essential part of being a programmer).
Basically, I don't think that C#, or any .NET environment for that matter, is a very good way to introduce someone to programming. Even without the changes in C# 2.0 and 3.0, it's a fairly complicated, abstract environment and much better suited to someone that already has some good programming fundamentals under their belt.
Pete
Alun Harford - 17 Jan 2008 22:40 GMT >> [...] >> Some of the enhancements that have come along in the last two updates [quoted text clipped - 17 lines] > introduction to the basic ideas of data storage, flow control, and i/o. > There's a reason the word "beginner" is in the name. :) There's also a reason Dijkstra wrote:
"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration."
I don't think "beyond hope of regeneration" is quite right, but it certainly does far more harm than good.
Alun Harford
Peter Duniho - 17 Jan 2008 22:56 GMT > There's also a reason Dijkstra wrote: > [quoted text clipped - 4 lines] > I don't think "beyond hope of regeneration" is quite right, but it > certainly does far more harm than good. I don't understand that comment, and I think it's hopelessly narrow-minded. Just because Dijkstra knows something about programming, that doesn't mean he knows something about _teaching_ programming. That statement proves to me that he doesn't know enough about teaching.
An entire generation of programmers were raised on BASIC, myself included. I have not found my BASIC experience to be a liability, and in fact if anything it made me appreciate the more structured environments I was exposed to later. Beyond that, BASIC is extremely simple and provides a no-nonsense, no-complications initial exposure to the idea of thinking like a computer.
Frankly, I've seen far too many people approach programming from a sort of gestalt, holistic point of view, trying to do everything at once rather than applying a good methodical approach. They have no idea where to start, so they try to start everything all at once and fail miserably. I suspect that these people have been exposed to higher-level, highly abstract concepts far too early. They don't have the discipline required to work through problems a piece at a time the way that computers insist on.
And finally, any teacher who says that teaching a student is impossible is simply a failure as a teacher. Assuming a student who is willing, any competent teacher should be able to convey whatever concept they need to. Blaming that failure on the student or the student's prior experience is a cop-out. It is true that the "law of primacy" applies, and a student who has learned bad habits from their use of BASIC will have to unlearn them and this is harder than learning the good habits in the first place. But BASIC doesn't in and of itself cause bad habits (you can just as easily teach good habits in BASIC as elsewhere, within the limitations of BASIC of course), and in any case these bad habits are always unlearnable.
Maybe it's my own bias, based on my own experience, but I don't consider myself a bad programmer and I don't think that I was "mentally mutilated beyond hope of regeneration". I think it's silly for anyone to claim that BASIC is necessarily going to be a cause of something like this happening.
Pete
Arne Vajhøj - 18 Jan 2008 01:33 GMT >> There's also a reason Dijkstra wrote: >> [quoted text clipped - 16 lines] > simple and provides a no-nonsense, no-complications initial exposure to > the idea of thinking like a computer. Dijkstra worked as a teacher at a university for several years and wrote a book about teaching computer science, so he must have had some experience with teaching.
It should be note that he said that about BASIC in 1975. And the BASIC of 1975 was let us call it "basic" and did not have the capabilities of recent BASIC dialects like VB.NET and VB6.
Arne
Jeroen Mostert - 18 Jan 2008 01:35 GMT >> There's also a reason Dijkstra wrote: >> [quoted text clipped - 9 lines] > that doesn't mean he knows something about _teaching_ programming. That > statement proves to me that he doesn't know enough about teaching. It's a good thing he's dead, because he'd be deeply offended at that statement. Teaching programming (and discussing how it ought to be taught) was his life's work, you know. He was also a good programmer, but that's almost beside the point.
The thing is, Dijkstra had a very different view from what programming is (or ought to be) than most of us do, and it was that view he was trying to teach. That view is completely divorced from the "try stuff out and see where you end up" approach that BASIC encourages, and that's what his characteristically hyperbolic statement is getting at. I don't think he would have objected to the attitude per se (we all have to start somewhere), but what he definitely did object to was the Dark Ages he felt that BASIC (and for that matter still almost all modern programming languages) were keeping programming in.
I can tell you that Dijkstra certainly did know about teaching programming -- his kind of programming. Now, it's one thing to say that his kind of programming was too academic or incomplete to be a valid basis for teaching programming as we know it. That's undoubtedly true, and he himself knew it; he just thought everyone else was just wrong on that. For what he did teach, he taught it well.
I say this as a programmer who started out on BASIC, and who once sat in a class taught by Dijkstra. And while I must obviously disagree on his opinion that that therefore qualifies me as "mentally mutilated beyond hope of regeneration" :-), it also allows me to see why he *would* say that, and why it can't be taken literally.
> And finally, any teacher who says that teaching a student is impossible > is simply a failure as a teacher. On the other hand, anyone who claims that, given enough time and effort, *anyone* could be taught to program well, is arguably part of the problem. This was another one of Dijkstra's peeves. What do you mean, "elitist"?
 Signature J.
Peter Duniho - 18 Jan 2008 02:09 GMT > It's a good thing he's dead, because he'd be deeply offended at that > statement. That seems doubtful to me. How could someone who makes such blatantly offensive statements themselves be so easily offended?
In any case, if he would be offended, then he ought not to have made such an offensive statement. People in glass houses, etc.
> The thing is, Dijkstra had a very different view from what programming > is (or ought to be) than most of us do, and it was that view he was > trying to teach. If your point is that his idea of what's a "good programmer" is different from the rest of the world's idea, that's fine with me. But then the quoted statement is entirely irrelevant in this discussion.
> [...] >> And finally, any teacher who says that teaching a student is impossible [quoted text clipped - 3 lines] > *anyone* could be taught to program well, is arguably part of the > problem. I did qualify my comment as being applicable only to a student who is themselves willing to be part of the process.
There are obviously some people that are unteachable. Whether due to mental defect or simply their lack of interest in the topic. But otherwise, it is simply untrue that it could be impossible to teach a particular person a particular topic. Human beings are designed to learn, and given a student has all the normal functioning human intelligence and who is able and willing, they can be taught anything.
Pete
RobinS - 18 Jan 2008 07:49 GMT >> It's a good thing he's dead, because he'd be deeply offended at that >> statement. [quoted text clipped - 30 lines] > and given a student has all the normal functioning human intelligence and > who is able and willing, they can be taught anything. I used to believe that, but I don't any more. Not everybody can understand everything, whether because of their background, or because of some kind of wiring, I don't know.
Some people "get" math while to others it is incomprehensible.
I made A's in Organic Chemistry (eons ago) and it all made complete sense to me, where others who really, really wanted to do well in the class and spent hours studying, couldn't get higher than a C no matter how hard they tried.
Some programmers you work with see the patterns and know how it all fits together. Others barely get it to work and it hangs by a thread.
And when I was writing software with other developers for chemical plants, I explained repeatedly that pressure and temperature affect the volume of a fluid, but still got the same questions over and over again (the valve is open 100% all the time, but the volume fluctuates; why?) from the same two people because they just could not comprehend that one simple fact.
RobinS.
Peter Duniho - 18 Jan 2008 07:56 GMT > [...] > And when I was writing software with other developers for chemical [quoted text clipped - 3 lines] > from the same two people because they just could not comprehend that one > simple fact. All due respect, those experiences do not show that those people were unteachable. It simply shows that they failed to be taught.
In any case, we're not talking about people who are simply not "cut-out" to learn something particular. The thesis here is that there are people who cannot be taught to program well, but could have been if only they hadn't learned BASIC.
I think it's a pretty lame excuse for a teacher to blame their failure to be able to teach a person something on something that person had been taught previously.
Pete
Scott Roberts - 18 Jan 2008 16:16 GMT >> [...] >> And when I was writing software with other developers for chemical [quoted text clipped - 17 lines] > > Pete Actually, that's not the thesis at all. The thesis is simply that BASIC teaches more bad habits than good. I'm 100% certain that Dijkstra was simply stating that it's more difficult to teach programmers who started on BASIC, and tossed in a little hyperbole to make his point.
I'm not saying that I agree with that thesis, but at least argue the correct point.
Jon Skeet [C# MVP] - 18 Jan 2008 16:44 GMT On Jan 18, 4:16 pm, "Scott Roberts" <srobe...@no.spam.here-webworks- software.com> wrote:
> Actually, that's not the thesis at all. The thesis is simply that BASIC > teaches more bad habits than good. I'm 100% certain that Dijkstra was simply [quoted text clipped - 3 lines] > I'm not saying that I agree with that thesis, but at least argue the correct > point. I think it's reasonable to argue with the words Dijkstra used. Just to put both Dijkstra's words and Peter's understanding together:
Dijkstra: "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration."
Peter's interpretation: "The thesis here is that there are people who cannot be taught to program well, but could have been if only they hadn't learned BASIC."
It seems a pretty reasonable interpretation to me. It's possible that Dijkstra *meant* that it's harder to teach programmers who'd started on BASIC, but that's definitely not what he *stated*.
If we can all agree that what Dijkstra actually *stated* is unreasonable, we can move on to debate one particular guess as to what he *meant*.
Jon
Scott Roberts - 18 Jan 2008 18:10 GMT > I think it's reasonable to argue with the words Dijkstra used. Just to > put both Dijkstra's words and Peter's understanding together: [quoted text clipped - 12 lines] > Dijkstra *meant* that it's harder to teach programmers who'd started > on BASIC, but that's definitely not what he *stated*. Arguing semantics is pointless.
> If we can all agree that what Dijkstra actually *stated* is > unreasonable, we can move on to debate one particular guess as to what > he *meant*. The only debate worth having is one about ideas.
If you really think that Dijkstra's meaning was that it is literally impossible to teach good programming to someone who first learned BASIC because their brain has literally been mutilated beyond hope of regeneration, then you are 100% correct in calling his statement silly. In fact, it's so obviously silly that it's clearly not what he meant - which, of course, is the very definition of hyperbole.
jehugaleahsa@gmail.com - 19 Jan 2008 03:26 GMT On Jan 18, 11:10 am, "Scott Roberts" <srobe...@no.spam.here-webworks- software.com> wrote:
> > I think it's reasonable to argue with the words Dijkstra used. Just to > > put both Dijkstra's words and Peter's understanding together: [quoted text clipped - 27 lines] > fact, it's so obviously silly that it's clearly not what he meant - which, > of course, is the very definition of hyperbole. I like you Scott Roberts. :-)
Jon Skeet [C# MVP] - 19 Jan 2008 07:50 GMT > > Peter's interpretation: > > "The thesis here is that there are people who cannot be taught to [quoted text clipped - 5 lines] > > Arguing semantics is pointless. To me, arguing semantics is arguing the meaning. Without agreeing on the meaning of the quote we're discussing, anything else really is pointless.
> > If we can all agree that what Dijkstra actually *stated* is > > unreasonable, we can move on to debate one particular guess as to what [quoted text clipped - 8 lines] > fact, it's so obviously silly that it's clearly not what he meant - which, > of course, is the very definition of hyperbole. So contrary to what you said before, you *don't* want to discuss what was stated. You want to discuss what you happen to believe Dijkstra meant.
That's absolutely fine, and almost certain to be a more useful discussion, but I don't think it's reasonable to claim that what you believe he meant was what he actually stated.
 Signature Jon Skeet - <skeet@pobox.com> http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet World class .NET training in the UK: http://iterativetraining.co.uk
RobinS - 20 Jan 2008 18:11 GMT >> [...] >> And when I was writing software with other developers for chemical [quoted text clipped - 17 lines] > > Pete Thanks for the sideways insult; I appreciate that. I used to believe this, too, but over time have changed my opinion about it.
In school (many years ago), there were people in my classes that studied more than I did and just could not get some of the chemical engineering concepts, could not think logically, could not see the patterns of how things worked, while others (most) in the class could. Could the teacher have explained things differently? Maybe. But there are only so many ways to explain the pressure-volume-temperature relationship. It's a fairly simple concept.
As for people being taught BASIC and not believing they could ever do OO, I'm not sure I buy that. If you can figure out how to program in any language, you can probably figure out another. And doing it effectively is not the same thing as doing it correctly. I used to work with a guy that would get programs to work, but they were easily breakable anbd poorly designed. But he DID get them to work.
RobinS.
Peter Duniho - 20 Jan 2008 18:48 GMT > [...] > As for people being taught BASIC and not believing they could ever do > OO, I'm not sure I buy that. I don't buy it either, and that's the point here. The original statement as quoted is IMHO absurd, and not at all useful in the context of this thread.
jehugaleahsa@gmail.com - 19 Jan 2008 02:40 GMT On Jan 17, 7:09 pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com> wrote:
> > It's a good thing he's dead, because he'd be deeply offended at that > > statement. [quoted text clipped - 32 lines] > > Pete I had a probability teacher who claimed he had taught his 3 year-old advanced calculus. He wasn't bluffing, either. He wasn't a good teacher, but he was sure "a monkey could do it." In my experience, some people refuse to learn about programming. I have met masterminds who simply didn't like it. One students got an 105% on a test and then dropped the subject. *Shrugs* Other students have read entire books, done assignments multiple times over and still manage to get 30%. *Shrugs* Whether is interest of capacity is the question - I am not the type to pick a side and run for it. BTW, I am a fan of Djikstra, and I am fairly confident he had a wonderful sense of humor. :- )
.\\axxx - 18 Jan 2008 03:19 GMT My 2c...
It is more than likely that, if your son progresses in programming, he will be writing in an OOP environment. My belief (as an experienced software developer using pretty much any language you care to mention (yes, I'm THAT old)) is that the best thing to teach a student today is OO concepts. These are so poorly understood by so many developers today, that a good understanding puts you a step ahead. Whether C# is the 'best' language is debatable - and I think depends a great deal on age and prior experience. All those curly braces sometimes make it look a little scarey to first timers!
Remember, you don't have to look at the whole of the .NET 3.5 framework if you are teaching programming. Start with a simple Hello World form - click the button and change the label text. This introduces OO (and also alows the student to play with the form properties, (which can be a distraction in the classroom environment, I admit, but playing with properties is introducing OO in an easy way)
You can progress from there whichever way your fancy takes you - introducing just parts of the framework that are necessary to develop the program. Initially, I feel, this will involve introducing the usual programming concepts common to most programming languages - iteration and conditional programming being the two major constructs.
Moving on to databases does become increasingly complex - and (in my experience) DB concepts are often taught separately, introducing SQL outside of the development environment, so that when tying together some front ent program to a database, both ends are familiar to the student.
One problem that occurs here is the abilities of the teacher. Many teachers were brought up on procedural languages, and many take the 'it didn't do me any harm' view. This is a poor argument. I have a friend who never wore a bicycle helmet when he was young, and it never did him any harm either - so he lets his kids ride around without them. Of course, his school friend who was killed when not wearing a helment didn't grow up to sire any offspring...
.\\ax Software developer for more years than I care to remember, high school teacher for not very long at all.
Peter Duniho - 18 Jan 2008 03:43 GMT > My 2c... > [quoted text clipped - 5 lines] > understood by so many developers today, that a good understanding puts > you a step ahead. No question that OOP is going to be an eventual step for any serious programmer.
But. We don't insist that children go straight to walking. We let them practice crawling first. That allows them to master basic concepts like perception and navigation before they are up on two feet going too fast for their brains to keep up.
Likewise, even OOP programming still involves a lot of basic procedural implementation details. I don't care how well a person has been taught OOP design, if they haven't mastered the basic mechanics first they still won't be able to write a useful program.
> [...] > One problem that occurs here is the abilities of the teacher. Many > teachers were brought up on procedural languages, and many take the > 'it didn't do me any harm' view. This is a poor argument. In that situation, sure. I agree. A bicycle helment is demonstrably useful in preventing injuries and death that might otherwise occur. Just because someone lived through not wearing one, that doesn't mean a helmet's not useful.
But it's a pretty far stretch to use the same argument to justify a claim that learning programming without OOP concepts as an initial step is harmful to one's future as a programmer. All the evidence in fact argues against this claim. On the other hand, it's well-proved that when teaching something to a person, it does no good whatsoever to jump ahead to advanced topics before they have mastered the foundational elements.
Pete
.\\axxx - 18 Jan 2008 04:53 GMT On Jan 18, 1:43 pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com> wrote:
> > My 2c... > [quoted text clipped - 18 lines] > OOP design, if they haven't mastered the basic mechanics first they still > won't be able to write a useful program. I believe you think of OOP as being an advanced concept because it was learned by you post procedural coding - and not hand-in-hand. If we are going to be walking in a jungle environment, we shouldn't learn to crawl in a suburban loungeroom (sorry - running out of relevant examples). OOp is, if you like, the environment, so learning to program in that environment is, I would think, the best environment for learning. And learning procedural language can be done just as well in that environment as in another.
> > [...] > > One problem that occurs here is the abilities of the teacher. Many [quoted text clipped - 12 lines] > teaching something to a person, it does no good whatsoever to jump ahead > to advanced topics before they have mastered the foundational elements. All the evidence? You mean all the OOp programmers now who learned on procedural languages first? I've met a large number who were, frankly, crap at OOP - and I have never met a professional who was brought up on OOp from first principals - so what evidence?
and again - sure you need to teach the basics before going on to the advanced, but do you really think OOP is advanced? I think of it as simply a different way of thinking about a problem - and in fact with kids I find it makes more sense to them as a concept that 'pure' coding. Sure, they still need to learn how to write a function, and a loop, and an If and Switch (or whatever) (and, please, nobody teach them to use GoTo :) but doing this in an OO environment, using OO terms, is a great introduction to something which, at its heart, is not advanced - just different.
> Pete Peter Duniho - 18 Jan 2008 06:08 GMT > I believe you think of OOP as being an advanced concept because it was > learned by you post procedural coding - and not hand-in-hand. That's not why I think of OOP as being advanced. OOP requires a certain level of abstract thinking that is simply not even present in most young children. On the other hand, the idea behind a basic loop iteration (for example) is something anyone who can count and follow instructions can easily grasp.
OOP _is_ advanced. And not just because I didn't learn it first.
> [...] > All the evidence? You mean all the OOp programmers now who learned on > procedural languages first? I've met a large number who were, frankly, > crap at OOP Irrelevant. The assertion was that it's impossible to teach good programming practices to someone who started with BASIC. To refute that assertion you need only demonstrate some (or one, for that matter) programmers who started with BASIC but who have learned good programming practices.
Every field has what I believe to be a relatively high number of people who don't practice the field with proficiency. Honestly, in most cases I think it's more an issue of the people just not caring than anything else. Those people _could_ be good at what they do, if only they had some pride in their work.
But even if all those people are truly intractably bad at what they do, it's the _other_ people that are relevant. Those who serve as counter-examples to the false claim. And no matter how many bad programmers you find, there are plenty of the other kind.
> - and I have never met a professional who was brought up > on OOp from first principals - so what evidence? Well, unless it's your claim that you also have never met a professional who has learned good programming practices, then you have stated the evidence right here (anecdotal though it may be).
> [...] Sure, they still need to learn how to write a function, and a > loop, and an If and Switch (or whatever) (and, please, nobody teach > them to use GoTo :) but doing this in an OO environment, using OO > terms, is a great introduction to something which, at its heart, is > not advanced - just different. Even assuming you can successfully teach your student OOP, the OOP concepts cannot be used at all (in mainstream programming contexts) without the procedural/imperative foundation. It's a basic matter of primacy: you can write a program with imperatives but without OOP. You can't write a program with OOP but without the imperatives. Frankly, that's all it takes to know that one follows the other.
Pete
RvGrah - 18 Jan 2008 07:23 GMT Well I almost forgot about my pensive moment this afternoon. Thank you all for weighing in...
Let me add some preface. My dad wrote Cobol in the Sixties for Chrysler International out of their London offices. Later he wrote Basic for an insurance company stateside. He wanted me to learn coding when I turned 18 in 1973, but I had my head just about anywhere else, despite the fact that I had the ability to learn programming then as I do now. I finally got into writing code full-time for a living in 2000 (never actually had a computer until 1995!). This was after various careers, mostly in construction and as a contractor. I still work in the construction field, just as a developer for a larger construction company that has some ambitious software ideas.
My son is now 18, and I want him to learn to write code. He's going to go to a local school to learn Dreamweaver and graphic arts type things, but he has the smarts to just dive in and learn code, if he could develop the inclination and determination to do it. He has his head in music and all the other kinds of things 18 year olds do.
It seems to me at least, that for a smarter individual, seeing programs go together that right away have their own gui, colors, tricks is more gratifying than doing things that just print results to a screen. I know it did for me. I've shown him how to build a simple sql server set of three or four tables and then query them from C# and display results in an Infragistics grid. I'm sure he grasped all of it, but kids nowadays are a lot harder to amaze and surprise than my generation was 35 years ago.
I don't really think the whole OOP versus procedural thing is such a big issue. You can use VB.Net or C# as mostly a procedural language anyway until you start to grasp the concepts of how the tools you work with are all object based and then start building your own little classes and overrides as you see a need. All depends on the kinds of things you're developing... But the gratification factor is much higher, imho, with any "visual" language-ide.
Bob
Peter Duniho - 18 Jan 2008 08:01 GMT > [...] > My son is now 18, and I want him to learn to write code. For what it's worth, most of the children I am in constant contact with are significantly younger than that, and I made the assumption (bad idea, I know) that your son was younger too.
An 18 year old is basically an adult. They've still got a lot of maturing to do, but mentally they have completed the bulk of their development. In particular, they have pretty much all the necessary tools with respect to abstract thinking required for effective programming in any relevant situation. I think a motivated, interested 18 year old can learn programming in pretty much environment without the environment itself becoming a barrier.
It's a very different question than that of teaching young children, which is what I thought we were discussing. Obviously the relevance of my comments is significantly less, given the actual situation.
Pete
Jon Skeet [C# MVP] - 18 Jan 2008 08:22 GMT > > My son is now 18, and I want him to learn to write code. > > For what it's worth, most of the children I am in constant contact with > are significantly younger than that, and I made the assumption (bad idea, > I know) that your son was younger too. Ditto - partly because I'm beginning to wonder how and when to start my eldest off on programming, assuming he's interested. (He's 4 now. I'll get more fun a few years later, when I can start to teach the twins - an ideal way to start off with pair programming!)
> An 18 year old is basically an adult. They've still got a lot of maturing > to do, but mentally they have completed the bulk of their development. In [quoted text clipped - 3 lines] > programming in pretty much environment without the environment itself > becoming a barrier. Yup. I wouldn't like to start off teaching a young child about OO with things like polymorpishm, but a young adult is a different matter.
(Someone mentioned Logo and BASIC in the same post, btw - one of the most rewarding things I did as a 10 year old was to write a Logo interpreter in Spectrum BASIC. The Spectrum BASIC manual was brilliant - I learned trigonometry from it, effectively.)
 Signature Jon Skeet - <skeet@pobox.com> http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet World class .NET training in the UK: http://iterativetraining.co.uk
jehugaleahsa@gmail.com - 19 Jan 2008 03:09 GMT > Well I almost forgot about my pensive moment this afternoon. Thank you > all for weighing in... [quoted text clipped - 34 lines] > > Bob I have ran into this issue myself. Most people like to see immediate results, rather than having to work for them. I am still amazed by pong because I see the immense amount of technology that goes into it. However, and you can tell your son this, just making pictures becomes less and less rewarding after a while. Once you learn the tool and how to combine the features, graphic design becomes really, really tedious and unrewarding.
When I first started programming, I wanted to be a game programmer because I loved games. I loved how they looked, how they played. But deep down there was always this question in my head asking, "What magic makes thy computer run so?". And eventually the questions were answered through my computer science courses. And now video games are horribly boring to me. I am more interested in how they simulated that fire, or the g-force or how the computer manages all those 3D points. However, now I am more aware of what a computer is and I can use that to do things like make computer games from scratch.
Most of the code I write for fun doesn't do anything. It helps me do something. I like to write libraries. I like to fix other programmer's code. I like to learn why code works. Screw the final result! I found my niche.
Tell your son that programming is fun and keeps on coming. I think my job is more fun than a job should be. It is frustrating, yes, but it is also intense and when you finally get your head around it, it becomes like a playland.
Scott Roberts - 18 Jan 2008 15:57 GMT >> I believe you think of OOP as being an advanced concept because it was >> learned by you post procedural coding - and not hand-in-hand. [quoted text clipped - 6 lines] > > OOP _is_ advanced. And not just because I didn't learn it first. I'm curious how you reconcile your comments here with your assertion in another thread that use of delegates & anonymous methods is actually "more readable" than basic loop iteration (which, according to you, hides the intent of the code). I realize that delegates and anonymous methods are not, strictly speaking, OOP. But any rational thinker would admit that they are more advanced that basic loop iteration.
> Irrelevant. The assertion was that it's impossible to teach good > programming practices to someone who started with BASIC. To refute that > assertion you need only demonstrate some (or one, for that matter) > programmers who started with BASIC but who have learned good programming > practices. You seem to have missed the obvious hyperbole.
Peter Duniho - 18 Jan 2008 19:33 GMT > I'm curious how you reconcile your comments here with your assertion in > another thread that use of delegates & anonymous methods is actually > "more readable" than basic loop iteration (which, according to you, > hides the intent of the code). I never wrote that "basic loop iteration" "hides the intent of the code". I did say that the intent is harder to see, but that's a completely different statement. Please don't put words in my mouth.
As far as reconciling goes, there's no reconciling to do. In the other thread, I made it very clear that the question of "readable" is subjective and dependent on one's experience. The question was whether one should denigrate certain language concepts as being bad choices simply on the basis of one's own lack of understanding of the concepts.
That's a completely different question from whether one needs to learn one programming concept before moving on to another. You are comparing apples to oranges.
>> Irrelevant. The assertion was that it's impossible to teach good >> programming practices to someone who started with BASIC. To refute [quoted text clipped - 3 lines] > > You seem to have missed the obvious hyperbole. The quoted statement is only a contradiction of what I suggested if you take it literally. Hyperbole or not, it's not a valid refutation of what I wrote.
Pete
Scott Roberts - 18 Jan 2008 20:05 GMT >> I'm curious how you reconcile your comments here with your assertion in >> another thread that use of delegates & anonymous methods is actually [quoted text clipped - 4 lines] > I did say that the intent is harder to see, but that's a completely > different statement. Please don't put words in my mouth. I apologize. For the record, here is the exact quote:
"I _can_ tell you that I find the intent of the code much more apparent in the second version. The first version is very clear about the mechanics, but any interpretation of the intent is completely hidden."
(The "second version" refers to anonymous methods and delegates, the "first version" is an iterative loop)
I guess we simply differ in our understanding of the phrase "intent is completely hidden". I'm sorry that I apparently misunderstood you.
Peter Duniho - 18 Jan 2008 20:25 GMT > I guess we simply differ in our understanding of the phrase "intent is > completely hidden". I'm sorry that I apparently misunderstood you. You did. I was referring to a specific example. The statement was not a general indictment of looping constructs.
jehugaleahsa@gmail.com - 19 Jan 2008 02:54 GMT On Jan 17, 8:43 pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com> wrote:
> > My 2c... > [quoted text clipped - 37 lines] > > Pete My guess is that most American programmers don't write applications, but are responsible for scripts/batch files, etc. Whether they are programmers is also a good question. My guess is that the majority of the remaining programmers are grunts and rarely have part or say in the design of large software systems. Many programmers can survive just implementing skeletons, which requires almost no OOP at all, usually. I agree that OOP is extremely desirable for any programmer to understand; how many that do understand it can use it? If you want to be on top, learn a language as fluently as english, hammer design patterns and gather a ton of experience when to use them. A single man *can* write a library as complex as some provided by vendors; since he has complete understanding of the system, he can work faster. Build a few libraries, build some applications on top of those and then become a consultant or a software engineer. You just have to prove to someone that you know what you are doing. Clients like to see things work. I personally don't feel I have reached the level of experience needed. But C# is becoming as clear as crystal and OOP is old hat, now. However, I am already finding myself at the lead of many projects and consulting/teaching. Just remember that skills are only half the battle.
Thanks, Travis
Scott Roberts - 18 Jan 2008 15:47 GMT >> There's also a reason Dijkstra wrote: >> [quoted text clipped - 43 lines] > > Pete That's a pretty high soap-box, Pete.
Especially for someone who said this just the other day:
"I can't answer that question, not knowing enough college interns, and it having been far too long ago for me to really remember what it was like to be a college student myself."
Peter Duniho - 18 Jan 2008 19:34 GMT > That's a pretty high soap-box, Pete. And the original quote wasn't? Right.
> Especially for someone who said this just the other day: > > "I can't answer that question, not knowing enough college interns, and it > having been far too long ago for me to really remember what it was like > to > be a college student myself." Bravo. Very nice straw-man Scott. Blew right over, didn't it?
It's amazing what you can do when you take things out of context, eh?
Scott Roberts - 18 Jan 2008 21:00 GMT >> That's a pretty high soap-box, Pete. > [quoted text clipped - 10 lines] > > It's amazing what you can do when you take things out of context, eh? Sorry Peter, but yesterday you were claiming ignorance on the capabilities of new programmers (e.g. college interns) as it relates to the "readability" of various blocks of code. Today you seem to be an expert in the area of teaching programming to new students. Forgive me if I'm a little confused.
Peter Duniho - 18 Jan 2008 21:16 GMT > Sorry Peter, but yesterday you were claiming ignorance on the > capabilities of new programmers (e.g. college interns) as it relates to > the "readability" of various blocks of code. Read my posts again. You are misinterpreting them to suit your own whim.
In particular, the problem with understanding what's "readable" to a college intern or anyone else is that, AS I HAVE SAID NUMEROUS TIMES, that question is subjective in nature.
> Today you seem to be an expert in the area of teaching programming to > new students. Expert? No. But I do have some knowledge of teaching, yes. In any case, what's teachable has zero to do with what a person naturally finds "readable". Your conflation of the two issues is, quite frankly, absurd.
> Forgive me if I'm a little confused. You are forgiven, assuming you will stop trying to twist every little word into something it's not. You would do well to give the benefit of the doubt until you are sure you have comprehended what's been written. You're not doing that right now. Instead, you just make up whatever interpretation suits you and then use that false interpretation to buttress an invalid point.
Forgiveness is for those who are truly apologetic.
Pete
Alun Harford - 17 Jan 2008 22:42 GMT > I've been writing in C# for about 4 years now, coming from VB.net and > VB6 before that, in which I know I'm not alone. I found learning C#, [quoted text clipped - 12 lines] > > Anybody have thoughts they care to share on this? I don't think C# is a good first programming language.
The 'purer' functional languages are a much better bet. ML, Haskell, and (if you want a .NET language) F# are much better languages to learn first.
Alun Harford
Arne Vajhøj - 18 Jan 2008 01:20 GMT > I've been writing in C# for about 4 years now, coming from VB.net and > VB6 before that, in which I know I'm not alone. I found learning C#, [quoted text clipped - 12 lines] > > Anybody have thoughts they care to share on this? C# is not that bad a language to start with.
Just start with a reasonable level of ambition.
Do not jump to LINQ in week 2.
Of course there are other languages as well.
20 years ago Pascal was generally considered *the* language for learning programming.
It is not in favor today, but it is still a good learning language. Not too complex and you will learn good practices.
Arne
Family Tree Mike - 18 Jan 2008 01:22 GMT I just would add that my kids, started with "Scratch", a language from MIT. It teaches some of the basic principles before moving on to a more traditional language. I liken it to the old "Logo" language. Now the older one is dabbling in C#.
http://scratch.mit.edu/
> I've been writing in C# for about 4 years now, coming from VB.net and > VB6 before that, in which I know I'm not alone. I found learning C#, [quoted text clipped - 14 lines] > > Bob Kevin Spencer - 18 Jan 2008 12:43 GMT You may be experiencing some of your concern as a result of not seeing the long historical view of the development of programming languages, and the C family in particular. Programming languages have been evolving ever since the first Assembler code was created in order to facilitate the generation of machine code, which is ultimately what all code becomes. Your son should learn something about the foundations of programming languages before he dives into code. The point here is that programming evolves in nature, and programming languages evolve, but ultimately they all do the same things they did originally. Sequence, Selection, and Iteration underly all processes. All data is "simply" bits.
As for the C family, which I am particularly fond of (I started out with C, and have never regretted the decision), C was a fairly early entry into the high-level (read "above Assembler") language pool, with syntax resembling Pascal, which another poster mentioned. C was created to be concise and powerful, and to resemble the actual mathematical processes that it abstracted. For this reason, learning C can be very useful in terms of understanding what programming is, and what it does, including how the processor works, and the mathematical nature of all computer operations.
Each successive "version" of C, starting with C++, has been what might be characterized as an "extension" of the C language, which was intentionally designed to be extensible. C++ was literally such an extension originally, the first object-oriented C language, which abstracted the programming model further with object-oriented principles and additional syntax to accomodate these new abstractions. The "++" (iterator) in the name exemplifies this. C# took the abstraction further, and incorporated much friendlier syntax, in terms of these abstractions (Hence, the overlapping iterator symbols in the name). While a C++ program still looks a lot like the procedural C code that it is based upon, C# class-related code looks more like the abstractions which it represents. The syntax is less cryptic, but still strongly resembles C in most ways, and in fact, can accomodate in-line C code blocks.
Some of C# was developed to accomodate and interact with the .Net platform on which it operates, which includes automatic memory management (garbage collection) and object-oriented value types, something which C++ could not accomplish.
With each successive version of C#, more extensions have been added, such as Generics and Linq. These have been added for the same purposes, to simplify and streamline the coding process. But it is important to note that they are not necessary for writing software. They simply encapsulate functionality which formerly took more code to create. Therefore, it is not necessary to be able to work with all of these extensions to learn C#.
In other words, what I'm saying is that learning programming is a lot like the process of writing software. It is best handled one chunk at a time. So, you needn't worry about your son having to learn all of it (in fact, it is not possible, as it continues and will continue to evolve). Like anything else, if he starts with the basics, he can work his way up at his own pace. I'm not suggesting that you start him off with C, but he can easily learn the base C# language as you have, starting with the simplest concepts, and working his way up from there. The archetypical "Hello World" application remains the best starting place, as it involves the simplest sort of programming, and it is important not to overwhelm the beginner, lest he/she lose heart.
 Signature HTH,
Kevin Spencer Chicken Salad Surgeon Microsoft MVP
> I've been writing in C# for about 4 years now, coming from VB.net and > VB6 before that, in which I know I'm not alone. I found learning C#, [quoted text clipped - 14 lines] > > Bob Jeff Louie - 18 Jan 2008 19:20 GMT Bob.. My first Z80 assembly project moved a fish around the screen on an 8K Exidy Sorcerer. My second assembly project printed text sideways since all I had was a narrow thermal printer.
IMHO this type of positive feedback is really useful to a beginner, no matter what the language. So I would consider practical scripting use a script language as a first step, where the coder can see practical and useful results.
Regards, Jeff
jehugaleahsa@gmail.com - 19 Jan 2008 02:25 GMT > I've been writing in C# for about 4 years now, coming from VB.net and > VB6 before that, in which I know I'm not alone. I found learning C#, [quoted text clipped - 14 lines] > > Bob Depends on what your ambitions for your son are. If you want him to be a wise, all-knowing programmer, then you're getting ahead of yourself. There is no better way to start programming than with a simple "Hello, World". How you show him how to do it is the interesting part.
Now, personally, I prefer to teach programming starting from the command console application. I let more complicated topics like forms come in later, since they tend to limit you to one platform and they hide a lot of details. For simple console applications, C# is hard to beat. If he gets to the point where he needs collections, start him out with something simple like Array or ArrayList. When he gets tired of casting all the time, introduce generics.
Of my students, most of them pick up generics first by memorizing the syntax and then only later grasping the "fill in the blank" concept.
Again, personally, SQL is in itself a whole new programming language. It is an advanced topic for a starter. It is probably one of the most- used programming tools, as well. But, again, start with something simple, like flat files, and when he gets tired of parsing all the time, introduce 'a' database management system and portable SQL. When he gets tired of writing SQL in-line with the code, teach him stored procedures, and so on. There are so many branches in computer science that you can either become a master at one topic or you can fan yourself out over multiple topics. I fan myself out fairly well and it comes in handy for making good design decisions. I also don't like the feeling of being "done" with a branch because I like to keep striving to find newer and better ways.
I believe that becoming a good programmer involves being interested in what you are doing. If you hit topic after topic, spilling your brains out, you're just going to frustrate the kid. I have tutored/tortured enough people to know when too much is too much. For some people, getting the idea of 'Hello, World' is enough. For people with an interest, it seems to grow naturally without any help. I tend to get my students accustom to showing me everything they do. When they think they did some thing cool, I pat them on the back and say, "You know what would make this really cool?" or "Check this out!". A lot of times, just bringing up phrases like: design pattern, SQL, HTML, Web Service, XML, <language name>, <operating system>, <field of research> lets them know there are things out there for doing what interests them.
The way I see it, everyone at some point thinks MessageBox.Show is the sweetest thing ever. When we get tired of clicking 'OK', we want to try newer, harder things. My personal favorite thing to do anymore is just to write a cool application and spend the rest of my time improving it. Anyone can make something work; it takes talent to make it work well; it takes even more talent to make the code approachable.
And remember, you're not the best programmer in the world. Don't always correct his code by putting curly braces in the right place. He may develop his own style and defensive programming techniques that work better for him (and better than yours do for you). What is instructive, though, is to show flaws in logic by doing something to break his code. Say, "Oops"; it builds a competitiveness in the student to make their code unbreakable. When coders become defensive, they tend write better code the first time around . . . the proverbial "well, what if . . .".
Most of all, make learning programming fun. Don't go about "assignments" with anal requirements. Make applications straight- forward - something to "just get it done". One thing that always killed programming juices were assignments that asked students to parse lines, or something that could be done in an easier fashion. If your assignment is to parse lines, then make that the assignment. If it is to calculate an average, make parsing simple. Beginning programmers have trouble with assignments with multiple requirements because each requirement is a battle - which each can take a whole week - they don't need another one hanging over their heads to bog them down.
Here is a pretty generic agenda for programming students:
1) Hello, World - Simply learn the syntax and basic operation of the environment/language. 2) Hello, <Input> - Get user input and display it on the screen. 2.1) Introduce IF - Introduce conditional branching and have them output different results depending on input. 2.2) Introduce While, etc. - Introduce looping to perform an action multiple times. 3) Count - Count the number of lines in a file or from the command line. 4) Average - Calculate the average from numbers passed in. 5) Min/Max - Find the minimum/maximum in a list (can be done while receiving input). 6) Array - Store the input in a array and then print it out. 7) Cumulative - Redo the previous exercises with the array now. 8) Sort - sort the input using bubble, insertion, and/or selection sort (a mix between min, swap and iteration). 8.5) Introduce methods/functions - Place separate code into functions/ methods; e.g. Count, Sum, Average, Max, Min, Sort. 9) Multiple Arrays - Have input where the first item is a key and the other items are values. Store the items in separate arrays. Keep association between key and values by index while performing sorts, averages, etc. 10) Introduce Structures/Classes - Instead of storing information in in arrays and associating by index, create a class to contain all values. Repeat program above. 11) Introduce methods - Put calculations on objects into methods inside the object class. 12) Introduce accessibility/visibility - Hide fields, such as sum/ average, in private fields. Use properties to make visible or use properties to calculate. 13) Introduce inheritance - Create a super class. Explain keywords like virtual and sealed. 14) Introduce interfaces - Create interface for both classes. 15) Introduce abstract class - Create abstract base class for both classes. (Good time to teach "Concrete classes only as leaves") 16) Polymorphism - Stick both classes in an Array or ArrayList and extract as interface. Call method through interface. 17) Accessibility Part 2 - Explain protected and internal. 18) Introduce Generics - Make ArrayList above List<T>. 19) Data Structures - implement as easily as possible. 19.1) Array<T> - indexer, fixed-size 19.2) List<T> - add, remove, find (insert is advanced) 19.3) LinkedList<T> - insert on front/back/middle, remove, find (splice is advanced) 19.4) BinarySearchTree<T> - add, find (remove can be advanced) 19.5) Graph - shortest path, etc. 20) Forms - basics about forms. 21) XML - basics about. 22) Database - basics about SQL. 23) Source control - basics about source control. 24) Other technologies - other languages, systems programming, serialization, operating systems, algorithms, design patterns, etc. 25) Software Engineering/Architecture - explain requirements gathering, design, flow model, testing, etc. 26) Independent study - where you go, "You know what would make that even better?"
That is a fairly flexible path for someone to follow if they want to get the basics down first. Usually, students tend to pick things up as they go along. The further down the list they get, the longer it takes. Most of my students never get past data structures and get hung up somewhere between polymorphism and generics. Those who are interested seem to get to binary search trees, or beyond, before they start to struggle. A good thing to do is have a reference manual when teaching a new language. Wrox makes a fairly decent Professional C# book. It is a great supplement and gives students a chance to learn about features not covered in their lessons. I often reward students who find a .NET class to do their programs for them (I just make them do it over and give them bonus points).
I am not saying C# is the ultimate language for teaching. Mostly likely, any language you choose will have you hitting these topics. However, VS makes programming fairly easy and lightens memory load (Intellisense and what not).
Hope it helps, Travis
P.S. - I would like to say I do not agree with programming courses and books that teach classes straight forward. Many courses now teach classes first because of the requirement that all code be contained in classes in languages like Java and C#. However, when learning C/C++, you weren't required to know functions to work with "int main()". Students have trouble grasping Integers ("why can't they have decimal points and be as big as you want?") and putting a class in the mix can be even more confusing. Personally, I believe classes should be first thought of as syntactic candy and then later revealed. I mean, no language would expect a start-up programmer, let alone a professional, to understand console I/O. Let's try to keep it simple, stupid! That's my guff.
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|