[Tutor] role playing game - help needed

Alan Gauld alan.gauld at btinternet.com
Sun Dec 12 19:01:31 CET 2010


"David Hutto" <smokefloat at gmail.com> wrote

> > That is a bad piece of advice. You should only use input() when 
> > you can
> > fully trust whoever doing the input (i.e. you).
>
> Who uses the crap we, as noobies produce?

Hopefully you do.
And can you really be absolutely sure you won't accidentally
type a dangerous command into an input prompt?
I once accidentally deleted all the files on my Unix workstation
by thinking I was in a subdirectory when I was at the root folder
as administrator.... It took me several hours to recover the bulk
of my files using the raw shell commands and a nwetwork
connection to my colleage's Sun box.

The point is that it's nearly as easy to use good practice as it
is to use bad practice so you might as well get used to doing
it the safe way. Then you are protected, even from yourself.

> It's pie in the sky mentality. We design it because WE
> want it and WE(individually) use it.

But if it works for you it may well work for somebody else,
who, when they see it, want a copy. That's how the vast majority
of amateur written software starts off, then it becomes
shareware or opensource and starts getting copied on.
And if it has insecure code in, people get bitten. Now, you
can argue its their own fault for using "opensource" code,
but they won't see it that way.

One of the most widely distributed programs that I've written
(privately) was something I did when first learning Windows
programming with Delphi - literally the second Windows
program I ever wrote. 15 years lqater I still get the occasional
email from somebody who has found a copy and wants to use it!
It was a learning excercise for my own amusement, I lent it
to a friend, who lent it to a friend who asked for some
tweaks, etc... There are probably several hundred users now.

And remember that Linux started out as a personal learning
exercise for Linus Torvalds while a student, he didn't set out
to challlenge Microsoft, it was just a bit of a fun thing to do.

Software that does something useful has a habit of proliferating,
even when written by noobies. Get into the habit of doing things
well and that will be a good thing of which you can be proud..

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/




More information about the Tutor mailing list