Computer Science Teacher
Computer Science Teacher - Thoughts and Information from Alfred Thompson

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Four Key Concepts of Computer Programming

    • 18 Comments

    Last week Rob Miles who is taller than I am, has more hair than I do and has an English accent all of which indicate he is probably a lot smarter than I am left a comment on one of my posts that lists his idea of the four key concepts in programming. He left to comment on Do We Need A New Teaching Programming Language BTW. The post and his full comment are worth the read. Rob’s list was:

    • Process data (assignment)
    • Make decisions (if)
    • Loop (do - while, for)
    • Use indexed storage (arrays)

    Among other things he said:

    If you can do these four things you can write every program that has ever existed. Sure, the code won't be pretty, but it will solve the problem. In my course we focus on algorithms at the start because this is where we actually create behaviours  [note classy British spelling which adds credibility] that solve problems.

    In all seriousness, Rob is a great teacher who also writes some really good textbooks. He really knows his stuff. All of that not withstanding I kept trying to think of a fifth thing to add to his list.

    I thought about input/output for a long time. But I/O is such a platform dependent sort of thing. It depends not only on the language but the operating system and even available hardware. Input via a key board is different from punch cards (remember those) and still more different from input via a Kinect sensor (let’s keep in mind that there is a future). As I recall the PASCAL standard did not specify requirements for input/output and left it to the developers for individual platforms. So that probably doesn’t fit.

    I thought about variables but that is sort of covered by process data and indexed storage. Even internal data representation which I see as a key computer science concept is probably not as key for programming. I have successfully used programming languages that only stored integers and strings. Well maybe there was a Boolean but I forget. I managed to write some useful applications anyway. Some even dealing with money.

    Recursion? How often do you really need recursion? And a lot of things that recursion is used for loops will do just fine for. So while one should learn recursion and a really good programmer should know how, and more importantly when, to use it I don’t think it fits the top four or five list.

    Would you add something? Remove something? Overall what do you think of Rob’s list?

    Note:  To subscribe to this blog please use http://feeds.feedburner.com/ComputerScienceTeacher as the RSS feed source. Thanks.


  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    How Does Kinect Work?

    • 0 Comments

    imageChances are you have heard about the Kinect for Xbox 360 which lets you play games without a controller. The Kinect is a full body motion sensing device that lets you use your body as the controller. You may be wondering how it works though? The magic is in the software! OK, sure the hardware is important to but software is what makes the hardware go right? Anyway, here are some links to more information about how this exciting new technology works. Update: You can lsten to a podcast of me talkng about how the Knect works by vistng http://www.mos.org/events_activities/podcasts&d=4858 I recorded that intervew at Boston's Museum of Scence in February 2011.

    And a couple of videos looking at the device using IR imaging. Not sure what these really mean but my more geeky friends are all excited by them. Smile



  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Interesting Projects–A Collection

    • 1 Comments

    It seems as though teachers are always looking for new projects to use with students. Projects get stale (at least to a teacher who has been grading lots of them for a long time) or seem to not fit with a current crop of students or just never seem right. So the hunt goes on for more. When I come up with programing projects I like to post them here on my blog for use, comments, feedback and in the hopes that people will help make them better. I tag them with the projects tag to make them easier for people to find as well. But recently it struck me that an annotated list of some of the more interesting projects might be in order. So here it is.

    Programming Projects Using Arrays This is a collection for the APCS mailing list of projects teachers have suggested for teaching arrays. They should work with any programming language.

     Whack Something Game for Windows Phone 7 – This is a “how to” I wrote for creating a whack a mole style game for the Windows Phone 7. It could easily be used/modified to create a similar game for Windows or the Xbox since it uses XNA Game Studio.

    The Credit Card Project – Do you know how credit cards are validated? I think a lot of students would be interested in this project that includes knowing something about the codes that identify types of credit cards and a check digit to validate the number.

    FizzBuzz–A Programming Question – this was based on an interview question I read about. The comments are interesting and include both a lot of discussion about this particular project and similar questions. This one uses loops and discussion statements in an interesting combination.

    Lines Can Be Fun This is a discussion of some interesting graphical line drawing projects. There is some sample code using Small Basic but you could use these ideas in most languages that support simple graphics.

    Would you play this game? A simulation of a card game with the idea of determining if it is a reasonable game to play as defined by being something one can actually win at. It uses random numbers, arrays and loops.

    Visualizations and Sorting Some ideas around projects that show or play as in sound how sorting algorithms work. Something to make sorting more interesting than just “magic” behind the scenes.

    ASCII Art For Fun and Projects – Old school ASCII art projects may seem passé but a lot of today’s students don’t know about them which makes these ideas “new to them.” And they can be fun.

    Monte Carlo Simulation – Slot Machines – How do slot machines work? Add some graphics to this one and really make it rock.

    Monte Carlo Simulation – Roulette – how does the house win at Roulette? Random numbers, probability and creating a simulation are all a part of this project.

    Who Designed That User Interface – How would you design an ATM interface? Yeah it involves money. Smile This is a chance to not only have students implement a user interface but learn about data checking/validation and how it all fits with usability.

    Are You Using a Strong Password – On one hand this is a simple data validation project that looks at characters and does some evaluation. On the other hand it is an opportunity to talk about security, what makes a strong password and why strong passwords are important.

    Coding Up A Coded Message – Not surprisingly this is about codes and cyphers. I find that a lot of younger kids are fascinated with hiding messages with codes. This allows for a lot of interesting character manipulation and some good algorithm discussions.

    Fun With Formulas Did you know that horsepower was based on James Watt finding that a work horse could lift a 1,000 pound weight 33 feet in 60 seconds? I didn’t either but it makes for a fun project. Sample code in C#, Visual Basic and a screenshot of a cool solution table using Excel. Yep, programming sorts of things in Excel. Who knew? Smile

    Fun With Colors Move the sliders for red, blue and green to adjust the color values of a color display. This is the sort of thing designers use for all sorts of color picking routines. It shows something about how color mixing works as well as making a fast and easy project to let students experience success quickly.

    Binary Number Game – A lot of traffic comes to this blog from people looking for ways to teach binary numbers. This post describes one good learning game/project and opens the door to more with a little imagination. One might as well make a game out of learning when possible.

    The Four Digit Problem – How would you randomly pick a four digit number with no repeating digits? Would you use recursion? You could. Or loops? That would work as well. What’s the best way to do this/

    A Simple Check Digit Project This project uses the formula for validating passport numbers. With more and more people needing passports at a younger and younger age this project has some relevance to many. Having a meaningful project to discuss check digits (which are apparently not as inherently interesting to everyone as the yare to me) makes this a pretty good project if I do say so myself.



Page 4 of 618 (1,853 items) «23456»