IDE influence (was RE: [thelist] ColdFusion: Nested pound signs)

spinhead evolt at spinhead.com
Fri Nov 16 19:27:07 CST 2001


Exactly. Conventions should be about what works best, but sometimes they're
just habits with no foundation in current usage. If they don't affect
usability then it's personal preference time, but the minute something makes
me think harder than I already have to, it better be for a good reason.

I do my CSS the same way you do, and for the same subconscious reason. When
I changed my JS format, it never occurred to me to change my CSS 'cause the
same reasons don't make sense there.

I'd love to compile a list of this kind of stuff (maybe a tip search?) and
things like rudy's dropped commas for sql which really make code easier to
read for humans.

spinhead


----- Original Message -----
From: ".jeff" <jeff at members.evolt.org>
To: <thelist at lists.evolt.org>
Sent: Friday, November 16, 2001 4:35 PM
Subject: RE: IDE influence (was RE: [thelist] ColdFusion: Nested pound
signs)


> joel,
>
> the topic of coding conventions is one that's near and dear to my heart.
in
> looking at my own style, i find it interesting that i use two different
> techniques when it comes to curly brace usage.  when it comes to
javascript,
> i match up the braces like so:
>
> function myFunc()
> {
>   if(lala != po)
>   {
>     alert('haha, you watch the teletubbies!');
>   }
> }
>
> however, when it comes to css, i don't match them up.
>
> body {
>   background: #ffffff;
>   color: #000000;
>   margin: 0px;
>   font-family: tahoma;
>   font-size: 11px;
> }
>
> after thinking about it for a bit i think i figured out why.  javascript
can
> be nested any number of levels deep making it critical that you are able
to
> quickly match up opening and closing braces.  css, on the other hand, is
> only one level deep.  in this instance it's more important to create a
> visual bond (ie, only a single line-break) between the selector and each
of
> its properties and a visual separation (ie, a curly-brace and two
> line-breaks) between the last of the properties of one selector and the
next
> selector.
>
> thanks,
>
> .jeff
>
> http://evolt.org/
> jeff at members.evolt.org
> http://members.evolt.org/jeff/
>
>
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !
>





More information about the thelist mailing list