Coder Social home page Coder Social logo

emurgis's Introduction

Emurgis

The most efficient way to get things done, ever.

The problem

Emurgo doesn't currently have a way to concisely track problems that need to be solved. This produces confusion, inefficiencies, duplicated work, etc.

The solution

A variant of the Collective Code Contstruction Contract is used to decide whether or not a problem is worth solving, and what the simplest possible solution is. This is a robust process which delivers results in the form of emergent properties. A side-effect of the process is that all aspects of the organization which use it become parallelized as it completely removes the neccessity for blocking processes such as meetings. All work within the organization can then be done asynchronously.

Reminder

Do read your code after you write it and ask, β€œCan I make this simpler?” We do use a nice minimalist and yet readable style. Learn it, adopt it, use it.

How to run Emurgis locally

Install Meteor

curl https://install.meteor.com/ | sh

Clone repository

git clone https://github.com/EmurgoHK/emurgis.git

Note: if you want to edit things and send a pull request you should fork this project on Github first and clone your fork instead of https://github.com/EmurgoHK/emurgis.git.

Install Dependencies

meteor npm install

Run meteor

npm start (use npm run prod to minify everything and simulate production speeds) (use npm run debug to start Meteor in debug mode)

If Meteor starts but you get a white screen:

meteor npm install --save core-js

If you already have the database but want to update it to the latest version, do a meteor reset before running the above.

Mongo errors

If Mongo exists with status 1: Quick fix: export LC_ALL=C
Proper fix: something is wrong with your OS locales, good luck.

Meteor errors

If you do a git pull and Meteor doesn't start, the first thing to do is run meteor npm install as there may be package updates.

###Authentication To enable Authentication either configure OAuth or copy the following code in the browser console to create a test user: Accounts.createUser({ username: 'testing', password: 'testing', email: '[email protected]', profile: { name: 'Tester' } }) Now you will be logged in as a Test user.

Contributing to Emurgis

A cardinal sin that many open source developers make is to place themselves above others. "I founded this project thus my intellect is superior to that of others". It's immodest and rude, and usually inaccurate. The contribution policy we use at Emurgis applies equally to everyone, without distinction.

The contribution policy we follow is the Collective Code Construction Contract (C4)

If you're wondering why any of the rules in the C4 are there, take a look at the line by line explanation of everything in the C4, this explains the rationale and history behind everything in the protocol and makes it easier to understand.

As this is a new project without a strong pull request histroy, you should take a look at past pull requests from Blockrazor to see how to do things. You may also want to look at the bad pull request role of honour to see how not to send a pull request.

Want to see server logs? Go here.

The project style guide is here.

