2018-05-08

I didn't get any devlogs written on Sunday or Monday (killer migraine) but I did go through the Django tutorial on Sunday.

It's kind of all over the place, but I'm learning a bunch of new things right now:

  • some new hardware (BLE and LoRa)
  • web development / Django
  • mobile development / Android / Java

I'll talk more about each thing in detail, but the idea is that I can do things like

  • building small nodes that interact with the world (e.g. IoT) and gateways to connect them
  • building a web service that can collect information from nodes
  • building mobile and desktop tools for making sense of the information

In general, learning these things opens up my options for problems I can solve. Right now, I'm mostly limited to building CLI tools and backend servers. It would be useful to be able to solve my own problems. Later on, it would also make it easier for me to do my own remote freelance type of gig.

There are a few concrete ideas I have for things to build:

  • the garden sensor network (e.g. the current adventures in BLE), a site for collecting data (even if it runs on a raspberry pi in my house), and an app on my phone so I can see what's going on.
  • a morning routine app to help me get started in the morning.
  • a self-hosted evernote replacement that's more tailored to what I want, e.g. with better calendar support and that incorporates advanced document features (like footnotes and the like).
  • taking my tech library and putting it on a site so that friends can check out books (like an actual library).

With that, I guess I'll write up a bit about what I'm trying to accomplish and the challenges I'll be facing.

Hardware-side

On the hardware side, I'm using Adafruit Feather boards (so far, all the work has been using the nRF52 board but I've just received the LoRa board).

The prototype has just been using the Feather with simulated values, and I still have plenty of work to do hammering out the beacon protocol before moving on to hardware. The next step will be hooking the beacon up to its power system and building an enclosure; this will entail sorting out a solar charging system and getting an unintrusive enclosure set up. I'll probably have to design out the supporting PCB; I've been meaning to figure out how to use Kicad to order boards from OSHPark. I've used Eagle in the past (even paid for a license) but I'm not a fan of the direction Autodesk is taking it and it's been a long while since I designed a board. It'd be fun to put together a header board with a JST interface to I2C and an MPTT setup.

The collector node is going to be a Rasperry Pi, which means I need to dig mine up and make sure I can locate it somewhere that can actually see the nRF52 nodes. Then, I can take the tools that I've built that run on my laptop and make sure they work on the Pi. I also need to decide whether the collection API and database live on the Pi or in the cloud. Running locally means I don't have to worry about the home network going out, but it also restricts me from accessing it outside of my house. A bridge to cross later.

Web development

I've never really spent time in my career building web apps; I've built a few small REST-like API and RPC systems that are primarily devoted to supporting command line tools. I've certainly not done much work with front ends or UI/UX. As part of my move to not having to screw around with computers as much (e.g. fiddling with the mechanics of the thing v. using them to solve problems in my life), it'd be nicer to have humane interfaces --- and the humane answer in many cases is a shiny UI.

So now I find myself learning Django, leveraging my strong Python background; I've done Restas in Common Lisp, a few Clojure systems, and Revel in Go, but I feel like it's easier to get answers for things using Django. I can take the concepts I learn here and translate them to other systems later.

I've also never really spent time doing database-driven apps. We did a little SQLite at Echostar, I've built some side projects with light Postgres, Redis, and CouchDB in the past; but, in general, the things I've built professionally just haven't needed these things before. I always have to look up how to create databases, for example, so there's a lot of stuff here to learn too.

Then there's the UI stuff: another thing I've had next to no experience in. I've hacked together a little HTML and bootstrap in my time, and I once wrote a dumb comment system for a company I worked at, but I really don't know what I'm doing. I'm guessing React is the way to go, but I'm not sure. Angular was the hotness not too long ago and that was miserable; maybe it's just putting up with it.

The elephant in the room is that the only web development gig I've had, I hated. I think that was partly the environment --- never having done web development, working fully remotely with a bunch of people who also weren't web developers, at a company that was struggling to make money, and with the promise of being able to do the work I actually wanted once we started making money --- and partly just being so in over my head. It wasn't good, and it was for the mutual benefit of both myself and my employer that I left. And yet I've grown quite a bit since then, and in a healthy environment I think I could excel.

Mobile development

Back when I was doing the Africa deployment with the Army, I got an iPod touch and a macbook air that I could use to learn how to write iOS apps. I didn't get too far with it, mostly due to external circumstances. I did build some things that were useful to me, though; the only one I remember well was a quiz to help me learn French that I adapted for Swahili when I moved to Tanzania.

There's a special magic to having tools that you can hold in your hand, and the touchscreen interface adds a more personal interactivity to it. I'd like to be able to build tools for myself again that fall in that category. I'm going with Android because it's easier to get dev hardware (e.g. I have a Nexus 5X lying around) and I don't need Apple hardware to run the development environment. I do have a Macbook Air, but it'll struggle with XCode. I've been looking at a new development laptop, and it just makes more sense to go the Thinkpad-with-Ubuntu route.

This also means learning Java, which really isn't the problem --- it's learning the ecosystem and build tooling. Fortunately, IntelliJ makes it easier, but there's still a lot to learn here too. In fact, I had to learn Java last year while trying to build a plugin for Marathon last year, and it wasn't too bad. Some people have pointed out that I could learn Kotlin, but what I found writing Clojure was that not knowing Java really hurt. When your language is built on the JVM, it helps to the language it was built for. Learning Java doesn't preclude learning Kotlin later, but it does make my life easier (I think). Maybe there's a little hesistation to learn Kotlin given how utterly painful learning Scala was (and I've written Haskell before).

Other skills

Not having a formal CS background has made learning some of the more advanced stuff more difficult. It definitely made the AI course that much more difficult, though it was more the math side that made the ML course challenging. I've been able to mostly learn what I need from the math side as I go, but now it's also time to spend time getting really comfortable with the foundational CS topics: discrete math, linear algebra, data structures, and algorithms. I'm defining comfortable as building solid intuitions for things, even if I don't remember the details. As the old wisdom goes, it's rare that I'll need to implement a hash map or a binary search tree, but having an intuition for their properties means being able to make informed decisions in the design stage of problems.

New hardware

I'm really not keen on buying more hardware, given how much I already have (the Pixelbook, an X200, an X220, the macbook air, the XPS-13), but I think I'd like to ditch the XPS-13 and pick up a new Thinkpad over the next couple months. I just bought the Jetbrains tools to make my life easier, but the machines I have are struggling with running it. I compared a new Macbook Pro to the T470, and for several hundred dollars, I could get a shiny new laptop with half the memory and a weaker processor. It's admittedly kind of weird being in a spot where I can't just write code on a netbook (the nice thing about doing embedded development and C/C++/Go in general), and weird to be using an IDE instead of vimacs.

Afterwards

This round of learning is focused on getting the background and skills to build interfaces and infrastructure for problem solving. Once I do that, I think it'll be easier to start solving the problems: throwing in some data cleaning and statistics (machine learning), CV, NLP, etc. It's maybe more boring tech, but it's somewhat foundational to the way the world works right now.


Tags: