node-forward / discussions

Soliciting ideas and feedback for community driven collaborative projects that help Node.
149 stars 1 forks source link

Advertising Non-Priority Issues: -io.canDoFor(me) +me.canDoFor(io) #25

Open formula1 opened 9 years ago

formula1 commented 9 years ago

Proposal

Tagging and Advertising non-priority issues/userland projects that are beneficial to io.js.

The Problem

Many people are willing to put up valid yet not-priority issues without providing a solution or a movement towards an solution. The reason them not helping with the solution can be many things (work, life, too big to do alone, not within their ability, recreating the wheel, etc). At the end of the day, those issues are brought up with the intent on someone else doing the work. However, its important for someone to do the work.

Current Solution

As Bert mentioned in the latest TC meeting, there needs to come a point in time where some issues are closed because it is not worth the io.js teams time. You gentlemen are work within multiple languages, micro optimizers and making sure apis are abstract and organized. As such, certian requests (whether popular or not) may be wasting your time when you can be making io.js the slick, lean, mean low level machine it can be.

That being said, the current solution is to ignore requests deemed unnecessary and then direct anyone who repeats the request to the original issue.

I understand and truly believe you want community involvement. However, the community is made up of all types. Young and old. The Isaacs' of the world making readable streams better as well as the WebWorker requestors (when child_process is the exact same thing only better). Javascript was originally made for the browser, as such you are going to get some people that think in the browser (or are just starting out with programming and barely think)

Proposed Solution Verbose

var current_code = require("CurrentCode");
var problem_solver = require("ProblemSolver");
var ogs = require("OpenGovernanceServer");
var current_issues = require("CurrentIssues");
ogs.on("issue", handleissue);
OpenGovernanceServer.start();

var good_issue_tester = /.*validity.*/;
var priorities = [/.*problem.*/, /.*improvement.*/, /.*add.*/];
var type = [/.*speed.*/, /.*memory.*/, /.*compatibility.*/, /.*api.*/];

//It would probably be better to reverse priority since most would fall into the last
var tests = [/.*breaks.*/,/.*insecure.*/,/.*hogs.*/,/.*dumb.*/,/.*unecessary.*/];

function handleissue(issue,response){
  var i;
  var priority_level;
  var issue_types;
  var bad;
  var similar_issues;
  if(!good_issue_test.test(issue.concept)){
    return response.send("need more info");
  }
  if((priority_level = arraytest(issue.concept,priorities)) == -1){
    return response.send("need more info");
  }
  if(priority_level == 2){
    if(!issue.written_code) return response.redirect("community");
    bad = arraytest(issue.written_code,tests);
    if(bad == 4) return response.redirect("community");
    if(bad != -1) return response.error("your code is "+bad);
    problem_solver.implement(issue.written_code);
  }
  similar_issues = current_issues.findSimilar(issue.concept);
  if(similar_issues.length > 0){
    var res = "Your issue similar to the following \n";
    for(i=0;i<similar_issues.length;i++){
      res += similar_issues.redirectLocation+"\n";
    }
    response.reprimand("you didn't search");
    return response.send(res);
  }

  issue_types = collect(issue.concept, types);
  if(issue_types.length === 0){
    return problem_solver.handUnknownType(issue,response);
  }
  var time_to_build;
  if(!issue.written_code){
    time_to_build = problem_solver.calculateTime(issue);
    if(time_to_build == -1) return response.send("need more info");
    if(time_to_build > MAX) return response.redirect("community");
    if(priority_level === 0){
      return problem_solver.solve(issue);
    }
    problem_solver.advertiseProblem(issue);
    return response.redirect("community");
  }

  bad = arraytest(issue.written_code,tests);
  if(bad == 4) return response.redirect("community");
  if(bad != -1) return response.error("your code is "+bad);
  problem_solver.implement(issue.written_code);
  return response.send("ok");
}

function arraytest(text,array){
  for(var i=0;i<array.length;i++){
    if(array[i].test(issue.concept)){
      return i;
    }
  }
  return -1;
}

function collect(text,array){
  var found = [];
  for(var i=0;i<array.length;i++){
    if(array[i].test(issue.concept)){
      push(i);
    }
  }
  return found;
}

Laundry List

Here is a laundry list of that aren't and shouldn't be a priority. Its not meant to actually be a request, but simply examples of what you may and have found within the issue queue.