Shop OBEX P1 Docs P2 Docs Learn Events
My attempt at a "Gold Standard" process — Parallax Forums

My attempt at a "Gold Standard" process

CircuitsoftCircuitsoft Posts: 1,166
edited 2013-01-12 08:09 in Propeller 1
So, I've set up Gerrit code review on my home server. You can access it at http://vdubshouse.zapto.org/parallax/. As a first change, I submitted a very basic README file and, like any other commits, would like comments/suggestions before fully committing it.

So, I'll do my best to watch this thread, but Gerrit has conversation threads associated with each change, so code discussions should happen there.

Thanks, everyone, and if you have any questions, please post them here.

Oh, and, should this gain traction, there should be little difficulty moving the entire thing into Parallax' hands.
«1345678

Comments

  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-12-21 13:27
    1. How does this work?
      Gerrit uses the Git version control system to hold the repository. Every change gets submitted to Gerrit and is held in limbo until a Process Administrator approves it. In order for a Process Administrator to approve a change, it must be given a +2 vote, which only a Senior Developer has permission to do.

    2. How do administrators decide to approve changes?
      For now, that's up to the admins, but I would offer the idea of leaving each change up for at least a week, watching what comments it garners, and accepting/rejecting changes based on where commentary seems to go.

    3. Who is a Process Administrator? What about Senior Developer? Can I be one?
      If you think you can help the process in either capacity, please PM me and let me know. I will try to look into how helpful you've been on the forums, and may or may not require more discussion before giving you the permissions in question. While this probably sounds horribly arbitrary, I really don't intend it to be, and hope to choose the same people that the community-at-large would if it were voted on.
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-12-21 13:28
    • To create an account
      Click Register in the top/right corner, and log in via an OpenID provider. If the provider you use is not your primary email, please click "Settings" in the top-right corner, click "Contact Information", and "Register New Email" to add your primary email account. It is imperative that one of your accounts match the email address used by Git in your commit messages, as Author.

    • To download the current state of the repository
      Use Git to clone "ssh://YourUsername@vdubshouse.zapto.org:29418/Parallax Library" and follow the directions in the DEVEL.txt.

    • To review a commit
      Start by looking at each file in the change. Double-click on a line to start a new "draft" and add comments for that particular line. When you're done, click on "Up to change" and click the Review button. From there, you can enter overall comments, vote on the viability of the change, and submit your comments in total.
  • prof_brainoprof_braino Posts: 4,313
    edited 2012-12-21 13:36
    This is interesting. How does a given item qualify?

    For example, what traits for the item have to display to be considered "gold", and how would this be measured?
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-12-21 13:40
    I was planning to appoint a few people, namely, kuroneko, Mike Green, PhiPi, Chip, and a few others upon recommendations as owners/moderators. Only selected people have permission to push changes into the actual repository. Anyone, however, can comment and suggest changes to a "feature" or library entry.

    While I, personally, currently have admin access to the site and can submit changes, I don't intend to do so, because I don't think I'm knowledgeable enough to approve Propeller code. I'm only keeping the role in a technical administrator context.

    And on that note, everyone, please register and sign in. There's no real reason not to, and it cuts down barriers down the line, when you feel need to comment. If you want to see Gerrit used on another project, check out OpenOCD (experience).
  • Mike GMike G Posts: 2,702
    edited 2012-12-21 14:27
    I believe code standards are a good thing and necessary in any kind of group development. Simply creating a repo and assigning tasks is not going be productive. I'm assuming the folks mentioned in post 5 are all wiling participants. But, If I were asked, I'd say, "No way, that's too much authority and responsibility." The last think I want is Jimmy sending me PMs and emails asking for a status.

    If you want to elicit change and implement code standards then simply do it! Be a leader... Stop with the they should and I can't because...

    How do you go about doing that? Well, pick a goldification candidate (ask Parallax if needed), assemble a team, write the specs, build the tests, write the code, refactor, and document along the way. The repository is secondary.
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-12-21 14:34
    Part of this is that every change involves community input, not only from the admins, but from everyone. I imagine the best way to do this is to submit an object myself (though the only ones I'd be comfortable doing so with are written by other people). Coding standards and such have already been defined by others (though I'll have to look around, but I know I've seen them). Here, I'm trying to provide a mechanism to help people enforce and reach those standards.

    I'm not writing standards, because I don't think I'm qualified to do so. I've always been better at IT/IS type things, and like sitting on the engineering side of that fence.

    For now, I'd like people to play with the commenting mechanism, just on my DEVEL.txt document, and get that up to a complete/usable spec before submitting it.
  • eldonb46eldonb46 Posts: 70
    edited 2012-12-21 14:50
    Wow, It is hard to believe that there are already one million people signed up, I got id number 1000001, or is that old number 65 :-)

    I am looking forward to the discussions on a object/library/entry bases, in the past discussions were always lost in an avalanche of other forum topics.

    Thanks, good work !


    Eldonb46
    #1000001
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-12-21 14:56
    You're #1 (first is zero, User IDs start at 1000000).
  • SeekerSeeker Posts: 58
    edited 2012-12-21 15:13
    eldonb46 wrote: »
    Wow, It is hard to believe that there are already one million people signed up, I got id number 1000001, or is that old number 65 :-)

    I am looking forward to the discussions on a object/library/entry bases, in the past discussions were always lost in an avalanche of other forum topics.

    Thanks, good work !


    Eldonb46
    #1000001

    I am looking forward to it too. It has been needed (and wanted) a long time.

    Seeker (John)
    #1000002 ;)
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-12-21 15:50
    I have updated the FAQ above. Do people who have subscribed to this thread see such edits, or do I need to make another reply for the changes to appear?
  • SeekerSeeker Posts: 58
    edited 2012-12-21 16:18
    I have updated the FAQ above. Do people who have subscribed to this thread see such edits, or do I need to make another reply for the changes to appear?

    I only get notified of new posts... not edits.

    Edit to add: But I know to look.
  • prof_brainoprof_braino Posts: 4,313
    edited 2012-12-22 08:05
    So my questions in post four got missed. Not to nag, but I'd want to know.

    How is a item measured to determine if its "gold" or not? Is this to be subjective (some group of individuals "likes" it) or objective (it meet these specific criterion)?

    Or is the "gold" qualification simple review status, "reviewed" versus "not reviewed"?

    The answer to these questions will give us a fairly accurate estimate of the likelihood of success for this effort.
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-12-22 08:40
    You sort of have to play with Gerrit a bit to understand what it offers.

    I've decided to create two groups with different permissions.

    Process Admins

    I imagine making you (prof_braino), and others who have a solid handle on process, Process Admins. It is up to the Process Admins' discretion whether any object/change/update is accepted into the repository. Mostly, your job is to look at the discussion surrounding and object and determine whether consensus has been achieved or not. However, you can't submit something until it has been tagged as both "Good Code" and has been Verified.

    Senior Developers

    This group will hold the people who have proven to be the most technically competent. I'll start with Kuroneko, Chip, Bill Henning, and a few others. It is up to their discretion to give something either a "+2, Good to submit" or "-2, bad idea, never submit" tag. All users can vote +1/-1, but they're not actually cumulative, so a bunch of +1s does not make a +2.

    As for requirements, I would refer to requirements made by others. There were a few posts to that end in the [THREAD=144536]Whatever happened to the "Gold Standard"?[/THREAD] thread. I'm mostly trying to provide the mechanism to enforce and encourage a reasonable process, rather than implement my own personal coding standard.


    One of the main points about Gerrit, is that it's a great place to hold things that are on their way to Gold Standard, but not quite ready. I'm in the process of trying to convert Lonesock's ffdsv1 driver to C, and I expect there to be a lot of discussion and revisions surrounding it before it's submitted. I'm hoping I can use it as an example to show off the process.

    As for assigning people to groups, I can't do that until they've made their own accounts. That's why I asked for PMs in the FAQ entry on this thread.
    How is a item measured to determine if its "gold" or not? Is this to be subjective (some group of individuals "likes" it) or objective (it meet these specific criterion)?
    I suppose it would be most accurate to say it's subjective, but that it's depending on the whims of two distinct "senior" groups.
    Or is the "gold" qualification simple review status, "reviewed" versus "not reviewed"?
    Since Gerrit offers a lot more options than just Reviewed or Not Reviewed, I hope I answered this above.
    The answer to these questions will give us a fairly accurate estimate of the likelihood of success for this effort.
    Well, really, any process is going to need community buy-in. In the most recent Gold Standard thread, twc said
    twc wrote: »
    ... there's nothing to prevent anybody from making & hosting 'Joes Gold Standard'. That's good and the more the merrier - indeed multiple efforts over time would allow the users to vote on the best scheme (process, coding, testing, doc) with their download clicks.
    This is why I started this effort. I'm hoping several people will sign up and work with it for a while. If it goes somewhere, great. If not, it's a failed experiment, but at least I tried it. But no matter what anyone does, anything will fail without at least some community buy-in for the attempt.
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-12-22 08:45
    Oh, and the "Verified" tag is usually applied by an automated process, but I haven't set that up yet. At my work, we have Jenkins set up to run automated tests on code (mostly, make sure it compiles before being Verified, but I don't have PropGCC on the machine running Gerrit yet. Wowrking on that now.)
  • prof_brainoprof_braino Posts: 4,313
    edited 2012-12-22 14:14
    OK, here's my bit, and after mentioning it, I will butt out if asked to. If asked to participate further, I have some experience with this area.

    Folks need to know what they are being asked to buy into. Right now, we don't know. Leaving the determination of "gold or not" to a select group of individuals relying on their interpretation of "gold" in not something we can NOT buy into. It is undefined.

    However, the data suggests that there is an easy way to do this right. I reference the Carnegie Mellon Software Institute CMMI body of knowledge. There's a LOT of material there, here is the cliff notes version. (just as a starting point)

    We need to build a discrete set of qualifications for be "gold". These must be Yes/No or True/False testable. For example:
    • Is there a requirement (or set of requirements) for this function?
    • Is the set of requirements all testable?
    • Are there tests?
    • Have these tests been executed?
    • Do all the tests Pass?


    After those are answered, we can talk about:
    • Is there code?
    • Has the code been reviewed by a sufficient number of people?
    • Have all the review comments been addressed?

    So, the REPOSITORY is the last part of the process. The CRITERION is the first part of the process, otherwise we can never get to code and review. And these two lists can be a starting point point, if participants can agree. The lists are to be refined as we gain knowledge by experience.

    Anywho, I know something about this, and its not so hard once we know the trick. And the trick is saying what we want. We can get what we want when we can be specific when we ask for it.

    Is there any interest in this?

    May I add that this is an excellent start, and the only thing lacking is clearly defined criterion for what qualifies as gold.
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-12-22 14:37
    One of the things I like about Gerrit is that something can be submitted with a state of, respectively to your sequence of questions, "Yes, Yes, No, No, No, Yes, No, No", and it can sit in limbo, in review, getting fixed, revised, documented, etc until it's turned into a "Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes" state, at which point it can be submitted fully.

    So, please, do not butt-out. Given comments you've made in the past, I would very much like you on the "Process Admin" team. I expect things to be submitted for review that have a good idea, but aren't really ready yet. This provides a forum, attached to the code/documentation, with integrated automated testing, so that sub-standard submissions can be developed to the point of achieving the standard.
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-12-22 15:11
    As for code standards, it often seems easier to go backwards. Write a piece of code, hash it out in the community until everyone agrees that it's easy-to-read and functional, then examine it in detail to determine what attributes make it easy-to-read, and write a standard based on that.
  • twctwc Posts: 107
    edited 2012-12-22 16:04
    As for code standards, it often seems easier to go backwards. Write a piece of code, hash it out in the community until everyone agrees that it's easy-to-read and functional, then examine it in detail to determine what attributes make it easy-to-read, and write a standard based on that.
    This is what I'm thinking. Braino is absolutely right you need requirements and testing, otherwise it's not much different than OBEX. But a good way to start is run some code up the flagpole and see where the discussion leads. My experience is this will ID practical issues that are overlooked or hard to predict in a pure top-down approach. Maybe craft prototype drivers for a few basic functions (ex: display, mass storage, i2c/spi) and apply a few of the advocated templates and everyone can kick the tires and discuss. Once there's a winner the reqts. become apparent and can be documented.
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-12-23 01:50
    Oh, and prof_braino, much of what I've been listing in this forum really ought to be documented in the repo, so please go create an account, and start commenting on my attempt to upload a basic instructions file (which has been there for some time). That way, you can play with the tool, and help produce documentation at the same time.
  • prof_brainoprof_braino Posts: 4,313
    edited 2012-12-23 06:51
    Oh, and prof_braino, much of what I've been listing in this forum really ought to be documented in the repo, so please go create an account, and start commenting on my attempt to upload a basic instructions file (which has been there for some time). That way, you can play with the tool, and help produce documentation at the same time.

    Thanks for the invite. I've signed up.

    Incidentally, this is the point at which the Parallax effort stopped last summer/fall; we never agreed what if any criterion would be used to measure a submission to the Gold Standard repository, or how such criterion would be evaluated. Understandably so, since the advice was that bulk of the process should be "organically driven" by the community, and Parallax should have a minimal role (perhaps "final approver") rather than the more resource intensive "soup nazi" role found in heavily regulated industries. The final roles will likely be somewhere in between.

    In any case, this will be a good experiment. I'm glad you are leading the exploration of this option.
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-12-23 09:16
    Awesome. Please go look at the one change that's there at the moment, and comment on it. If you don't understand it, and it needs more explanation (which I'm sure is the case) please say so.

    Quick howto: Click on "All" in the top-left corner, then "Open" to see a list of all changes (currently there is one, "Committing setup instructions"). Click on it to open its changeset pane. From there, you can see the files in the commit (again, only one, "DEVEL.txt"). Click on DEVEL.txt to open the diff (against nothing since it's a new file). From there, double-click on any line in the file to insert a comment. This is called a "Draft" and can be edited later. When you have all your comments in the file, click "Up to Change" then the "Review" button. You can give it a +1 or -1 vote (or not if you don't want to), and add final comments to the whole change. Once they're submitted here, I can see them and respond to them, either with more comments, or a new version of this change.
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-12-27 13:28
    By the way, for anyone starting to experiment with this, you can press "?" in the web UI to get a list of keyboard shortcuts.
  • jazzedjazzed Posts: 11,803
    edited 2012-12-27 15:55
    Incidentally, this is the point at which the Parallax effort stopped last summer/fall; we never agreed what if any criterion would be used to measure a submission to the Gold Standard repository, or how such criterion would be evaluated. Understandably so, since the advice was that bulk of the process should be "organically driven" by the community, and Parallax should have a minimal role (perhaps "final approver") rather than the more resource intensive "soup nazi" role found in heavily regulated industries. The final roles will likely be somewhere in between.

    Ever seen this? http://www.parallaxsemiconductor.com/support/goldstandard/specifications

    I don't agree with all of it, but looks like a great starting point if you really want criteria.

    Happy New Year,
    --Steve
  • prof_brainoprof_braino Posts: 4,313
    edited 2012-12-27 16:45
    jazzed wrote: »
    Ever seen this? http://www.parallaxsemiconductor.com/support/goldstandard/specifications
    I don't agree with all of it, but looks like a great starting point if you really want criteria.

    Sure did, that's why we needed the discussion. The material on that page only represents the LAST 5-10 percent of the work.
    The ninety percent not addressed is regarding what is the item intended to achieve, how it expects to go about doing it, how this can be tested, whether the tests pass.
    Also needed are whether anyone reviewed the item, is the material complete and understandable.

    So yes it is a great starting point. There is substantial work before the goals of the Gold Standard effort are achieved.
  • jazzedjazzed Posts: 11,803
    edited 2012-12-27 20:22
    @braino,

    That last 5 to 10% as you call it is actually the hardest part because you need a consensus that works. The standard is the end product that submitters and reviewers must follow faithfully to have a solution.

    The best process you will get (more or less) from contributors is:
    1) brief description of the general purpose and enough theory (if necessary) for the average person to get it.
    2) black box description of each public interface - testers get a white box because source is available.
    3) some proof that it works - a functional demo program (not a full test harness).
    4) standard compliance - and peer review acceptance of readable code.


    The mechanics of review is like a clock: it is something that should work well and be not over-bearing. Looks like Circuitsoft has a good first cut at that.

    The problem with too much thinking is having no time left for action. It shouldn't take a year to get this done.

    I presume this is only for SPIN/PASM to start with. Other languages will have various proportional challenges depending on the basic elements.

    --Steve
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-12-27 20:50
    twc wrote: »
    As for code standards, it often seems easier to go backwards. Write a piece of code, hash it out in the community until everyone agrees that it's easy-to-read and functional, then examine it in detail to determine what attributes make it easy-to-read, and write a standard based on that.
    This is what I'm thinking. Braino is absolutely right you need requirements and testing, otherwise it's not much different than OBEX. But a good way to start is run some code up the flagpole and see where the discussion leads. My experience is this will ID practical issues that are overlooked or hard to predict in a pure top-down approach. Maybe craft prototype drivers for a few basic functions (ex: display, mass storage, i2c/spi) and apply a few of the advocated templates and everyone can kick the tires and discuss. Once there's a winner the reqts. become apparent and can be documented.

    So, I've not seen any comments from Braino or Jazzed (or anyone else with a more process-oriented view) on my and twc's previous idea of just hashing something out until everybody likes it, then examining what about the final form is necessary/desirable in a standard.

    Thoughts?
  • prof_brainoprof_braino Posts: 4,313
    edited 2012-12-27 22:56
    So, I've not seen any comments from Braino or Jazzed (or anyone else with a more process-oriented view) on my and twc's previous idea of just hashing something out until everybody likes it, then examining what about the final form is necessary/desirable in a standard.

    I don't have the git installed yet, but its still on my list.

    Re: jazzed - knowing what the code is intended to do, and how to verify that it does something in particular is the only thing of interest. If we don't establish these, it does not matter whether code conforms to a standard or not. Conforming to a coding standard is trivial if all the participants agree to it, and not possible when the participants do not agree.

    The items you list (description of the function, description of the interfaces, some type of tests, and peer review that says the previous three are sufficient) is a good start. The process by which we review these and determine if they are sufficient is the challenge at hand.
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-12-27 23:03
    Everyone, I have now uploaded (Gasp!) an actual piece of code! It's not tested, but it does compile cleanly. Let's use this as an exercise to try developing a module into a complete entry and see how it goes.
  • jazzedjazzed Posts: 11,803
    edited 2012-12-27 23:54
    The items you list (description of the function, description of the interfaces, some type of tests, and peer review that says the previous three are sufficient) is a good start. The process by which we review these and determine if they are sufficient is the challenge at hand.

    I suppose that means you and I agree on those points.

    BTW, most of that is in the Parallax Gold Standard document, although it is not explicitly stated.

    That's all I have to contribute. I wanted to add more, but I have plenty to worry about as it is. I just wish Parallax was more involved in this. That they were involved is some consolation.
  • SRLMSRLM Posts: 5,045
    edited 2012-12-28 00:54
    Everyone, I have now uploaded (Gasp!) an actual piece of code! It's not tested, but it does compile cleanly. Let's use this as an exercise to try developing a module into a complete entry and see how it goes.

    Personally, I would never review a piece of code in the depth that it required unless I needed to use it. In which case, I dive down into the internals and modify to suit. I've always imagined that the "Gold Obex" would have to work the same way: the only people who will do more than a superficial review are those who need to use it in a project. This naturally leads to the conclusion that you will rarely (never?) have a group of volunteers actively working on a single object to bring it to Gold Status.

    And on that note, my superficial comments about the FFDS1.c/h files are:
    1) I think the dat section should be volatile. Also, with spin2cpp you can use --dat with --gas to make a separate .s file (apparently: I've never tried it, although I will tomorrow).
    2) Should line 25 of FFDS1.c really be static? That would imply to me that you can only have one of the objects, which seems like a problem in some situations (I'm not at all sure of this, though).
    3) Code fluf, but it's inconsistent with the placement of "{": sometimes it's on the end of a line, sometimes by itself.
    4) If you don't use the specific memory types (int32_t, etc) then you don't need to #include <stdint.h>.
Sign In or Register to comment.