Slashdot Mirror


Ask Slashdot: Good Introductory SW Engineering Projects? (HS Level)

New submitter mtapman writes: I'm looking for suggestions on introductory software engineering projects for a high school level student. Assume the student can do basic math (up through Algebra I or Statistics I) but is new to logic and computer science. Each project should take no more than four hours to complete including research, coding, and testing. The intent is to introduce the student to software engineering (and computer science) through practical and fun examples. Classic CS problems are welcome. One of the key criteria is available research/reference material to allow the student to make progress with 30-60 minutes of online research.

Some ideas that came to my mind (not necessarily good ones) are: (1) pick a sorting algorithm and sort a list of ten words alphabetically, (2) write a program to convert characters from lower to upper case, (3) write a program to divide two numbers in two different programming languages and compare the results to determine the differences between the languages.

140 comments

  1. No you don't by Anonymous Coward · · Score: 0

    Wrong question. You're just trying to drive down the wages of software jobs.

    Sincerely,
    Slashdot Consensus

    1. Re:No you don't by Big+Hairy+Ian · · Score: 1

      Get them to write a Bayesian twat filter for slashdot they'll never look back :)

      --

      Build a Man a Fire, and He'll Be Warm for a Day. Set a Man on Fire, and He'll Be Warm for the Rest of His Life.

    2. Re:No you don't by 110010001000 · · Score: 1

      My guess is as soon as they finish their project they are going to take theodp's job for half the price!

    3. Re:No you don't by Anonymous Coward · · Score: 0

      Funny but how do you really develop something like that when every example in the test set is a positive?

  2. 4 in a row by behrooz0az · · Score: 3, Insightful

    It's a simple board game that can be done in less than an hour if prapared for, of course they can do a lot of extra if they got the talent/time.

    --
    Moderating "-1, Disagree" is simple censorship. Have the guts to post your opinion. -- Spazmania (174582)
    1. Re:4 in a row by Anonymous Coward · · Score: 1

      This a thousand times this. 4 in a row is a great startersproject.
      When I just learned programming this was an assigment, when the assigment was done I spent 2 months reading up on networking and programming to make it able to play over the internet.

    2. Re:4 in a row by Anonymous Coward · · Score: 1

      This a thousand times this. 4 in a row is a great startersproject.
      When I just learned programming this was an assigment, when the assigment was done I spent 2 months reading up on networking and programming to make it able to play over the internet.

      This , also , please learn them some version control system like git if you want them to actually learn something that they might be able to use in a production environment.

    3. Re:4 in a row by Anonymous Coward · · Score: 1

      This , also , please learn them some version control system like git if you want them to actually learn something that they might be able to use in a production environment.

      High school may be a bit early for production environment discussions. But, please learn yourself some grammar if you want to work more in a production environment in English, eh?

    4. Re:4 in a row by CastrTroy · · Score: 1

      This is a great idea. Any modern source control system is good, just to get experience with the general ideas. If you make them commit as they go along it's a great tool to monitor their progress as well. I made it through all of university without ever seeing a source control system in an academic setting. Luckily I found out about it myself before getting out of university.

      Another recommendation is to introduce them to the debugger. Another invaluable tool that was non-existent throughout my education. It would have saved me so much time if I had only known simple features like how to set a break point, and how to step through the code. You're not doing anybody any favors by making them use the print function to figure out the state of their code.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    5. Re:4 in a row by Anonymous Coward · · Score: 0

      It would have saved me so much time if I had only known simple features like how to set a break point, and how to step through the code. You're not doing anybody any favors by making them use the print function to figure out the state of their code.

      The print function isn't the end of the world... it works across nearly all hardware and software configurations. Otherwise you may one day find yourself on a system which doesn't have a debugger, or at least not a free one that is any good (e.g., some parallel environments).

    6. Re:4 in a row by __aaclcg7560 · · Score: 1

      I would recommend chess. Simple to design on the surface but increasingly difficult to implement the rules and an A.I. opponent.

    7. Re:4 in a row by Anonymous Coward · · Score: 0

      Horsie takes prawn.

    8. Re: 4 in a row by Anonymous Coward · · Score: 0

      Four hours?

    9. Re: 4 in a row by __aaclcg7560 · · Score: 1

      The design should take less than four hours. A board with 64 squares, six type of game pieces and 16 pieces per side isn't hard to program. That's scratching the surface. Going beyond that requires more time.

    10. Re:4 in a row by __aaclcg7560 · · Score: 1

      King humps Queen. ;)

    11. Re: 4 in a row by armada · · Score: 2

      Tic tan toe is perfect for your timetable.

      --
      "This message was sent from an Apple //GS"
    12. Re: 4 in a row by ChrisMaple · · Score: 1

      It might not be hard to code chess if you're already an accomplished programmer. For a high-schooler, a beginner, the student has to learn the basics of some computer language, the concepts behind procedures and functions, what bits and bytes and floats are, and on and on.

      --
      Contribute to civilization: ari.aynrand.org/donate
    13. Re: 4 in a row by __aaclcg7560 · · Score: 1

      You can easily build those lessons around how to represent a chess board with 64 squares in code. This can be as simple as an array or complex as move generation.

      http://www.gamedev.net/page/resources/_/technical/artificial-intelligence/chess-programming-part-ii-data-structures-r1046

  3. Here's one by Anonymous Coward · · Score: 2, Insightful

    How about https://projecteuler.net/? They have a ton of problems.

    1. Re:Here's one by sumdumass · · Score: 1

      If they have a feedback on that page suggest that they work on the problem of their menu bar. It doesn't resize with the page and leaves navigation to the impossible on my phone as all the menu options are off the page with no way to scroll to it.

  4. Don't reinvent the wheel by Etherwalk · · Score: 5, Insightful

    Don't reinvent the wheel. Look for teacher forums where you'll find CS teachers who have found certain exercises are really great teaching exercises. Call other CS teachers at peer schools or schools that are a little better than yours. (You can also go to really great schools, but depending on where you're teaching may have to simplify a bit). Email teacher lists.

    The examples most slashdotters think of may be good, but haven't been field-tested in the same way.

    1. Re:Don't reinvent the wheel by arth1 · · Score: 2

      Given that most teaching is utter crud designed to get students to pass tests and teachers to think as little as possible, I'm not sure that's a good idea.

      My main advice is that the first year or so of assignments should always be to at as low level as possible. No library functions except the most basic IO ones allowed until the student understands the underlying algorithm of those library functions. No puts() until you know how to use putc() to do the same. No printf() until you have written your own character substitution function. Software engineers should not just batch up black boxes they don't understand. That's for code monkeys.

      And that defeats some of the internet search too - what you're going to find there is mostly code monkey material. People who ask wat do? Others offering a solution that may or may not work, but never explaining why it should work. That's useless.
      If searches can be limited to reputable code repositories, and that all QA type sites are banned, that would be better.

    2. Re:Don't reinvent the wheel by 0100010001010011 · · Score: 3, Insightful

      Software engineers should not just batch up black boxes they don't understand.

      And if they want to become software engineers they should go to college. This should expose a broad spectrum of students to programming. I absolutely treat printf as a blackbox. I trust its output, I trust that the authors of the black box did their job. But if I spent my career reinventing BLAS I'd never get any work done.

      I say start highlevel to appeal to a broad number of students and then if the rabbit hole they want to go down is CS, then they can learn how the blackboxes work.

    3. Re:Don't reinvent the wheel by oh_my_080980980 · · Score: 1

      Programming is not high level stuff. If he wants to teach software engineering - he's on the wrong track. If he wants to teach programming, go with it.

    4. Re:Don't reinvent the wheel by 0100010001010011 · · Score: 1

      And learning 2D shapes like triangles and squares isn't high level engineering but you wouldn't be able to do a statics or dynamics course without it.

      Remember these are still high schoolers.

    5. Re:Don't reinvent the wheel by Anonymous Coward · · Score: 0

      Good post but one error should be pointed out: you used the term "software engineer" instead of "software developer" or "programmer". Engineering is a completely separate discipline from programming or IT, therefore there is no such thing as a "software engineer".

  5. sorting? by hydrodog · · Score: 2

    Sorting may be interesting to you, but it's dry and rather abstract. If you are working in Java or python, graphics is available, and graphical projects are far more interesting to the average high school student. Animation of any kind (processing is ideal) 3d animation (spinning globe, 14 lines in processing) 2d board games (checkers). Note you are creating a board that only allows legal moves, not playing. Earth-moon-sun system (for those captivated by the spinning globe. You can do more mathematics if students like it. For example primes. Tying it to graphics, the prime number spiral: http://mathworld.wolfram.com/P... http://adastraeducation.org/Pr...

    1. Re:sorting? by ranton · · Score: 2

      Sorting may be interesting to you, but it's dry and rather abstract.

      I completely agree. Sorting and doing string manipulation may be important things to learn, but they won't inspire passion in the kids. And in high school I assume your goal is to get them interested in the subject not just provide job training.

      My first programs in grade school were tic-tac-toe and various text based dungeon crawler games. These got me interested in the field. I learned sorting and string manipulation to solve other problems, they were not the goal themselves.

      --
      -- All that is necessary for the triumph of evil is that good men do nothing. -- Edmund Burke
  6. Get it Sorted by Anonymous Coward · · Score: 1

    Sorting algorithms are the old staple for a reason, they are generally pretty simple and get the kids thinking about how the data is actually manipulated. Do you need a scratch copy of the entire list or just a buffer of 2 elements? is method X faster than method Y? is this always true? What are the time / memory trade-offs and would this algorithm be suited to a very large data set?

    Id be tempted to give them a large data-set to work with an get them to race their algorithms without explicitly walking them through the various flavors of sorting, there will always be 1 kid who already knows what a bubble sort is, but the rest of them can try and work it out on their own.

    1. Re:Get it Sorted by Anonymous Coward · · Score: 0

      Sorting algorithms are the old staple for a reason

      Yeah, no-one's bothered to come up with something less boring.

  7. SE you say? by Anonymous Coward · · Score: 0

    Here's an idea: Interview five of your classmates about their dream holiday. Write the requirements for a perfect holiday in a form of well-structured essay, identify the commonalities and points of variability, identify and evaluate risks, constraints, and surrounding issues. Abstract and make note of the general themes of the holidays and prioritize the characteristics of the ultimate holiday. Describe an ultimate holiday, and present it to your classmates for critique and comments.

    1. Re:SE you say? by Anonymous Coward · · Score: 0

      And make them do this while standing.

      Captcha: syndrome

    2. Re:SE you say? by oh_my_080980980 · · Score: 1

      This! The only one who gets it.

  8. CipherSaber by Anonymous Coward · · Score: 0

    Take a look at CipherSaber.org. It's a simple encryption system based on RC4 that should be possible to write and test in four hours. Learning the basics of cryptography is worth while these days even for beginners. And sending encrypted messages to each other would be more fun than sorting.

    1. Re:CipherSaber by ray-auch · · Score: 1

      Yeah, but don't forget all classroom crypto projects must include a back door for teacher access.

      Bonus marks are available for using steganography or other methods to provide plausible but inaccurate plain text through the back door such that the teacher does not know you are actually passing secret messages in class (before attempting, candidates may wish to note that teachers must be aware of the feature to award bonus, and that teacher awareness of such also indicates failure)...

    2. Re: CipherSaber by Anonymous Coward · · Score: 0

      Not recommended. Spending time in jail may be fun to us, but not for milennials that need to deliver results 4 hours ago. Just make them buy an ipad and install apps. They will stay in walled garden for protection.

    3. Re: CipherSaber by Arnold+Reinhold · · Score: 1

      Writing your own encryption software isn't illegal yet (at not least in the U.S.) and getting kids to learn how is not a bad idea. Also it's time people on Slashdot gave Apple some respect for providing high grade security and encryption to its customers. After all, Apple is the company that the FBI and supporters of mass surveillance in Congress are most angry at.

  9. Benford's law by Anonymous Coward · · Score: 0

    I suggest that you keep things simple but useful. I think that regex (don't kill me yet) is useful as a tool to get the students thinking in new ways and open their mind to data collection.

    I suggest you use Benford's law (https://en.wikipedia.org/wiki/Benford%27s_law) as an inspiration to statistics and you get your students to collect Annual Reports or whatever random text they can find that have a lot of numbers in them. The goal is to find all numbers and then group the numbers according to the first digit and see if it matches what Benford predicts.

    One way to do it is to copy the text to an online regex-editor (https://regex101.com/) and find out how to separate numbers from the text. Then, how to order the numbers and to count them. Finally how to plot them.

    It's also fairly easy to do this kind of processing with a simple computer program so your students may have totally different approaches which is good when they present their work.

    I suggest you have a default text that they should process in order to verify their algorithm

  10. CS vs. programming by sloede · · Score: 2

    Do you want to get the student interested in programming or do you want to show what freshman CS students have to put up with? Because I think these are two pairs of shoes, and personally I would get bored after doing even just one sorting or text conversion problem. My suggestion would be to choose something that has a nice visual result, either directly on the command line or after visualizing it with something like gnuplot/matplotlib. One of my favorite "beginner's problems" for potential research assistants with little to no programming experience is to code up a simple diffusion-limited aggregation simulation (https://en.wikipedia.org/wiki/Diffusion-limited_aggregation). The algorithms are simple (less than 100 lines of Python), there is plenty of documentation around, and the results are nice to look at.

  11. Obvious question by gpig · · Score: 1

    Given your requirement regarding online research, the question should be:

    "Search the internet for a classic computer science exam or job interview question, then find a matching answer on Stack Overflow. (Bonus points will be awarded if the answer you find is correct)."

  12. Booooring by Anonymous Coward · · Score: 1

    The ideas suggested are really dull - has the world really not moved on in 30 years?
    I'd suggest tasks that incorporate *real data* from the *real world*. Read a thermometer, get the weather from yahoo's api, or calculate exchange rates using live data: real world problems that are relevant and engaging.

    1. Re:Booooring by Anonymous Coward · · Score: 0

      I posted a really cool idea, and it's apparently been deleted....

    2. Re:Booooring by Anonymous Coward · · Score: 0

      Is there a small programmable drone that schools could buy? Get the kids to program a simple flight as part of the assignment, then have them test it during school hours on the drones for real?

  13. Hello World by Anonymous Coward · · Score: 1

    Hello World. In Java. That should put him off CS for good.

  14. Pong by Anonymous Coward · · Score: 0

    Pong. It is a great fun little game that is simple to program. It is easy to expand on once the initial simple game is created.

  15. Code Kata by Bizzeh · · Score: 1

    Sounds like something that Code Kata were designed for.

    Decent list of them can be found http://codingdojo.org/cgi-bin/...

  16. Don't forget... by Anonymous Coward · · Score: 0

    There will be students who are hungry to learn all they can about programming, those who are slightly interested but will become either the former, or, more commonly by far, students who will never use computers for more than facebook no matter WHAT you attempt to teach them. Without that kind of passion, they really can't fit into the world of future software developers. Maybe code monkeys, but that's not really a career path... Especially if they haven't really shown interest before say, age 10.

    1. Re:Don't forget... by HeadSoft · · Score: 1

      I'm thinking most hardcore system programmers and computer scientists on here will probably agree with that to some degree. The best in the industry are those who were already learning this stuff *on their own* as early teens at latest. Focus on them. The others are just seat warmers, honestly.

  17. Windows 10 programming by Anonymous Coward · · Score: 0

    I know that this is kind of politically incorrect to say in Slashdot, but Channel 9 has great series of tutorials in beginning programming UWP apps. Instead of tinkering with crusty old algorithms, that could be a fresh platform for the kid to get into the real-life business.

  18. LOGO by Sooner+Boomer · · Score: 1

    Is LOGO dead? It once was the perfect introductory language. Now get off my lawn!

    --
    Chaos maximizes locally around me.
  19. An init system by Hognoxious · · Score: 1

    An init system that's just an init system - not 97 other unrelated things.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  20. Star Wars Engineering project by Anonymous Coward · · Score: 0

    I hate to break it to you, but the millennium falcon is not real. (I guess that is what you mean by "Star Wars Engineering project - Han Solo level")

  21. More fun projects by gizmod · · Score: 1

    I think doing sorting algorithms, math problems and string manipulation hardly counts as "fun" when it comes to programming. Rather get them to do some ascii animations (walk, wave, punch methods), ascci men, ascci dogs and birds etc. What about simplistic clones of zork? (lots of if else logic, multidimensional arrays perhaps). I have found that to get students (at least younger ones) interested in programming staying away from the more formal cs examples is the way to go. Doing these more challenging game like projects, although slightly harder will eventually incorporate the more formal sorting, searching, string manipulation excercises into them anyway without them being the actual focus. They will be so distracted in that they are making a small game, they wont even notice their learning the formal stuff.

  22. Payroll by printman · · Score: 1

    Right a program that calculates gross pay, federal, state social security, and Medicare deductions, and net pay. Extra credit for handling exemptions and filing status. Teaches basic logic for the tax tables, how the tax system works (good life skill), and how to take input and produce output. Can be done in any language, too...

    --
    I print, therefore I am.
    1. Re:Payroll by __aaclcg7560 · · Score: 1

      Right a program that calculates gross pay, federal, state social security, and Medicare deductions, and net pay.

      *cough* COBOL *cough*

    2. Re:Payroll by printman · · Score: 2

      Haha.

      This is for introducing high school students to programming and basic logic. Remember that most of these kids will probably not become programmers but they might be doing reports and/or spreadsheets which can take advantage of basic programming and logic. Start simple (one step beyond "Hello, world"), then move on to more interesting stuff once they have mastered the basics, otherwise they will not understand or be able to adapt the exercises to new projects.

      (and let's not forget that a LOT of programmers do web sites and databases, which are not far removed from COBOL and batch jobs from days past...)

      --
      I print, therefore I am.
    3. Re:Payroll by __aaclcg7560 · · Score: 1

      When I was a teenager looking at programming in the early 1980's, the local library had only COBOL programming books. Payroll was a common theme among them. There's still a market for COBOL programmers to maintain legacy code on mainframes or convert to a modern programming language.

    4. Re:Payroll by Anonymous Coward · · Score: 0

      That's funny! I remember finding a few BASIC books in the late 1970s at my local library, but they were all oriented toward scientific and business computing. Payroll and accounting were very common, as those were the most obvious things for businesses to automate, and offer a good return on the investment of a computer.

      The books back then hadn't caught up with the "fun" microcomputer revolution yet. I remember in particular Basic BASIC which an older friend told me would be the best book for learning BASIC. It had examples like finding the roots of quadratic functions.

      I ended up going to Radio Shack and buying Computer Programming in BASIC for Everyone which was much more fun. Despite the picture of a TRS-80 on the cover, it was really written for mainframe/mini BASICs and gave instructions at the beginning for how to dial up with a modem and log in on your teletype terminal!

      Once our school got Apple IIs, I sat down with the AppleSoft BASIC manual, some issues of Creative Computing, and David H. Ahl's BASIC games books, and never looked back!

    5. Re:Payroll by __aaclcg7560 · · Score: 1

      Many of those old books are available at the Atari Archives. I've been translating David H. Ahl's BASIC games into Python to learn that language better.

      http://www.atariarchives.org/

  23. Software eng has piss all to do with comp sci by Zenin · · Score: 2, Insightful

    You don't go into an intro woodshop class and hand the students physics exercises. Why would you intro computer engineering by throwing dry computer science at them? Are you trying to chase good kids away from computing professions??

    The biggest mistake educators make with computers has been thinking they have piss all to do with math or science. Sure, at a fundamental level they aren't about anything else. But at a fundamental level my morning omelet is all about particle physics, so yah. :/

    The reality is day to day software engineering has massively more in common with shop classes and "maker skills" than it ever does with math or "science". Just like most machinists are just trying to cut and weld steel into things rather than invent a new alloy, most software engineers are just trying to cut and paste code into new program shapes rather than invent a slightly more efficient sort algorithm. Sure, there's a teeny, tiny minority of egg heads doing amazing work on graphic card drivers to make my FPS better in Fallout 4, and I'm very grateful we have them, but the other 99.89% of programming in the world isn't anything so deep.

    If you want to jump start kids on software engineering, buy a few cheap Arduinos, LEDs, maybe a few servos, and go nuts. The first for loop that makes an LED blink or a servo wave and they'll be hooked for life...not to mention learn more about actual software engineering then you'd ever have done with the comp sci/math tactic.

    --
    My /. uid is better then your /. uid
  24. Find books by AHuxley · · Score: 1

    That taught BASIC, Ada, Pascal.
    They have a lot of simple intro projects that dont need some "company" CS web gui, movie set branding or intro movies to show what fun their movie themed gui is.
    Re 'write a program to divide two numbers in two different programming languages and compare the results to determine the differences between the languages."
    That might just result in seeing something done in 4 lines vs 8 lines or the use of english words in code. A discussion about the amount typing, why english was used... why it was done like that in the past, what is been done now.. what company they know uses what language this decade and why...
    Show the origins of other languages, history eg Ada, C, BASIC but then teach and show one language to a good standard.

    --
    Domestic spying is now "Benign Information Gathering"
  25. Tax by abednegoyulo · · Score: 1

    and everything that we usually do IRL that involves computation. For the logic part, try alarm system.

  26. Convert integral numbers to Roman notation by jeanphilippe.gravel · · Score: 1

    This is a *programming* intro project. SwE projects are hardly shorter than a month of work. Anyway, this "code kata" is excellent to learn 'if then else' constructs, integral division and modulo operator. Cheers

  27. SW Engineering project by Anonymous Coward · · Score: 0

    Two areas that I have found not properly covered in most school projects—handling inappropriate input and errors and reading and writing from a file.

    I suggest you have them design an input form that can handle incorrect and excess input and write the form data to a file. Make sure they are ready to handle malicious input.

    The form should not be long, it should include a field that is numbers only, a field with limited alphanumeric entry (such as M/F or A/B/C or 1/2/3 etc) with code to manage incorrect hits. They need one long field that allows for a greater length in the entry field than the length allowable in the file, this means they may need to manage a means of reducing the input to write to the file while retaining the substance and meaning.

    They also need to handle garbage entry, such as a name field with just a bunch of letter strung together at random.

    There should be an e-mail address field with appropriate checks to determine if the entry is garbage.

    Almost every program will require reading and writing to a file and every program requires some form of error handling. Most software engineering classes I have ever been involved in have not done well in these areas.

  28. Oh Pascal's problems in your chosen language by Anonymous Coward · · Score: 0

    Pick up a copy of "Oh Pascal!" and then present the introductory problems to the students to solve in the language of your choice. It is a good introductory textbook irrespective of language.

  29. (1) pick a sorting algorithm and sort a list of t by Bobakitoo · · Score: 2

    (1) pick a sorting algorithm and sort a list of ten words alphabetically

    Why limit yourself to 10? The difference, on a modern computer, between n^2 and n log n will not show up with that few. If you are going to make them write sort programs, make them sort arbitrary input. Then when they feel confident about their code ask them to sort 10000 words.

    Teaching sorting help to better appreciate the quality of good algorithm, and there is nothing better for that than seeing your 'perfectly fine' stupidsort() never returning because the data is so large.

  30. How I would do it by MikeRT · · Score: 1

    If they seem more of a hobbyist, I would give them a VB.NET cookbook and a copy of the express IDE. The reason why is that VB.NET will hold their hand and that will lead to one of two outcomes if they're the type that is at least warm to the field: either they'll get sick of that hand holding and want something better or they'll realize it's just a tool for them. In the latter case, don't worry. They may go into a field where programming is a supporting skill, but not something they need to be good at on a serious level to succeed.

    If they seem a lot more serious, I'd choose Groovy. WHT, you're probably thinking. Groovy? Here's why:

    1. Groovy has many of the advantages of Python and Ruby in terms of rapid feedback and coding cycle.
    2. Groovy can effortlessly move between a simple scripting language and a full Java replacement.
    3. Groovy has a mature tool chain in IntelliJ, Gradle and Maven for serious work later.
    4. Groovy occupies a really interesting niche that makes learning Java, JavaScript and Ruby later really, really fast for a beginner.

  31. Card Shuffles .. by raleigh.dst · · Score: 1

    Project #1: Using the language of choice develop a program to shuffle a deck of cards in the most efficient manner while maintaining a high confidence of random draws. Bonus: Build this program as a library that can be used by later projects to expand their functionality. Project #X: Create a program to utilize your shuffle library that will adequately replicate an existing single player card game. (Solitaire) Continue to build from there until you have a working online casino .. ok.. well maybe not that last part. -Casey

  32. Neither science nor engineering by Anonymous Coward · · Score: 4, Insightful

    You're right, this has nothing to do with computer science. But it's not software engineering either, merely programming. Just like making a birdhouse in the woodshop is neither physics nor mechanical engineering, but merely woodwork.

  33. Prime numbers by kneth · · Score: 2

    High school students should know what a prime number is. Find all prime numbers from 2 to 1000 could be a fun, little problem. A quick research, and the student will find the sieve of Eratosthenes (https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes) and implement it.

  34. Goldbach conjecture by madro · · Score: 1

    In HS, finding the two primes that add up to an even number was the most memorable assignment. The teacher had a bet that anyone who could write a faster program than his would get a prize ... but his was always faster for any number over a million or so. It wasn't until the next semester that I figured out that the key was to only loop until the square root of a factor before deciding it was prime.

  35. Some ideas by Anonymous Coward · · Score: 0

    Four hours? Above all, programming is about perseverance. Array sorting? Boring. Programming Conway's game of life with text output is a fun array exercise. Root finding using Newton's or secant method. Extra credit for programming Mead and Nelder's algorithm for finding extrema. Makes a nice plot too. Finding statistical moments of data. I recommend using Scheme.

    1. Re:Some ideas by KGIII · · Score: 1

      Hah! I know who he is. I even met with him a couple of times. I was an Applied Mathematic student and went to see a few of his lectures and a couple of his talks. Conway, I think he's still alive, is pretty damned smart.

      --
      "So long and thanks for all the fish."
  36. Software engineering? by shortscruffydave · · Score: 2

    It might be a question of semantics, but you ask for a software engineering project for someone with no real programming experience. I would say that software engineering is far broader than just programming. Start with coding projects and move on to the larger/harder discipline of software engineering. Walk before running, and all that

    1. Re:Software engineering? by wheelbarrio · · Score: 1

      ooh, snap!

    2. Re:Software engineering? by oh_my_080980980 · · Score: 1

      And one does not need to coding experience since Software engineering is higher level. If you want to teach computer programming then teach computer programming. If you want to teach software engineering - DON'T USE PROGRAMMING EXAMPLES!

    3. Re:Software engineering? by bluefoxlucid · · Score: 1

      This is common in education: people want to teach X, so they bluntly approach X.

      I recently had a conversation with K.A. Ericsson--a brilliant man who has driven research in the area of learning and developing expertise--and our exchange included a minor discussion of using his Deliberate Practice in education. His interest was largely targeted at incorporating better educational techniques into the classroom, and he lamented that he only saw an improvement in *learning* and not an improvement in the long-term career of the students; I debated the merits of teaching the students the techniques of learning, rather than simply using them.

      To put it simply: he found a better way to teach programming, mathematics, music, and medical diagnosis; I told him he should teach *that* *method* to students so they can independently plan their approach to new information and skills. We didn't debate so much as discuss. His largest problem in the field is the scientific one: it's ridiculously hard to measure those things, and he's a scientist and needs to formally identify empirical results. I'm an engineer: at the cost of a constant drift toward dogma (which, hopefully, the scientists can counterbalance with their research), I take pieces and assumptions such as "education improves a person's ability to thrive" and work on the individual pieces along the way, assuming that optimizing each input will optimize the output, which acts as an input to the next piece. In other words: rather than asking, "If I make people more academically capable, do they actually become more effective and advantaged in their adult lives?", I simply say, "We must give these people the ability to learn more effectively so they have more tools to use in their adult lives, thus giving them an advantage."

      Now go back to the original topic: What's a good software engineering project to teach high school kids programming?

      If you want to be a software engineer, you should know about planning, risk, and research. You need a cursory grasp of project management, specifically of defining requirements and breaking down the work; you don't need EVM, schedule management, human resources management, procurement, or all that other stuff. You need to learn to make decisions about architecture. You need not only languages, but methods.

      People want to teach students programming languages and call it programming. "Can you construct a conditional loop?" "Can you make a class, and call object members?" They think that's the starting point. It's ludicrous, like teaching someone construction by starting them on building a small shed, instead of on the fundamentals of wood and fasteners and the proper architecture of a stable structure. Apprentices are kept under strict watch and taught as they carry out tasks of increasing complexity, not loosed on their own to build rickety hovels that pass as homes.

      When I learned what little I know about plumbing, the first lessons involved copper pipe and an acetylene torch; we joined six inch lengths of pipes together with flux and solder. The construction students went on to learn about routing water supply and waste systems, using PVC and CPVC, constructing stable floors, and architecting a complete building with proper building practices. It was not about building houses, but about knowing how houses were built and why they were stable.

      You must learn planning, architecture, and design patterns before you learn to build something which uses planning, architecture, and design patterns. The common-sense answer that the student can somehow force something simple to work is broken: this teaches the student bad habits of thinking, and forces them to do excessive work laboring to produce something with little understanding of how to go about it. You should focu

  37. Make sure there is learning within learning by LawPrime · · Score: 2

    I've done this several times and a key point in nurturing interest over disdain in students is to place some additional, personalized learning in the project. If the student has a mathematical bent, I usually assign a Monte Carlo simullation of pi. It is amazing to see random "dart throws" and an easy calculation converging to pi, and it lends itself to a quick drawing, followed by a quick outline, followed by pseudo code, followed by short coding -- and it usually requires simple debugging to work out whether you need to use "" or "=". If the student is a tactile learner, find a device project like a Mindstorm kit, so they end up with a physical object to touch and control. And who doesn't need a little self-driving dump truck to distribute handouts up and down the rows? If they are artistic, perhaps explore pixel edge detection to create a line drawing from a photo. They will come away with keen insight into how images are stored and displayed. The key is that they use coding to DO SOMETHING THAT THEY PERSONALLY FIND VALUABLE. If you don't do this, then it will be just like forcing them to memorize the multiplication tables or diagramming sentences. Most students aren't inspired to go back to those particular assignments on their own. Our goal is to build internal interest so they will become life-long learners. One more thing I have done in small classes is to do a team project. (I did one with TI calculators.) you can negotiate who gets what subroutine and do all the preliminary teaching and organizing on the whiteboard and then turn the subroutines over to the students. When they transfer all the subroutines between themselves and see it all run, they feel like they have really done something, since the teacher didn't GIVE it to them. They also have to learn to aggressively test individually and then to debug as a team.

  38. Build a compiler or a database by Anonymous Coward · · Score: 0

    They are good exercises.

  39. None of your choices are SW engineering by Anonymous Coward · · Score: 1

    They're copypasta programming.

  40. Hack a MUD codebase by Anonymous Coward · · Score: 0

    One of my favorite exercises to give students at that level is to hand them a MUD codebase and ask them to make some simple modifications. As a "software engineering" rather than a pure "programming" exercise, it's a fun example of something with a good bit of architectural complexity that can nevertheless be broken up into small chunks that make sense for entry level students - and who doesn't like games?

  41. Project Euler and Games by bradley13 · · Score: 1

    For simple procedural stuff, do exercises off of Project Euler.

    Then move on to games. These can start simple, for example, writing a poker or blackjack program that runs in the console. Then move up to simple graphical games. Put together a simple framework they can use, to get them started. Or take an existing framework, but it's really better to roll your own: it will be a lot smaller, because it is focused on the exercises you want to do, and you will understand it better as well.

    --
    Enjoy life! This is not a dress rehearsal.
  42. Write a POP3 client by mrsam · · Score: 1

    POP3 is a simple, basic email download protocol. Shouldn't take more than a few hours to write one from scratch. The specs are easiky available, and will serve as a good introduction to writing free software based on Internet standards.

  43. Re: (1) pick a sorting algorithm and sort a list o by arth1 · · Score: 1

    Why limit yourself to 10? The difference, on a modern computer, between n^2 and n log n will not show up with that few.

    Because with that few, you can step through the program from beginning to end, even on paper. A much better chance to find out why something goes wrong, and not just that it crashed or produced wrong results.

    If you are going to make them write sort programs, make them sort arbitrary input.

    No. Two point six times no. Real life data is not arbitrary. Different search functions work with different efficiency for different data.

  44. OOP with actual objects. by 0100010001010011 · · Score: 1

    Preface: I'm a mechanical engineer by trade. I went back and decided to audit some of my undergraduate classes to refresh my memory I realized there aren't any good 'toolboxes' for any of those classes. AeroPython is a good graduate level class for Aerodynamics-Hydrodynamics with Python but there's nothing more basic.

    Last night I decided to cram Kindergarten -> Statics into one module just so that I could build on top of it for Mechanics of Materials.

    It is in no way complete but it served a purpose, here's just an excerpt from what I threw together:

    class Shape2D(object):
            def __init__(self,area=None,perimeter=None):
                    self.area=area
                    self.perimeter=perimeter
    class Circle(Shape2D):
            # This could be a lot cleaner, but it works.
            def __init__(self,diameter=None,radius=None,area=None,circumference=None):
                    # By doing this, we can define these as symbolic in the future.
                    # aka, solve for the unknown.
                    d, r, A, c = sympy.symbols("d r A c")
                    circ_eqn1=sympy.Eq(2*r,d)
                    circ_eqn2=sympy.Eq(pi*r**2,A)
                    circ_eqn3=sympy.Eq(2*pi*r,c)

                    if diameter is not None:
                            self.diameter=diameter
                            self.radius=sympy.solve(circ_eqn1.subs(d,diameter),r)[0]
                            self.area=sympy.solve(circ_eqn2.subs(r,self.radius),A)[0]
                            self.circumference=sympy.solve(circ_eqn3.subs(r,self.radius),c)[0]
                            return
            @property
            def I_0(self):
                    return 1/4*pi*self.radius**4

    However going forward I can define a circle and use it in anything I need. I can add a length and make it a tube. Revolve it and make it a sphere.

    Don't teach them something completely foreign, have them make a module/class for something they know rather well and then as step 2 'automate' something about it, make it programmatic.

  45. 4 Hours is a TERRIBLE Criteria by Anonymous Coward · · Score: 0

    There is very little of interest or educational value that can be done in 4 hours and what does exist is pretty much guaranteed to put a student off to software development as much as similarly-geared math courses. Your best bet would be to architect something that could be done in a quarter by a professional and drag it out over the course of a semester or year. Pick a project they would immediately understand the value in (an IM client/server application for instance) and then break it down into pieces they can understand and follow along with. If you do it well they should get sucked into it any everyone with the aptitude for software development in the class will likely finish within a month or two while spending the rest of the time polishing it off or adding neat features. Maybe even pick multiple projects and let students pick whichever they are most interested in.

    Code doesn't translate well to strict coursework, that's why pretty much all CS majors suck at it and quality software engineers tend to be self-taught. The trick is inspiring them to spend all night for several nights fiddling with things until they work, but being careful not to force it and drive them away.

  46. Not "Software Engineering" ... by gstoddart · · Score: 1

    I'm looking for suggestions on introductory software engineering projects for a high school level student. Assume the student can do basic math (up through Algebra I or Statistics I) but is new to logic and computer science.

    First off, stop calling this software engineering, because it isn't. No more than a potato gun is rocket science.

    This is an into computer programming assignment, but it sure as hell isn't engineering, and it sure isn't "software engineering".

    Engineering is a discipline, and involves far more complexity than what you're describing. In many places it's also a licensed profession like "doctor" where you can't just slap engineer on your title.

    Don't do yourself or your students the disservice of going around saying "yarg, I'm teaching teh software engineering". There's enough self-aggrandizing titles in the industry as it is without pretending a high school "learn to code" project is anything resembling "engineering".

    --
    Lost at C:>. Found at C.
    1. Re:Not "Software Engineering" ... by oh_my_080980980 · · Score: 1

      Two people get it! I suppose it says a lot about our educational system when people equate computer programming with software engineering.

  47. Not engineering by wheelbarrio · · Score: 1

    Don't oversell what you're doing as "introductory software engineering". If your students are high school level and "new to logic and computer science" then what you should be doing is teaching them an introduction to programming. That is a fine and worthy goal right there. Software engineering is usually a college-level subject or even a degree in itself, teaching already-capable programmers how to design and build complex and robust real-world systems; much of the material revolves not around programming at all but SDLC process and other things that will be irrelevant (and boring) to computer-naive high schoolers. Not to be too precious about it, but the terminology matters; would you advertise an introductory high-school physics course on friction and statics as an "introductory civil engineering"?

    1. Re:Not engineering by oh_my_080980980 · · Score: 1

      Agreed. However, i think you can teach software engineering **if** you focus on software engineering and not programming.

  48. poker by i.r.id10t · · Score: 1

    Create a deck of cards, shuffle it, deal a hand of poker adn determine what hand it is.

    --
    Don't blame me, I voted for Kodos
  49. This is Introductory Programming not Engineering by Anonymous Coward · · Score: 1

    While you might be trying to make the course sound cool calling this Software Engineering is totally inappropriate. If you teach a person to apply a bandaid it isn't introductory medicine its first aid. Engineering is a licensed profession with regulatory bodies and legal responsibilities and entails a much higher level of training than the programming equivalent of adding two numbers together.

  50. Get a couple of Raspberry Pi by real.melancon · · Score: 1

    Sorting algorithms are boring. Get a couple of Raspberry Pi. Introduce them to Python scripts (10 lines of code first) and GPIOs for LED blinking. Then maybe display stuff on a cheap 16x2 LCD. For less than $100, then will get the idea, and perhaps have a kick to it, and want to do more.

    1. Re:Get a couple of Raspberry Pi by Anonymous Coward · · Score: 0

      I 2nd that thought. Make it a Triple header Math/Computer Science/Real world Electronics.

      There are TONS of teacher led instructables as well as lesson plans for using the Pi. Just google raspberry Pi and you will see tons of stuff.

      RAH

  51. blinky lights and pushbuttons by Anonymous Coward · · Score: 0

    Arduino/Teensy or similar cheap micro that has easy interfaces to simple devices.

    Then, a problem like making change in a vending machine. Buttons for 1,5,10 cents in, Blinky lights for what gets fed back (1,5,10)

    there's a lot of different ways to solve the underlying problem (state machines, outright calculation, etc.)

    There's also opportunity to make abstracted classes/modules for the interfaces (GetMoneyDeposited(), ReturnChange())

    As others have noted, some sort of source code repository is nice. But realistically, for a single 4 hour class, it seems a bit overkill.

  52. Hard copy output by Peter+(Professor)+Fo · · Score: 1

    Whatever the exercise there must be something to physically take away, and perhaps titivate later.

    'Draw a graph' might start with rows of stars bashed out on a teletype... which then needs !'s for the horizontal scale and +'s for the vertical scale... and then the scales may need to be scale to fit the data. Of course by now you're drawing symbols on a pixel map then converting it to a matrix printer. Then instead of a fixed X axis you move to X-Y (or scatter) on a virtual drawing surface that gets expressed on a laser printer.

    (I put the teletype in there for fun, but there are plenty of tech limitations around today.)

    I'm a bit worried about the 'go and research it' bit. I'm all for 'use the internet to help crack specific problems, steal code etc.' but it's your job to be right with them while they're trying to get their ideas together and then to work. When they're floundering you've got to show them the way so they can move on.

  53. ECG with sound card input and Python grapher by Anonymous Coward · · Score: 1

    This circuit is really cheap and easy to build. I've built it twice now, and even with Radio Shack last minute trips for parts I'd forgotten, it was still cheap.
    http://www.swharden.com/blog/2013-04-14-simple-diy-ecg-pulse-oximeter-version-2/

    The circuit doesn't take long to make using a breadboard - no soldering required. There's a parts list on the site.

    For the Python grapher, I think I used pygame to get a context to do graphics. I can't remember what API I used for sound card input. Basically, I polled the sound card mic port as often as I could - each time I asked the sound card for the mic value, it's giving the voltage between electrodes (which are pennies). This gives you the heartbeat or muscle firings, etc, whatever it is you have the pennies on (you'll put them on the surface of your skin for instance). Don't worry - if you're using 3 AA batteries, there's very little power in the system to shock you - the circuit is using an op-amp to amplify tiny variances in voltage at the skin's surface.

    For the chart, I just made a dot for every voltage value given from the sound card (y being the vertical axis representing the voltage value, and x being the time). Each time I got a new value, I moved all the other dots one x to the left, so I had a scrolling graph. Writing the Python code took me longer than the circuit and was more intellectually challenging (not much, Python is really easy to code in).

    1. Re:ECG with sound card input and Python grapher by Anonymous Coward · · Score: 0

      Oh, and you could also use a webpage with javascript APIs to do the display (was just reading about webaudio). DSP.js is a javascript library which gives you the fast fourier transform - shows you all the frequencies / how much of each frequency is present in a signal. You just put all the data values from the mic in an array and pass the array into that function.

  54. Math + visuals by DavidHumus · · Score: 2

    A number of fairly simple mathematical problems lend themselves also to visual representation, which many find appealing. For instance, start with building Pascal's triangle, then display it as an image by choosing some way to map numbers to colors. Once you've done this, similarly visualize the triangle modulus some different integers - as shown here: http://code.jsoftware.com/wiki... . Doing this while extending the triangle to very high numbers can lead to discussions about the limitations of floating-point representation and other topics.

    Another project that can start simply and become as complex as you want to make it is something like diffusion-limited aggregation - https://en.wikipedia.org/wiki/... - which also lends itself well to visualization and requires non-trivial array-handling.

    Of course, the calculation and display of the Mandelbrot set also lends itself to any number of enhancements.

  55. Cashier GUI by Anonymous Coward · · Score: 0

    Build a simple cashier GUI for a fast food restaurant, try VB.NET to make it easier for a first timer. Or build the GUI for them. Labeled buttons, colour coded sections, textbox display of price...etc. If you have a touchscreen available, use it.

    This was my final project in HS. It was a brilliant "aha!" moment when I really saw how this could be used in the real world.

  56. Number base conversion by Anonymous Coward · · Score: 0

    I remember one I had in HS that I enjoyed, a program to convert an arbitrary number in one number base to another (Base ten to octal, binary to hex, base7 to base 12, etc). I remember the program itself is actually fairly small and simple, though does need some complex math. Source code is also fairly easy to find on Yahoo/Google.

  57. Write simple shell functions like cat, echo, sort by Anonymous Coward · · Score: 0

    Takes the mystery of how the shell and c interact.

    More complicated things like a sort have algorithms.

    The other way is a single board computer which gives wire wiggling capability.
    Arduino, RasPi, etc come to mind.

    Starting with a running, useful system like a QuadCopter controller and tweaking it is another possibility to keep the more advanced folks interested if they don't want to teach the rest of the class for you.

  58. Something Fun, not Math by rockmuelle · · Score: 1

    First off: avoid the algorithm and math problems. The one or two geeks in the class will love them, the rest of the class will be turned off from programming for the rest of their lives. I have a Ph.D. in CS and still hate those types of problems (ok, I have a love/hate relationship with those types of problems - i love them, but hate using them for pedagogical purposes).

    That said, the single best intro to programming/software engineering project I had was a graphics programming project when we barely knew how to program. Our professor gave us a small library that had functions like "create_window()", "draw_rect()", "clear_screen()", "get_input()" and had us do a series of exercises that put objects on the screen, moved them around, and then refactored into our own graphics library. Some of the more advanced students made simple games.

    From a software engineering perspective, this taught a number of important lessons early on:

    - Code reuse/trusting third party code (we had a library for the complex stuff - if you can stop NIH syndrome before it starts, you've already won)
    - User interfaces (we had to get some input from the user to decide what to draw)
    - Event loops (software does not live in a vacuum, despite what the functional guys want you to believe ;) )
    - Debugging/iterative development (no one's project worked the first time)
    - Teamwork (do this as a team, have different members write different parts to learn how to interface with other programmers... save pair programming for later)
    - Refactoring/code organization (how to recognize when you've wrote the same code for each shape and move that into a function)
    - That you can do cool looking things easily with software (never underestimate the power of a graphics to get people excited about computers)

    This was in 1992, so we used X windows on Sparc stations and wrote everything in C.

    In 2016, here's how I'd do the same project:

    - Use (simple) Javascript (get over any biases you might have)
    - Stick with simple functions and introduce hash tables/dicts as a general purpose container. Don't do objects (esp in JS, since there are too many ways to do them)
    - Provide a library that creates an SVG canvas (use this as the graphics area)
    - Create a few related elements like a text box or buttons for controls and user input, but do this via your library
    - Have a mechanism for callbacks/closures (don't tell them what they are yet and lose them, just show them how to use them)
    - Do it entirely in the browser with a simple text editor (this is a development environment everyone has on their computer already, IDEs are a course on their own)
    - Have some exercises that use the interactive developer interpreter
    - For the advanced students, give them a library call for loading remote data and have them change their graphics in response to it

    In addition to the stuff we learned, this also:

    - Introduces the browser as a development/rapid prototyping platform
    - Gives students a basic idea of how web content gets made
    - Teaches some basic networking
    - Gives the advanced students a platform to get creative with

    Good luck!

    -Chris

    1. Re:Something Fun, not Math by nazrhyn · · Score: 1

      This is probably the best response I've seen. It summarizes the valuable point that there's no way high school introductory programming curriculum should have introductory-college-level-computer-science-like elements in it. (You're trying to excite the students about the possibilities of something they might not have considered before, not bore them to death and scare them off forever! If they decide to not only go into "programming", but also into "software engineering" via a degree in Computer Science, then they'll get plenty of that later on.) And, it asserts that programming that produces visual results is the most likely kind to spark interest and keep attention while tricking the students into learning by doing. (You can tell a new software engineer that this or that is the best practice and they may pay lip service and go through the motions, but until they see the need in their own code or in the course of their own work, they won't really believe you.)

      I will add that it has been demonstrated time and again that framing learning in the context of a game can dramatically improve uptake. If there's any way to start with something like what rockmuelle suggested and transition into creating games, I feel like that would be the best! Providing good introductory curriculum at this level almost always will require more of the instructor in terms of planning and environment set up than it will require of the students during execution of that curriculum. Though, you wouldn't be asking if you didn't want to spend that time, I suppose.

      --(a different) Chris

  59. you can challenge them. by Anonymous Coward · · Score: 0

    Don't be afraid to challenge them. One of the most important aspects of programming and life in general is to learn how to fail and persevere, iterate until you get it right.

    So stuff like: (2) write a program to convert characters from lower to upper case is not quite enough. [foostring.upper()]

    Make them write their own utilities. Stuff like 'write a program to find and eliminate duplicate files in a directory.', 'write a program to scrape a web page for a specific piece of info', etc. Stuff that will teach them loops, file I/O, basic OS file operations, string comparisons, etc.

    And make them do it in Python.

  60. REGULAR EXPRESSIONS by coldr3ality · · Score: 1

    If there is one discipline to serve as a common root for the fundamentally different learning experiences of "computer science" and "software engineering" in the sense that is meant in the posts above, regular expressions. Regular expression syntax is absolutely not object-oriented and does not share any resemblance to natural human language, which makes the experience more like dealing with individual bits and numbers as in computer science, but still abstract and relatively informal. Regex may be the most widely applicable scripting skill to have. A finely crafted regex exercise could segway nicely into a computer science exercise working with datagrams.

  61. Write a Paper by Rob+Riggs · · Score: 2

    Have the students write a paper on the difference between Computer Science and Software Engineering.

    --
    the growth in cynicism and rebellion has not been without cause
  62. Advent of Code by Brian+Kendig · · Score: 2

    I had a lot of fun with this over the holiday season: http://adventofcode.com

    It's twenty-five simple but interesting programming challenges. Day 1 is a simple "count the number of open and close parentheses in a string." Later days include "generate MD5 hashes until you find one that starts with five zeroes," "generate 50 iterations of Conway's Game of Life," "solve a Traveling Salesman problem for Santa," and even "simulate an RPG and find the best strategy for beating the boss." Each day has two parts; solve the first to unlock the second. Several of the challenges involved recursion, but in general they cover wide ground. Some people solved both parts within five minutes of each day's puzzle becoming available, but for those of us who didn't care about the leaderboard, an hour's work was usually plenty to get it done. (Students without experience would take a bit longer.) Also, the input for each day's challenge was different for each user - there were probably only a handful of possibilities, but it meant that you couldn't always just copy someone else's answers without doing the work yourself.

    I think you'll find a lot of great material here. Pick a few of the days to explore with your students; teach them how a software engineer would attack the problem. Try solving it with different languages and compare how each language would do it. Demonstrate how you could optimize code to find the solution faster (especially in the "Game of Life" and "Look and Say" challenges).

    Also, there was a great Reddit community that shared solutions in various languages, and lots of people put their code on GitHub. Some people played "code golf" and came up with amazingly terse solutions. I used the Advent of Code to teach myself Swift (my solutions are at https://github.com/bskendig/advent-of-code); my code was more verbose than it should have been but I usually solved each problem in fewer than 100 lines.

  63. Software Defined Radio by Anonymous Coward · · Score: 0

    How about that? Just call in an external library and use Python, make a program to select frequency.

  64. abbreviations: HS, SW, CS by Anonymous Coward · · Score: 0

    "SW Engineering Projects? (HS Level)"
    Star Wars projects? Han Solo level?

    CS - Captain Solo? Chancellor Supreme? Cade Skywalker? Cham Syndulla?

  65. mastermind by holophrastic · · Score: 1

    games are always better for teaching. have them program mastermind, and other real-world logic-based games. They'll learn the logic of programming from the logic of reality.

  66. Find a good game with mod support by Anonymous Coward · · Score: 0

    Then get the kid to have fun modding games and learning through that.

  67. Alien Virus by Anonymous Coward · · Score: 0

    Get them to program a virus that will disable the shields of an invading army of aliens by planting it in the mothership. Jeff Goldblum did it in something like 15 minutes.

  68. Don't start with sorting by ImprovOmega · · Score: 1

    Look if you're going to start out you really need to introduce them to Boolean logic first and foremost. That is your lifeblood in computer science. Start with the basics - true/false, if/else then go to simple compound statements with or/and/xor/nand and show them basic truth tables for evaluating them. From there you can build out. And you should have them working on very simple projects.

    If this is in a classroom environment where they will be doing actual homework and such your entire first week will be devoted to getting them to set up a basic build environment and have them do simple I/O. They needn't understand all the ins and outs, but they should be able, after one week, to build a simple "Hello World!" program that asks for input from the keyboard and prints the results back to the screen.

    After Boolean logic you can start branching out. A really good goal to work towards is having them build out a text-based "Connect-4" style game. This gives them something they can actually show off and lets you build incrementally on a wide swath of programming topics. Start with loops - like how would you print out a row of empty squares on the command line? Then expand that to nested loops - how would you print out a 2d game board of empty squares? Now they can get an introduction into states - is it red's turn, black's turn, or is the game over? How do we keep track of which squares have a red or black piece in them? Oh wait, it has to occupy the lowest square on the board, how do you think we could do that? Now how and when do we check for a game over condition?

    You can work collaboratively on the Connect-4 project with them throughout the semester as a teaching tool and assign side projects highlighting the topics you want them to learn along the way. For their individual final project you could have them make a Tic-Tac-Toe text-based game.

    Depending on how fast they progress you could move on to more advanced topics - like showing them how to do a Depth First Search on the Connect-4 board to check for connected chains, modifying the Connect-4 game to be of arbitrary size/shape/connections for a win, and maybe some lessons on Object Oriented Programming by abstracting the game into its own class. Or maybe even introduce them to graphics programming by starting to make a graphical version of Connect-4 using the text engine as a base (the background structures are identical, all that really changes is how you draw the gameboard and how input is done).

    And if you decide to show them sorting the best thing I can recommend is start with all the cards from one suit in a deck of cards. Then demonstrate how various sorting algorithms go about sorting. Remember - human sorting is typically a variation on insertion sort, that one will probably make the most intuitive sense to them, even though bubble/selection is easier to code up. This works well even transitioning into n*log(n) algorithms because you can at least visually show them the heap structure in heapsort and how it heapifies, the split buckets and merge process in merge sort, or the pivoting and splitting in quicksort. And don't get me wrong, I think sorting algorithms are fundamental to a good CS education, but they are kind of an advanced way to start. Usually that's a Sophomore CS class when you start learning about algorithm design and analysis (and it's often merged in with an introduction to data structures).

  69. Spreadsheet by kwelch007 · · Score: 1

    Have them do a spreadsheet that uses both formulas and pivot tables.

  70. Software Engineering IS NOT Programming by oh_my_080980980 · · Score: 1

    This should not have to be said but Software Engineering IS NOT Programming. Based on your description you want to teach them computer programming. Change the course name.

  71. Suggestion by Anonymous Coward · · Score: 0

    Write a program to extract links from an html page to a text file and another program to get the urls. Lots of different approaches so they can be creative, not too dry, and lots of websites to choose from.

  72. Ludicrous suggestion ahoy! by Anonymous Coward · · Score: 0

    Found the Perl programmer!

  73. The game of kings... by __aaclcg7560 · · Score: 1

    Building a chess engine is a good programming exercise. A board with 64 squares, six types of game pieces, and 16 pieces per each side shouldn't be too hard to program. Implementing the rules for each game piece can be tricky, especially more obscure plays (i.e., castling with king and rook or promoting pawns to queens). Another step into the rabbit hole is to create an A.I. opponent. You can do that without looking at any of the academic literature from the last half-century on programming the game of kings.

  74. Tripple duty. Math/CS/And Elex - See Raspberry Pi by Anonymous Coward · · Score: 0

    All you need is a Raspberry Pi. Inexpensive and ready to go Linux platform. Programming is a snap and real world controls are at your fingertips. As well as World wide support and suggestions. As well as Teacher lesson plans etc.

    What could be better?

    RAH

  75. Re:Tripple duty. Math/CS/And Elex - See Raspberry by __aaclcg7560 · · Score: 1

    An introduction to basic electronics? Most of these kids can assemble a circuit by following a diagram. But they get lost if the circuit doesn't work, lack the knowledge to troubleshoot the circuit, and flood the comment boards with requests for the correct circuit and/or PCB design file. Some kids think the solution for any electronic problem is to throw in a Raspberry Pi or Adrunio board into the mix.

  76. Some SW engineering ideas by Daetrin · · Score: 1

    A good introductory SW engineering project? I assume you've already done basic maintenance projects and such before and are looking for something entirely new. So i'd suggest starting out with a very small droid. If you keep the functionality limited it should be pretty cheap and simple to construct and program.

    After that i think there are two paths you could take. Since you'll already have experience with motivators it should be simple to scale up a little and create some kind of vehicle. I would suggest a small one person speeder. Alternately if you're willing to branch out into high energy physics you could try to create your own blaster.

    And if you're really ambitious and willing to learn both fields you could eventually work up to building your own fully armed and operational X-Wing! After which you'll have mastered all the basics and from that point on the sky's the limit!

    (And don't get fooled! Some people might try to convince you that building a lightsaber is so easy that any man-child could do it. However along with requiring special skills that apparently aren't tought to the general public it also requires very rare and expensive materials of the highest quality. I assure you that if in a fit of petulant rage you try to create one without adequate training, using whatever leftover bits of crystal you're able to find lying around, you'll just end up with some crackling, sputtering piece of crap that will vent waste plasma all over the place and won't even be able to hold a coherent beam.)

    --
    This Space Intentionally Left Blank
  77. Benford's Law is fun by dplong · · Score: 1

    Have them write a program based on Benford's Law. The task combines statistics and programming. The results are interesting, too. Have them find a real dataset online and run it through their program to determine how likely fraud was involved in producing it. I wrote just such a program--it should be tiny--and evaluated population per county in Texas. Was legit! Also have them create their own fraudulent dataset and show that it is fraudulent via their Benford's-Law program.

  78. Monty Hall simulation? by bucketman · · Score: 1

    Walk them through the Monty Hall Problem (https://en.wikipedia.org/wiki/Monty_Hall_problem) - they won't believe the solution. Then make them write code to simulate the problem and tally the probability seen empirically. Should be a very modest amount of code but pretty fun for them.

  79. Have them convert between Arabic and Roman numbers by xanthos · · Score: 2

    I taught an intro to programming course years ago and having them convert an Arabic number to Roman numerals was one of my favorites.

    There are lots of CS constructs that come into play including number and string manipulation, looping constructs, if/then logic, etc.

    They also get to see that there is more than one way to solve the problem and that some solutions can be far more elegant than others.

    --
    Average Intelligence is a Scary Thing
  80. Making Sandwhiches by Anonymous Coward · · Score: 0

    If this is for Software Engineering, then you shouldn't be touching computers until later.

    Get paper, pencils, bread, peanut butter, jelly, and whatever else you like.
    Give the paper and pencils to the students.
    Tell them to write instructions to you to make a sandwich.
    As they turn the instructions in, follow their instructions EXACTLY. For example, if the first step is to put the peanut butter on the bread then you pick up the unopened jar of peanut better and drop it from a height onto the unopened loaf of bread. When someone says to spread the peanut better on the bread, feel free to only smear it on the outside crust instead of on one of the flat sides. When you're done following their instructions, give their sandwich back to them. Depending on how you want to do it, you could have them watching you follow their instructions or perform the instructions where they can't see it (white box vs black box).

    If they are able to write the exact steps, then you can get creative depending on how well they did. You can split them up into groups and each group does a section of the steps (like breaking programs into modules), then you attempt to follow the modules in whatever order they give you. Don't tell them the groups can't work together, but also don't tell them they can. Make sure the modules are broken up in a way that they won't succeed unless the groups work together. The point being is they'll need to work together to interface their sections of the instructions.

    Don't forget to add or remove a requirement while they're working.

  81. Software Engineering != Programming by mzellers · · Score: 1
    I just want to chime in on the side of those who are making the distinction between Software Engineering and programming. If you really want demonstrate what Software Engineering is about here is what I would do:
    • In teams of 3-4 students each implement a program to solve some problem that might take the teams at least several days. They need to work out an approach to the problem, divide up the work among themselves and actually implement and debug their solution.
    • Next, have the groups exchange programs and try to break the other teams implementation. Perhaps have them try to fix any bugs that they can without communicating with the other team.
    • Finally, scramble the groups again and add some new requirement and have the new teams implement the new requirement on top of code they have never seen.
    1. Re:Software Engineering != Programming by __aaclcg7560 · · Score: 1

      In teams of 3-4 students each implement a program to solve some problem that might take the teams at least several days. They need to work out an approach to the problem, divide up the work among themselves and actually implement and debug their solution.

      I had that exercise in Small Group Communications. My team consisted of myself (a.k.a, token white guy) and three Vietnamese guys. I did all the work, made the group presentation and wrote the report on Vietnamese culture. The Vietnamese guys were upset that the instructor gave me all the credit for the assignment even though I used their ideas. The real world work environment isn't that much different.

    2. Re:Software Engineering != Programming by Anonymous Coward · · Score: 0

      Yeah, frame the problem for **Individuals** not the corporate-object-of-worship known as a "team" . "Teams" may be fine for implementation, but comprehension, insight, and invention (not 'innovation', by damn ) are things of the individual.

      PERMIT exchange of information and collaboration, if the individuals wish to indulge in such, but do not REQUIRE them.

      the above is only my opinion, but it is one informed by experience.

  82. teaching software engineering? by Cederic · · Score: 1

    If you want them to learn software engineering, try this:
    - find a fun exciting simple project on Github. Or write one.
    - challenge the class to:
        -- download the source code (requires installing git and learning how to use it)
        -- build it (requires build tools and learning how to run them)
        -- run it (make it do something fun)
        -- find a bug in it (make sure it's got bugs - e.g. a calculator that adds 2+2=5)
        -- raise a bug report (requires finding the bug repository and writing it up)

    Next week, get them to fix the bug.

    The week after, you can start the whole requirements/stories/changes journey.

  83. Draw a circle. by Anonymous Coward · · Score: 0

    Give them a routine to draw a point on the screen at x,y coordinates. Then give them a pair of coordinates and have them draw a line between them. Ask them to do this with no multiply or divide in the loop. Requires a short bit of research, then implementation of a well known algorithm. This is sort of the most useless, today, yet enlightening programming as it teaches a different way to approach problems. Get them to then explain why it works. Circles then become a more complex yet graspable follow-on.

  84. Past HP CodeWars problems and solutions by Anonymous Coward · · Score: 0

    We've got 15 years of programming problems (and 10 years of working solutions) that we used for our annual high school-level programming competition: HP CodeWars. The problems start very simple and progress to "an hour and 100+ lines to solve" with the higher point values. All of them are available on the website at http://www.hpcodewars.org under the 'Sample Problems' heading.

    We spend a long time every year generating a new problem set that hopefully touches on a lot of different programming topics without requiring specific language usage or a lot of library dependencies. Note that our winning teams (3 people to a team, using a single computer and keyboard) have generally solved n-1 or n-2 of these in three hours...

  85. Task scheduler by Anonymous Coward · · Score: 0

    Write a simple flexible task scheduler (todo scheduler, essentially) for scheduling time-limited activities in the day.
    Just something fun to make more optimal use of limited time in the day.

    One that lets you define:
    Task groups, with type (exercise, learn, relax, etc)
    Tasks in those groups (simple, complex, exhaustive exercise)
    Duration (multiple if better, like 15, 30, 60 minute segments, with priority for each, based simply on larger numberin field=higher chance logic)

    Store these in a file format, like INI, CSV, XML, JSON or similar simple formats.
    Write a basic UI to do these tasks.
    Optional command-line support. (Interface more optional, gotta love a nice CLI)
    logbook for each task to keep track of activity in those tasks.
    Optional labeled pages for logbook so you can keep track of different items in a related task. Saves on task bloat, cuts down 'learn [language]' from the number of languages to one. Easier to manage too. More flexible as well! You might feel like learning some German over Japanese that day.

    From there you can expand in many directions.
    Covers datetime, UI (GUI and CLI), file IO, file formats, some basic stats, inheritance.
    Not too hard to do if you lay out the needs logically.
    Plus, it might even help most people bring order to their day, even here!
    Yes, HS level.

  86. YOU ARE CANCER. SUBSEQUENTLY DIE. by Anonymous Coward · · Score: 0

    You are cancer. This is why ten years from now we will keep complaining about ignorant idiots who happen to infect the worlds codebase with crap, "developers" who cannot tell the difference between a pointer and an integer and appalling security vulnerabilities. Programming cannot happen right before a solid understanding of the fundamentals of computing and computers is taught. NO MORE "SIMPLE" INTRODUCTIONS TO PROGRAMMING, PLEASE!

  87. ACM ICPC problems? by Anonymous Coward · · Score: 0

    For me, learning to solve the ACM ICPC problems was always enjoyable and challenging especially at a HS level. Several archives of prior year problems can be found using a quick Google search. I especially like how most of these problems are based on a known simple input sequence and known simple output sequence. Algorithms are at the heart of most programs these big data days and therefore the study of them should be encouraged. I agree that they can turn some people off so a mixed approach (graphics, web, DB, and algorithms) will likely work best.

  88. Practical Jokes and Having Fun by MakersDirector · · Score: 1

    Great question and welcome to IT!

    I have a pretty crazy history with computers which started with self assigned projects and self appointed challenges at 11 years old.

    First, I bought 101 Basic Programs by David Ahl available here: http://www.atariarchives.org/b... and spent a summer typing those games into a basic interpreter running on an Atari 600xl. There were MANY games in this, which was my attraction, but the real learning came when i didn't like the game's mechanics and changed them to suit myself, with the sheer volume of tedious typing led to a lack of attention which introduced errors - and helped me actually learn the logic of the code by figuring out why it was breaking down and where.

    Now to be clear, the programs you proposed are - shall we say - like watching paint dry - tremendously boring - and code doesn't have to be like this. You have a whole generation of game players who - if you simply introduced things they would be interested in - mechanics of gameplay - whether that's physics and having them draw a pixel that falls at a certain rate, or it's introducing collision detection, or it's introducing scripted dialog and response systems to the traditional 'hello world' stuff, or it's applied fractal graphics (fractals are actually quite easy to implement), or it's making logical changes in a text based adventure - games are my suggestion and advice to ANYONE teaching programming for the first time.

    Optimization, in my opinion, such as fast sorting algorithms for a text search are wonderful and all, but teach the student how this is applied to the real world, and have them build a portion of a scripted response system so they understand how dialog responses work in a game and methods to make these more effective. Teach them not just the tool, but at least ONE strategy and method to apply that tool.

    Now for self development, once I input all those programs... I got into practical joking.

    So I taught myself how to code to create practical joke programs that made it look like a hard drive was being reformatted - a program I would place on an unsuspecting target's machine while they were at lunch. I created another practical joke to make it look like a digital computer screen had lost it's vhold. Another practical joke would periodically pop up 10 notepads on the desktop. And yet another practical joke program - chug and slug - would chew through memory or slow the system to a crawl. From there, I took up TCP/IP programming because I wanted to remotely send a friend's computer a difficult to locate message which would have his computer moo like a cow. I taught myself SMTP and POP and how to build a generic SMTP /POP proxy server because I was interested in a girl at work and needed a way to seamlessly intercept communication that she (or anyone else in the office) couldn't detect. I taught myself how to hack into other machines to install my practical jokes and to 'net send' messages from my boss's machine to a friend of mine - and tell him to come to my boss's desk.

    Programming - in large part - can be one of two things: It can be a way to simply do a job - like a hammer to the carpenter - which makes programming horribly dull for most - or it can be a creative means for expression - which is what made it so much fun and lucrative for me for years.

    My advice is to challenge yourself, and your students - the practice and art of having fun. Give them non destructive challenges to achieve.

    Practical jokes AND games make for wonderful ways to express and to learn this skill and find yourself in great demand.

  89. Half a million by Etherwalk · · Score: 1

    . . . there is no such thing as a "software engineer".

    There are half a million of these supposedly fictional beings. It may be time to get off the soap box.

    http://www.bls.gov/oes/2008/ma...

  90. ROBO CODE by wolf12886 · · Score: 2

    Check out Robocode, it's a game where you write simple java code to control a tank in 2d. You can then battle your robot against your friends. The great part about it is that you can make a working AI with really simple code, stuff like turn until facing enemy, if facing enemy drive forward. If facing enemy shoot straight ahead. If you know enough trig, you can try to lead your shots, try to dodge, etc. We did this once at a computer science camp I went to in highschool and it was AWESOME. The other thing that's great about it is that since they're competing with each other, they wont get too discouraged. Everybody's bot is going to be a twitchy mess, so even barely working ones can win matches. This works best as a mult-day things, since the kids can learn from each other and refine their bots over time.

  91. Robots and Video Games by evilklown · · Score: 2

    I was involved with a research meta-analysis during my graduate coursework and we found that students are overwhelmingly more receptive to learning programming when they have something visual that they can use to associate the code that they write to something actually happening. We didn't look at what kinds of problems or what visual output works best, but my opinion is that you could start with something like Lego Mindstorms (which has/had a drag-and-drop interface that can be used to arrange blocks of logic) or do some kind of video game programming. I learned via a tool called Jeroo [1] which was basically a simple video game that required input via programming rather than from controllers. You could also take some kind of open-source simple video game, remove some chunks of code, and have the students re-implement the code that was removed. You can use this as a building exercise, so they get to build their own video game that they can play by the time that the course is over. [1] - http://home.cc.gatech.edu/dorn...