[thelist] Coning conventions, pet peeves

David Kaufman david at gigawatt.com
Fri Apr 29 23:52:59 CDT 2016


Yeah.

I will list array elements or, especially, hash key-value pairs, one per
line, even if there are dozens of them.

It *is* about code -- or in this case, rather: data -- readability.  But,
perhaps even more so, about making Very Readable diffs!

When you're are on a team that version-controls data, or metadata about
your code, or whatever (hey, we all do it!)  then being able to understand
exactly what changed by just glancing at a commit email is quite
habit-forming.

-dave



On Fri, Apr 29, 2016 at 8:17 PM, Jason Handby <jason.handby at corestar.co.uk>
wrote:

> > Two things I like to go against the grain on to make code more readable
> for
> > myself -
> >
> > var message = 'This makes it easier for me to write HTML in JS';
> > var mightDriveOthersCrazy = '<h1>'
> >   + message
> >   + '</h1>';
> >
> > Also -
> >
> > function functionWithManyArguments(
> >   firstArg,
> >   anotherArg,
> >   thirdArg,
> >   yetAnother
> > ) {
> >   console.log('Any more than three arguments becomes hard to read for me
> > unless I use line breaks between them');
> > }
>
> Yeah I pretty much do this - I'm massively in favour of readability;
> developer time is expensive and my brain isn't getting any younger :)
>
> Jason
>
> --
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>


More information about the thelist mailing list