[Prophesy] Diff to transform converter

Erica Douglass erica at simpli.biz
Mon Jun 10 05:08:19 EST 2002


> -----Original Message-----
> From: prophesy-admin at auug.org.au [mailto:prophesy-admin at auug.org.au]
On
> Behalf Of Daniel Phillips
> Sent: Sunday, June 09, 2002 6:07 AM
> To: prophesy at auug.org.au
> Subject: Re: [Prophesy] Diff to transform converter
> 
> On Friday 07 June 2002 16:17, Daniel Phillips wrote:
> 
> If an end-of-line is missing in a diff file, it's probably fair to
treat
> it
> as a syntax error.  If missing in the input or output file then we
have to
> watch out for the (crude) diff syntax that indicates this and process
it
> to
> produce the correct transform.  I believe this only affects the final
> operation, and then only with certain of the three basic operations.
> 
> --
> Daniel

Sometimes it really shows that you are a UNIX person. :P

You're forgetting that you're going to have to translate between \n,
\r\n (Windows), and \r (Macintosh) if you want full cross-platform
compatibility. Here's what I used to translate in PHP. It's based on the
browser detected and assumes that the file has been pulled into a string
called $content.

	// get os for carriage returns :P
	if(strstr(getenv('HTTP_USER_AGENT'), 'Win')) {
		$content = eregi_replace("\r","",$content);
	};

This brings up a whole lot of questions, like:

-- What is your interface going to be? If it's web-based, it's easy to
detect the browser and make assumptions. Cross-platform GUI... well,
it's not as easy. If you want to force people to use Linux, you can make
a Linux-only binary and a web-based client for people who aren't using
Linux, but then you might have some pissed-off customers.

-- What DO your customers want? At what stage do you want to start
pulling in user feedback? So far this list has mostly been "Daniel is
cool because he can do a diff transform, and look, here's this nifty
Python thing..." I usually start by asking the customer(s) what they
want and designing from that spec. I think that is pretty much the norm
in customer-centered development, which is definitely required if you
want this project to actually succeed rather than to be a PET (penis
enlargement tool).

I'm not trying to bash you, Daniel. I'm just questioning where this
project is going. I would like to see a nice marketing-style spec with
bullet points and customer needs analyses.

The question that everyone on this list should be thinking about is, "Is
this a serious project that I am willing to invest my time in?" If so,
we need a spec, not just C code.

Erica




More information about the Prophesy mailing list