How to game on Azure while minimizing cost

Posted on 28 April 2020

I left my desktop at school when I left when the campus got shut down, but I still wanted a way to ‘play warzone with the boys’. I experimented a bit and have found what as far as I can tell, is the cheapest way to set up a cloud machine game on Azure.

Costs/Savings for a cloud gaming machine breaks down like this:

  • VM per hour pricing
    • Switch to spot pricing
    • Deallocate (stop from portal) when not in use
  • Storage: monthly cost + disk operations cost
    • Avoid managed disks: by default, VMs are provisioned with a 127 GB OS disk. If you make this an HDD, this runs up to ~5/month in fixed costs. And then expanding this or making a data disk for game data runs up your costs a lot more, and charges you even when you’re not using the machine. What’s more, you get charged for disk operations when it’s in use
    • Store game data as a block blob and extract to the temp disk to avoid page blob charges and the associated disk operations costs. The temp disk also has almost 5x the performance of a premium SSD managed disk in my experience. Downloading/uploading is incredibly fast with 40 gigabit network interfaces installed on the VMs (although storage performance will bottleneck)
  • Network costs: only outbound data is charged
    • Make sure all storage and VM resources are in the same region
read more

Dry Canyon Hike

Posted on 26 April 2020

Trail conditions as of 4/26/20: Towards the end of the dry canyon trail, there’s a bit of snow, but nothing I couldn’t handle with my pair of trailrunners. As you can see from the Strava recording, I went past that and to the trail to the top of big baldy, where there’s quite a bit of snow. I ultimately didn’t attempt the final summit of big baldy because I was alone due to social distancing so wanted to err on the super safe side, but it looked doable. It’s about half a mile out from where my recording ends.

read more

Social Distancing

Posted on 04 April 2020

I have done this trail so many times in my life, still never gets old.


Posted on 08 March 2020

View this post on Instagram

A post shared by Jimmy Xiao (@jimmyjxiao) on

Making RGB LED projects that pull from REST APIs easier

Posted on 30 November 2019

Project Github Link

This is a framework I wrote that helps you create solutions that use a lot of RGB LEDs that are used to indicate statuses of various things pulled from web APIs. It’s written for ESP8266, but I don’t imagine it would be especially hard to adapt to other microcontroller platforms, especially if they’re arduino based. It’s got some nice abstraction logic to help handle multiple port expanders (MCP23017) and addressable LEDs (WS2812). I wrote it initially for this project.

read more

Map with weather of airports around the country

Posted on 29 November 2019

Pictures are worth 1000 words, so here’s what I’m talking about:

I have a friend who’s a private pilot, and bought a map with a bunch of airports and airspace stuff on it (actually two of them on accident). I decided to work with him to put RGB LEDs in various airports to indicate flying conditions in real time. Apparently, these are called METARs, which to save you a search because I had no idea what it meant either, stands for METeorological Aerodrome Reports. We used the API from the Aviation Weather Service from NOAA, which returns the information in XML, which we parsed with TinyXML2.

Since it would be making web requests, an ESP8266 seemed like the logical choice for the platform that controls all of this. A similar project online used a Raspberry Pi, but in my opinion, that’s overkill and more expensive that it needs to be (we’re both college students, cheap = good). We bought the ESP-01 tiny version of it at first, which worked, but using an Arduino to interface with it and dealing with the associated voltage conversions and holding certain pins low to flash and what not was incredibly frustrating so I ended up getting a NodeMCU instead. Much easier to work with.

We pasted the map onto a giant foam board we found with glue, then drilled holes for LEDs. My initial solution had a common annode LED for each of the 20 airports we planned to do, but my friend thought 60 wires running back to the breadboard (3 for each LED) was excessive. I don’t want to admit it, but he’s probably right; it would’ve been a giant pain to wire up. Instead, we got these addressable LEDs. These are pretty nice, I have two rails of 5V and GND that all the LEDs could connect in parallel to, and then they just get daisy chained up to each other through the data pins. The code used is all here.

Since the initial solution involved using a bunch of non-addressable LEDs, and we ended up using the WS2812 based LEDs, I made a framework that simplifies projects that use a lot of RGB LEDs and pull from REST APIs using the ESP8266. Check it out!.

Some the airports were chosen based on sentimental reasons and others just to get a picture of what’s happening around the country. If anyone’s curious here are the airports we did: BOS,​JFK​,PHL​,DCA​,RDU​,ATL​,MSY​,DFW​,MCI​,ORD​,OSH​,DEN​,SLC​,BZN​,SEA​,SFO​,LAX​,CLT