[thelist] eXtreme Programming (XP) (was Re: CSS 'hacks')

Tom Dell'Aringa pixelmech at yahoo.com
Mon Jun 10 16:20:00 CDT 2002


Hey, this is a great example that I think fits in somewhere to the whole XP thing.

I agree, write code that non-techies or NEW techies or SUB techies or whatever can add/amend.

Your second point is valid - but not the example! (IMO). I've said it before, I'm a programmer,
but I came from the graphic design side and I don't "get it" as fast as the "hard core programmer
type" person. I will eventually get it, but I need a bit longer and I need examples I can work on
myself. But I digress...the point is, I cannot stand code with single letter variables, no
comments at all and no spaces. (granted, you had nice spacing :)).

To me its unreadable a month later (or sooner if larger code, below is such a small snippet). And
new techies or non techies who see that stuff - their eyes roll up into the back of their heads
instantly.

Instead of :

$y = date("Y") +0;

Give me:

$year = date("Y") + 0;

(this is PHP, which I am not much familiar with so I won't change the Y, but I would if I knew I
would not break it to Year)

Instead of:

p=((n/20)*100);

Give me:

percent = ((newPosition / 20) * 100);

You will NEVER convince me that these changes significantly alter download time, even among larger
pages. And, if you have so much freaking JS or whatever code in one page that it DOES affect the
download, you are doing something VERY VERY wrong (IMO).

Please, tell me p is percent and I will be 100% happier, my code will be 100% more readable (by
HUMANS) and it will make sense a week, a month, a year later to me or somebody else.

I sometimes want to say the only people who write such code are Supra Geeks(TM) who want to
impress people, but I won't because that might generate lots of flames...er ...yeah.

Anyway, part of XP is make usable, modifiable code - which it isn't if somebody else can't read
and edit it.

/tom


--- Michael Mell <mike at nthwave.net> wrote:
> Here are some more (less inflammatory) guidelines.
>
> ~ write code so that non-techies can add/amend content
> ~ write code so that time-related aspects need no maintenance. For example:
> <?
> $y = date("Y") +0;
> for ($i=$y; $i<$y+7; $i++) { // display an <option> for this year and the next 6 to come
>       echo "<option value=". $i .">". $i ."</option>";
> }
> ?>
>
>
> Michael Mell wrote:
>
> > Whoa, I just stepped in a big one. Sorry for the unintended offense.
> > I find Javascript extremely frustrating to work with. As a language and concept, it's
> wonderful.
> > It's varied implementations across browsers and platforms makes using it in practice a major
> > headache. I decided long ago to do everything possible on the server and use Javascript in the
> > browser only when necessary.
> >
> > As you say, my guidelines do not fall any where close to the realm of the 12 practices listed
> in
> > the XP FAQ I linked to. The XP school is simply a model I would like to see emulated in the
> realm
> > of web coding.
> >
> > Rather than looking to offend, I hoped my post would generate a set of guiding principles for
> > coding websites.
> >
> > So, Tom, do you have web site coding guide line you work with?
> >
> > Tom Dell'Aringa wrote:
> >
> > > Wow, I'm wanting to know more about the "Javascript as a system that suck(s)" and why,
> myself.
> > > I've been in contact with XP before and think its a great idea. However, "avoid working with
> > > systems that suck" may be your XP guidelines but that hardly falls under the 12 core
> practices
> > > outlined in the FAQ!
> > >
> > > If you were attempting to adopt a XP philosophy in your work, you would not necessarily
> avoid
> > > working with a system, as much as work with a system within the XP framework.
> > >
> > > Again, I realize these are your practices for yourself. But I don't see "javascript sucks so
> I
> > > don't use it if possible" and XP matching up.
> > >
> > > Tom
> > > --- Michael Mell <mike at nthwave.net> wrote:
> > > > There is a concept floating around called Extreme Programming (XP). Here is a
> > > > quick intro:
> > > > http://www.jera.com/techinfo/xpfaq.html
> > > >
> > > > XP goes far beyond simple coding practices, but I have an intuitively defined
> > > > set of guidelines that I think of as my XP guidelines.
> > > > ~ do nothing that is not platform independent
> > > > ~ avoid working with systems that suck (I include Javascript here)
> > > > ~ if necessary to work with sucky systems, keep it to a minimum (most of CSS in
> > > > NS4)
> > > > ~ always build in an Object Oriented way (even my simplest websites use a CMS)
> > > >
> > > > Anyone have a more rigorous set of XP guidelines for html/css?
> > > >
> > > > mike
> > > >
> > > > jcanfield at magisnetworks.com wrote:
> > > >
> > > > > > i'm not anti-css, in fact i definitely and wholeheartedly
> > > > > > believe in separating style from content, but at the same
> > > > > > time, i have a very strong aversion to what i call hacks
> > > > > > (donning my flame retardant suit), so if anything, i am
> > > > > > perhaps just a css anti-guru....
> > > > > >
> > > > > >
> > > > > > rudy
> > > > >
> > > > > No, you're an evangelist for the true faith.
> > > > >
> > > > > Part of what's wrong with the web is that so many of us have felt compelled
> > > > > to hack HTML for presentation instead of leaving it as a structural tool.
> > > > > Standards are making progress, and the browsers are (albeit sluggishly)
> > > > > following suit. Let's not submit ourselves to years of CSS hacks which we'll
> > > > > all have to unlearn next year, the way we now all have to unlearn HTML
> > > > > presentational hacks.
> > > > >
> > > > > joel
> > > > > --
> > > > > For unsubscribe and other options, including
> > > > > the Tip Harvester and archive of thelist go to:
> > > > > http://lists.evolt.org Workers of the Web, evolt !
> > > >
> > > > --
> > > > mike[at]nthwave.net
> > > > llemekim         YahooIM
> > > > 415.455.8812     voice
> > > > 419.735.1167     fax
> > > >
> > > >
> > > > --
> > > > For unsubscribe and other options, including
> > > > the Tip Harvester and archive of thelist go to:
> > > > http://lists.evolt.org Workers of the Web, evolt !
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Yahoo! - Official partner of 2002 FIFA World Cup
> > > http://fifaworldcup.yahoo.com
> > > --
> > > For unsubscribe and other options, including
> > > the Tip Harvester and archive of thelist go to:
> > > http://lists.evolt.org Workers of the Web, evolt !
> >
> > --
> > mike[at]nthwave.net
> > llemekim         YahooIM
> > 415.455.8812     voice
> > 419.735.1167     fax
> >
> > --
> > For unsubscribe and other options, including
> > the Tip Harvester and archive of thelist go to:
> > http://lists.evolt.org Workers of the Web, evolt !
>
> --
> mike[at]nthwave.net
> llemekim         YahooIM
> 415.455.8812     voice
> 419.735.1167     fax
>
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com



More information about the thelist mailing list