View unanswered posts | View active topics It is currently Tue Mar 26, 2019 5:08 pm

Reply to topic  [ 1 post ] 
My Recipe For Quality Units Of Work - Software Dev 
Author Message
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15240
Location: Home sweet home!
I was explaining to someone what I do to achieve a generally good hit rate for regression-free improvements to the firmware. This is it, in brief:

  1. Work and work until I get the result I want. (make it work)
  2. Tidy up what I can see is obviously wrong. (make it right...)
  3. Run 'git difftool' and review every single change in every single file.
  4. Ensure that only a narrow set of changes are present to commit.
  5. Revert any changes that are stylistic or unrelated.
  6. Run 'git difftool' again and look for omissions and mistakes by reviewing every line of change in every file
  7. Repeat that until a full check results in no changes - because each change has the chance to introduce a new mistake.
  8. Final test to ensure it still works as required. < For me this stage = try more than one decoder/user config. For you it might mean unit tests, launching the app with different flags, different action paths to the same feature, whatever. It needs to be as thorough as possible, though.
  9. If any changes repeat self-review process until clean again.
  10. Commit
  11. Push to dev branch for others to review/test.
  12. Push to master branch for mainstream use.

I really do do this. I often run git diff and git difftool as many as 30+ times before finally committing my work. It's through this thorough self-review that I ensure the quality of my work is high. You might think that it's a lot of work, but it pays off when you don't have to diagnose and fix stuff later. If your platform allows for unit testing in a straight forward way DO IT. Any automated testing and code quality review is worthwhile and a time saver and quality booster in the short medium and long terms.


_________________ - where Open Source means Open Source, and Free means Freedom - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!

Thu Apr 05, 2012 11:48 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF. ColorizeIt.