[DG: User Experience] Coding Styles, specifically JS > Re: [sakai-kernel] Re: Small changes

View: New views
3 Messages — Rating Filter:   Alert me  

Parent Message unknown [DG: User Experience] Coding Styles, specifically JS > Re: [sakai-kernel] Re: Small changes

by elicochran :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks everyone! If only all our questions could be so neatly answered.

On Fluid we also followed Crockford's coding conventions (http://javascript.crockford.com/code.html 
) and ran our code through jslint. (http://www.jslint.com/) At first I  
resisted some of Crockford's conventions and jslints suggestions. Many  
of them feel arbitrary. But over time I was seduced by the pleasure of  
seeing the same coding style no matter the author, and jslint does  
catch a lot of common mistakes.

Using jslint would also mean usingt a standard set of jslint settings.

Here is the Fluid page on our code conventions and our jslint  
settings: http://tinyurl.com/yk27b7k

As jslint says, "Warning: JSLint will hurt your feelings."

- Eli

PS. Aptana [and maybe Eclipse] has jslint validation so you can see  
your errors with out going to the web site, but it doesn't catch  
everything and I haven't figured out how to configure it with _my_  
jslist settings.



On Oct 28, 2009, at 8:57 AM, Ian Boston wrote:

> There are 2 sets of code.
>
> I cant really talk about the UI although an observation from other  
> projects is tabs are to be discouraged, as they all to often get  
> mixed with spaces.
>
> I can comment about the Java code, and the link that lance has  
> provided outlines the policy.
>
> Ian
> On 27 Oct 2009, at 13:44, Speelmon, Lance Day wrote:
>
>> http://confluence.sakaiproject.org/display/KERNDOC/Code+Style
>>
>>
>> Lance Speelmon
>> Scholarly Technologist
>>
>> On Oct 27, 2009, at 9:37 AM, Eli Cochran wrote:
>>
>>>
>>> Ian,
>>> Do we have code conventions for Sakai 3 published anywhere? Space,
>>> tabs... number there of, Crockford for Javascript... that kind of  
>>> thing.
>>>
>>> - Eli
>>>
>>> On Oct 27, 2009, at 5:22 AM, Ian Boston wrote:
>>>
>>>>
>>>>
>>>> When making small changes, that fix bugs either reported or  
>>>> discovered
>>>> can people try not to reformat the code base. It creates big  
>>>> patches
>>>> that block others and are hard to review.
>>>>
>>>> This is gentle reminder, I am happy to merge but it does  
>>>> obfuscate the
>>>> changes which will allow unintentional bugs to creep in.
>>>>
>>>> Current example is 269c0e51f574baab7123ae982b58002fdf4aa54f  you  
>>>> can
>>>> check your logs to have a look at who this one belongs to, but we  
>>>> are
>>>> all guilty, myself included.
>>>>
>>>> Thanks
>>>> Ian
>>>>
>>>>
>>>>>
>>>
>>> . . . . . . . . . . .  .  .   .    .      .         .              .                     .
>>>
>>> Eli Cochran
>>> user interaction developer
>>> ETS, UC Berkeley
>>>
>>>
>>>
>>>
>>>
>>
>>
>> --~--~---------~--~----~------------~-------~--~----~
>> You received this message because you are subscribed to the Google  
>> Groups "Sakai Kernel" group.
>> To post to this group, send email to sakai-kernel@...
>> To unsubscribe from this group, send email to sakai-kernel+unsubscribe@...
>> For more options, visit this group at http://groups.google.com/group/sakai-kernel?hl=en
>> -~----------~----~----~----~------~----~------~--~---
>>
>

. . . . . . . . . . .  .  .   .    .      .         .              .                     .

Eli Cochran
user interaction developer
ETS, UC Berkeley


_______________________________________________
sakai-ux mailing list
sakai-ux@...
http://collab.sakaiproject.org/mailman/listinfo/sakai-ux

TO UNSUBSCRIBE: send email to sakai-ux-unsubscribe@... with a subject of "unsubscribe"

Re: [DG: User Experience] Coding Styles, specifically JS > Re: [sakai-kernel] Re: Small changes

by Michael Korcuska-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

How would this work as a Sakai 3 JavaScript. It is desirable to  
reference an external standard (reduces our need for documentation for  
one thing, and if it is a well-known standard then new developers may  
already be familiar with it) and the idea of following Fluid  
conventions is also appealing for obvious reasons.

Could we adopt http://tinyurl.com/yk27b7k (mostly) as is?

Michael


On Oct 28, 2009, at 09:18, Eli Cochran wrote:

>
> Thanks everyone! If only all our questions could be so neatly  
> answered.
>
> On Fluid we also followed Crockford's coding conventions (http://javascript.crockford.com/code.html
> ) and ran our code through jslint. (http://www.jslint.com/) At first I
> resisted some of Crockford's conventions and jslints suggestions. Many
> of them feel arbitrary. But over time I was seduced by the pleasure of
> seeing the same coding style no matter the author, and jslint does
> catch a lot of common mistakes.
>
> Using jslint would also mean usingt a standard set of jslint settings.
>
> Here is the Fluid page on our code conventions and our jslint
> settings: http://tinyurl.com/yk27b7k
>
> As jslint says, "Warning: JSLint will hurt your feelings."
>
> - Eli
>
> PS. Aptana [and maybe Eclipse] has jslint validation so you can see
> your errors with out going to the web site, but it doesn't catch
> everything and I haven't figured out how to configure it with _my_
> jslist settings.
>
>
>
> On Oct 28, 2009, at 8:57 AM, Ian Boston wrote:
>
>> There are 2 sets of code.
>>
>> I cant really talk about the UI although an observation from other
>> projects is tabs are to be discouraged, as they all to often get
>> mixed with spaces.
>>
>> I can comment about the Java code, and the link that lance has
>> provided outlines the policy.
>>
>> Ian
>> On 27 Oct 2009, at 13:44, Speelmon, Lance Day wrote:
>>
>>> http://confluence.sakaiproject.org/display/KERNDOC/Code+Style
>>>
>>>
>>> Lance Speelmon
>>> Scholarly Technologist
>>>
>>> On Oct 27, 2009, at 9:37 AM, Eli Cochran wrote:
>>>
>>>>
>>>> Ian,
>>>> Do we have code conventions for Sakai 3 published anywhere? Space,
>>>> tabs... number there of, Crockford for Javascript... that kind of
>>>> thing.
>>>>
>>>> - Eli
>>>>
>>>> On Oct 27, 2009, at 5:22 AM, Ian Boston wrote:
>>>>
>>>>>
>>>>>
>>>>> When making small changes, that fix bugs either reported or
>>>>> discovered
>>>>> can people try not to reformat the code base. It creates big
>>>>> patches
>>>>> that block others and are hard to review.
>>>>>
>>>>> This is gentle reminder, I am happy to merge but it does
>>>>> obfuscate the
>>>>> changes which will allow unintentional bugs to creep in.
>>>>>
>>>>> Current example is 269c0e51f574baab7123ae982b58002fdf4aa54f  you
>>>>> can
>>>>> check your logs to have a look at who this one belongs to, but we
>>>>> are
>>>>> all guilty, myself included.
>>>>>
>>>>> Thanks
>>>>> Ian
>>>>>
>>>>>
>>>>>>
>>>>
>>>> . . . . . . . . . . .  .  .   .    .      .         .              .                     .
>>>>
>>>> Eli Cochran
>>>> user interaction developer
>>>> ETS, UC Berkeley
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>>>
>>
>
> . . . . . . . . . . .  .  .   .    .      .         .              .                     .
>
> Eli Cochran
> user interaction developer
> ETS, UC Berkeley
>
>
>
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google  
> Groups "Sakai Kernel" group.
> To post to this group, send email to sakai-kernel@...
> To unsubscribe from this group, send email to sakai-kernel+unsubscribe@...
> For more options, visit this group at http://groups.google.com/group/sakai-kernel?hl=en
> -~----------~----~----~----~------~----~------~--~---
>

--
Michael Korcuska
Executive Director, Sakai Foundation
mkorcuska@...
phone: +1 510-859-4247 (google voice)
skype: mkorcuska




_______________________________________________
sakai-ux mailing list
sakai-ux@...
http://collab.sakaiproject.org/mailman/listinfo/sakai-ux

TO UNSUBSCRIBE: send email to sakai-ux-unsubscribe@... with a subject of "unsubscribe"

Parent Message unknown Re: [DG: User Experience] Coding Styles, specifically JS > Re: [sakai-kernel] Re: Small changes

by jrnorman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I understand from the guys that we are broadly in line. They should  
speak up, but there is some work going on that should lead to much  
better docs in a few days so I won't push them as it may well get  
answered in that work.

John

On 29 Oct 2009, at 19:13, Ian Boston wrote:

>
> Probably a question more for UX than kernel.
>
> But, IMHO, yes most of it, with the following exceptions.
>
> AFAIK we dont build code in the S3 UI.
> The paragraphs on scratchpad and incubator are probably fluid  
> specific.
> Strict white space *might* be OTT, but its v important that patches do
> exactly what they say they will and not reformat 100's of lines of
> code for a 1 line change, so consistency is important.
>
> Code style:
> It might be a good idea to check the code style conventions against
> what is already in the code base, if conforming to it generates a
> small patch then I would say go for it, if the patch is massive then
> it should be discussed as it will give anyone working on a patch queue
> a complete nightmare.
>
> all imvho
> Ian
>
> On 28 Oct 2009, at 16:34, Michael Korcuska wrote:
>
>>
>> How would this work as a Sakai 3 JavaScript. It is desirable to
>> reference an external standard (reduces our need for documentation  
>> for
>> one thing, and if it is a well-known standard then new developers may
>> already be familiar with it) and the idea of following Fluid
>> conventions is also appealing for obvious reasons.
>>
>> Could we adopt http://tinyurl.com/yk27b7k (mostly) as is?
>>
>> Michael
>>
>>
>> On Oct 28, 2009, at 09:18, Eli Cochran wrote:
>>
>>>
>>> Thanks everyone! If only all our questions could be so neatly
>>> answered.
>>>
>>> On Fluid we also followed Crockford's coding conventions (http://javascript.crockford.com/code.html
>>> ) and ran our code through jslint. (http://www.jslint.com/) At
>>> first I
>>> resisted some of Crockford's conventions and jslints suggestions.
>>> Many
>>> of them feel arbitrary. But over time I was seduced by the pleasure
>>> of
>>> seeing the same coding style no matter the author, and jslint does
>>> catch a lot of common mistakes.
>>>
>>> Using jslint would also mean usingt a standard set of jslint
>>> settings.
>>>
>>> Here is the Fluid page on our code conventions and our jslint
>>> settings: http://tinyurl.com/yk27b7k
>>>
>>> As jslint says, "Warning: JSLint will hurt your feelings."
>>>
>>> - Eli
>>>
>>> PS. Aptana [and maybe Eclipse] has jslint validation so you can see
>>> your errors with out going to the web site, but it doesn't catch
>>> everything and I haven't figured out how to configure it with _my_
>>> jslist settings.
>>>
>>>
>>>
>>> On Oct 28, 2009, at 8:57 AM, Ian Boston wrote:
>>>
>>>> There are 2 sets of code.
>>>>
>>>> I cant really talk about the UI although an observation from other
>>>> projects is tabs are to be discouraged, as they all to often get
>>>> mixed with spaces.
>>>>
>>>> I can comment about the Java code, and the link that lance has
>>>> provided outlines the policy.
>>>>
>>>> Ian
>>>> On 27 Oct 2009, at 13:44, Speelmon, Lance Day wrote:
>>>>
>>>>> http://confluence.sakaiproject.org/display/KERNDOC/Code+Style
>>>>>
>>>>>
>>>>> Lance Speelmon
>>>>> Scholarly Technologist
>>>>>
>>>>> On Oct 27, 2009, at 9:37 AM, Eli Cochran wrote:
>>>>>
>>>>>>
>>>>>> Ian,
>>>>>> Do we have code conventions for Sakai 3 published anywhere?  
>>>>>> Space,
>>>>>> tabs... number there of, Crockford for Javascript... that kind of
>>>>>> thing.
>>>>>>
>>>>>> - Eli
>>>>>>
>>>>>> On Oct 27, 2009, at 5:22 AM, Ian Boston wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> When making small changes, that fix bugs either reported or
>>>>>>> discovered
>>>>>>> can people try not to reformat the code base. It creates big
>>>>>>> patches
>>>>>>> that block others and are hard to review.
>>>>>>>
>>>>>>> This is gentle reminder, I am happy to merge but it does
>>>>>>> obfuscate the
>>>>>>> changes which will allow unintentional bugs to creep in.
>>>>>>>
>>>>>>> Current example is 269c0e51f574baab7123ae982b58002fdf4aa54f  you
>>>>>>> can
>>>>>>> check your logs to have a look at who this one belongs to, but  
>>>>>>> we
>>>>>>> are
>>>>>>> all guilty, myself included.
>>>>>>>
>>>>>>> Thanks
>>>>>>> Ian
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>
>>>>>> . . . . . . . . . . .  .  .   .    .      .         .              .                     .
>>>>>>
>>>>>> Eli Cochran
>>>>>> user interaction developer
>>>>>> ETS, UC Berkeley
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>>>
>>>>
>>>
>>> . . . . . . . . . . .  .  .   .    .      .         .              .                     .
>>>
>>> Eli Cochran
>>> user interaction developer
>>> ETS, UC Berkeley
>>>
>>>
>>>
>>>>
>>
>> --
>> Michael Korcuska
>> Executive Director, Sakai Foundation
>> mkorcuska@...
>> phone: +1 510-859-4247 (google voice)
>> skype: mkorcuska
>>
>>
>>
>>
>>
>>>
>
>
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google  
> Groups "Sakai Kernel" group.
> To post to this group, send email to sakai-kernel@...
> To unsubscribe from this group, send email to sakai-kernel+unsubscribe@...
> For more options, visit this group at http://groups.google.com/group/sakai-kernel?hl=en
> -~----------~----~----~----~------~----~------~--~---
>

_______________________________________________
sakai-ux mailing list
sakai-ux@...
http://collab.sakaiproject.org/mailman/listinfo/sakai-ux

TO UNSUBSCRIBE: send email to sakai-ux-unsubscribe@... with a subject of "unsubscribe"