WSJT-X reports time difference > 2 seconds on Windows 10

All of the JT modes (JT65, JT9), and now the new mode FT8 are sensitive to correct system time within a couple of seconds. This is because the transmit/receive cycle starts and stops at a predetermined time, and the software of each transmitting station and each remote receiving station need to be in sync in order for each transmission to get successfully decoded.

FT8 seems to be forgiving within about 1.5 seconds of difference, but above this it flags the delta between stations in the DT column:

On a new laptop with Windows 10, even though the date and time is set to set automatically using a remote time server on the internet, almost every FT8 transmission received was consistenly > 1.5 seconds in difference.

To fix this I downloaded and installed Dimension 4 and set it to start automatically. Sync’d the time and now we’re all set – you can see the received calls below in the DT column are all now within a couple of 0.1s after the sync:

Learning Golang (part 2)

It’s been several months since I started to look at Golang, but I’ve been picking it back up again. The design decisions in the language are starting to make me like this language more and more. It’s clear there were decisions made to address many pet peevs with other languages. Here’s a few I’ve noticed:

  • standard formatting and the ‘go fmt’ tool. In many other languages there’s endless debates about where your { and } should go, and honestly it really doesn’t matter. Go addresses this by requiring a single style where the opening { is syntactically required at the end of the line (and not allowed on the following line) in order for your code to compile. End of argument. Done
  • a single for loop for iteration. Other languages support for and while in a few different variations (while condition at the beginning of a block or at the end), but Go has a ‘for’ statement and that’s it. Keep it simple.
  • much time has been wasted in Java arguing about whether exceptions should be checked or unchecked. Go’s approach, no exceptions, no exception handling. You have an ‘error’ type which you can chose to return as the last return value from a function if needed

Here’s my notes following on from my earlier Part 1.

Imports

Imports are each on a separate line, with the package in quotes:

import "fmt"
import "unicode/utf8"

Variables

Variable types are defined after the variable name, both in variable declaration and function parameters:

func ExampleFunc(x int, y int) int {
var example int
var example2 string
...
return 1
}

This function takes 2 params, both ints, and returns an int.

Unlike other languages where you can pass many params but only return a single result, Go functions allows you to return multiple results, e.g.

func ExampleFunc(x int, y int) (int, int) {
var example int
var example2 string
...
return a, b
}

To call this function and receive the multiple results:

x, y := ExampleFunc(1, 2)

If you’re only interested in one of the return values you can use the blank identified to ignore one of the returned values:

_, y := ExampleFunc(1, 2)

Functions with a capital first letter are exported so they can be imported elsewhere, functions with a lowercase first letter are not.

Adding a Silicon Power 512GB SSD to my Mac Pro 2008

TLDR; here’s the main points:

  • Restore a Time Machine backup using Recovery, not from Disk Utils from the MacOS installer
  • If an uninitialized SSD is not visible to Disk Utils, it may show up under ‘diskutils list’
  • If still not visible, put it in a USB drive enclosure where it should get detected, then initialize it

I picked up a cheap $50 512GB SSD to add to my Mac Pro 2008. I already have Windows 10 on one SSD, but decided it was time to replace the WD Blue 5000rpm drive also with an SSD. Backed up El Capitan to Time Machine, and now ready to add the new drive.

I mounted it in a Sabrent 2.5 to 3.5 caddy, and then attached to one of my drive sleds.

I’ve had good luck with new and even refurb drives over the past couple of years, this Silicon Power SSD is the first drive that’s given me issues, as it’s not visible in Disk Utils or even to ‘diskutils list’ which normally detects and lists an installed drive even though it’s not usable. Not knowing if it was the SATA connectors, I removed all my other disks, and moved it between each of the 4 slots, and no go, it was still not detected in MacOS Recovery Disk Utils, either when booted into El Cap, or in Windows 10.

First attempt to see what was going on, I tried downloading Silicon Power’s SP Toolbox software, and Windows Defender says it has a trojan:

Ok, well that’s not good. Uninstalled.

To double check that the drive could be detected on other machines I uninstalled it and moved it to a USB3 external drive enclosure. Windows 10 Disk Management now sees the disk as uninitialized, and pops up a dialog to initialize it as either MBR or GPT. Ok, picked GPT but haven’t formatted it yet. Going to now book back into MacOS Recovery to see if I can format it, and restore my TimeMachine backup. Back in a few mins.

Ok. So I have a Recovery partition that for some reason does not boot. The other option is to boot from an MacOS El Cap bootable USB flash drive and restore from Disk Utils there. I tried this and when I selected the ‘Restore…’ menu option, selected the Time Machine USB drive and the SSD as the target, I ended up restoring a copy of the content of the Time Machine backup onto the SSD, but it’s not bootable. First clue that this happened should have been from the boot menu screen when I had 2 identical orange Time Machine drive icons, and not a new silver bootable disk.

Since I don’t have a working Recovery partition to boot from where the ‘Restore from Time Machine’ option is, I went the long way round and installed El Cap from USB to the new SSD which got it bootable and with a new Recovery partition, then booted to this Recovery partition, selected the ‘Restore from Time Machine’ option, left it restoring over night, and now I have I my previously El Cap install completely transferred to the new SSD, successfully bootable and all. That took way longer than I expected, but now successfully up and running!

El Cap boot time from SSD on this 2008 Mac Pro is about 4 seconds, whereas before from a 5000rpm WD Blue it was at least a minute to get to the desktop… a HUGE improvement!

Solving a Quora programming homework question in ARM Assembly

It makes me sad when students ask the online communities to ‘please write me a program that does the following’. Not only is this flat out dishonest to ask someone else to do your homework for you, the opportunity for learning is in the process of solving the problem and writing the code yourself. If someone else writes the code, you’ve missed that opportunity. There’s little to be learned if someone else does the hard work and gives you the final result.

Most communities police these types of questions pretty well. Reviewers on Stackoverflow for example are quick to respond to these types of questions to help developers restructure a generic request for help into a specific question about a specific problem that the developer need help with. The guides that are usually referred to on suggestions to restructure these questions are actually very good advice and reminders for us all on how to ask good questions:

On other community sites, the community response goes in a different direction. This question for help on how to write a program was responded to be some of the funniest and bizarre approaches to solve the askers problem in all sorts of obscure language from Brainfuck to Whitespace and plenty of other weirdness inbetween.

Not to be left out but a little later to the party, I realized I hadn’t done any ARM assembly for a while, so here’s my solution in ARM Assembly that I developed on my Raspberry Pi:

.global main

main:
MOV R4, #3 @ init outer line counter =3

_outerloop:
MOV R3, R4 @ init word loop counter with current value of outer counter

_wordloop:
MOV R7, #4 @ syscall 4: output to stdout
MOV R0, #1 @ stdout
MOV R2, #6 @ length of string
LDR R1, =output
SWI 0

SUB R3, R3, #1 @ decrement word loop counter
CMP R3, #0
BNE _wordloop

@print newline
MOV R7, #4 @ syscall 4: output to stdout
MOV R0, #1 @ stdout
MOV R2, #1 @ length of string
LDR R1, =eol
SWI 0

SUB R4, R4, #1 @ decrement outer counter
CMP R4, #0
BNE _outerloop

_exit:
MOV R1, #0
MOV R7, #1
SWI 0

.data
output:
.asciz "Smile!"
eol:
.asciz "\n"