Get the Newsletter


Articles of the Week

Jenn Says Goodbye

Review: RioRiot

Shaun's Third Annual Smart-Alec Summer Movie Preview

On Graduating in December

The Last Hoo-rah

Time Flies


 

 Dr. Covington's Daily Routine (Maybe): A Karel Program
Jeff Davis | Vent Section Manager

03/29/02

To all the geeks: assume that some of the instructions I've put here
exist in Karel's vocabulary


BEGINNING-OF-PROGRAM
DEFINE-NEW-INSTRUCTION wake_up AS
BEGIN
Turnleft;
Turnleft;
Stand;
Scratch;
Move;
Move;
Open_door;
Dis_robe;
Open_door;
Sing_in_shower;
Dry_off;
Re_robe;
Turnleft;
Turnleft;
Move;
Move;
Move;
END;
DEFINE-NEW-INSTRUCTION back_out_the_lincoln AS
BEGIN
Move;
Move;
Take_keys_out_of_pocket;
Insert_key;
IF Jim_Gilmore_is_Behind_You THEN
BEGIN
Shift_Reverse;
Nail_accelerator;
Brace_for_impact;
Smile;
Turn_on_NPR;
END
ELSE
BEGIN
Shift_Reverse;
ITERATE FIVE TIMES
BEGIN
Beep;
END
END
Turnleft;
Turnleft;
Shift_drive;
Press_accelerator;
END;
DEFINE-NEW-INSTRUCTION commute AS
BEGIN
WHILE front-is-clear DO
BEGIN
Move;
END;
IF Martin-Hall-is-to-the-right-or-left THEN
BEGIN
Turn_towards_Martin_Hall;
END
WHILE not-parked DO
BEGIN
Move;
END
END;
DEFINE-NEW-INSTRUCTION dostuff AS
BEGIN
Sit_at_desk;
Talk_with_Warren;
Talk_with_Bonnie;
Discuss_fiscal_problems;
Utter_colorful_metaphors;
Consume_food;
Be_glad_food_is_not_from_Dalton;
Sign_stuff;
IF in-public THEN
BEGIN
Wave_like_Queen_Elizabeth;
END;
END;
DEFINE-NEW-INSTRUCTION gohome AS
BEGIN
Get_up_from_desk;
Stretch;
Get_on_elevator;
Wipe_on_gold_with_sleeve;
Exit;
Move;
Move;
Move;
Get_in_lincoln;
Back_out_the_lincoln;
END;
DEFINE-NEW-INSTRUCTION dayinthelife AS
BEGIN
Wakeup;
Back_out_the_lincoln;
Commute;
Dostuff;
Gohome;
END;
BEGINNING-OF-EXECUTION
Dayinthelife;
Turnoff;
END-OF-EXECUTION
END-OF-PROGRAM

Year: 2003 (Masters)
Major: Education
Comments:
Extremely clever!! Having had an 'affair to remember' with Karel my first semester, I couldn't wait until the end of the semester & we 'divorced'. It was, at times a most 'maddening' affair, especially when all the directions were followed & he didn't respond correctly!! Hope you sent this to Dr. C. especially the cute picture.

Name: Jeff
Year: Senior
Major: English
Comments:
In Karel's World, there are beepers. They can grow, they can be picked up, they can be put down. According to the text, they're circular red things that blink and emit a soft beeping noise. They exist so the programmer can write code that varies in its flexibility. I hope that answers your question.

Name: Olivia
Comments:
What's with the beepers!!??

Name: Brian Korte
Comments:
Does this mean that Doug poops beepers?