The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

Yeah! Exactly! What he said! by Avium2009-05-08 10:20:04
  Dude, I've been saying that for YEARS by SnArL2009-05-08 12:24:10
    Sure you do. by MatthewDBA2009-05-08 12:32:43
      It's entirely subjective by SnArL 2009-05-08 13:15:33
"Best" always is. :D

By making programming less demanding, students don't need to think as creatively as often. The more you have to think creatively, the better you get at it. This way, when you are handed the requirements for your program, you're able to see the different ways to approach the problem and choose the way that fits best, rather than choosing the way that you memorized in school and then coding to "make it fit" your problem.


Let's use an example. One of my friends in high school wrote a Pascal program to draw 6 spaceships on the screen, then draw and erase lines as the ships "fired" on each other. The program was HUGE and didn't have a single procedure defined...the entirety of the code was between the BEGIN and END statements. It also took him the better part of a month to write, and he was having problems working the bugs out.

When I looked at the code, I asked him, "Why didn't you use procedures to make it simpler?" He went ahead and rewrote it...

...Kind of. He wrote *6* procedures to draw the ships...each ship was drawn by its own procedure. Then he had a separate procedure to draw and then erase the "phaser" blast between each of the 3 ships on the left and the right side of the screen...18 procedures total for the phasers. Each procedure was written exactly the same, except for the changes to the coordinates passed to the graphics functions.

When I looked at it again (about a week later), I tried to explain that what he needed was ONE procedure to draw *A* ship, and another procedure to draw and then erase a phaser blast. He DIDN'T UNDERSTAND what I was talking about. He couldn't comprehend that it was possible to write a procedure that would take as parameters the location and orientation for a ship, and then draw the ship there, facing the specified direction.

I finally gave up trying to explain it, and wrote it myself (this was NOT for class). When I showed him the code, he couldn't figure out how it worked.


His solution, while FUNCTIONAL, was not the BEST solution from an efficiency and maintenance standpoint. It also didn't teach him an important lesson: how to take a repetitive task that has slight variations and parameterize it.
[ Reply ]
        there's a reason why programming is now easy by joresgump2009-05-08 14:01:04

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)