Alex W.'s Blog

Recent content on Alex W.'s Blog
https://blog.alexwendland.com/ (RSS)
visit blog
How to avoid losing items? Holding pens.
7 Jul 2024 | original ↗

I put it in a safe spot. -- a phrase my mom would always say when she’d lost something. Why do we lose things inside our homes? When we are interrupted or need to hastily respond to a new demand, we often make quick decisions about where to place physical items. We always place them in locations which make sense given our current state of mind,...

Situational Awareness hot takes
19 Jun 2024 | original ↗

situational-awareness.ai Situational Awareness is submarine marketing so Ilya can raise a fat round for SSI. Situational Awareness overstates algorithmic improvements because benchmarks are in the training data and models can’t operate on out-of-distribution questions. Situational Awareness overstates future algorithmic progress because...

Can a product with "0g sugar" contain lactose?
3 Mar 2024 | original ↗

I am severely lactose intolerant, so I strictly avoid lactose in my diet. Unfortunately, there is no lactose free label1. However, lactose is a sugar. So, can you use the sugar entry on a nutrition label to determine if a product has zero lactose? Firstly, is lactose including in the analysis of “Total Sugar” on an FDA mandated nutrition label?...

DRAFT: Notes on Responsible AI Companionship
28 Jun 2023 | original ↗

Thesis: AI companions will be mainstays in human life. We can learn from the past 50 years of technology companionship to guide this next era. Social surrogacy - people spontaneously seek out social surrogates when real interactions are unavailable. Phase 1 - Television (general parasocial, mitigates feelings of loneliness) Phase 2 - Social media...

To combat Altruist, Schwab should buy Advyzon
8 May 2023 | original ↗

Summary Altruist’s1 bundled custodian + platform software model presents an existential threat to Schwab & Fidelity’s ~$5T AUM hold on the independent RIA market. Altruist is making a classic disruption play, and, as of April 2023, they’re on the brink of stage 4 of the Disruptive Innovation process. Schwab & Fidelity need to address their...

Healthcare 🩺
16 Mar 2023 | original ↗

Resources Of the 100s of articles/podcasts/books I’ve read, these are the best concentrations of healthcare knowledge that I’ve come across: EconTalk | Podcast | Vivian Lee: The Long Fix - overview of hospital procedure pricing and broken market incentives in healthcare EconTalk | Podcast | Adam Caifu: Ending Medical Reversal - discussion about...

Recommended 1:1 Topics for Early Employees and Startup Executives
17 Feb 2023 | original ↗

Across the startups I’ve been at I’ve seen early employees struggle to know what to talk about with C-suite executives in 1:1s (one-on-ones). Early stage startups are small enough that most employees have monthly or even weekly 1:1s with the CEO or other executives. These executives usually have their hands too full to provide the usual career...

My programming trends from 2020 to 2022
2 Jan 2023 | original ↗

I use a program called Wakatime to track my IDE usage. In 2021, I was in the top 10% of all users. In 2022, I decreased substantially, matching my career transition from software engineering to product management. I spent 120 hours actively using an IDE in 2022 I was pleasantly surprised to see only 6 hours of software engineering work for...

30+ houseplants in a New York City apartment
22 Dec 2022 | original ↗

As of December 2022, I’ve got 34 houseplants1 in my 14’ x 14’ apartment in Manhattan. They take <3 hours of maintenance per month and bring freshness and nature into my life. I’ll run through my maintenance tips, unique challenges I faced in my NYC apartment, and FAQs I get about my plants. Maintenance Tips I’ve learned 2 tricks for easy...

The FDA approved Luminopia One
20 Oct 2021 | original ↗

On Wednesday morning I got a call from Scott Xiao, Luminopia’s current CEO, letting me know that we’d finally done it: Luminopia had an approved medical device. 5 years ago when we had our first face-to-face with the FDA, Scott had forgotten his Canadian passport so he wasn’t even allowed into the building. Congrats Scott and Dean! What a journey...

Chunked Iteration in Python
20 Sept 2021 | original ↗

