CMC logo Cave Man Code

Every example lives in the examples/ folder of the download, in order from tiny to tricky. Open them in OGABOOGA CODER with the Examples button.

#FileWhat it teaches
0101_hello_oga.cmcoga, your first program
0202_boxes_grunk.cmcboxes, changing them, gluing text
0303_squish_numbers.cmcall math signs and math helpers
0404_binga_if.cmcif checks
0505_wonga_else.cmcelse and else-if chains
0606_booga_repeat.cmccounting loops and the lap box
0707_zug_while.cmcwhile loops
0808_zoop_each.cmcwalking through a pile and through text
0909_clump_functions.cmcmaking your own words
1010_ork_return.cmcgiving answers back
1111_piles_snorf.cmcpiles: plop, skoop, yoink, change a spot
1212_text_goop.cmcgoop, shout, whisper, flip, find, split, join, what
1313_blorp_ask.cmcasking the person questions
1414_random_munga.cmcrandom numbers (made testable)
1515_fizzbuzz.cmcthe classic interview question
1616_guess_number.cmca whole game (needs a person)
1717_drawing_skrib.cmcevery drawing command
1818_countdown.cmccountdown and blast off
1919_stars_triangle.cmcloops inside loops
2020_grade_calc.cmcgrades, and a clump with a check
2121_list_stats.cmctotal, average, biggest
2222_reverse_text.cmcletter-by-letter text work
2323_times_table.cmcnested loops and piles of text
2424_hot_potato.cmcrandom pick from a pile
2525_rock_paper_scissors.cmca game against the computer
2626_fibonacci.cmcrecursion: a clump that calls itself
2727_turtle_spiral.cmcdrawing with a loop
2828_word_counter.cmcsplitting text and counting
2929_temperature.cmcconversion clumps
3030_cave_painting.cmca tiny pixel-art scene
3131_english_aliases.cmcthe same language in English words

Running an example

From the terminal:

cmc run examples/15_fizzbuzz.cmc

From OGABOOGA CODER: click Examples, pick one, and it opens in the Text tab. Press RUN.

Suggested order for a new coder

  1. 01, 02, 04, 06 (talking, boxes, choices, loops)
  2. 08, 11, 12 (piles and text)
  3. 09, 10 (clumps)
  4. 15, 19, 21 (classic puzzles)
  5. 26, 22 (recursion and text surgery)
  6. 17, 27, 30 (drawing)
  7. 16, 25 (games -- give them to a friend)

Writing your own examples

The best way to learn is to change an example until it breaks, then fix it. Try:

Next: FAQ.