Trivial coding problems

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

User avatar
Pesto
Posts: 737
Joined: Wed Sep 05, 2007 5:33 pm UTC
Location: Berkeley, CA

Trivial coding problems

Postby Pesto » Tue Jul 05, 2011 11:59 pm UTC

Hi, all. I'm likely going to be leading some training on a new source control tool at work, and I need some trivial programming exercises so that people have something to commit to their repositories.

Ideally, these should be brain dead simple problems that can be broken down into a few simple sub steps. For example:

Write a program that outputs this...

Code: Select all

*
*
*
*
*

Modify it to output this...

Code: Select all

*
**
***
****
*****

Modify it to output this...

Code: Select all

      *
     **
    ***
   ****
  *****

Something similar could be done for FizzBuzz, if you're familiar with that problem. Each of these intermediate steps would be a new commit in the repository.

I'm open to other types of ideas that I could use for the training. For example, I often test source control using sandwich files.

Code: Select all

   bread
   peanut butter
   grape jelly
   bread

Code: Select all

   bread
   peanut butter
  -grape jelly
  +raspberry preserves
   bread

These are great for testing, but kind of mundane when asking someone else to do them in a class. I feel like simple programming examples will keep people engaged.

Ideas?

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 9 guests