Thursday, July 28, 2022

Dealing with legacy projects

One of the areas I provide value is improving the quality of legacy projects, see this, this, this, and this. Yesterday, I was asked again for help with a legacy project that contains both hardware and software but no documentation, i.e. it used heroic development. Here are the steps we should follow:
  1. Convince me: Why are you asking for my help, why don't you continue as before? Are you trying to please the quality department with documentation fluff? Where did you get stuck, what are the concrete issues you think I can help? Are there any standards that must to be followed or are these standards nice to have?
  2. Interview the developers and create a document on Confluence, write what problem the project solves, what its current status is, what the current problems are and what more features will be added. Add a diagram showing the hardware and software components and their interfaces, especially external interfaces. Later on you can add more details, making it a proper developer handbook.
  3. Let the developers do a live demonstration of the current capabilities.
  4. Upload code and tools necessary for build to a repository.
  5. On a clean PC, build code. Add repository links and build steps to document.
  6. Add unit tests starting with the simplest sections. Update document as you add more and more tests and become acquainted with the code/design.
  7. Add automated nightly build scripts, update document.
  8. Add steps of hardware assembly and test to document.
  9. If there are manual tests, create a test plan document detailing test steps on Confluence. It should include links to documents on how to assemble and test the hardware and how to build the code and upload to hardware.
  10. Create a deployment document (or add to existing document) detailing the steps of how the product is delivered to the end user and how user will share issues/requests with the developers.

Recovering an USB drive

After creating an Antix linux operating system installation USB drive (30GB) and finishing the OS installation, I wanted the use the drive as usual for copying files. However, Windows 10 showed me a full 4MB drive and did not allow me to copy any files there:
I opened Windows Disk Management a saw that there was an unallocated 29.95GB volume:
I right clicked on the unallocated partition but New Simple Volume option was disabled. I ran Windows diskpart.exe and selected disk 1:
I deleted the partition on disk 1 using the override flag:

Now in Disk Management, New Simple Volume option was enabled:

I selected that option and created an new volume but formatting failed with "The system cannot find the file specified". When I tried to format with file explorer, I got "Windows was unable to complete the format" message. With diskpart.exe, I used clean:
In Disk Management I tried New Simple Volume again, this time it formatted the drive successfully: