In 1972, Edsger W. Dijkstra published a paper titled The Humble Programmer. Dijkstra was trained in math and physics and was a university professor for much of his life. This paper is an interesting reflection on the history of computers and contains thoughts for the future. A few quotes are included below:Read More »The Humble Programmer
Go does a lot of things well (good performance, easy to learn, very productive, extensive stdlib, excellent tooling, etc), but after programming with Go for three years (both embedded Linux and cloud applications), stability is the characteristic that really stands out.Read More »Why are Go applications so reliable?
Recently I needed to calculate NAND partition tables for a project where we will be supporting a number of different flash parts from 500MB to 2GB. I first tried this in a spreadsheet, but found it difficult to work easily with hex numbers and do the calculations I needed. I then looked into options for formatting text in columns from a program and found the nice text/tabwriter Go library. With a few lines of code, I was then able to get the below output, which is quite easy to read. The only tricky part was figuring out that for right justified data, you need to:
- not use tabs for the padding character
- add a trailing \t in the input data
Go has a pretty neat development environment, and its helpful to set up a standard GOPATH on your workstation up front. This is what I do:
- mkdir ~/go
- add the following to .bashrc (or some file that configures your env on login)
- export GOPATH=~/go
- export PATH=$GOPATH/bin:$PATH
Now, after you log in, you can do things like:
In the quest for technologies that work well for embedded Linux systems, I recently gave Go another try. The last time I tried this was very early on and there were some floating point issues on ARM that appear to be fixed now. Having spent a few days porting an existing application to Go, there is a lot to like about Go.