Step-by-step guide to sending a pull request

  1. Read the contribution protocol and the line by line explanation of the protocol.
  2. Fork this github repository under your own github account.
  3. Clone your fork locally on your development machine.
  4. Choose one problem to solve. If you aren't solving a problem that's already in the issue tracker you should describe the problem there (and your idea of the solution) first to see if anyone else has something to say about it (maybe someone is already working on a solution, or maybe you're doing somthing wrong).

It is important to claim the issue you want to work on so that others don't work on the same thing. Make a comment in the issue: @emurgobot claim before you start working on the issue.

If at some point you want to abandon the issue and let someone else have a go, comment: @emurgobot abandon.

  1. Add the Emurgis repository as an upstream source and pull any changes:
@: git remote add upstream git://github.com/EmurgoHK/emurgis //only needs to be done once
@: git checkout master //just to make sure you're on the correct branch
@: git pull upstream master //this grabs any code that has changed, you want to be working on the latest 'version'
@: git push //update your remote fork with the changes you just pulled from upstream master
  1. Create a local branch on your machine git checkout -b branch_name (it's usually a good idea to call the branch something that describes the problem you are solving). Never develop on the master branch, as the master branch is exclusively used to accept incoming changes from upstream:master and you'll run into problems if you try to use it for anything else.
  2. Solve the problem in the absolute most simple and fastest possible way with the smallest number of changes humanly possible. Tell other people what you're doing by putting very clear and descriptive comments in your code every 2-3 lines.
    Add your name to the AUTHORS file so that you become a part owner of Emurgis.
  3. Commit your changes to your own fork: Before you commit changes, you should check if you are working on the latest version (again). Go to the github website and open your fork of Emurigs, it should say This branch is even with Emurgis:master.
    If not, you need to pull the latest changes from the upstream Emurgis repository and replay your changes on top of the latest version:
@: git stash //save your work locally
@: git checkout master
@: git pull upstream master
@: git push
@: git checkout -b branch_name_stash
@: git stash pop //_replay_ your work on the new branch which is now fully up to date with the Emurgis repository

Note: after running git stash pop you should run Meteor and look over your code again and check that everything still works as sometimes a file you worked on was changed in the meantime.

Now you can add your changes:

@: git add changed_file.js //repeat for each file you changed

And then commit your changes:

@: git commit -m 'problem: <50 characters describing the problem //do not close the '', press ENTER two (2) times
>
>solution: short description of how you solved the problem.' //Now you can close the ''. Be sure to mention the issue number if there is one (e.g. #6)    
@: git push //this will send your changes to _your_ fork on Github
  1. Go to your fork on Github and select the branch you just worked on. Click "pull request" to send a pull request back to the Emurgis repository.
  2. Send the pull request, be sure to mention the issue number with a # symbol at the front (e.g. #1014).
  3. Go back to the issue, and make a comment: @emurgobot label "done". This will label this issue as complete, and everyone can test your solution and close the issue if it solves the problem.

What happens after I send a pull request?

If your pull request contains a correct patch (read the C4) a maintainer will merge it.
If you want to work on another problem while you are waiting for it to merge simply repeat the above steps starting at:

@: git checkout master

Tests

To run tests:

meteor test --driver-package practicalmeteor:mocha

You should generally write a test for anything you don't want to break later, otherwise it will probably end up being broken by someone. We use Mocha + Chai for testing. You can see an example in this pull request.

Can I be paid to contribute to Emurgis?

Yes, this is sometimes possible.

Your first step is to very carefully read and understand everything above, including the linked files, then start fixing problems and sending pull requests!

If your code is amazing and brilliant but you don't understand the contribution process we cannot consider you for a paid position.

Make sure you follow the project on Github so you get updates.

Contact the Emurgis BDFL (Benevolent Dictator For Life): gareth AT emurgo.io if you've been contributing code to Emurgis and want to keep doing it but you are hungry.

Rules for paid contributors

  1. Write tests for your code so that people don't break it later. We use We use Mocha + Chai for testing. You can see an example in this pull request.

  2. Engage in discussion about problems even if you aren't working on them yourself. Be helpful to other contributors, many are volunteers who just want to be part of the project. You (should) have a pretty good understanding of the codebase and can probably save others a lot of time.

  3. Your code should be very well commented and easy to read. It should be immediately clear what your code is doing. You should be able to look at your code a year later, in the morning before coffee, and immediately know what it's doing. Write code and comments like you are teaching someone else how to do what you're doing.

  4. Your pull requests should be a glowing example to others of how to work with the C4. Each one should be a model that others can refer to.

  5. In an ideal world, you would be able to work on any issue you want and there would be no need to assign tasks so that our budget is kept under control. This would be possible because you would always work on the the problems that are really worth solving right now to get to some form of MVP. We can't predict the future, there are no plans or roadmaps (these are not compatible with the C4). Emurgis grows through evolution not intelligent design or central planning. So if something isn't an in-your-face problem right now, it may never be, we could end up going down a totally different road before we get to it. While we want to avoid technical debt, we also don't want to be working on things that will someday maybe become a problem if Emurgis becomes a thing. Demonstrate that we can trust your own judgement on what you should be working on and what's worth spending time on.

License

The license and contribution policy are two halves of the same puzzle. This project is licensed under the MPL v2.0 license. The code is owned (and Copyright) by all contributors. Contributors are listed in the AUTHORS file. Please add your name to the end of this file in your first pull request so that you also become an owner.

This license ensures that:

  1. Contributors to Emurgis cannot have their code stolen and used by closed-source projects without their permission. It's very common for corporate software merchants to steal code from open source projects and use it in their closed source or even patented products and services in direct competition with the original project. For example, anyone who contributes code to a project released under a BSD/MIT style license effectively has no rights to their own code or any improvements made upon it.
  2. Anyone using any code from Emurgis must also share their work under a share-alike license so that anyone else can use their improvements.
  3. No one can change the above, without explicit written permission from all contributors, which is essentially impossible to get. That means even the founder of this project cannot ever relicense and sell Emurgis and its code. It belongs to everyone who contributed to it (and it always will).

It is not permissible to use any code from this codebase in anything that isn't using a share-alike license. Violations of the license will absolutely not be tolerated, and the terms of this license will be brutally enforced through a variety of very creative methods.

emurgis's People

Contributors

akatrodiya avatar anbud avatar ashhimself avatar ayanrocks avatar bharatkevadiya avatar chamidu-supeshala avatar chankokochan avatar daichiemurgohk avatar dilpreetsio avatar gsovereignty avatar kriswormwood avatar light-bringer avatar madanbhandari avatar naomazik avatar porcellus avatar samuelralak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emurgis's Issues

problem: no status tag for problems

Problem: there's no status tag to indicate the current status of problems.

When a problem is claimed, it should automatically be given the "In progress" status.
When a user resolves an issue, it should be tagged as "ready for review" so that the creator of the project can then either "close" the issue or mark it as "open" again. Once closed, the issue should simply be tagged as "closed" and the UI logic can then be used to hide it from view.

Problem: UI is not updated after login

Problem: when logging in with Google, the UI still asks users to sign in, both on the login page and also in the nav bar.

This is probably deeper than a UI issue because I've discovered a whole lot of other issues that could be related to a user not really being signed in, or possibly a broken google-login package.

Problem: too much boilerplate code in project

Problem: I started this project with boilerplate code that uses autoform, allow/deny rules, etc, there's a lot of unnecessary code.

Solution: remove anything that isn't required to add and view problems.

Problem: no auth system

Problem: users should be authenticated before being allowed to log issues etc. All users must have a @emurgo.io email account to sign up.

Problem: user login bad UI/UX

Problem: We currently have the login with gmail button on the top navbar which looks quite untidy and out of place. It doesn't blend in with the current UI.

Solution: Replace the gmail login button with a sign in link. Have a better message displayed to users when a login attempt fails instead of the current Internal Server Error

Problem: user's name not shown on problems

Problem: user's names are not shown on problems.

solution: on the problem detail page, show who created the problem, and who claimed the problem (if it's been claimed).

Problem: new issues are deleted from mongo on page refresh

Problem:

  1. Add a new problem.
  2. Go to the home route.
  3. Problem exists.
  4. Refresh page.
  5. Problem no longer exists and is removed from the collection.

I haven't checked if this is just being saved to a local collection and cleared on refresh, or if there's some weird bug actually deleting it. It could also be related to the weird login bug in #43

Problem: [/new] Nothing happens when user clicks submit

Problem: When user submits the new problem, no other action is performed informing the user that the form has been submitted/saved or failed validation which would lead the user to assume that the operation failed or simply the form does not work.

Solution: Notify the user if the operation was successful/failed on submit and possibly redirect to different page upon success. Possible pages to redirect to either problems page and problem item page.

Problem: login and signup fields exist

Problem: the UI suggests to users that its possible to log in or create an account without using Google sign in when this is not actually the case.

Solution: remove all log in and sign up UI elements, the only one that should remain is log in with Google.

Problem: users can delete issues from home route

Problem: users can delete issues from home route. This is a problem because they might delete something that has updated information.

solution: It should only be able to be deleted from the problem detail page.

Problem: [/:problemId/edit] users not notified of validation errors

Problem: Submitting the edit form doesn't notify the user of any validation failures.

Solution: Notify the user of any validation errors on the login form - use a similar format as the add problem form. Consider the possibility of using a single form for both New and Edit problems.

problem: google authentication not working in production

Problem: I've deployed emurgis.org:8000 temporarily, it's literally a mainboard sitting on a desk and will probably go down from time to time, but over the coming days things will become more stable.

Google login isn't working and the usual token setup doesn't show up. There are no console or server errors to indicate what's happening.

If necessary I'll update the relevant auth collections with the google tokens etc but putting this issue here in case it's something else.

Problem: not enough tests

Problem: pull requests generally aren't being submitted with tests.

Solution: all pull requests should include tests to ensure the problem they solve doesn't become a problem again later (e.g. if new code breaks it). Client side is not important because users will notice straight away but server side should be tested.

Ping @anbud @samuelralak @AshHimself

Problem: [/new] Add new problem form input order counter-intuitive

Problem: The order of input fields from the Add New Problem is counter-intuitive and confusing i.e it starts with a detailed explanation of the problem then summary. A more natural order would be:

  • Brief summary or Title
  • A detailed explanation of the problem
  • Optional description

A good example of such an order is the github issues. I would propose that a similar format should be followed.

ping @gazhayes @AshHimself

problem: no live checking for field lengths

Problem: fields are not currently checked for length when the user types. This is annoying, especially on the problem summary field.

Solution: check length onKeyUp (or whatever) and display remaining characters.

Fields should have the following maximums:
problem field: 500 chars
solution field: 500 chars
problem summary: 62 chars (will be prepended with 'problem:' which is 8 chars.

Problem: logging in with emurgo.io email account is annoying

Problem: users currently have to use an emurgo.io email account to signup/log in. The process is very manual, users have to type in their email address and verify the email.

Possible solution: use the 'accounts-google' package instead.

This will introduce a new problem which can either be fixed at the same time or logged as a new issue: developers need to be able to log in without an emurgo.io account.

Problem: home route layout isn't very good

Problem: home route layout isn't very good, there's too much information which makes it cluttered.

Solution:
The home route table only really needs a problem summary, time since creation (using moment.js), and current status.

Problem: users cannot add dependencies

Problem: users can't create nested issues (cannot add dependencies).

The solution to this should allow unlimited levels of nesting (by having dependencies on issues that have dependencies). It should also prevent circular dependencies because this will cause problems in the UI later when viewing as some kind of tree showing all issues.

Problem: [/documentEdit] Problems not editable

Problem: Clicking on the edit button on a problem redirects to an empty page

Solution: redirect users to an edit form when the edit button is clicked. disallow other users other than the owner to edit the problem.

problem: solution field is not displayed

Problem: text added to the solution field is not displayed on the problem detail page.

Solution: add solution field to collection if not already there and add view logic

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.