Posts
Uline Design
A shipping supply catalog is an odd place to seek design inspiration, but hear me out. I believe that the Uline print catalog is impeccably designed. At less than an inch thick, it somehow contains 907 pages of pure design bliss. Every product inside is advertised in exactly the same, boring manner. Each listing contains:
- A heavy title in all caps, such as SHIPPING LABELS
- Up to, but no more than 5 bullet points describing the product. The bullet points are double-spaced apart, and never contain more than about 15 words. Many are much shorter
- An image, usually paired with a relevant caption. The caption never merely describes the image, but provides a place for additional product data, such as a SKU number
- A table of product information, to inform a purchasing decision
And that’s about it. This information framework is extremely consistent throughout the catalog. There are very few design cues present, yet there are absolutely zero people in this company’s target demographic who would fail to grasp their offering.
testLanguage Specialization
I began programming professionally in 2016, and after about 8 years and change, I finally feel ready to pick a language to specialize in. I’ve decided that Python is that language. Here is why.
Intuition
Something about the language clicks with me. While I’m not a huge fan of magic methods, the majority of these methods (a.k.a. dunder methods, short for double-underscore methods) in Python feel sensibly-named to me. That’s not to say they are the most-sensible names for what they accomplish - but I feel like they provide enough info to hint at what they accomplish, without being overly verbose.
testSnow Crash State of Mind
In high school, I became very interested in philosophy, psychology, and current events. This was by way of a couple clubs I was involved in - Speech & Debate and Model UN. Yes, I am ashamed to admit I was one of those kids. The uber nerds, the try-hards, the Ivy-League wannabes. I even dressed the part, unnecessarily wearing (rather ugly) dress shirts to school because I thought “people will take me seriously”, which someone quoted me as saying in the yearbook.
testShooting Garbage at the Sun
SpaceX recently promised to bring the cost of getting cargo to space down to $10 per kilogram. At the same time, Starlink is placing thousands of satellites in orbit to beam information to every corner of Earth. Both of these futures seem to promise that Earth’s garbage problem will soon become space’s garbage problem. What are some potential solutions to this problem?
-
The Orbital Wedge - a trapezoidal prism will be placed in a static orbit, and oriented with it’s large side facing Earth. Three sides shall face away from Earth - the top, and the two sides which angle towards the top. Any sufficiently small object which impacts it will be ejected away from Earth, thus clearing out the Earth’s orbit of space junk.
testDarkroom Experiment #1
Darkroom photography has always been a side hobby for me. Pursuit of this hobby imparts a feeling that no other hobby of mine does. Recently, a colleague curiously inquired about this hobby. I took this interest as a sign for me to get back in the darkroom, and two weeks later, I’m mixing my own bio-friendly developer chemicals, Colorado-style.
Caffenol
Order powdered Vitamin C.
Research something called “washing soda”. It’s the younger brother of baking soda, but somehow also safe. It’s for washing clothes - don’t drink it.
testJumbo Jet Mind
A tech founder recently one-upped Steve Jobs1 by describing AI as “like a jumbo jet for the mind”2.
What does that mean? To me, Steve Jobs comment that “a computer is like a bicycle for the mind” was about improved intellectual efficiency. Over 30 years later, this is still a fantastic analogy.
But a jumbo jet isn’t efficient - the amount of energy it takes to move a human from point A to point B is astronomically higher if they were to take jumbo jet, than if they were to go by foot. So the human wins on energy efficiency there. The jumbo jet wins on time efficiency.
testWeb App Performance Investigation
Problem
A Django web application is experiencing performance issues. Baseline tests show that the average latency to access an authenticated page is approximately 1500 milliseconds. This is not acceptable performance for a user interface1.
Approach
When faced with an engineering problem, a great place to start is by formulating tests that bisect the problem space. This allows one to apply binary search2 to the space, which is the same method that
testgit bisect
3 uses to assist a programmer in identifying the commit that introduced a bug.Diagrams as Code
A major pain point in the process of maintaining documentation is that, while a product is in development, documentation tends to go stale quickly. This can occur for a number of reasons:
- Engineers don’t know how to create useful documentation
- Documentation is kept separately from the work being done
- Only a small subset of engineers are tasked with creating and maintaining documentation
The first problem is a large challenge. Learning how to write good documentation is an entire course. Learning how to create good diagrams is an entire course.
testCatching Ideas
It’s not a good idea to maximize catching ideas.
The brain needs time to refresh itself. This is not meant to be a scientific claim by any means, merely a psychological observation. When an idea arrives, don’t race to write it down. Chew on it for a while. Let it stew. Turn it into food for thought.
Even this particular idea right now - that ideas aren’t precious - has been with me for some time. I only just figured out what the core thesis is.
testDjango Template Language
“Front-end” in web development refers to the visual appearance of an application or website. In Django, a web development framework, the front-end is created in DTL (Django Template Language), which is a superset of HTML (Hypertext Markup Language).
DTL represents the “what” of the page - the actual contents. The “how” of the page - how the page appears - is defined by CSS (Cascading Style Sheets).
testIncomplete CSS Cheatsheet
Introduction
Some running notes about CSS.
I first used CSS at least ten years ago. Since then, I have acquired knowledge and skills piecemeal. I recently decided to sit down and learn the best practices of the specification in 2023 from this site. Here are my summarized notes.
Table of Contents
The Box Model
content box
: artworkpadding box
: mounting boardborder box
: framemargin box
: space between each frame
__________ ________border box________ _______________________ | | padding box | | | _______ | m | ___________________ | m | _________________ | | | a | | | | a | | | | | | r | | | | r | | | | | | g | | |\---/| | | g | | | | | | i | | | o_o | | | i | | | | | | n | | \_^_/ | | n | | | | | | | | | | | | | | | | b | | content box | | b | | | | | | o | | | | o | | | | | | x | | | | x | | | | _______| | | |__________________| | | |_________________| | | | | | | __________| |________________________| |______________________|
Selectors
-
testselector
- what element is being styledProgrammer's Comedy
I’m not a one-trick pony;
I can do more things.
This is my, quote, “rally cry!”
for my interview at 3.I’m not a one-trick pony;
I can do more things.
Want to see a new haiku?
Off course you do, it’s free.Experts have systems.
Systems programmers have Rust.
That is my haiku.“That’s not so bad,
test
But we’re dying here, you see.”
The Humanities reply,
As you avoid eye-to-eye.Thinking Slowly
I recently purchased a mechanical, ergonomic, and split keyboard1. I love the idea of yet another tech gadget to keep me engaged.
However, I quickly found myself in over my head. This keyboard is programmable, so the first thing I did was spend several hours tweaking the keys to my exact preference. I soon learned that key placement wouldn’t solve my immediate problem - which was the drastic reduction in my typing speed. I went from typing 100+ words-per-minute on a regular flat membrane keyboard, to a paltry 20 words-per-minute and barely able to scratch 95% accuracy.
testPredictions for 2024
-
“Halvening” of bitcoin supply around May will result in the price of bitcoin reaching ~$100,000 USD, per the stock-to-flow model. https://www.lookintobitcoin.com/charts/stock-to-flow-model/
-
AI will enter another ice age, rather unexpectedly, after it is discovered that {company} helped generate a bunch of fake political ads (including faked audio and video)
-
The US will withdraw significant financial and military support from Ukraine
-
… in order to support Taiwan during a conflict that will break out in Spring 2024
testSoftware I liked in 2023
Here are some software programs I liked1 in 20232.
mermaid.js - Excellent tool for creating architecture (and other) diagrams from text. Add to a markdown file with special syntax. Renders in GitHub natively. Has some bugs, but team seems to have a good head on its shoulders and should hopefully work them out soon. 8/10
VSCode - One of the few things Microsoft hasn’t totally screwed up yet. Plug-in ecosystem is enormous. 9/10
testCheap Web Scorecard
I recently came across The “Cheap” Web, a self-described “solarpunk philosophy of web design”. I highly recommend reading the whole article, for it’s both a throwback to what the web used to be, as well as a vision for what the future may hold.
Towards the end of the article, the author proposes the following measures of cheapness. I decided to rate this website according to those measures.
Cheap to maintain
Definition: Most webpages should work indefinitely without falling over.
testEmpty Web Frameworks
Framework Popularity New project size # files React 1 340000K 38219 htmx * 44K 1 Angular 5 295000K 23757 Django 13 20K 9 Gatsby 24 542000K 47703 jQuery 3 88K 1 *: Not in top 34
Methodology
React
- Install React (via npm)
> npm install react > npm view react version 18.2.0
- Create a project
> npx create-react-project empty-react-project
- Analyze disk usage
> du -h -d 1 emptyDjangoProject 339M empty-react-project/node_modules 36K empty-react-project/public 368K empty-react-project/.git 32K empty-react-project/src 340M empty-react-project > find empty-react-project -type f | wc -l 38219
htmx
testIndian Philosophy
Preamble
Thinking, writing, and speaking about any ancient culture using modern English is extremely challenging. A great deal is lost in translation. Many religions, including Hinduism, strongly encourage the study of the religion in the original language. As a child, I learned Hindu slokas in Sanskrit, with only a tenuous understanding of what the phrases meant.
As a result, I am always hesistant to attempt to describe theories of
testBharathiya Darshan
, or Indian Philosophy, in English. The original texts, along with much of the analysis has been written and conducted in Sanskrit. I do not know Sanskrit - in fact very few people can claim more than passing acquaintance with the language.Prefer Markdown
I have spent a lot of time writing HTML. I wrote my first HTML when I was around 12 years old. I was obsessed with a website called
testneopets.com
, a website geared for kids to take care of virtual pets. There were games to play, coins to earn, and pets to splurge on. Items could be earned and sold in a “shop” to other players (for fake currency only). I wanted to customize my Neopets shop, which was allowed using this thing called “HTML”. This seemed like a fun way to test out these new typing skills I learned from Mavis Beacon Teaches Typing.AWS Cheatsheet
Compute Services
testECR
- Elastic Container Registry, stores images (e.g. Docker)
ECS
- Elastic Container Service, orchestrates/scales Docker containers
EC2
- Elastic Compute Cloud, virtual machine. Rent in cloud. Common use case is as a server for a web application. Do whatever on it though
Load Balancing
- Allows traffic to be distributed among multiple EC2 instances
Cloud Watch
- collects logs and metrics from EC2 instances
Auto Scaling
- defines policies to create new EC2 instances based on traffic, etc
Elastic Beanstalk
- More abstraction on top of EC2 and all the above services (aka PaaS - Platform as a Service)
Lightsail
- Even more abstraction . . .
Lambda
- Functions as a Service, aka Serverless. Code runs only when an event occurs. Only pay for requests and compute time, not constant uptime
Serverless Repo
- more abstraction on top of a Lambda
Outposts
- Runs AWS APIs on your personal serverFuture Business
In recent news, a new Silicon Valley startup is looking for funding. P2P (Penguins to Polar Bears) seeks one-hundred million dollars to repair the damage done to the penguin habitat after last year’s seed baby Btc (Bridge the Caps) built a bridge between the North and South Poles.
testLearning Hard Things
I took a total of one computer science class in my undergraduate degree. It was a CS class geared towards non-CS majors. The class started at 10AM, which was about 2 hours before my brain started functioning effectively.
In that class, we were shown many things. Variables! Inputs and outputs! Roman numerals! Classes! As a neuroscience major, I hadn’t the faintest clue what the point of any of this was. Was programming supposed to be this esoteric, this alien?
testAI helping a programmer
I am attempting to solve a homework problem that asks me to write a helper function to use in a later problem. I have gotten 95% of the way there with this function, written in Standard ML:
fun longest_string_helper f sl = foldl (fn (next, acc) => if f (next, acc) then acc else next) "" sl
The purpose of this function is to take a function
testf
and apply something called a left fold across each element of the list sl. Each answer is stored in an accumulator, which is instantiated to the empty string.The Automonk
Start at 0:00 ⏵ Pause music ⏸ Resume music ⏵The Automonk patiently paced the hall, chanting:
testFibonacci Standard ML
Challenge
Write a recursive function in SML that accepts one
i: int
argument and returns a list of Fibonacci numbers of lengthi
.Approach
Let’s approach this problem in 3 stages. First, we’ll write a function that generates Fibonacci numbers, without worrying about recursion or number of arguments. From there, we will progressively improve the function until it meets the requirements of the challenge.
Attempt 1
(* c: current, n: next, lst: list of numbers, i: count to generate *) fun fibonacci_1 (c: int, n: int, lst: int list, i: int) = case i of 1 => lst | _ => fibonacci_1 (n, c+n, n::lst, i-1)
This function accepts four arguments - the current number, the next number, a list of numbers, and the quantity of numbers to generated. For example,
testfibonacci_1 (1, 1, [1], 8)
generates the first 8 numbers and returns a list[21, 13, 8, 5, 3, 2, 1, 1]
.Untitled Story
Second Draft: Jan 17 2023
PART 1
In retrospect, the access to information humanity once had was severely underappreciated in its time. When the Internet was unveiled, a decent percentage of even the general public DID know that it would be revolutionary, especially after the proof was very clear in only 2 decades from its inception to mass adoption. Those early generations knew, through experiments in e-mail, instant messaging, e-commerce, and social media, that what they had was a MILLION times better than the world where even the most basic of services was a chore and not free.
testRisk Analysis for Software Projects
Revised: August 2023
Introduction
In regulated engineering, FMEAs, FTAs, and PRAs are common acronyms for risk management documents. Outside of that world, “risk management” is a bit of a snoozer of a topic. Behind this deceptive veneer lie some valuable tools that could benefit software projects at large, and not just in regulated environments.
One of these tools is the FMEA, or Failure Modes and Effects Analysis. Before diving into the FMEA though, let’s set up a little background information.
testProgramming Languages
I recently began a Coursera course called “Programming Languages”, offered by Dan Grossman at the University of Washington. I decided to take this course because the description advertises it as a way to understand the underpinning of all programming languages more thoroughly. When I first learned to program on my own, I always assumed that once I had more experience and learned more languages, I would began to understand the commonalities and differences between programming languages. However, years later, I still lack the big picture view that I desire.
testSquare One
The original version of this website was written using GatsbyJS, a headless CMS engine that’s all the rage right now in the world of web development. After a few weeks, I learned that it was tremendously overkill for a personal website with maybe a few dozen pages (including all my blog posts). Most importantly though, GatsbyJS is bloated with dependencies that take forever for me troubleshoot when all I want to do is add support for MathML.
testTechnical Communication
In every technical contributor’s career, they will be required to communicate technical work to a non-technical audience. This task typically manifests itself in the form of e-mail, instant message, and one-on-one verbal communication. As they rise through the ranks, they will eventually present their work to larger groups and higher ranks, but the basic lay-person communication task remains the same.
Throughout their career, every technical contributor (TC) will be required to summarized complicated details for a non-technical audience. Here are some tips for how to successfully approach these interactions.
testIdeas that Created the Future
In late July 2022, I began reading an excellent book called Ideas that Created the Future - Classic Papers of Computer Science by Harry R. Lewis. As I began exploring theoretical computer science in more detail, I immediately sought out “review” papers, which I recalled from grad school often provide a great overview of a particular subfield. These papers can be a bit lengthy, but the content is generally pretty digestible compared to culiminating work of a thesis, for example. A format like Ideas that Created the Future is ideal for someone new to theoretical computer science, such as myself. I’ve always been a huge fan of history, because I need the context of where an idea fits in time relative to the rest of its field. In Ideas that Created the Future, Lewis provides a brief introduction to each article to place it correctly in history and offer context to what challenges the author was facing and trying to solve.
testBenchmarking Rust with Criterion.rs
Introduction
Benchmarking is a method of systematically assessing a program for performance. This process is a valuable component of regression testing because it helps you compare changes and improvements to your code. The systems programming language Rust offers many statistically rigorous analysis techniques, such as the Criterion crate, which is a popular tool used for benchmarking in Rust. In this article, we’ll go into more detail on how to use Criterion to compare various Rust functions to solve a problem from Project Euler.
testParallel Processing in Rust
Rust is a systems programming language that is quickly gaining traction at well-known companies including Amazon, Discord, Dropbox, Meta, Alphabet, and Microsoft. It is built for performance, reliability, and productivity and has been voted the most loved programming language according to Stack Overflow’s Annual Developer Survey since 2016. Some large-scale commercial projects that have been built using Rust include:
- Mozilla’s Servo parallel browser engine
- Discord’s Read States service
- Polkadot’s Substrate blockchain engine
- Figma’s Multiplayer service
All of these real-world use cases of Rust utilize and benefit from concurrent and parallel processing, which can be daunting to implement on a good day, and pretty terrifying when implemented badly. Rust helps mitigate concurrency hazards by design, but it’s still up to the programmer to construct their program logic thoughtfully so they can take advantage of the power of concurrent and parallel processing.
testThe Color of Film
They say a picture is worth a thousand words, so I took that literally and built average color pictures for each episode in the first season of Game of Thrones. Each vertical line represents one second of the show. Here’s what I got : https://imgur.com/a/naPeJ.
Here’s some examples using a couple of popular movies: https://imgur.com/a/4g2lJ. Which movies do you think they are?
Source code for converting videos to film strips
FFMPEG is a convenient command line tool that can be used to extract frames from a video file.
testVisualizing NBA Pace
Part 1: Inspiration
I saw this post and knew immediately that I needed to do something similar for the NBA. However, I had a few things going against me. Unlike Pro Football Reference, Basketball Reference doesn’t have one single page containing every single game that’s ever been played. Rather, it is split up into season and months. And that’s because over 58 thousand NBA/ABA/BAA games have been played since the inception of professional basketball in 1946. This presented a challenge - I needed to store the outcomes of every single professional basketball game that’s ever been played in one location so that I could start analyzing data and finding trends. And that’s exactly what I did - I wrote an R script (getNBAgames.R) that builds a key-value pair of season:months, builds the URL where the games for that month are located, and then goes to that URL, gets the HTML table, converts it to a dataframe, and saves it as an R object. Then, I load the R objects into my Shiny app and feed the data into Plotly to generate heatmaps of the data.
testCar Temperatures in Phoenix
Using a wireless microcontroller, I monitored the temperature on my car’s dashboard and in the passenger footwell for a whole day during a particular hot spell in June in Phoenix. Even though I’m a Phoenix native, I was surprised by just how hot the inside of my car gets. The hardware components used were:
- Particle Photon
- 2 Amphenol MA100BF103A NTC thermistors
- 3 C batteries (the heat really saps the batteries)
The programs I used for recording and processing data were:
testlinkTitle = “Abstractions and Interfaces” shortTitle = “Abstractions and Interfaces” title = “Abstractions and Interfaces” draft = true genres = [“technical”] date = 2023-09-01 +++
Hypothesis
The lower the level of abstraction in an application, the easier it is to interface with other applications.
Definitions
application
: A piece of code written in a domain of knowledge I’m familiar with.Criteria
“Ease” is defined as speed at which a 99% correct implementation can be developed by a programmer with familiarity in the domain. This can mean they have hands-on experience in the field and understand some of the jargon.
test
-