from typings import Generator, Iterable, TypeVar ChunkT = TypeVar("ChunkT") def chunks( iterable: Iterable[ChunkT], size: int ) -> Generator[Iterable[ChunkT], None, None]: """ Break *iterable* into lists of length *n*: >>> list(chunked([1, 2, 3, 4, 5, 6], 3)) [[1, 2, 3], [4, 5, 6]] The last yielded list will have fewer than *n* elements if the...

Onboarding to Python, FastAPI, SQLAlchemy (2021)
19 Sept 2021 | original ↗

Several key pieces in Pinwheel’s tech stack are: Python (CPython) - Language + Runtime FastAPI - Web framework Pydantic - I/O data object validation Starlette - ASGI framework uvicorn - Event loop ASGI server SQLAlchemy - ORM psycopg2 - Postgres DB driver Here are a collection of articles, notes, books, etc. I thought were particularly helpful...

Big Trees 🌳
21 Apr 2021 | original ↗

Other great big tree websites: Gathering Growth Foundation Maui, HI - April 21, 2021 Lahaina Banyan Court. The largest ficus benghalensis in the USA and has its own Wikipedia page. Planted in April of 1873 (148 years before this photo). It’s grown to have 16 major trunks, each of which looks like it’s own tree until you notice the connecting...

Developer Resources 💻
9 Mar 2021 | original ↗

Learning + References Accessibility a11y project | collection of accessibility resources, including a checklist to audit websites Algorithms Algorithms by Jeff Erickson Android ADB Commands — Part III - ProAndroidDev Architecture Realworld implementation w/ different frameworks The Majestic Monolith - Signal v. Noise The Architecture of Open...

2021-03-01
1 Mar 2021 | original ↗
Citi loses $500M, and why verification UIs should switch modes
18 Feb 2021 | original ↗

This is hilarious. Last August, Citigroup Inc. wired $900 million to some hedge funds by accident. Then it sent a note to the hedge funds saying, oops, sorry about that, please send us the money back. Some did. Others preferred to keep the money. Citi sued them. Yesterday Citi lost, and they got to keep the money. -Matt Levine @ Bloomberg Here’s...

Release: wasm_spec_kernel - a Jupyter kernel for WebAssembly
31 Dec 2020 | original ↗

Testing out WebAssembly features that are only present in webassembly/spec’s reference interpreter is hard because the interpreter is written in OCaml and can’t be run on the web. So I created a Jupyter kernel that interfaces with its REPL. Now you can showcase WebAssembly code in a Jupyter environment. Find the package on PyPi: Explore the...

Debug/trace logging in a custom Jupyter kernel
28 Dec 2020 | original ↗

I was unable to get Jupyter to report any logs from my custom kernel, even when I was running jupyter labs --debug. This was the case for both print calls and logging.{critical,debug,etc.} calls. To work around it I configured my kernel’s logger to write to a file using logging.basicConfig(filename="kernel.log"). The Jupyter runtime can’t eat...

Extract color configurations from an iTerm profile
17 Nov 2020 | original ↗

Moving colors from one iTerm profile to another is difficult because all the color configurations appear as separate, un-namespaced entries in the profile’s exported JSON. The following jq command can be used to pull out all the configuration items that have a "Red Component" sub-property, which all the color properties will have. jq...

Script the installation of .deb packages that have configuration prompts
7 Nov 2020 | original ↗

Some packages open up a terminal UI to ask you several questions after you install them with dpkg -i. If you’re trying to install the package using Ansible apt’s deb feature then the installation will hang forever while it waits for these prompts to be answered. You can pre-answer all of the questions by using Ansible’s debconf feature. To figure...

Translucent status bar in PWAs on iOS
25 Sept 2020 | original ↗

There is an incantation to get a translucent status bar in a PWA (progressive web app) on iOS, e.g. the first image vs. the second image: Though the screenshots omit it, this is particularly relevant to phones that have “The Notch” (see CSS-Tricks). You need to: Add1 the tag (source) to the section of the HTML file Add1 the tag (source) to...

Different Homebrew formula approaches (for `go` binaries)
16 Aug 2020 | original ↗

homebrew-core requires binaries to be compiled from source, you can’t just download an asset from GitHub Releases and then use the bin.install command to setup the binary. If you’d prefer to use the pre-compiled you can’t introduce your tool into homebrew-core, ie. it won’t be installable with brew install toolname. Instead you can create a tap...

Supporting CLI programs in `subprocess.run` on macOS & Windows without `shell=True`
14 Jul 2020 | original ↗

In Windows, subprocess.run uses CreateProcess (docs) which (appears to?) only identify .exe files by default. Therefore when trying to run something like the heroku CLI using subprocess.run('heroku') it fails with [WinError 2] The system cannot find the file specified. Using where heroku I can see that it has two executables at: C:\Program...

Using `filetype` to guess CHK files in FOUND.000
6 Jul 2020 | original ↗

What is “FOUND.000”? From https://www.howtogeek.com/282798/what-are-the-found000-folder-and-file0000chk-file-in-windows/ Windows’ built-in chkdsk tool, short for “Check Disk”, creates this folder and file. Windows automatically runs Check Disk when it notices a problem with a file system. Those .CHK files are fragments of corrupted data—rather...

Sending email from a forwarding-only address in Gmail
2 Jul 2020 | original ↗

The Harvard Alumni Association offers a forwarding-only email address for alums at custom_username@alumni.harvard.edu (anyone with a Harvard Key can access it here). They state that, A forwarding address is not a stand-alone email account. Rather, it is a service that will forward messages to your existing email address. … By default, your...

Custom JSON payload for *Get contents of URL* in iOS Shortcuts
1 Jul 2020 | original ↗

The Get contents of URL action in iOS Shortcuts conveniently has a JSON payload type. However, this default type only supports objects at the top-level (e.g. {"key": "value"}, you can’t submit a top-level array (e.g. [{"key": "value"}]. To work around this create a Text action in which you manually author the JSON (e.g. [{"key": "VARIABLE"}]) and...

TypeScript, Lerna, and .dockerignore
25 Jun 2020 | original ↗

This approach ignores everything by default and then whitelists what’s permitted. Or at least it takes that approach for the top-level directory but has to explicitly restrict nested directories because exception statements don’t support wildcard directories. * !package.json !yarn.lock !lerna.json !tsconfig* !packages/ packages/*/dist/...

Connecting to host machine from Docker container on macOS
21 Jun 2020 | original ↗

This is from a note I wrote in 2017, there is likely a better way to do this in modern Docker. Inside the container run sudo ifconfig lo0 alias 10.0.2.2. This will add 10.0.2.2 as an alias for the loopback interface Now, the container can talk to the host by targeting 10.0.2.2 Caveats: MySQL restricts user access by origin, therefore 10.0.2.2...

How to work with streams in `got`
19 Jun 2020 | original ↗

Calling got.stream(url, options?) returns a duplex stream with additional events. This stream can be read from (e.g. listening to the data and end events) for retrieving the response body, and can be written to (e.g. calling write(data) and end()). If the stream is not read from then the response body will not be downloaded. The additional events...

How to implement max download size with `got`
19 Jun 2020 | original ↗

The sindresorhus/got documentation provides a hooks based approach which can be found at Advanced Creation: Limiting Download & Upload Size. You can also use got.stream(...) to implement this functionality in a manner that avoids any response body download if the content-length header indicates that the download will be too large (the sample in...

Feedly intentionally sets the wrong RSS date
17 Jun 2020 | original ↗

I was trying to figure out why my RSS feed was showing the wrong article times in Feedly, even though they looked right in other RSS readers. I finally found the answer at https://feedly.helpscoutdocs.com/article/323-my-article-is-showing-the-wrong-date The main date that is important is the date in the RSS feed itself. If the article gets...

Tasks and Promises in fp-ts
16 Jun 2020 | original ↗

In fp-ts a Task is just a a lazy Promise, eg. () => Promise, since Promises are eager normally (ie. they execute their computation when created, not when await-ed on). See getLine in fp-ts-contrib for an example. A TaskEither is for representing Promises that can reject. The reason the tryCatch method, intended for converting a Promise to a...

Release: bedsheets - use Google Sheets as a RESTful DB
9 Jun 2020 | original ↗

Google Sheets has a bunch of wonderful database features: built-in version control, collaborative management, a great table browser, powerful data processing functions, and basic visualization tools. There are a few libraries and SaaS offerings that let you use it as a serverless DB, but they either 1.) cost money, 2.) require you to depend on a...

2020-05-20
20 May 2020 | original ↗
Graduated from Harvard
17 May 2020 | original ↗

’twas a virtual graduation thanks to COVID. Fortunately, Conan O’Brien was the class day speaker and used the format well (video). Thanks to the advanced standing program I was able to accelerate my graduation, so I only graduated 1 year behind my original class. I took 27 wonderful classes in college. Here they are in the order they appear on my...

Senior Thesis: WebAssembly as a Multi-Language Platform
10 Apr 2020 | original ↗

I submitted my undergraduate thesis for Honors in Computer Science at Harvard on “WebAssembly as a Multi-Language Platform”. My advisor was Professor Nada Amin, and my readers were James Mickens, Stephen Chong, and Eddie Kohler. Where to find it: awendland/2020-thesis - GitHub repo containing the thesis awendland/webassembly-spec-abstypes - my...

How to Backup Google Drive to S3/Hard-disk
24 Nov 2018 | original ↗

As reliable as Google is, it can be worrisome to depend solely on one company to maintain all of your data. In both my personal and startup life, I’ve kept all of my non-code data in Google Drive. Besides two instances in the past 4 years, during which Google Drive was inaccessible for a cumulative 6 hours when I needed it, everything has been...

npm Install Hook Scripts: Intro (Part 1)
21 Nov 2018 | original ↗

npm1 is the de-facto package manager for JavaScript code. Though initially intended for use with node.js, it’s expanded to managing dependencies on the frontend as well. npm makes a developer’s life substantially more convenient, but it provides that convenience at the cost of security. In particular, npm is happy to auto-execute package scripts...

2018 Yarn vs. NPM
8 Jun 2018 | original ↗

With NPM’s recent acquisition of ^Lift Security and the Node Security Platform, as well as the release of their package-lock.json and the npm ci command for reliable CI installations, it seemed like a compelling time to reavaluate the value proposition of Yarn. Plus, for some reason Yarn kept giving me 401s on our CI two weekends ago for some...

2018-06-01
1 Jun 2018 | original ↗

Co-founder and CTO at Luminopia, where we were working to cure lazy eye (the team’s working on even more now!). Checkout some coverage of an early clinical trial we ran at BCH, a writeup by the Ophthalmologist, some SXSW coverage. Plus, The Crimson asked me for a brief statement and HBS wrote-up a case study on us, if that’s your thing.

2016-05-16
16 May 2016 | original ↗

Woohoo! Fun college things! One of those fun college things was Datamatch, a website started in 1994 at Harvard where people fill out a questionaire and then are matched with their perfect soulmate on Valentine’s Day and given a free meal with them. I also worked with Harvard College Consulting Group, looking at user retention for a big 3 cable...

2015-08-01
1 Aug 2015 | original ↗
The Second Quarter of 2015: Projects
13 May 2015 | original ↗

Following the spirit of The Second Quarter of 2015: Items, I’m going to also post an infrequent summary of the projects that I have been working on and other transgressions that have occurred as of late. New McConnell Brue Macroeconomics Glossary - (School) Python - GitHub I was getting tired of constantly searching through my textbook’s glossary...

The Second Quarter of 2015: Items
13 May 2015 | original ↗

I was inspired by a website I stumbled across on called My Faults My Own by Ross Rheingans-Yoo in which he keeps a live post for each month where he lists worthwhile articles he’s read and other things he “would like to signal-boost, but won’t take the time to do full writeups on”. I enjoy the idea substantially, and with this post am commencing...

Particle Network Animations in JS
20 Feb 2015 | original ↗

I just did a minor revamp of the TEC Club homepage in order to include a live, JS generated network of floating dots. Opaque interconnections will pop to life when the dots travel within 100 pixels of each other. On mouse over, the connections will fade away and the dots will grow increase in opacity. It can be quite entertaining to watch. I...

Algorithmic Art in Javascript
10 Aug 2014 | original ↗

I was reading the solution to a problem on Stackoverflow when this thread caught my eye http://codegolf.stackexchange.com/questions/35569/tweetable-mathematical-art/. People were challenged to come up with concise functions for Red, Green and Blue to be called on each pixel in a 1024x1024 image. Furthermore, the functions had to total less than...

Linux Terminal Batch Download One Liner
26 May 2014 | original ↗

More than once I’ve come across a situation where I’ve needed to download a set of files from a website, all on the same page, and all with a similar HTML markup pattern. Additionally, I’ve come to fall in love with the Linux Terminal and all of its easy-to-use commands. So, here’s a mashup of the two! I wanted to download all the (free, legal)...

Android, the better UX?
28 Mar 2014 | original ↗

Intro What’s the best looking smartphone? Quickly the obvious response is given, “iPhone”. The leader in innovation, design, functionality, usability, friendliness… et cetara. I’d like to challenge this widespread assumptions and propose that, in fact, Android provides a better net user experience. I’ll start off with one stipulation, this...

AlarmManager, BroadcastReceivers, Activities! Oh my!
27 Aug 2013 | original ↗

Intro This article is the result of hours of frustration, research and lack-of-understanding on my part. I went out with the simple goal of implementing a timer function using Android’s AlarmManager class. With ease and efficiency, traits I have come to expect when using the Android APIs, I got it working in under 15 minutes. It was made of three...

An Ongoing Comparison of Brackets and Sublime Text 3
3 Aug 2013 | original ↗

Intro I’ve worked on a few frontend web projects before and mainly used Aptana Studios 3 for all my IDE/Text Editor needs. Mainly this was because Aptana is based on Eclipse and I have done a significant amount of development in Eclipse. Aptana suited most of my needs, I especially enjoyed the built in FTP syncing and code formatter, but lacks...

A Foray Into AngularJS
3 Aug 2013 | original ↗

Intro So I’ve recently finished the Java backend for a project that I’m working on and now I need to get the frontend up and running. I’ve done some meager frontend stuff before, basically a very very simple single-item POS system, but I found myself a tad disgusted with the JQuery-Constructor pattern I was using. There were so many callbacks, a...

Robotics, a subject that's lacking
27 Jul 2013 | original ↗

In light of the lack of STEM and modern technologies training, such as Programming, Computer Architecture and other High-Tech areas, I would like to do my part by starting a weekly Robotics class. Why have this class? Robotics is a combination of subjects that implements a wide range of advanced current technologies. It teaches skills in...

STEM, training that matters
23 Jul 2013 | original ↗

The Problem An elementary school’s core curriculum covers basic math, English and science. However, some schools, due to their success in finding funding through the school district or strong parent communities, are able to provide cultural education with music and art classes. More specifically, 94% of elementary schools nation wide provide...

SAT Prompt 1
17 Jul 2013 | original ↗

Hello, again. I am quite disappointed in myself for not writing another blog post until now. Of course I can come up with a myriad of excuses, but the problem is simply that I didn’t write anything and in hindsight that is all that matters to me. As a sorta-kinda form of punishment, today I am making myself write a post containing my response to...

Why start a blog?
9 Jul 2013 | original ↗

Why would I dedicate time to writing a blog? Probably for the same reason many people dedicate their time towards writing their blogs: they hope to develop themselves further by sharing their thoughts and knowledge with others. At least that seems like a profound enough sounding reason for me :) I’ve wanted to start a blog for a couple years now...

2011-09-01
1 Sept 2011 | original ↗
Disable Right Click
8 Jun 2011 | original ↗

Here is some code I modified from DynamicDrive to disable right clicking on my school website: