One huge benefit to using a source code management system (SCMS) like the de-facto industry-standard git is it eases, nay, down-right facilitates collaboration. One common attribute of a web developer is perfectionism. At times, this wonderful tool and (oft) wonderful trait can be at odds with one another. For those of us who appreciate beautiful code, we (not me) often fear sharing what isn’t a polished thing of beauty.
<?php
diff --git a/compost_customizations.module b/compost_customizations.module
index d4e3daf..fa4c5d0 100644
--- a/compost_customizations.module
+++ b/compost_customizations.module
@@ -728,15 +728,42 @@ function compost_customizations_queue_forgotten_bucket_emails() {
//$raw_collection[0]->field_reminded_about_forgotten_b->set(1);
$collection = entity_metadata_wrapper('field_collection_item', $raw_collection[0]);
$collection->field_reminded_about_forgotten_b->set(1);
- // @todo: remove after finishing
- if ($collection_id == 6) {
- // Set to reminded
- $collection->save();
- }
-
-
- $been = 'reminded?';
+ // Set to reminded
+ // @todo: uncomment to save! $collection->save();
+ $date = $collection->field_forgotten_bucket_date->value();
+ $email_content = theme('forgotten_bucket_email', array('user' => $user, 'date' => $date));
}
+
}
}
+}
There are two main problems with selfish sandbagging of one’s code.
- Making mistakes is one very efficient way to learn, and when others can see your mistakes during your process, if you are open to constructive criticism, you learn faster. Failure is a necessary part of eventual success.
- When you are working with one authoritative repository, which, despite git’s naturally distributed nature, is often the case, you may be working on your own code locally for a week or more without ever pushing that code to another (backup) repository. What happens when your computer fails? You lose a week of work. It’s 2015 while I’m writing this, and that is no longer acceptable, nor will make you, your employer, or your client very happy when (not if) it happens.
This solution, as it is technical in nature, will only deal with problem #2, though both are worthwhile in considering how to improve.
Here is the workflow I recommend a solo developer considering for her own workflow when collaborating with others in a shared code repository.