How to achieve the highest score for a better Utopian reward for development contributions

in #good6 years ago

utopian_better_rewards.jpg
I'm going to try to help you, contributors of the development section, to get better rewards for your dedicaded work, your projects.
Please note that all I'm going to say is my point of view and other moderators may not agree with me. I'll try to be as general as possible although I prefer reviewing javascript (Node and React) contributions so the examples I'll provide will mostly be for javascript. I sometimes review .NET and Java but not so much.

Utopian Guidelines
First let's take a look at the utopian guidelines
utopian-guidelines.jpg
Submissions should include a comprehensible commit history. Projects or updates submitted in a single commit will not be considered for potential reward.

Here the easiest way for us moderators (well for me at least) to review your code is if you use Pull Requests. 1 feature = 1 pull request = multiple organized commits. We can quickly see all the modifications that are in the contribution. It's also the way I'm used to develop. I was a mentor for a while at OpenClassrooms and part of the course was to learn how to use a Pull Request. The use of PRs was mandatory in all the courses projects.
Inclusion of outdated or low quality code may lead to a lower score of your contribution, thus reducing your chances of receiving a reward.

Here this is quite simple, try to have updated packages and follow best practices of the language of your choosing.
Generated code or other results of automated processes will not be considered for potential reward.

Try to separate the generated code from your PR, commits and contribution. For example if you're using vue-cli create a Pull Request, init your project, commit and merge. But don't add this Pull Request to the contribution. It looks like you're trying to hide your real work and try to fish for a high reward by saying 'Oh look at all the code I have done'. This puts me in a bad mood and I don't want to be nice anymore.
Submitted contributions should offer unique value. Redundant projects, trivial code snippets, example code or simple templates will not be considered for potential reward.

Don't create contribution that just fix bugs. They must provide nice additions, features... Don't reinvent the wheel too, if a project exist in blue don't create the same one in red ;) Projects can also not concern the Steem Blockchain.
To be considered for potential reward, Bug Fixes and New Features should be submitted via Pull Requests. The Pull Request should have been merged within the past 14 days.

Bug fixes are OK only if it's because of a 3rd party libraries. And correcting 2 bugs isn't enough for a contribution. You'll just end up with a 0.
Updates on Own Projects may be committed directly, without a Pull Request. To be considered for potential reward, commits should not be older than 14 days.

That's one of a guideline that I don't specially agree with. I'd rather have pull requests and it's a really good habit to have especially when you work in a team. Why code differently because you're a team of one?
Bug Fixes for contributor’s Own Projects will not be considered for potential reward, unless the Bugs were caused by third party dependencies.

We talked about this one already.
The questionnaire
The source of absolute truth! This is the tool that will decide the score of your contribution. Let me explain how I choose the answers.
![utopian-scroll-of-truth.jpg()
How would you describe the formatting, language and overall presentation of the post?

For this one I like to have pictures, code extracts, justification of technical choices. For each new feature it's nice to have a little gif demo when it's possible. It's also nice to link the first post that present your project because it's not always the same moderator that will do the review. Keep in mind that you're presenting your work of your open source project to the community not just to an utopian moderator so you can get a reward. So each contribution should be presented as an article that's pleasant to read. Not just 'Hey I've done some code what is my utopian score?' .
Read this contribution. It's a good example of how to achieve the highest score for this question.
How would you rate the impact and significance of the contribution to the project and/or open source ecosystem in terms of uniqueness, usefulness and potential future applications?

This one is highly subjective. If it's a few fixes, cosmetic addons I won't give a high score. But if there are multiple new core features added to the project I'll give the highest score.
How would you rate the total volume of work invested into this contribution?

Your project is for the open source community, it's not a daily paid job. So in my opinion, I won't give a high score for something that could be done in a few hours. But how do I judge the amount of hours? Well I can only do it based on my experience. I've been a developer for 11 years now. I've worked with multiple languages (.NET, Java, PHP, JavaScript, ...) for multiple companies. So I guess the amount of work based on how much time it would take me and then add a little more hours because it wouldn't be fair to junior devs. So if it's one day it's going to be "shows some work done", if it's 3 or more I give the highest score.
How would you rate the quality of the code submitted?

Well now we have best practices and IDEs that can automate a few tasks for us. So I'm looking for design patterns like MVC, MVVM, ... I'm also looking to the overall aspect of the code. IDEs can now automatically format code when saving. We also have tools to check our code or modify it. I'm thinking about eslint and prettier for example. IDE can also suggest changes. If you're used to write java 1.4, you install java 1.8, IntelliJ will offer tips on how to write code with the new features (streams, ...). The last part are the algorithms, the developer work and here this is more the experience talking. Don't hesitate to take a look at well known, updated projects. There so many ways to write an algorithm and there isn't always a best way to do it.
How would you rate the proficiency and expertise necessary to fix the bug / implement the added feature(s)?

The more complicated a project is the more expertise it requires but if a contribution only concerns adding a lot of HTML templates well you don't need to be an expert to produce code of good quality. Let's take a JavaScript example. If you deal with ReactJS, Redux, RxjS and a database like PostgreSQL or MongoDB and then you add docker, etc. This begins to require a lot of basic knowledge on multiple tech. Or for Java if you have SpringMVC, Spring Security, Maven, Hibernate, you add a little AngularJS and unit tests with JUnit, again this is a wide range of stuff to know. So if your contribution uses a bit of everything then you'll get the high score!
How would you rate the accuracy and readability of the commit messages?

Here it's pretty easy to have a high score. Avoid commit messages like "minor fix, add CSS, add stuffs, oups, adding a lot of features". Instead don't hesitate to split your commits into meaningful ones. Let's say you're adding a whole CRUD feature, your commits could be divided like that:
"Add X packages", "Add API CRUD endpoints", "Add unit tests", "Fix bug for the issue X", "Add CRUD pages", "Add jest tests or E2E tests", "Fix CSS issue for XXX", "Add responsive to the CRUD pages"

And there you have it. The commit history helps us understand how the developer did his feature. We know what code to expect in each commit. So top score! Here I have a great example: this contribution and this pull request. You can see the clear commit history.

How do you rate the quality of the comments in the code?

This last question has raised a lot of issues. I've see a lot a useless comments. The aim of a comment is to help to quickly understand a portion of code. So when I see something like this I get angry. Some comments that I found not useful (sorry guys). Example 1, example 2
// Get the user profile
const profile = await Profile.findOne({ userId });
You should comment the function declaration for example. Here is a random example.

/*
Process the invoice received.
If the invoice is paid ship the product
otherwise send an email to the user and back-office

@param user application client
@param invoice product invoice

*/
function processInvoice(user, invoice) {
}
or part of code that is complicated

// Explain the content of what it's done because if someone new (or the 6 month later you) read it, it will take a few minutes to understand
if (somevar === somestuff) {
complicated code
}
And what if I don't comment anything because my project is easy? Well you'll probably have the lower score but that doesn't mean you won't be picked by the staff and have the maximum reward.

In short
Take your time to write your article, be a salesman and offer everyone (not only the utopian moderators) something nice to read.
Don't post multiple little contributions. The reward increases exponentially so one well written contribution will have a greater score than 3 average ones.
Try it be up to date in the languages you've chosen, read articles on best practices, design patterns, ...
Simplify your job and try to automate some tasks (code format, ...)
I hope this little article will help get better rewards and I hope to see exceptional contributions in the future. May be we will have to fight between moderators for the staff picked contribution. Who knows?

Good luck everyone!