Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Teaching programming - a few thoughts

Options
  • 21-09-2009 1:21pm
    #1
    Registered Users Posts: 7,468 ✭✭✭


    I've recently just finished running course on VB.Net and Java. 17 out of 20 students got their diplomas and 3 have exams to repeat this week so I'm happy that I've done a good job. But tbh I used Netbeans with Java as the course was short on time, and in hind site I shouldn't have gone to an IDE straight away.

    I went with Netbeans as it was more rewarding for the students to put stuff on screen as they were used to this following the vb.net section of the course. While I think the word *mistake* is too strong in this case, I don't think I should have used the IDE off the bat. Notepad and the java compiler, on the other hand, is a pain in the ass when you're trying to support 20 student programmers at once. It's simply not practical.

    I think something like editplus that supports projects, auto-indentation, code highlighting and limited auto-completion (but not intellisense) can step in an replace notepad. It can also be configured to run the java compilier at the command prompt. Its like notepad on steroids. I believe Notepad++ is similar. I amn't available for comment on *nix as I've only recently started using Ubuntu. That being said something like IDLE would rock.

    If I were to run the course again, which I'm not as they original lecturer is back from leave, then I would go with editplus or another programmers text editor. It would force the students to really have to work on getting the most simple projects working and this, for want of a better word, beats the basics into them. I would also teach Java before VB.NET - yes VB.NET is OOP but its waaay to forgiving and may have people believing that the job is easy.


