Why Do They *Think* That?
•October 23, 2022 • Leave a CommentEssays you didn't want to read
INTRO: What this Essay Will/Won’t Cover
Someone recently asked on Twitter why people seem more upset about others visibly protecting themselves from Covid (which is perceived as doing “too much”) than they are about the death and disability that can result from infection.
Being me, I chimed in, and then was asked to elaborate. As I said Over There, a serious answer is more than a Twitter thread, or even an essay; it’s a book, and plenty of books have been written about how and why people think obviously wonky things. (I’ll cite a few at the end of this piece, for those wanting a deeper dive.) But there are some obvious cognitive heuristics, biases and fallacies that come into play, and if people want to know just a bit about them (but don’t want to learn it from Wikipedia, which does a pretty good job with this stuff), I…
View original post 5,399 more words
COVID CO2 Tracker: getting started with realtime upload!
•June 1, 2022 • Leave a CommentA few months ago, I finished work on the prototype for an android client app that uploads measurements to my COVID CO2 tracker app in realtime!
While talking to prospective beta testers, I’ve just written the instructions each time in private messages. I will keep this blog post up to date with instructions. I will improve the user experience as time goes on (and more people use it), and plan to make it easier!
The majority of configuration happens via the Co2Trackers.com interface. This was much easier for me to implement – I could reuse a lot of code! – but also means it may not be obvious when you install the android app at first.
The configuration is actually much the same as it is for uploading your first measurement manually, and at the moment, you need to add a single measurement for the location manually to begin. Watch the instruction video linked on the home page for instructions.
Then, select a sublocation from the drop-down, and the “choose place for realtime upload” will be available. Click it, then restart the android app. At this point, anytime you change the settings, you should restart the app.
Now, the app is ready to work! As long as the device is within range of the aranet4, you should see a “start background polling & updating” button. Once you click that, the app will start a service (you will see a bar in the notification area!) and you can minimize it by hitting the home button. The app will now upload data automatically.
I am working to make the app automatically start when your device starts up, but as of writing, you need to start it again (and click the “start background polling and updating” button) each time you reboot the device! This feature is fairly annoying to develop and debug, but it’s something I should roll out next.
Limitations
The app currently uploads one measurement every 15 minutes, not the measurements in between. The GATT characteristic that returns all recent measurements is undocumented and I have not reverse engineered it.
I currently only support one device at a time right now. I don’t even have enough beta testers to worry about multiple sensors yet 😉
6 Months of guerilla CO2 measurement with the COVID CO2 tracker
•August 10, 2021 • Leave a CommentIt’s been six months since I started work on an app to crowdsource CO2 measurements as a COVID mitigation effort. Volunteers (“CO2 guerillas”) across the world have since added nearly 600 measurements to the database, as part of an effort to document safe and dangerous indoor spaces.

The app (deployed at: https://covid-co2-tracker.herokuapp.com/home) was born out of the need to improve indoor air quality in the middle of a highly contagious airborne respiratory pandemic. Somehow – more than a year into this – governments around the world deny the very fact that this virus is spread through the air, not through surfaces and “droplets”. This was obvious from the very beginning to me, and to hundreds of aerosol scientists, safety engineers, HVAC specialists, and even entire countries where SARS-1 epidemics hit in the past.
Continue reading ‘6 Months of guerilla CO2 measurement with the COVID CO2 tracker’React internals: Fibers
•August 22, 2019 • Comments Off on React internals: FibersIf you’ve ever worked with a complex framework like React, you might know that there’s a LOT going on behind the scenes to make everything work. Libraries like boost are infamous for their complexity, and the complex programming responsible for their useful features.
React, a javascript library for building entire frontend web apps, has the same complexity. It maintains an entire emulated DOM (to attempt reduction in browser-side re-rendering), extensions to Javascript (JSX, for embedded pseudo-html syntax), state management (to update the UI by comparing the emulated DOM with updates), and insanely complex backends for implementing everything uniformly.
Functional Programming vs Object Oriented Programming
•August 14, 2019 • Leave a CommentWritten by myself, Tomas Engquist, and Harpreet Ghotra. They each did more than their share of the work!
Continue reading ‘Functional Programming vs Object Oriented Programming’
querySelector vs getElementByID
•August 1, 2019 • Leave a CommentA quirk of modern Javascript is that we have (at least) two ways of programmatically finding items in the DOM. querySelector is the newer of the two, dating to 2013, and is the more powerful one. It has a fancy syntax, and lets us write complex queries for groups of elements, classes, and subelements. But more powerful isn’t always more betterer.
It turns out that the added complexity means getElementByID is about twice as fast as querySelector. They’re both pretty fast, but I’m going to look into why getElementByID is faster.
Processing audio in the browser!
•July 18, 2019 • Leave a CommentThe modern web is an amazing place. You can do almost anything in a browser that you can do in native code. Including processing audio in realtime. In javascript.
Nuts? Probably. Worth it? Definitely.
Ruby on Rails testing goes parallel – a deep dive!
•July 2, 2019 • Leave a CommentIf you ever work on large software projects, you’re bound to spend a LOT of time compiling code, running unit tests, and lots of other non-code stuff.
Since programming is really thought-intensive, any focus breaks are really disruptive. Even a ten second test suite is enough to break a train of thought. What can we do to improve that? Parallelize it of course!
Continue reading ‘Ruby on Rails testing goes parallel – a deep dive!’
Diagnosing Ruby require_relative issues with DTrace on OSX
•June 20, 2019 • Leave a CommentRuby, like many programming languages, has a C-like mechanism for using code defined in other files. It’s critical for the development of any serious program, but it’s also prone to weird errors when files aren’t included in the proper order, or not included at all. It’s usually pretty obvious which file you’re not require_relativeing, but there are times when the only way to make sense of things is to trace the system calls.
On Windows, Process Monitor is by far the best way to diagnose this sort of problem. It gives a useful trace of just about everything a process does. I’ve used it many times before to diagnose file loading issues, and weird compiler errors. Similarly, strace on Linux traces every system call.
But what about OSX?
Continue reading ‘Diagnosing Ruby require_relative issues with DTrace on OSX’



