Configure Wifi on Ubuntu Server with Netplan

Add a file, 1-wlan0.yaml, to /etc/netplan/ with the following contents,

$ sudo cat << EOF >> /etc/netplan/1-wlan0.yaml
network:
    version: 2
    wifis:
        wlan0:
            optional: true
            access-points:
                NAME_OF_YOUR_ESSID:
                    password: "YOUR_SECRET_WPA_PSK_HERE"
            dhcp4: true
            dhcp6: true
EOF

Then apply the plan,

$ sudo netplan apply

A Case Study of Go Channels and Goroutines

Let's talk about Go channels and Goroutines and how we can get started with them using a semi-practical example.

In our case we will calculate all prime numbers from 2 to 500,000. The reason for picking this example is that determining a number is prime takes CPU time and it's an independent enough task that we can use threads to concurrently process multiple numbers. By using channels to distribute the work to Goroutines we get a well rounded way to learn about these concepts.

At the end, we will implement the same thing in Python. We will compare the implementation differences between Go and Python and how long it takes to run equivalent programs. Spoiler alert: Go is much better suited for this task.

Read more …

GitLab and go get

I was trying to run go get on a git repository hosted on a private GitLab instance. This repository was stored under a sub-group. I was working from a non-default branch. Since it is a monorepo the module/package was in a subdirectory. So a combination of four factors complicated matters for me.

Read more …

Swift FAQs

These Frequently Asked Questions are for those starting to learn Swift. As I start my journey I have a lot of questions. I'm documenting those here from the perspective of someone who has been programming for a long time in Python and has worked in other languages when needed (e.g. bash, Groovy, Go, PowerShell, etc.).

Read more …