You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by Everett Toews <ev...@RACKSPACE.COM> on 2014/11/13 23:59:11 UTC

jclouds Best Practices

Lack of easily identifiable best practices for jclouds makes it difficult for both new and experienced developers to contribute.

It’s impossible to tell what jclouds best practices are at any given moment. It depends entirely on who the reviewers are and if they happen to be familiar with the best practice for the code under review.

All jclouds reviewers operate on a PR by PR way to communicate what they perceive to be the best practices, whether or not that aligns with what others perceive to be the best practices. We attempted to address this with the Best Practices [1] wiki page but we didn’t do a good job of promoting its use or contributing to it. I would like to change that.

I just added a simple section about Mock Tests [2] along with an example. If you would like to improve that section, go for it.

Who wants to add a section about domain classes and auto-value?

Regards,
Everett

[1] https://wiki.apache.org/jclouds/Best%20Practices
[2] https://wiki.apache.org/jclouds/Best%20Practices#Mock_Tests

Re: jclouds Best Practices

Posted by Adrian Cole <ad...@gmail.com>.
PS thanks for the suggestion. I want to help, just this is what
stopped me. It literally took me 30+ minutes just to change minimum
java language level back to 6.

Once this hurdle is out of the way, I'd love to help document stuff.
For now, I'd prefer licking the sidewalk next to the bus stop.

On Thu, Nov 13, 2014 at 3:19 PM, Adrian Cole <ad...@gmail.com> wrote:
> Biggest problem we have is this.
>
> Try clicking here https://wiki.apache.org/jclouds/Best%20Practices
> Then, try logging in.
> Then, try updating something while you are logged in.
>
> We need a better place to collaborate on best practices. and also we
> should stop using the word "best" for now :) We have current practice
> and some of that is far from best. For example, plastering fallback on
> 404 without reading docs is a bad practice.
>
> -A
>
> On Thu, Nov 13, 2014 at 2:59 PM, Everett Toews
> <ev...@rackspace.com> wrote:
>> Lack of easily identifiable best practices for jclouds makes it difficult for both new and experienced developers to contribute.
>>
>> It’s impossible to tell what jclouds best practices are at any given moment. It depends entirely on who the reviewers are and if they happen to be familiar with the best practice for the code under review.
>>
>> All jclouds reviewers operate on a PR by PR way to communicate what they perceive to be the best practices, whether or not that aligns with what others perceive to be the best practices. We attempted to address this with the Best Practices [1] wiki page but we didn’t do a good job of promoting its use or contributing to it. I would like to change that.
>>
>> I just added a simple section about Mock Tests [2] along with an example. If you would like to improve that section, go for it.
>>
>> Who wants to add a section about domain classes and auto-value?
>>
>> Regards,
>> Everett
>>
>> [1] https://wiki.apache.org/jclouds/Best%20Practices
>> [2] https://wiki.apache.org/jclouds/Best%20Practices#Mock_Tests

Re: jclouds Best Practices

Posted by Adrian Cole <ad...@gmail.com>.
Good point, Ignasi.

There's already a technical_debt label, so I tagged those 2 with it.

-A

On Thu, Nov 13, 2014 at 10:42 PM, Ignasi Barrera <na...@apache.org> wrote:
> FTR:
> https://issues.apache.org/jira/browse/JCLOUDS-690
> https://issues.apache.org/jira/browse/JCLOUDS-691
>
> We should create the tech deb label to mark all issues like these that
> (IMO) should be the top priority.
> El 14/11/2014 00:31, "Adrian Cole" <ad...@gmail.com> escribió:
>
>> ps I think there must be a typo. I can't imagine a case where you are
>> updating something, it is not there, and null is the answer? Did you
>> mean GET?
>>
>> Update Methods
>>
>> On not found or 404, return null.
>>
>> @Fallback(NullOnNotFoundOr404.class)
>>

Re: jclouds Best Practices

Posted by Ignasi Barrera <na...@apache.org>.
FTR:
https://issues.apache.org/jira/browse/JCLOUDS-690
https://issues.apache.org/jira/browse/JCLOUDS-691

We should create the tech deb label to mark all issues like these that
(IMO) should be the top priority.
El 14/11/2014 00:31, "Adrian Cole" <ad...@gmail.com> escribió:

> ps I think there must be a typo. I can't imagine a case where you are
> updating something, it is not there, and null is the answer? Did you
> mean GET?
>
> Update Methods
>
> On not found or 404, return null.
>
> @Fallback(NullOnNotFoundOr404.class)
>

Re: jclouds Best Practices

Posted by Adrian Cole <ad...@gmail.com>.
ps I think there must be a typo. I can't imagine a case where you are
updating something, it is not there, and null is the answer? Did you
mean GET?

Update Methods

On not found or 404, return null.

@Fallback(NullOnNotFoundOr404.class)

Re: jclouds Best Practices

Posted by Adrian Cole <ad...@gmail.com>.
Biggest problem we have is this.

Try clicking here https://wiki.apache.org/jclouds/Best%20Practices
Then, try logging in.
Then, try updating something while you are logged in.

We need a better place to collaborate on best practices. and also we
should stop using the word "best" for now :) We have current practice
and some of that is far from best. For example, plastering fallback on
404 without reading docs is a bad practice.

-A

On Thu, Nov 13, 2014 at 2:59 PM, Everett Toews
<ev...@rackspace.com> wrote:
> Lack of easily identifiable best practices for jclouds makes it difficult for both new and experienced developers to contribute.
>
> It’s impossible to tell what jclouds best practices are at any given moment. It depends entirely on who the reviewers are and if they happen to be familiar with the best practice for the code under review.
>
> All jclouds reviewers operate on a PR by PR way to communicate what they perceive to be the best practices, whether or not that aligns with what others perceive to be the best practices. We attempted to address this with the Best Practices [1] wiki page but we didn’t do a good job of promoting its use or contributing to it. I would like to change that.
>
> I just added a simple section about Mock Tests [2] along with an example. If you would like to improve that section, go for it.
>
> Who wants to add a section about domain classes and auto-value?
>
> Regards,
> Everett
>
> [1] https://wiki.apache.org/jclouds/Best%20Practices
> [2] https://wiki.apache.org/jclouds/Best%20Practices#Mock_Tests