[TangerineSDR] [EXTERNAL] Re: Fwd: Proposal: HamSCI Code Review

Engelke, Bill bill.engelke at ua.edu
Thu Aug 13 19:17:26 EDT 2020


Colleagues:
Regarding code review – I guess my team and I stand to both gain and lose the most on this, since we are doing most of the software (at least, for Tangerine). A few observations –


  *   We are already well down the road toward the Phase 1 code, as we are following a project plan established back in January. The time to implement a standard is at the very beginning of a project, not after several thousand lines have been written and tested/debugged. (Of course, we can be certain that many bugs remain).  Compliance with a coding standard is not part of the requirements and could constitute an significant increase the scope, I would think; I have some anxiety at having to rewrite a lot of it.  (Perhaps we could decide what needs rewriting and plan that for Phase 2?) – not to mention the fact that reviewing a large piece of software can be a project unto itself (time, resources, etc.) – which is certainly worthwhile if lives are on the line. This is not the case for the Personal Space Weather network.
  *   Jay mentions embedded software, so is there a part of this that would apply to the FPGA code, which has not yet been started (AFAIK) - ?
  *   Rob reminds us that there are multiple standards, and it’s not clear which (if any) would be good for this project. As far as “Elements of Style,” I can appreciate this thought because it speaks to readability. I have been writing & documenting the code with the idea that it would be picked up and used by others, so I have been trying to put in comments that are extensive enough that someone with minimal experience should be able to follow/modify it.
  *   I have been writing unit tests for automated testing for many of the functions in the c-code; it is challenging to do this for a multi-module system where a lot of things depend on another device doing something and replying in a specific way; you may or may not be able to detect real-time errors like software races, where you have to handle network timing. I am a bit fuzzy on how to do this on the python side, but I expect that some research will turn up some ideas.
  *   BEING PRAGMATIC - I have a list of TODOs where I plan to put in improvements over time that add robustness (but not significant functionality); for example, in C you can use a “low budget” function atoi to convert ASCII to integer, but it has the weakness that if it gets an error, it simply returns zero; the plan is to substitute a better method for all of those after proof of concept. I am nearing completion of the proof of concept stage for the Local Host. If we have a set of recommendations (from a standard or somewhere) on best practices for things like this, I would  be delighted to have it, and will use as much of it as possible (as long as it doesn’t require extensive rewriting). For the Central Control system, very little has been written, so any standards could be implemented at minimal cost (as long as it doesn’t say the team can’t use the tools they have already selected).

Is the Monday night telco the right forum in which to discuss all of this? I don’t know; most of the focus has been on the hardware…   -73- Bill

From: TangerineSDR <tangerinesdr-bounces at lists.tapr.org> On Behalf Of Aidan Montare via TangerineSDR
Sent: Thursday, August 13, 2020 11:56 AM
To: Jay Schwartz <wb8sbi at gmail.com>
Cc: Aidan Montare <aam141 at case.edu>; TAPR TangerineSDR Modular Software Defined Radio <tangerinesdr at lists.tapr.org>
Subject: [EXTERNAL] Re: [TangerineSDR] Fwd: Proposal: HamSCI Code Review

Jay,

I'd be interested in hearing more about this. I haven't been on the tangerine calls (I'm usually on the HamSCI ones), though I'm planning to start joining if I have the time.

On Wed, Aug 12, 2020 at 10:35 PM Jay Schwartz <wb8sbi at gmail.com<mailto:wb8sbi at gmail.com>> wrote:
Hello all,

Please allow me to introduce myself.  I'm a retired automotive embedded software engineer, BSEE, BSCS, licensed since 1974, Extra Class, and Life Member of ARRL, AMSAT, and QCWA.

In the auto industry code reviews are mandatory, and misery unto those who do not do one.  Part of this code review is to make sure the code complies with the Motor Industry Software Reliability Association (MISRA) standard.  This is a coding standard that started in the auto industry and has gone worldwide in many other industries.  The standard can be purchased for 10 British Pounds from https://www.misra.org.uk/<https://www.misra.org.uk/Publications/tabid/57/Default.aspx>

Many software compilers have incorporated this standard into their tools.  They will automatically check the source code at compile time and report any non-complicenses.  I.e. your code compile and link, but may not run the way you think it will.  By complying with this document you greatly reduce the chances of something undesirable happening.

This document is easy to comply with, and contains a lot of common sense do / do nots.  By complying with it also makes your code more readable and better able to be updated.  However, it is not friendly to spaghetti code.

If the code is written to comply with it then many preventable bugs can be avoided.  I.e. it reduces the need to patch by not having the bug in the code to begin with.

I have a copy of the standard and would be happy to explain it to the group at the next regularly scheduled video meeting.

73, Jay
WB8SBI

On Wed, Aug 12, 2020 at 6:00 PM Aidan Montare via TangerineSDR <tangerinesdr at lists.tapr.org<mailto:tangerinesdr at lists.tapr.org>> wrote:
For those not on the HamSCI mailing list:

---------- Forwarded message ---------
From: Aidan Montare <aam141 at case.edu<mailto:aam141 at case.edu>>
Date: Wed, Aug 12, 2020 at 5:00 PM
Subject: Proposal: HamSCI Code Review
To: <hamsci at googlegroups.com<mailto:hamsci at googlegroups.com>>

Dear all,

I'd like to propose a regular code review session for the HamSCI community, and get your feedback on the idea.

If you are interested, please fill out the following short survey to help me pick a time to hold code review sessions: https://forms.gle/uiEHCqMG9v1BaQiW7. I think the schedule can be informal; I'd be happy to meet at different times on occasion to accommodate different people, etc.

I've also created a page at hamsci.org<http://hamsci.org> (https://hamsci.org/code-review) for the project with some general thoughts on how the sessions might run. If you have any ideas or suggestions, please let me know as well (either via email or the form linked above).

Best wishes,

Aidan KB3UMD


--
Sincerely,

Aidan Montare
CWRU Class of 2021
--
TangerineSDR mailing list
TangerineSDR at lists.tapr.org<mailto:TangerineSDR at lists.tapr.org>
http://lists.tapr.org/mailman/listinfo/tangerinesdr_lists.tapr.org


--
Sincerely,

Aidan Montare
CWRU Class of 2021
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tapr.org/pipermail/tangerinesdr_lists.tapr.org/attachments/20200813/c3c90005/attachment-0001.html>


More information about the TangerineSDR mailing list