(no commit message)
authorlkcl <lkcl@web>
Fri, 24 Jan 2020 08:12:02 +0000 (08:12 +0000)
committerIkiWiki <ikiwiki.info>
Fri, 24 Jan 2020 08:12:02 +0000 (08:12 +0000)
HDL_workflow.mdwn

index 98e4bf60181d0d7142ab06acde52b66933163bfe..e50931f84196468ac66d1cffd571ea239d5d18ca 100644 (file)
@@ -186,14 +186,14 @@ for actual code development:
 
 * plan in advance to write not just code but a full test suite for that code.  **this is not optional**. large python projects that do not have unit tests **FAIL** (see separate section below).
 * only commit code that has been tested (or is presently unused). other people will be depending on you, so do take care not to screw up.  not least because, as it says in the [[charter]] it will be your responsibility to fix.  that said, do not feel intimidated: ask for help and advice, and you'll get it straight away.
-* commit often. several times a day, and "git push" it.  this is collaboration. if something is left evrn overnight uncommitted and not pushed so that other people can see it, it is a red flag.  if you find yourself thinking "i'll commit it when it's finished" or "i don't want to commit something that people might criticise" *this is not collaboration*, it is making yourself a bottleneck.  pair-programming is supposed to help avoid this kind of thing however pair-programming is difficult to organise over remote collaborative libre projects.
+* commit often. several times a day, and "git push" it.  this is collaboration. if something is left even overnight uncommitted and not pushed so that other people can see it, it is a red flag.  if you find yourself thinking "i'll commit it when it's finished" or "i don't want to commit something that people might criticise" *this is not collaboration*, it is making yourself a bottleneck.  pair-programming is supposed to help avoid this kind of thing however pair-programming is difficult to organise for remote collaborative libre projects (suggestions welcomed here)
 * **do not commit autogenerated output**. write a shell script and commit that, or add a Makefile to run the command that generates the output, but **do not** add the actual output of **any** command to the repository.  ever.  this is really important.  even if it is a human-readable file rather than a binary object file.
 * if the command needed to create any given autogenerated output is not currently in the list of known project dependencies, first consult on the list if it is okay to make that command become a hard dependency of the project (hint: java, node.js php and .NET commands may cause delays in response time due to other list participants laughing hysterically), and after a decision is made, document the dependency and how its source code is obtained and built (hence why it has to be discussed carefully)
 * if you find yourself repeating commands regularly, chances are high that someone else will need to run them, too. clearly this includes yourself, therefore, to make everyone's lives easier including your own, put them into a .sh shell script (and/or a Makefile), commit them to the repository and document them at the very minimum in the README, INSTALL.txt or somewhere in a docs folder as appropriate.  if unsure, ask on the mailing list for advice.
 * edit files making minimal *single purpose* modifications (even if it involves multiple files. Good extreme example: globally changing a function name across an entire codebase is one purpose, one commit, yet hundreds of files. miss out one of those files, requiring multiple commits, and it actually becomes a nuisance).
 * prior to committing make sure that relevant unit tests pass, or that the change is a zero-impact addition (no unit tests fail at the minimum)
 * commit no more than around 5 to 10 lines at a time, with a CLEAR message (no "added this" or "changed that").
-* if as you write you find that the commit message involves a *list* of changes or the word "and", then STOP. do not proceed: it is a "red flag" that the commit has not been properly broken down into separate-purpose commits. ask for advice on-list.
+* if as you write you find that the commit message involves a *list* of changes or the word "and", then STOP. do not proceed: it is a "red flag" that the commit has not been properly broken down into separate-purpose commits. ask for advice on-list on how to proceed.
 * if it is essential to commit large amounts of code, ensure that it is **not** in use **anywhere** by any other code. then make a *small* (single purpose) followup commit which actually puts that code into use.
 
 this last rule is kinda flexible, because if you add the code *and* add the unit test *and* added it into the main code *and* ran all relevant unit tests on all cascade-impacted areas by that change, that's perfectly fine too.  however if it is the end of a day, and you need to stop and do not have time to run the necessary unit tests, do *not* commit the change which integrates untested code: just commit the new code (only) and follow up the next day *after* running the full relevant unit tests.