[RENO]:  Hey, John you got a minute?

[JOHN]:  No, I am busy.

[RENO]:  I’m writing my monthly status report and I need your help with something.

[JOHN]:  Sorry, I don’t have time now.

[RENO]:  I wrote this batch file that copies a file from one server to another.  I want to include it in my status report, but I need to beef it up a little bit.

[JOHN]:  What do you mean?

[RENO]:  Well, writing the batch file was the only thing I did this month except for writing this stupid status report, of course.

[JOHN]:  Of course.

[RENO]:  Can I call my batch file a script instead or, better yet, can I call it a program?

[JOHN]:  I don’t really care what you call it.  Just get the hell out of here.

[RENO]:  I think that writing a script or program sounds much better than writing a batch file.  What do you think?

[JOHN]:  I think you are an idiot.  Please go away now.

[RENO]:  Here…take a look at my script.

Reno shows John his batch file.

COPY reno.log reno.bak

[JOHN]:  That’s it?  You spent an entire month on this?

[RENO]:  Come on, Bro.  Help me out on this.

[JOHN]:  Ok. If you leave me alone afterwards I will help you.

[RENO]:  It’s a deal.

[JOHN]:  Now, let’s get started.  In order for something to be thought of as a computer program it must contain at least a variable, a loop, an if statement, and an execution command.  The copy in your batch file is the execution command so that part is already done.  Let’s add the other components.

John begins to edit Reno’s batch file.

[JOHN]:  First we add a variable by assigning your file name to it:

SET fileName=reno

COPY %fileName%.log %fileName%.bak

[JOHN]:  Then we add the if statement. We call this branching, Reno.

[RENO]:  Huh.

SET fileName=reno

IF EXIST %fileName%.log COPY %fileName%.log %fileName%.bak

[JOHN]:  Finally we need to add some looping.  We call this iteration, Reno.

[RENO]:  Huh.

[JOHN]:  How long does it take for the file to copy?

[RENO]:  Huh.

[JOHN]:  Reno!  How long does it take for this file to copy?

[RENO]:  Uh…probably about an hour.

[JOHN]:  Perfect.  Let’s copy it eight times in a loop as such:

SET fileName=reno

IF EXIST %fileName%.log  (

  FOR %%A IN (1 2 3 4 5 6 7 8)  DO (

    COPY %fileName%.log %fileName%.bak

[RENO]:  Why eight times?

[JOHN]:  Eight hours is considered a full work day, right?

[RENO]:  Uh…yeah.  Huh.

[JOHN]:  So here’s how you’re going to write your monthly status report:

As a senior coding architect, I designed, developed, and implemented a highly sophisticated program to back up time sensitive, data critical content from one secure location to another eight times a day.  Each copy takes approximately one hour.  This means that my automated program offers a total cost savings for the company of one full-time employee per year.  Using the latest in artificial intelligence and machine learning methodologies, my program is able to determine whether it can copy or not.  My program is also designed to terminate by itself without human intervention.

[RENO]:  Huh.  That’s awesome.  I really appreciate it.

Reno was eventually promoted to CEO for his program.  John was assigned to maintain Reno’s code.  John later shot himself eight times with a six shooter.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)