Comments

  • Closed Accounts Posts: 5,096 ✭✭✭--amadeus--


    That's a very broad brush you are painting with there!

    I think there are a huge number of variables in play - too many to make a cast iron rule for.

    For example which are you placing more importance on - students knowing correct syntax ("always close a SQL statement with a ;") or *thinking* like programmers (loops, conditionals, data flow, understanding the concepts of variables, arrays and so on). If correct thinking is more important then an IDE as it "covers up" sloppy coding and frees the student to concentrate on structures.

    IDEs also make it easier to spot student errors when walking around multiple screens - colour coded keywords and capitalised objects mean you can scan code over someone's shoulder and spot the mistakes.

    However bad habits learned early are hard to shake so you may want to remove teh safety net as early as possible. And it depends on what the students will be doing - programming for a living or just hacking stuff for thier employer or fun? And if they are experienced coders or total novices.


  • Registered Users Posts: 40,038 ✭✭✭✭Sparks


    That's a very broad brush you are painting with there!
    Yeah, but it's hardly a fine detail - students are meant to learn the basics first, not the industry shortcuts. Those come after you know what it is you're trying to do, and should ideally be taught along with the cons of those tools as well as their advantages.
    If correct thinking is more important then an IDE as it "covers up" sloppy coding and frees the student to concentrate on structures.
    An emphasis on correct thinking does not forgive sloppy work! If you want to avoid language lawyers and focus on architecture, then that's down to the language chosen - pick something that hides away the machine, not the language. Teach in python rather than C. But letting the IDE do the work of programming... euch. We've too many wizard dialog boxes in IDEs for industry programmers, let alone students!
    IDEs also make it easier to spot student errors when walking around multiple screens - colour coded keywords and capitalised objects mean you can scan code over someone's shoulder and spot the mistakes.
    And in the process, you deny them completely the one thing you should be teaching them in the practical labwork in that situation - ie. how you searched for and found and fixed the bug.


  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    They were complete novices.

    With something like editplus its not an IDE so to speak, no wysiwyg or anything like that, but it does lend itself to writing code better then notepad.

    Like notepad it would still give them a greater understanding of debugging their code and code syntax than an IDE that highlights syntax errors as you type and can autocorrect them for you. This is at the initial stage, once they get their heads around that then its time to move to an IDE. A programmer who can't use an IDE is like a a bicycle for fish imo.

    My approach was, get the syntax down, get sequence, selection, iteration down, get some understanding of objects down and then try to teach them how to solve problems like a programmer rather than teach them a specific programming language if you know what I mean. Its an approach that worked too.


  • Registered Users Posts: 40,038 ✭✭✭✭Sparks


    Just to be upfront about it, by the way, I get that sometimes you have to use an IDE to teach stuff. With the course I've got coming up, we will be using an IDE - but it's an embedded systems course, it's on a very short timeframe, and it's at MSc level. So on the one hand we've been forced into the use of the IDE (which isn't as heavyweight as Visual Studio) even though I'd rather let them use a GNU toolchain from the commandline (and I'm going to try to work that in there, even if there's no labtime for it); but on the other hand, they should already have learnt basic programming and it's an introductory course, not a fundamentals course.

    But if it was a fundamentals course, then we'd use the discrete, command-line tools. Hands down, no question. Even if we had to radically cut back on what we'd cover because of the amount of time available.


  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    A few of things I've learned as a lecturer/course manager.

    1. Know your stuff, and when you don't say so. 20 programming students is a room full of intelligent people. You won't be able to bluff (I didn't try to bluff btw).
    2. Say you don't know when you don't know. So good I'll list it twice: There's nothing wrong with not knowing something - the ability to understand once its been explained is far more important in this field. Sitting in silence is a serious handicap for you, your class and/or your team. It wastes valuable time. If somebody points and laughs, well, then you know who the weakest person on the team is, don't you? [It's pointy, sneery person.]
    3. Time spent trying to learn something is time well spent and something will be learned. When I was studying I'd spend hours at night trying to get simple code working and got frustrated to the point of tears sometimes, then I'd walk away thinking I was sh*te. Standing in front of a class everyday it becomes obvious quite quickly who's spending time doing that and who isn't.
    4. No-one is the font of all knowledge, don't expect them to be. Otherwise know as: Make an effort FFS.
    5. Doing exams is a skillset in it's own right. Committing stuff to short-term memory is a good idea.
    6. Be good at what you do, but don't brag and never criticise. Nobody likes a no-it-all and will enjoy pointing out your mistakes. Modesty is an important trait, nuture it.


    And Finally... one "Well done, that was good." is worth a hundred explanations.


  • Advertisement
  • Registered Users Posts: 9,579 ✭✭✭Webmonkey


    Evil Phil wrote: »
    A few of things I've learned as a lecturer/course manager.

    1. Know your stuff, and when you don't say so. 20 programming students is a room full of intelligent people. You won't be able to bluff (I didn't try to bluff btw).
    2. Say you don't know when you don't know. So good I'll list it twice: There's nothing wrong with not knowing something - the ability to understand once its been explained is far more important in this field. Sitting in silence is a serious handicap for you, your class and/or your team. It wastes valuable time. If somebody points and laughs, well, then you know who the weakest person on the team is, don't you? [It's pointy, sneery person.]
    3. Time spent trying to learn something is time well spent and something will be learned. When I was studying I'd spend hours at night trying to get simple code working and got frustrated to the point of tears sometimes, then I'd walk away thinking I was sh*te. Standing in front of a class everyday it becomes obvious quite quickly who's spending time doing that and who isn't.
    4. No-one is the font of all knowledge, don't expect them to be. Otherwise know as: Make an effort FFS.
    5. Doing exams is a skillset in it's own right. Committing stuff to short-term memory is a good idea.
    6. Be good at what you do, but don't brag and never criticise. Nobody likes a no-it-all and will enjoy pointing out your mistakes. Modesty is an important trait, nuture it.


    And Finally... one "Well done, that was good." is worth a hundred explanations.
    That was helpful.


  • Registered Users Posts: 1,922 ✭✭✭fergalr


    Evil Phil wrote: »
    I've recently just finished running course on VB.Net and Java.
    I think I see the problem. ;-)

    Joking aside, in a discussion on the best way to introduce programming to people, I'm not sure that VB.net is the way to go for a first course.


    I think all first courses should have an algorithmic problem solving part, where people try and figure out ways, and discuss ways to solve problems without going near a programming language. I think that's the first essential. ('Insert sort these 10 cards.', 'Move these towers of hanoi and tell me how you did it', ' can you think of a more efficient way to pack this box?', 'how far can you go crossing each bridge only once? why?')

    I think that a huge variable to be considered when deciding how best to introduce people to programming is how motivated they are as individuals, and how intellectually mature they are. In fact, I think this is the key thing that should determine the teaching strategy.

    I think that if you are dealing with people that are mature, and self confident, and not likely to run out of motivation, then a language like C (via notepad) is a good starting point. Its rigorous, and, fundamentally, it provides a very consistent programming metaphor - its not a very leaky abstraction. People spend much time learning something early on, only to be told later, when something won't work, that 'oh, well, thats not exactly how it works under the hood' Perl, I'm looking at you.

    Now, I say this works well for motivated and mature individuals, because otherwise the sharp initial learning curve, and the poor early productivity payoff for the time spent will make people demotivated and want to go do something else.

    I know a good few people would be ready to jump in and disagree here, and say that if the material requires a lot of motivation, then it is being taught wrong. And in an ideal world, that'd be true. But I think that sometimes doing the hard stuff first produces better programmers in the long run, and I think that if the students are willing to persevere and work really hard at the hard stuff, and accept poor initial payoffs ("I did all that just to print a reversed line of text??"), they'll end up with a better understanding of the fundamentals in the end. Wax on, wax off...

    In a situation where you have slightly less well motivated, or less self confident, individuals (who aren't sure programming is for them, and aren't sure they're willing to follow through all the way), you could substitute something slightly more forgiving, like java, or even python, instead of C.

    If they are even more shaky, I think a combination of languages is useful. Something very high level, like lego mindstorms, or robocode, or a videogame scripting language, (or even something like Alice http://www.alice.org/ - seen it?) in combination with a more low level language (java via eclipse, python) might serve to show people that you can do cool stuff with all this programming, and keep them interested.

    I still wouldn't recommend VB for this though - still think its too leaky. Something very limited, and with a smaller set of features, and high visual impact would probably be better - again, only to serve as a carrot to teach them the high level pictures, and help them through the more fundamentals part of the course.

    *soapbox disclaimer: I'm not a lecturer of any shape or form.


  • Registered Users Posts: 7,681 ✭✭✭Trampas


    I think Edit Plus is good for teaching people to code in.

    You could easily spend a lecture trying to get net beans installed and up and running which wouldn't happen with edit plus.

    I used both edit plus and net beans when I did my degree in college.

    I could understand net beans for a huge project but overkill for java if you ask me.


  • Closed Accounts Posts: 1,567 ✭✭✭Martyr


    i prefer Notepad++ as an alternative to windows notepad.

    ConTEXT is also quite good but 0.98.5 was a little buggy at times, haven't tried 0.98.6 yet.

    both are free of course.


  • Closed Accounts Posts: 2,696 ✭✭✭mark renton


    simple resolution people - introduce C before Java


  • Advertisement
  • Closed Accounts Posts: 1,397 ✭✭✭Herbal Deity


    Do any lecturers/teachers actually tell their students to use Notepad?? Programming in Notepad is one of the more daft things I've heard.

    I haven't used Edit Plus, but I know that Notepad++ is great and would be my text editor of choice in Windows.

    Were I to teach Java to complete beginners, however, I'd use Eclipse. I wouldn't go near GUI stuff until a much later date and would make them use something like Scanner for IO.

    In fact, before I'd teach them GUI stuff, I'd make them learn C and to use Vim.


  • Registered Users Posts: 1,922 ✭✭✭fergalr


    Do any lecturers/teachers actually tell their students to use Notepad?? Programming in Notepad is one of the more daft things I've heard.

    I haven't used Edit Plus, but I know that Notepad++ is great and would be my text editor of choice in Windows.

    Were I to teach Java to complete beginners, however, I'd use Eclipse. I wouldn't go near GUI stuff until a much later date and would make them use something like Scanner for IO.

    In fact, before I'd teach them GUI stuff, I'd make them learn C and to use Vim.

    I wouldn't see teaching newbies to use 'vim' as a particularly productive way to start their programming education. I like Vim, and use it regularly. But its a pain to use to the start, its arbitrary and confusing, and not discoverable, and learning to use it doesn't further your understanding of programming very much, or enhance the motivation of the beginners.

    The reason I'd say notepad isn't a bad idea to start with is that it is very simple, and everyone is already familiar with it, and it really gets across to people the idea that they are just editing a text file, and that the compiler will just read the instructions in that text file and act upon them.

    Sure, its not a great long term development solution - of course not! - but it does keep things pretty simple at the start.

    A complex IDE like eclipse (which I really like) adds a lot of mental overhead to the process at the start.
    The beginners aren't sure what the IDE is doing and what the program is doing. It's a lot of extra functionality that can confuse them, and make the sharp programming ideas they are trying to learn fuzzier.


  • Registered Users Posts: 40,038 ✭✭✭✭Sparks


    fergalr wrote: »
    I wouldn't see teaching newbies to use 'vim' as a particularly productive way to start their programming education.
    [vim is] arbitrary and confusing, and not discoverable, and learning to use it doesn't further your understanding of programming very much
    [notepad] is very simple, and everyone is already familiar with it
    There's an interesting point buried in there. Vim seems odd to someone who started editing with notepad... but it doesn't seem odd to someone who didn't (like me - I predate notepad :D ). Vim is actually quite logically arranged if you've never used notepad. It makes two assumptions - (1) that you think of writing and editing as the seperate activities they are; and (2) that you can touchtype. I fell into both those categories, so I found it easy. Someone who's used to having a single mode in their text editor (like in notepad) where all the actual editing is done by special key combinations and menus, probably wouldn't see the reason for having seperate editing and insertion modes and using the main keys on the keyboard. Someone who started off on dumb vt100 terminals wouldn't have difficulty seeing the reason and if they could touchtype, they'd appreciate the choice of keys used (as they're based around touchtyping). Trust me, you spend much time typing on one of these things and you'll appreciate them too:

    Terminal-dec-vt100.jpg
    Note the lack of F-keys and the low number of non-alphanumeric keys in general

    On top of which, of course learning an editor won't teach them about programming. Learning a language probably won't teach them much about programming either :D Both are just tools to do the job. But, like all tools, some are better than others. The fact that vi (and vim) are still about is a testament to their suitability. And given that I've yet to find an editor as capable as vim (I mean, you try running notepad on a command line via ssh to a server in another timezone over a dialup connection...) -- and emacs doesn't count, it's a word processing environment, not a text editor :D -- I'll stick with my preferred tools. And recommend them.


    Besides, if you find original Vi that hard because of your notepad background, try cream...


  • Closed Accounts Posts: 1,397 ✭✭✭Herbal Deity


    Well, I didn't say I'd teach it to them initially, my point was really that I think students should have a strong foundation in command line programs before going near GUI stuff, and I'd consider proficiency in a decent text editor to be an extremely worthwhile skill. I'd be quite opposed to initially letting students use Netbeans or VB.net's WYSIWYG GUI builders.

    I was taught Java first using Eclipse, but not allowed use any libraries besides a simple terminal the lecturer had written.

    Eclipse has a lot of functionality, which could be confusing, but it's not necessary to use or understand any of this.

    The most important thing to get across intially is how to derive algorithms to solve simple problems. I think going by this logic, people suggest starting with C, but there's little difference between C and Java if you're not teaching Java in an OO context. The fundamentals are the same, but I'd go for Java, because the error messages are nicer and will save the student time initially.


  • Registered Users Posts: 1,922 ✭✭✭fergalr


    Sparks wrote: »
    There's an interesting point buried in there. Vim seems odd to someone who started editing with notepad... but it doesn't seem odd to someone who didn't (like me - I predate notepad :D ). Vim is actually quite logically arranged if you've never used notepad. It makes two assumptions - (1) that you think of writing and editing as the seperate activities they are; and (2) that you can touchtype. I fell into both those categories, so I found it easy. Someone who's used to having a single mode in their text editor (like in notepad) where all the actual editing is done by special key combinations and menus, probably wouldn't see the reason for having seperate editing and insertion modes and using the main keys on the keyboard. Someone who started off on dumb vt100 terminals wouldn't have difficulty seeing the reason and if they could touchtype, they'd appreciate the choice of keys used (as they're based around touchtyping). Trust me, you spend much time typing on one of these things and you'll appreciate them too:

    Uh oh.
    A vim debate - I was trying to avoid that :-)

    But seeing as we are here...

    There is a line of argument that says that VIM is just as easy to use as notepad in some objective sense; but its merely that we are so used to using notepad like tools that we think vim is objectively harder, when it is not really.

    I disagree strongly with this. I think VIM is harder to learn in a very important way.


    I first suggest that all user interfaces have to be evaluated with some reference to the prior experience of the user.
    Sometimes the UI metaphors we are familiar with run very deep, to the extent that its not obvious to us we are using past experience to reason about what a UI should do - but that past experience is always present, and forms our expectations. I think its difficult to say that something is in some sense 'objectively' just as easy, but only to people that aren't conditioned to the other UI metaphor.
    We might say that Brainfu*k is just as easy to code in as Java - but only to hypothetical Alien species who think in Brainfu*k.

    But what's important is how easy it is to learn for the people who need to learn it, and taking the learners background into account.

    Most beginning programmers have experience with GUIs, and familiarity with tools like notepad - maybe even notepad itself.
    They don't have familiarity with tools like VIM. They've seen wordprocessors, grown up with them, and they don't see writing and editing as separate activities - and this makes VIM hard to use for them, in a very real sense.

    I note that perhaps you were speaking broadly about UIs, and not about the new programmers - but let us agree that notepad is going to be less confusing and less distracting to newbies than VIM.



    The next thing I'd like to mention about VIM is that VIM is not 'discoverable' in the way that notepad is. And this is a big black mark against the learnability of vim, in my book.

    If you imagine someone with little experience of computers confronted with Notepad vs VIM.
    The press the keys - in notepad, the corresponding text appears. In VIM, funny command mode things happen.

    They want to save their file.
    Notepad has several prominent buttons at the top of the screen - if they press these, they see further actions - one of which is 'save'.
    Its discoverable - you can go from very little and discover the rest.

    VIM is not like that. Unless someone explicitly tells you what the save command is, or you go and look it up, you will not find it by yourself.
    The same applies for undo'ing a change, and most of the other features that notepad supports.

    So VIM is not as discoverable as notepad. It is not as easy to learn.
    VIM is less forgiving for keystrokes in the wrong place.

    Commands stack in VIM. Pressing 3, and then pressing d has a different effect than just press d. Yet there is no feedback that the pressing of 3 has changed anything. This is not obvious in the way that the effects of pressing 3 in notepad are obvious. Notepad is more direct manipulation.


    Now, obviously VIM is much more powerful and useful than notepad. It may be hard to find how to do things in VIM, but there are a lot more things to do. And that also, VIM is not nearly as hard to learn as many people make out, their views coloured by their prior experience.
    I never ever use Notepad, and I use VIM all the time.

    But VIM is harder to learn than notepad - both because the target audience already know notepad, and also because VIM is just in any practical sense, inherently less discoverable.


    Sparks wrote: »
    On top of which, of course learning an editor won't teach them about programming. Learning a language probably won't teach them much about programming either :D Both are just tools to do the job. But, like all tools, some are better than others.
    Learning a programming language doesn't teach you all of programming, its true.
    But I suggest that in any real practical situation, you are going to learn more programming from the act of learning a programming language than you will from using an editor.
    While knowing what a for loop does doesn't mean you how to use one, I think the process of learning it will teach you more about programming than that of learning VIM.
    And, for newbies starting out, I'd rather their time was taken up with learning the language, and learning to program, rather than learning to use a complex text editor that is a different style than they are used to.
    Sparks wrote: »
    The fact that vi (and vim) are still about is a testament to their suitability.
    Hmm - not sure I agree.

    Like the qwerty keyboard?
    I think thats another good example. Takes a while to learn, is non obvious at the start, and once you learned it, you are unlikely to try to learn dvorak.
    But that, alone, isn't testament to the suitability of qwerty.
    Qwerty, like VIM, is installed on most unix machines when none of the alternatives are - that makes it very useful to know - but that doesn't mean its the best.

    Sparks wrote: »
    And given that I've yet to find an editor as capable as vim (I mean, you try running notepad on a command line via ssh to a server in another timezone over a dialup connection...)
    Yes, agreed. Also, its syntax highlighting kicks the crap out of notepad.
    But again, this is testament to its ubiquity, and the high inertia it possesses, rather than its fitness for purpose, or overall goodness at the job.
    Perhaps if we didn't have VIM on every unix machine over ssh, we'd have a better way of streaming sessions to eclipse (or some generic format, or better tool) thats widely deployed, and just as easy to setup, instead? Its impossible to say.

    Sparks wrote: »
    -- and emacs doesn't count, it's a word processing environment, not a text editor :D
    I don't like emacs either :-)
    Sparks wrote: »
    -- I'll stick with my preferred tools. And recommend them.

    Besides, if you find original Vi that hard because of your notepad background, try cream...
    I don't find it hard; I think I first used VI over 10 years ago, so I'm not struggling to learn it or anything.
    But I still wouldn't recommend it being used in an introductory programming class - it'd just distract people from the stuff they are supposed to be learning.


  • Registered Users Posts: 40,038 ✭✭✭✭Sparks


    fergalr wrote: »
    But seeing as we are here...
    Well, why not...
    We might say that Brainfu*k is just as easy to code in as Java - but only to hypothetical Alien species who think in Brainfu*k.
    The Sapir-Whorf Hypothesis has never been proven...
    they don't see writing and editing as separate activities - and this makes VIM hard to use for them, in a very real sense.
    Yes, as I said. But that doesn't mean Vim is doing it wrong. Writing and Editing are seperate activities - that's why you have authors and editors in publishing and have had for a very, very long time.

    We shouldn't try rewriting hundreds of years of experience based on a bad UI in a microsoft product :)
    VIM is not 'discoverable' in the way that notepad is.
    Neither is C. Or brain surgery. Or theoretical physics.

    Look, some things are hard. And some tools need to be learnt and they're not newbie-friendly. You don't give someone a tool and stand back in a woodworking class, you teach them to use it first, and carefully so they still have fingers at the end of the first day.

    Programming's the same. You need to expend effort to learn to use the tools. Even those things cited as being wonderful for neophytes, like python, still require effort to learn. And there's nothing wrong with that and it doesn't act as too much of a mark against something's suitability for use as a teaching tool.
    If you imagine someone with little experience of computers confronted with Notepad vs VIM.
    The press the keys - in notepad, the corresponding text appears. In VIM, funny command mode things happen.
    Hmmm. Translate that to, say, surgery...
    "I don't get it, I poked him here with the scalpel and he just stopped breathing. It's a lousy user interface and we shouldn't teach students with it."
    :D
    Notepad has several prominent buttons at the top of the screen
    *cough*gvim*cough*
    Learning a programming language doesn't teach you all of programming, its true.
    But I suggest that in any real practical situation, you are going to learn more programming from the act of learning a programming language than you will from using an editor.
    True - though the really important things you learn are independent of the language used (so long as that language can do certain basic stuff). That's why Knuth's books are still so fundamental even with an invented assembly, invented computer and pseudo-code.
    [qwerty] Takes a while to learn, is non obvious at the start, and once you learned it, you are unlikely to try to learn dvorak.
    But that, alone, isn't testament to the suitability of qwerty.
    No, but the original design motives of qwerty are sufficient to throw "suitability" out the window :D Vim's design motives are a lot better. And the fact that you have such a large range of options with editors, and such ease in switching, but vim still persists isn't the same thing as the hardware longevity of qwerty...
    I still wouldn't recommend it being used in an introductory programming class - it'd just distract people from the stuff they are supposed to be learning.
    I'm not sure. In some cases, making it look unfamiliar can be of benefit for learning.


  • Closed Accounts Posts: 1,397 ✭✭✭Herbal Deity


    Oh dear, I appear to have opened a can of worms...

    :pac:


  • Registered Users Posts: 9,557 ✭✭✭DublinWriter


    The most important thing to get across intially is how to derive algorithms to solve simple problems.
    That and garbage collection, although that's not really applicable too much in a .net environment.

    Even before setting out to code, I'd suggest that you gave the students a good solid intro to boolean logic, deriving truth-tables, etc.


  • Registered Users Posts: 1,922 ✭✭✭fergalr


    Sparks wrote: »
    The Sapir-Whorf Hypothesis has never been proven...

    Well, I'm not sure that's relevant here. The seems to say that how you speak affects how you think. (am not a linguist!)
    All I was saying is that its possible to concieve of a species that found brainfu*k intuitive - but the possibility of such a being doesn't mean you can argue on that basis that brainfu*k is just as intuitive as java.
    For all practical purposes, and in the only sense that matters, brainfu*k is horrible - its bad.
    Whether what language you think it affects how you see the world isn't exactly the same thing.


    Sparks wrote: »
    Yes, as I said. But that doesn't mean Vim is doing it wrong. Writing and Editing are seperate activities - that's why you have authors and editors in publishing and have had for a very, very long time.

    Well - I don't consider the fact that being an author and being an editor are separate professions as very strong evidence that something like VIM should have a command mode.
    As I touched on before, just because that's how something has been done doesn't mean its the best way to do it - could be an accident of history.
    But I acknowledge that if the author/editor divide found in publishing was relevant here, that would be at least a good point, even if not totally compelling.


    But - I think its a little different when the author and editor are going to be two separate people, one of whom writes a book, and then hands it over for editing.

    But it's generally the one user of vim that's going to be both author and editor; and these two tasks are performed almost simultaneously. The one tool has to be good at both - both tasks are done together by the same person.
    Indeed, VIM is fine at this (if hard to use). I'm just saying the fact that both tasks are done separately in the writing doesn't mean that they should be done separately in a programmers tool.

    For example, I think the Eclipse/Intellij style IDE, with no explicit separation of the writing and editing tasks is the best tool I've seen for coding in.

    Sparks wrote: »
    We shouldn't try rewriting hundreds of years of experience based on a bad UI in a microsoft product :)
    No, we shouldn't.
    But that's not what I'm saying. I don't think the literary process is directly relevant here, as I just outlined.

    I do think you make a valid point here though. If we go too far down the road of trying to keep the UI experience consistent with whatever the user already knows, we will never innovate, and allow better, more efficient UIs to be adopted.

    All I'm saying is that there needs to be a balance too. In an introductory programming course, the emphasis, to my mind, has to be about teaching people to be good programmers. This should mean a focus on teaching them the art of programming.
    In an ideal world, I agree that we should teach them the best tools for the job too (I might differ about whether this is indeed VIM, though I do think VIM has a place). And, if I had as long as I wanted to teach the class, and the class were not easily confused, and infinitely motivated, perhaps I would start the course with a few weeks on using VIM.
    However, in most scenarios in practice, with a one or two semester college course, I still think the best thing to do is start off with a simple editor like notepad, that they are already familiar with, and that won't get in their way - won't increase their mental load.
    I'd be worried that making them start in VIM would just add much additional complexity that is on the periphery of what I'd be trying to teach.

    Sparks wrote: »
    VIM is not 'discoverable' in the way that notepad is.
    Neither is C. Or brain surgery. Or theoretical physics.
    I do think it'd be a fair criticism of C that it isn't discoverable.
    If we could make another language that was just as good as C, but more discoverable, then that language would be better.
    I think discoverability is important. That's why we write easy to read, well commented code. We might say that 'oh well, its going to be hard, just read it and work it out, you are a programmer, that's not an easy job!'. And some people do say this! But we generally agree that the more discoverable code is better.

    I think VIM and C are a bit different to brain surgery or TP.
    It's a bit silly to criticise the design of TP or the Brain as undiscoverable - after all, we didn't design the relevant systems! But VIM, on the other hand, is fair game, as far as I'm concerned.



    Sparks wrote: »
    Look, some things are hard. And some tools need to be learnt and they're not newbie-friendly. You don't give someone a tool and stand back in a woodworking class, you teach them to use it first, and carefully so they still have fingers at the end of the first day.
    Some things are indeed hard.
    And I would agree a point I think you are making here, which is that perhaps there's an emphasis on making programming easier than it can properly be made to me. That is certainly not the way to produce good programmers - indeed, I think I said as much in my first post on this thread - I'm in favour of the programmers having to sometimes do it the hard way if that makes them better programmers in the end.

    Still would start with notepad though, and move to VIM or Eclipse later, after they've got the basics of coding down, and can't be confused by a whole load of new UI concepts.
    Sparks wrote: »
    Programming's the same. You need to expend effort to learn to use the tools. Even those things cited as being wonderful for neophytes, like python, still require effort to learn. And there's nothing wrong with that and it doesn't act as too much of a mark against something's suitability for use as a teaching tool.Hmmm. Translate that to, say, surgery...
    "I don't get it, I poked him here with the scalpel and he just stopped breathing. It's a lousy user interface and we shouldn't teach students with it."
    Again, we didn't design the UI on the human body. I don't think its a fair analogy as such.
    If the human body was something we designed, then, yeah, I think it'd be a fair point that its a bit hard to discover what's wrong with it, and that maintenance operations are more error prone than they need to be.
    Given that that didn't happen (any creationists on the programming forum?) its not such a fair analogy.

    Sparks wrote: »
    :D*cough*gvim*cough*
    Yeah - gvim is much better from the discoverability point of view - if you told me I had to introduce first years to programming, and I had to use VIM, I'd probably go with gvim, because thats most familiar and discoverable.

    Sparks wrote: »
    True - though the really important things you learn are independent of the language used (so long as that language can do certain basic stuff). That's why Knuth's books are still so fundamental even with an invented assembly, invented computer and pseudo-code.
    Yep, absolutely.

    But... I think a version in a clearer language, more familiar to the readership, would make them more useful.
    Not so much if you are going to read them cover to cover, and you are willing to commit to this from the start - in that case the sunk costs of learning MIX are less important. But I given that most people won't do that, I think more people would get more from the books if they were in a more familiar language - even C, or gnu as style asm. That's just pragmatism.
    I think talking about Knuths use of MIX is a fair analogy for much of the discussion we are having here on VIM.

    Sparks wrote: »
    No, but the original design motives of qwerty are sufficient to throw "suitability" out the window :D Vim's design motives are a lot better.
    Its certainly a good point that the original design motives of VIM were to make a powerful editor that was useful for programmers, and not in in qwerty to (allegedly, depending on sources) cripple the thing.
    Still, I mainly brought up qwerty to show that just because something was ubiquitous and widely used is not a strong argument that its the best solution to the problem.

    Sparks wrote: »
    And the fact that you have such a large range of options with editors, and such ease in switching,
    Ah, but to use your earlier point, try using the rest of them over ssh on a remote machine you can't install software on...
    There's definitely a lot of inertia in the continued use of VIM too - maybe that's not as important as the merits of the editor - but I think both play a part.
    Sparks wrote: »
    but vim still persists isn't the same thing as the hardware longevity of qwerty...I'm not sure. In some cases, making it look unfamiliar can be of benefit for learning.
    That's an excellent point. Hadn't considered that - perhaps the ability to start fresh, and discard existing habits, and ways of thinking about things, is more important from a teaching point of view than the initial difficulty of learning the tool.



    Hmm - well I think that's most of the intelligent contributions to the VIM debate that I can make, for better or worse.
    Interesting points though - might give Herbal Deity back the can of worms.


  • Registered Users Posts: 1,922 ✭✭✭fergalr


    Well, I didn't say I'd teach it to them initially, my point was really that I think students should have a strong foundation in command line programs before going near GUI stuff, and I'd consider proficiency in a decent text editor to be an extremely worthwhile skill. I'd be quite opposed to initially letting students use Netbeans or VB.net's WYSIWYG GUI builders.

    I was taught Java first using Eclipse, but not allowed use any libraries besides a simple terminal the lecturer had written.

    Eclipse has a lot of functionality, which could be confusing, but it's not necessary to use or understand any of this.

    The most important thing to get across intially is how to derive algorithms to solve simple problems. I think going by this logic, people suggest starting with C, but there's little difference between C and Java if you're not teaching Java in an OO context. The fundamentals are the same, but I'd go for Java, because the error messages are nicer and will save the student time initially.

    I think if you do it the way you say here - teaching using Java, but not allowing the student use the features of eclipse, or the advanced features of Java, then that's probably a pretty good setup - a pretty good balance between keeping people interested, but making sure they get the fundamentals.
    I'd like to see some C in there at some early stage though - memory management, pointers, etc are important to do early enough.

    I wonder how hard it is to produce a cut down perspective of eclipse with most of the complexity hacked out, just leaving the editor and compilation and saving buttons? That might be a good thing to start out with.
    I think even all the buttons and functionality being there, even if the student doesn't use them, add to the 'mystery' of the whole process - and you want to avoid making it 'mysterious'.


  • Advertisement
  • Registered Users Posts: 9,579 ✭✭✭Webmonkey


    I'm glad I've learned C before Java and OOP principles. Helped me develop problem solving/algorithm skills without getting bogged down on OOP first. I know others from different colleges that do Java first and they appear to struggle with C then. In general, think learning C first is beter idea.


  • Closed Accounts Posts: 1,397 ✭✭✭Herbal Deity


    Webmonkey wrote: »
    I'm glad I've learned C before Java and OOP principles. Helped me develop problem solving/algorithm skills without getting bogged down on OOP first. I know others from different colleges that do Java first and they appear to struggle with C then. In general, think learning C first is beter idea.
    But you don't need to learn OOP to program in Java.... What problem solving/algorithm skills did you learn in C that you couldn't have learned in Java?

    Learning the basics in a language like Java allows one to learn problem solving/algorithms without getting bogged down with pointers and memory management, as well as errors being a lot easier to track down.


  • Registered Users Posts: 57 ✭✭lumpwood


    Learning the basics in a language like Java allows one to learn problem solving/algorithms without getting bogged down with pointers and memory management, as well as errors being a lot easier to track down.

    This is very true, its important for a student to see their code working. I've seen so many students get bogged down with silly details, even in a language as 'straight-forward' as Fortran. Learning the fundamentals of problem solving is the most important thing for students who are new to programming. On the course I used to tutor, the first assignment was done with a pen, paper and pseudo-code.

    I think the likes of Notepad++ is useful for the tutor/lecturer and students. It helps when picking out little problems and syntax errors. Also its a feature that a student will always have ready access to...so why not learn to program with code highlighting and all the other bell's and whistles.


  • Registered Users Posts: 40,038 ✭✭✭✭Sparks


    But you don't need to learn OOP to program in Java.... What problem solving/algorithm skills did you learn in C that you couldn't have learned in Java?
    Pointers (and the attendant ease of learning things like linked lists and objects and so forth).
    See, you see pointers as "hard to learn", I see them as "worth learning" because once you have learnt them, they make learning all manner of other things easier because you then have a better mental model of the underlying architecture. It's like the way that you code better after learning compilers (and I mean "code" there, not "program").

    Hell, there's a good reason Knuth starts with assembly language...


  • Registered Users Posts: 40,038 ✭✭✭✭Sparks


    Learning the basics in a language like Java allows one to learn problem solving/algorithms without getting bogged down
    BTW, if that was true, you'd be better off teaching using a glue language like Python or Ruby, with duck typing and dynamic everything. But we don't (in general), for a decent enough reason (namely that you train bricklayers to lay bricks, not arrange walls, if you follow the abstraction model).

    Maybe if you spent the first year or so teaching stuff from the hardware on up, and got up to the point where you were just making your way into algorithms, and then said "oh, by the way, here's Python, and now let's talk about objects and factories and agents and aspects and so forth"... but lets face it, noone does that either because no student will sit and learn the basics for a year without knowing there's more to come (and because it's too hard to teach a toolchain without teaching its application by accident in the process).


  • Closed Accounts Posts: 1,397 ✭✭✭Herbal Deity


    I suppose I was learning assembly and hardware at the same time I was learning Java.

    I just don't think C is a good language to start with.


  • Registered Users Posts: 1,922 ✭✭✭fergalr


    Sparks wrote: »
    Maybe if you spent the first year or so teaching stuff from the hardware on up, and got up to the point where you were just making your way into algorithms, and then said "oh, by the way, here's Python, and now let's talk about objects and factories and agents and aspects and so forth"... but lets face it, noone does that either because no student will sit and learn the basics for a year without knowing there's more to come (and because it's too hard to teach a toolchain without teaching its application by accident in the process).

    If you are talking about how to train CS people in general, as opposed to the narrower topic of how to give a first course in programming, then I quite like how they did it with us in TCD. We had separate courses delivered in parallel, where we learned ASM and low level hardware in one course, java and oop in another, digital logic in a third, and so on.
    The various courses don't connect up at the start, but eventually they all do and you end up with a thorough understanding of what's going on. The pattern of teaching both high level and low level stuff in parallel is a good way to teach people programming if they are in a 4 year CS course, and you have a lot of time and resources.

    At the same time, I had learned a good bit of C before coming to college, so that meant I got a lot more out of the courses, because I saw where things fitted together a bit better, and understood what the higher level languages were giving, what they were losing etc.

    As I see it, this ends up going back to what I put in my first post here - the best way to teach people programming depends a lot on where they are coming from, and how much motivation they have to gut out the hard stuff - I'd ideally deliver a first course on programming very differently to a postgrad mathematician, vs a first year CS, vs a second year general engineering student etc.


  • Closed Accounts Posts: 4,564 ✭✭✭Naikon


    The text editor and compilation from command line is a valuable tool.
    You would probably be better off teaching the student about revision
    control systems than how to drive a complex IDE.

    And no, I do not think new coders should care about revision control
    until later on in their programming endevours.


Advertisement