1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hi Guest, welcome to the TES Community!

    Connect with like-minded education professionals and have your say on the issues that matter to you.

    Don't forget to look at the how to guide.

    Dismiss Notice

Top Ten Programming Techniques

Discussion in 'Computing and ICT' started by JaquesJaquesLiverot, Dec 8, 2015.

  1. JaquesJaquesLiverot

    JaquesJaquesLiverot Established commenter

    A few weeks ago I happened to mention that something (modular arithmetic?) would be in my top-ten programming techniques, and someone asked me what the other nine would be - so here they are:

    Top Ten Programming Techniques

    What do you think? Is there anything you'd add - or anything you'd take away? Let's have a heated debate!
     
  2. JaquesJaquesLiverot

    JaquesJaquesLiverot Established commenter

    I forgot to add that there are quite a few links to examples in that article, but the TES stylesheet seems to hide them quite well - so give your mouse a good wiggle as you're reading!
     
  3. NeitherMouseNorSock

    NeitherMouseNorSock New commenter

    A great read JJL. Can empathise with having students who are obsessed with while. I presume it's the simpler initial syntax.

    #10 - I would have gone for Maths. squared numbers, cubed numbers, It's all good. Does input count as a missing element?

    Is this your teaching order or just a favourites list? (and justify for the upper mark band) ;)
     
    Last edited: Dec 8, 2015
  4. TonyGT

    TonyGT Established commenter

    Functions. Without them you're pretty limited in your programming scope.

    I would also say dealing with external files. Otherwise your got a load of programmes that never remember anything
     
  5. NeitherMouseNorSock

    NeitherMouseNorSock New commenter

    TonyGT - I think they're both important but not one of the basics. File handling first. Functions once all the 'essentials' are covered, imo
     
  6. JaquesJaquesLiverot

    JaquesJaquesLiverot Established commenter

    I actually start with print and input, but otherwise it's pretty-much an unordered list of the first things I teach.

    I didn't put print and input in the list because they only really apply to console-type applications - you wouldn't often use them in JavaScript or, say, a Windows application written in VB.
     
  7. JaquesJaquesLiverot

    JaquesJaquesLiverot Established commenter

    It's interesting that you mention files, because I wouldn't bother. I know that the OCR tasks are obsessed with them, but I honestly can't remember last time I used a file for storage. I'd go with cookies and databases.

    I mentioned functions and procedures - I didn't include them in the top ten because you need to have some techniques to put in your function; I suppose it's a chicken and egg sort of thing.

    I'm not saying that my list is right, of course - that's why I asked for opinions.
     
  8. madcat

    madcat Occasional commenter

    Not really programming as such , but I've always found those additional bits and pieces (programming style I suppose you might call it) really helpful for students (and me) for example
    • giving variables meaningful/legal names;
    • how to add comments to the listing;
    • simple debugging e.g.how to halt a run; how to track the value of a variable during a run (and yes I even include the frowned upon message technique)
    They are something that often gets forgotten about , but can save you hours of work

    Some more technical additions might also be
    • Initialising variables
    • As others have said, functions/procedures/sub routines , including how to send and return variables
    • How to deal with with mouse clicks and keyboard input
     
    NeitherMouseNorSock likes this.
  9. Twinklefoottoe

    Twinklefoottoe Senior commenter

    I hope JJL's list leads to some more articles because I really did enjoy the one on modulus and had a couple of excellent lessons with one of my A level group looking at exactly what he put in his article. This old dog may be only 8 working days from retirement, but I'm happy to learn new tricks from the (relatively) young blood in the game. In retirement, I'm looking forward to JJL's new book and working my way through the examples - to see how I should have been doing it for the last 20 years.

    I like the list. Would probably include formatting techniques in there somewhere as you can have a lot of fun playing with that in Python 3 once you've got your head around how it works. I wish Python would declare variables and use proper arrays. I just lie to my students and say that you should always declare variables before using them or it causes problems later on.

    In the interests of hijacking the thread and sending it off on a related tangent, I'd like a similar list for the top 10 applications to teach a beginner group of Python programmers to go with the top 10 programming techniques. I'll start with the first 3:

    1) Simple Maths calculations like reading in a radius and calculating the area of a circle, areas of a rectangle etc.
    2) Printing out the lyrics to 10 green bottles.
    3) Various simple dice games
     
  10. JaquesJaquesLiverot

    JaquesJaquesLiverot Established commenter

    I thought that everyone's list would be slightly different, which is why I've been asking in different fora. It probably also depends on which programming language you're used to, and the type of application you're used to making - e.g. console applications, web-pages, etc.

    The tasks I use with KS3 are on the following page:

    http://www.advanced-ict.info/programming/tasks.html

    I've just noticed that it's not up-to-date, though, as I've added a couple more recently. One is the putting people into teams thing from the modular arithmetic post, and I've also used a task where the user is asked for a word and it's spelt out using the phonetic alphabet, and a version of rock-paper-scissors.
     
  11. JaquesJaquesLiverot

    JaquesJaquesLiverot Established commenter

    I've just realised that I forgot to explicitly mention abs() and rounding - and also multiplying by -1 to change the sign, e.g. to change direction. If I say that it's part of variables or random numbers/scaling then I might get away with it!
     
  12. JaquesJaquesLiverot

    JaquesJaquesLiverot Established commenter

  13. madcat

    madcat Occasional commenter

  14. JaquesJaquesLiverot

    JaquesJaquesLiverot Established commenter

    Yes, thanks - I'm not sure what happened there!
     
  15. neddyfonk

    neddyfonk Lead commenter

    Interesting to see how the emphasis has shifted to C type languages ( mainly because of the ease of which they can be parsed / validated ). My first language was COBOL which although heavily structured could be self-documenting and almost natural language. In the 70s it was touted that TheLastOne would be the last language ever needed with almost no formal syntax - What went wrong ?
    In the first instance in schools I would avoid all languages and stick with flow charts to describe processes that are familiar (e.g. making a cup of tea ) which introduces variables ( how many spoonfuls of sugar), decisions (has the kettle boiled ), timing and loops. The principles apply to all languages, provide useful documentation, can be used to test logic and can be applied to a myriad of things in life outside of computing.
     

Share This Page