delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/01/26/23:00:45

From: "Mark Clements" <usenet AT NOkennel17SPAM DOT co DOT uk>
Newsgroups: alt.msdos,alt.msdos.programmer,comp.os.msdos.4dos,comp.os.msdos.djgpp,comp.os.msdos.programmer
References: <e_3Y9.104540$H7 DOT 4235688 AT news2 DOT calgary DOT shaw DOT ca> <3e3129de_2 AT news DOT iglou DOT com> <3E31795C DOT 3010108 AT BellAtlantic DOT net> <3e321bf5_3 AT news DOT iglou DOT com> <9307085f DOT 0301250744 DOT 77f0c663 AT posting DOT google DOT com> <3e33f24e$0$223$cc9e4d1f AT news DOT dial DOT pipex DOT com> <3e349961_3 AT news DOT iglou DOT com>
Subject: Re: can IBM DOS Version 5.00 be taught to read obj files?
Date: Mon, 27 Jan 2003 03:34:02 -0000
Organization: HappyDog Enterprises
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4920.2300
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4920.2300
Lines: 74
Message-ID: <3e34a8aa$0$245$cc9e4d1f@news.dial.pipex.com>
NNTP-Posting-Host: usercc172.dsl.pipex.com
X-Trace: 1043638443 news.dial.pipex.com 245 62.190.234.172
X-Complaints-To: abuse AT uk DOT uu DOT net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Joe Fischer" <gravity1 AT shell1 DOT iglou DOT com> wrote in message
news:3e349961_3 AT news DOT iglou DOT com...
> In alt.msdos
>
> Mark Clements <usenet AT nokennel17spam DOT co DOT uk> wrote:
> :> Joe Fischer <gravity1 AT shell1 DOT iglou DOT com> (PATHTYPER) wrote:
> :> >       I don't write the same routines a second time,
> :> > let alone over and over.
> :> >       With the exception of part of the routine to
> :> > assign a filename and file variable and check the
> :> > existence of the file, I can't think of any routine
> :> > that I would use twice.
> :
> : As just one of many examples of functions I've written that get used
over
> : and over again, my CheckInputFile() function is used in pretty much any
> : program that requires filenames to be passed at the command line.
>
>       That's great, if you do a lot of programming using files.
>
> : You pass
> : the value of the argument variable where the file is located (or empty
> : string if none) and a default extension (if applicable) and it will
expand
> : the filename and path, checking they exist, and prompt the user if there
are
> : any problems.
>
>        There area lot of possibilities using DOS error
> checking, a BBS Sysop program called Qmove had some,
> and I added several more to one version of it.
>        These types of programs are very useful, but
> some of use just like to play with graphics, display,
> and game programs. :-)
>
> : The trick  to making modular programming useful is
> : to make your functions generic.
>
>        I am grateful for any and all programs having
> considerable utility.
>        But in my programming, my objective is to
> write _the_ program and make it work with a minimum
> of bugs, some of which are due to my stupidity and
> carelessness and some from the compiler and OS the
> program is run on.
>        I have zero ambition to avoid having to write
> code, in fact, the reason I write is to have more
> to do to pass the time.
>        I get a big rush when I finally get lucky
> and write something that works great and is a
> little bit different or useful, or fun.

This is not a program I was talking about, but a single function that  I use
in many programs, and which could always be useful.  You're writing a
program to display a JPEG? - here's how to parse the command line.  You're
writing a game?  Here's how to load a saved game or ini file from the
command line.  The point I was making was not so much about the example
though, more that there are loads of things (particularly if you mostly work
in one area) which you will use over and over, so no point reinventing the
wheel every time (and of course, tried and tested code shouldn't have bugs
in it...)

The best feeling when programming is, as you say, writing good code that
works well, particularly first time (although probably even more
particularly after a night of tearing your hair out).  The second best thing
though is coming up against a tricky problem that will surely take days, and
then realising that those well-designed functions from your previous project
just slot right in and voila - you've pretty much done it!

--
Mark Clements
(To reply, remove NOSPAM)


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019