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.

22 of 140 comments (clear)

  1. 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 armada · · Score: 2

      Tic tan toe is perfect for your timetable.

      --
      "This message was sent from an Apple //GS"
  2. Here's one by Anonymous Coward · · Score: 2, Insightful

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

  3. 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.

  4. 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
  5. 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.

  6. 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
  7. (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.

  8. 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.

  9. 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.

  10. 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

  11. 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.

  12. 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.

  13. 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
  14. 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.

  15. 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.
  16. 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
  17. 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.

  18. 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...