Charles Lee

Books I Read in 2022

Inspired by https://florian.github.io/reading-2019/


Down Below

Down Below

by Leonora Carrington, published 1983

This book describes Carrington’s ~1-year stay at a mental institution in 1940. Her story starts at the beginning of World War II in 1940, when her husband Max Ernst is sent to a concentration camp for the second time and she escapes to Spain. Carrington’s mental breakdown manifests en route to Spain and becomes publicly disruptive while in Spain. Her hotel, in conjunction with people probably related to her father’s company, traps her and sends her to a mental institution. The institution, perhaps conforming to the standards of the day, seems uninterested in actually helping her condition: no explanation is given on why she is there or what the treatment is and the staff encourages her delusions. Her doctor gives her three painful seizure-inducing injections of Cardiazol, the last one as a punishment for disobedience. The book ends abruptly when, in 1941, with the help of a friend, she is transferred to another institution and escapes en route to Mexico. Carrington wrote this memoir in 1943 while in Mexico, and she ended up living the rest of her life there.

Papers I Read in 2022

Harvard Business Review - Managing Oneself

Harvard Business Review - Managing Oneself

by Peter F. Drucker, published 1999

This article in the HBR is an excerpt from Drucker’s book Management Challenges for the 21st Century. Drucker argues that to stay “engaged and productive during a work life in today’s knowledge economy that may span 50 years”, you need to understand your strengths and weaknesses and focus on improving your strengths. He starts by discussing how to identify your strengths using feedback analysis aka decision journaling, then talks about how to improve your strengths by identifying your learning style, values, and community. The final section is devoted to how to handle the second half of your life by developing a second career. Throughout the article, Drucker invokes “the historical view” and interleaves hypothetical situations and anecdotes from historical figures like Dwight Eisenhower, Lyndon Johnson, and George Patton.

My time as a Software Developer at Axoni

part of the series What I do at work

Application Process

I got started in crypto when my friend, Alice, introduced me to Bitcoin back around 2016. I was drawn in more by the interesting new technology and less by the vision of how it would change the world. Soon after, I worked through the excellent Bitcoin Coursera, which taught me 95% of what I know about Bitcoin. Alice was interested in starting a Bitcoin ATM business together. We did some research and found that it was possible – a few others had done so already, ATM machines were available to buy, and the legal status was shakey but looking positive. But it would be expensive – ATM manufacturers would only sell in bulk and we would need legal services. I decided that I didn’t have enough savings and didn’t proceed. In retrospect, I should have expected these conditions as an early mover. It’s normal for business owners to take out (substantial) loans and the root problem was that my risk appetite was too low.

My time as a Database Developer at Novantas

part of the series What I do at work

Overview

At the time I joined, Novantas (now Curinos after merging with a competitor) was a mid-sized financial consulting company that primarily worked with banks to price and analyze their deposit and loan products. A long time ago, Alice the analyst created a massive Excel workbook that to help a client price their deposit products, e.g. savings, checking, CD’s. This workbook became popular and was later ported to a Microsoft SQL Server and Adobe Flex web application and christened PriceTek Deposits. Soon after, PriceTek Loans was also born. Deposits and Loans together grew into half of the company’s headcount and Novantas became a strange 50/50 consulting/platform hybrid. I was the first full time SQL developer hire and reported to Alice. With me on the team, Alice could focus on customer sales and relations.

My time as an Application Developer at JPMorgan Chase

part of the series What I do at work

Application Process

I received an offer from JPMorgan Chase (JPMC) by working with my university’s career services. At the time I was attending Cornell University as part of the class of 2011, companies were in an escalating race to recruit students earlier and earlier. In the coding world, the ideal path was to intern at Google the summer before your senior year and then, after you finish your internship, to receive a full-time offer to start the summer after your senior year about 10 months later. After that, the next best option was to interview and secure an offer from the Fall Career Fair soon after the semester starts in September. I did not succeed. The final best option was to interview and secure an offer from the Spring Career Fair around February during your final semester. I didn’t get that either.

My time as a Co-op at LMI

part of the series What I do at work

Co-op program

During my time in college, I spent two semesters working at Logistics Management Institute (LMI) as part of my college’s co-op program. The “Engineering Cooperative Education Experience” aka co-op was a special internship program where the school worked with employers to make sure that the co-op work was meaningful and relevant to your course of study. Timing-wise, this worked out well for me because skipping two semesters of classes (and tuition) allowed me to graduate at the same as my friends, when I otherwise would have graduated a year early because of the ~20 AP credits I had collected during high school (a rare example of having something “just in case” actually coming in handy).

My time as a Web Developer Intern at GAL Inc

part of the series What I do at work

The summer after my second year in college, I worked for two months at GAL Inc, a local web development shop near my hometown in New Jersey. I was desperate to get work experience and was happy that this job post on Craigslist worked out. GAL Inc specializes in Search Engine Optimization (SEO) – getting websites to rank highly on search engines aka Google. Traditionally, SEO meant peppering your website with keywords and getting other websites to link to your website. These days, there are more advanced and unsavory ways to game search engine algorithms. Luckily, I was hired to work on clients’ websites and not SEO.

What I do at work

A few years ago, I participated in my high school’s career day. I talked about my work at a blockchain start-up and preached the gospel of Bitcoin. It felt like a waste of everyone’s time because I don’t think the students understood what I was saying. How could they understand what it means to “improve API performance” when they don’t understand what an API is? I was certainly lost when I was in their shoes and attended my career day. This series of posts tells the story of each of my jobs and explains concepts and situations so that people without prior experience can follow along.

What to post? You can post anything

inspired by Alexey Guzey’s Why You Should Start a Blog Right Now (archive)

It’s discouraging to browse the internet when researching things to write about. You’ll find amazing projects and posts by people smarter than you and it’s likely that you’ll find the very exact thing you were thinking of doing, but of course better-executed and well-written. It’s easy to walk away convinced you should write nothing because any attempt will be inferior, embarrassing, and a waste of time. Let’s address those points one-by-one:

Conversations with an expert on AI Safety

edited excerpts from an interview with an expert on AI safety

Charles: Some of our readers may be unfamiliar with AI safety. Can you start by describing what AI safety is?

Expert: AI safety is the study and prevention of unintended consequences of artificial intelligence. This includes ensuring that AI is designed in a way that prevents accidents, such as those that could lead to loss of human life or serious damage to the environment. It also includes making sure that AI systems are reliable and trustworthy, so that they can be relied on to make decisions that are in the best interests of humans and society.

d3-milestones timeline library

While working on a d3 timeline for another post, I came across a beautiful timeline library, d3-milestones, and knew that I wanted to use it. I’ve also wanted to play with WikiData for a long time, so I combined these two interests by grabbing data from Wikidata and visualizing it using d3-milestones. There’s another chart that I want to try out later in this post, so this first example will be straightforward: Stephen King novels by publication date.

Meditation and Imaginary Bad Things

“Meditation” is an overloaded word. Colloquially, it means to think deeply about; in pop culture it means various things including to clear your mind of thoughts; in most traditional meditation schools, it refers to mental exercises to train a specific skill, e.g. concentration, empathy. In pop culture, meditation is used as a relaxing, post-activity cooldown or calming ritual. In traditional practices, meditation is (obviously) the primary activity and it’s hard work – the goal is to reprogram your mind to reach nirvana. Roughly, the three stages of progression look like this, where “equanimity” means “mental calmness”:

Cloud gaming provider review

I first heard about gaming-as-a-service aka cloud gaming (not to be confused with games as a service aka GaaS) back in Wired magazine many years ago. The idea was new at the time and Wired talked about how the user experience was laggy and poor so I didn’t give it much thought. Fast forward to today and lots of the screenshots I see in game reviews look incredible. I’m curious to see for myself what the latest games look like at max settings, but like most people, I don’t have a computer that can play modern games nevermind play them at max settings. So, I decided to look at the three big PC cloud gaming providers: Nvidia GeForce NOW, Google Stadia, and Amazon Luna.

Review of The Art of Folding Vol. 2

sample spread

I came across The Art of Folding Vol. 2: New Trends, Techniques and Materials (TAoF2) while browsing the origami section at my local Kinokuniya, a chain of Japanese bookstores. I was put off by the pretentious title but flipped through it anyway and I’m glad I did.

I had been looking for “what’s next?” in origami both personally and generally. Personally, I had just wrapped up a two-year modular phase with some tessellations and Jun Mitani sprinkled in, and was considering whether to (1) try my hand at design (probably modular), (2) try computer-aided design and folding à la Mitani and Demaine, (3) return to traditional origami and work on shaping and finishing (I got a Yoshizawa book for Christmas), or (4) return to folding complex models from diagrams. Generally, I felt confused about where origami was going. I had thought that computer-aided design was obviously the future, then I saw the minimalist but unmistakably modern works by artists like Giang Dinh and Beth Johnson.

GPT-2 Twitter bot

aitextgen

I’ve been loosely following developments in machine learning since the AlexNet days back in 2012. I was particularly excited by OpenAI’s release of GPT-2 in 2019 because it seemed like “the solution for everything”. But sadly, even with the help of the code-first deep learning course at fast.ai, using GPT-2 was beyond me. It required ops knowledge I did not have to configure AWS instances and CS knowledge I did not have to tune countless parameters. I settled for reading gwern’s monthly newsletters for updates and his work on deep learning, and waiting for the day that GPT-2 would be plug-and-play. That day is here.

Reading Harry Potter

Harry Potter covers

warning: plot spoilers below

I finally read the Harry Potter (HP) book series, which was very popular 15 years ago when I was teenager. The seven books went on to spawn an eight-part movie adaptation, video games, a prequel film series, a play, and theme parks. As a teenager, I avoided the books because they were popular and I was too cool for popular. It’s taken me some time, but I’m now mature enough for HP. Even though I watched all the movies, I had the expectation that HP would be like other young adult series I’ve read (e.g. The Lost Years of Merlin or Artemis Fowl), where the protagonist has a driving goal (e.g. become the greatest wizard, avenge the wronged, etc), but Harry, like a typical real-life teenager, has no life goals; he’s content to go to school, hang out with friends, and be normal. HP’s plot revolves around unexplained hardships being forced upon Harry and him dealing with them: the novels are mysteries! It’s not surprising that J. K. Rowling went on to write crime mysteries after finishing HP.

Five Variations of Five Intersecting Tetrahedra

Overview

Thomas Hull founded the field of origami wireframes (or polypolyhedra per Robert Lang) when he created the classic Five Intersecting Tetrahedra (FIT) model. FIT is comprised of five tetrahedra (aka triangular pyramids), each constructed using a unit for each of six edges, that share a center-point and all intersect without overlapping. The existence of FIT has inspired many folders to design their own wireframe models, some of which I’ve re-created in my gallery.

Top three favorites

When people ask me what my favorite XYZ is, I usually just talk about a recent XYZ because I don’t spend time maintaining a life-long list of top XYZ – comparing my recent experiences with my past. But I should. Not so I can give polished answers to the next person who asks, but because it’s interesting and fun to see how my tastes and interests have changed over time.

Dune book vs movies data viz

In anticipation of the new movie interpretation of Dune – “Science Fiction’s Supreme Masterpiece” (says so right on the cover) – coming out this December, I created a visualization to compare the book to the previous two movies: the 1984 version and Frank Herbert’s Dune, a 3-part mini-series broadcast in 2000.

Dune (1984) review

To a fan looking for a fan-movie, 1984 Dune disappoints and feels dumbed-down. Part of the problem is the editing that brought the runtime from four hours down to two by using extensive voice-over narration, casually explaining secrets that characters originally never revealed (e.g. Reverend Mother Gaius explains the Water of Life and the Kwisatz Haderach to Paul), action without explanation (e.g. Stilgar immediately accepts and names Paul minutes after meeting him), and other forms of plot compression. However, even had I viewed the original pre-cut version so that forced editing wasn’t an issue, the creators made many decisions that I found distasteful. Some decisions were probably relics of the times:

Sandworm: a timeline of hacking

The book

In Andy Greenburg’s latest book, Sandworm: A New Era of Cyberwar and the Hunt for the Kremlin’s Most Dangerous Hackers, he talks about the exploits of the eponymous Russian hacker group and their significance. The book is split into six parts – Emergence, Origin, Evolution, Apotheosis, Identity, Lessons – with the main Sandworm narrative in the three parts: Emergence, Evolution, Apotheosis. We can deduce from this that Greenburg spends as much time on the context of Sandworm as on the group itself, and indeed in his own words:

OrigamiUSA Unconvention 2020

I attended the OrigamiUSA convention this year from June 26-27. The convention is usually held on a college campus, but this year, instead of canceling it, OUSA decide to reduce the number of events and host it on Zoom. I attended an in-person convention a few years and actually preferred this year’s online one:

  • I could participate from my sofa instead of commuting 1.5+ hours each way and day
  • I had all my tools and supplies readily available
  • I actually got to attend the classes I wanted. Classes taught by famous artists, e.g. Robert J. Lang, are in high demand and it’s normally difficult to secure a spot. When I went to the in-person convention, I wasn’t able to attend most of the classes that I (and everyone else) wanted

This is the list of events this year, followed by my foldings of all the models:

My Experience Learning Prolog

I first heard about the Prolog programming language in the book Seven Languages in Seven Weeks. The book, as promised, introduces the reader to the syntax and paradigms of seven different languages. What attracted me to Prolog was its similarity to constraint programming (programs are defined by and solved using their constraints), its similarity to SQL (data-focused and declarative), and its recursive nature.

Normally, I would learn a new language by playing with it, but Prolog was too foreign and intimidating, so I looked for a more structured learning approach. I did some research on recommended first textbooks to work through and settled on The Art of Prolog (AoP). This was a terrible decision. AoP is structured in four parts: logic programming, Prolog, advanced Prolog, and applications. Over two weeks, I completed Part I and worked through all the exercises using pen and paper. I was inspired by the beauty and simplicity of logic programs, and was excited to start Part II, which introduces the Prolog language and its shortcomings as a logic programming language. The exercises in Part II were essentially the same as in Part I, except using Prolog instead of pure logic. The solutions were ugly. I felt disillusioned at being introduced to beauty and then being denied it. I put AoP away and gave up on Prolog.

TALE-SPIN in Prolog

TALE-SPIN

TALE-SPIN1 is an AI program developed in 1977 by James R. Meehan. It works by using a knowledge base of actions to solve and modify goals. As actions are performed, they output text that form a story. In the words of the author:

TALE-SPIN is a problem solver, top-down and goal-directed. Its output may be regarded as a trace through problem-solving procedures.

Meehan rejected previous approaches with clean formulations that involved defining “one kind” of knowledge but sometimes resulted in bizarre stories. He instead defined and incorporated multiple kinds of knowledge to create more natural stories.

Chopsticks in Prolog

The Game

Chopsticks is a simple game of many variations played by children and college students. The variation I play is:

  1. two players start by each sticking both index fingers out to represent a count of one on each hand
  2. players alternate turns until someone loses by having a count of zero on both hands
  3. on a player’s turn, he must either:
    1. use one of his hands with positive count $H1$ to tap one of the other player’s hands $H2$. The other player updates the count on $H2$ to $(H1+H2) \bmod 5$ by changing the number of fingers sticking out
    2. redistribute aka “split” his fingers in one of two ways: $(4,0)–>(2,2)$ or $(2,0)–>(1,1)$

For example, we can visualize the first turn of the game like so:

Static site deployments with Hugo and GitHub Actions

Introduction

It’s been almost two and a half years since I’ve updated this website. While I was away, GitHub Actions was released and Hugo jumped from version 0.31 to 0.70! My old Hugo code no longer builds and instead of updating incrementally, I decided it was easier to just rebuild from scratch with the latest version. At the same time, I would update the theme1 I use and integrate GitHub Actions to replace the now-unnecessary deployment script 23.

DNS Records for GitHub Pages

Every once in a while I need to modify my custom domain’s DNS records to work with GitHub pages, and every time it’s a struggle to get it right. Here I document my currently-working setup.

I followed the recommended setup1 by configuring www as my Custom Domain, also configuring my apex domain, and letting GitHub Pages “automatically create redirects between the domains”. Specifically for this website, I told GitHub that my Custom Domain is www.charlesjlee.com and I setup the DNS records for charlesjlee.com. This involved making changes in three places: DNS records, repo config, site config.

Using the Silhouette Cameo to cut and precrease origami tessellations and modulars

Opportunity for automation

After a 7-year hiatus, I recently started folding origami again and decided to focus on tessellations and modulars. I used to fold mostly representational models, i.e. animals and humans, and wanted to explore some new areas. Luckily for me, origami advanced greatly while I was away and the first good books on tessellations1 and wireframe modulars2 were published by Eric Gjerde and Byriah Loper, respectively. I bought both books, dove straight into making models, and immediately found myself repeating the same steps hundreds of times.

C4's CBP Bitcoin certification - 9 months later

Back in March 2017, I posted about passing the Certified Bitcoin Professional (CBP) exam by C4. I did this partly out of curiosity and partly hoping it would help in a job search for crypto roles. My curiosity was satisfied, my wallet $73 lighter, and no employers seemed to care. Not surprisingly, what did help during my job search were my understanding of Bitcoin and my crypto sideprojects.

There is a more technical CBX (Certified Bitcoin Expert) exam intended for developers that looks promising: it covers the API and scripting. But given my experience with the usefulness of CBP and the lack of updates in the C4 organization, I would not bother. Since I took the exam 9 months, the only thing that has changed is the exam price \$73 –> \$135. Notably, the last blog post was on June 23, 2016 and the CBX exam has been “coming soon” since CBP was launched back in 2014.

Bitcoin beacon: using the blockchain to generate random bits

Random beacons

A random beacon is “a trusted service that broadcasts fresh random numbers at regular intervals”. Random beacons are useful in situations that demand security against manipulation, e.g. choosing precincts to audit after an election. Several beacon services currently exist, notably Random.org and the NIST beacon, however there are several advantages to using the Bitcoin blockchain as a source of randomness:

  • Publicly verifiable
    • Bitcoin blocks are public as soon as they are mined so anyone can perform and verify the beacon computations.
  • No trusted parties
    • Using proprietary services requires that you trust the operator of that service. In the case of random.org, they publicly state that they buffer their random numbers1, i.e. they generate the numbers before they are requested. This means that they could be in a position to profit from advance knowledge of the beacon output. Analogously, NIST previously promoted the Dual_EC_DRBG standard, which it has now admitted contained a backdoor for the NSA to exploit. Additionally, the NIST beacon was offline during the 2013 US Government shutdown.
  • Precise security guarantees
    • Due to the cryptographic structure of the Bitcoin blockchain and its use as a currency, it is possible to concretely analyze the entropy generated and the the monetary cost of compromising the beacon output.

In their paper, On Bitcoin as a public randomness source2, Joseph Bonneau, Jeremy Clark, and Steven Goldfeder provide such a construction and analysis. Specifically, they conclude that

Coursera review: Bitcoin and Cryptocurrency Technologies

The Bitcoin and Cryptocurrency Technologies Coursera is an 11-week, 4-lecturer collaboration that gives the student an overview of the existing cryptocurrency environment and how it came to be. It begins with a history of cryptocurrency advancements leading up to Bitcoin, then goes into the technical details of how Bitcoin works, moves on to the societal impact of cryptocurrencies, and finally ends with a discussion of future developments and their feasibility.

I took this course during the 12/26/2016 - 03/20/2016 offering and was thoroughly impressed by its quality. I learned a lot from taking the course – enough to pass the Certified Bitcoin Professional exam (see this post for my thoughts on Bitcoin certification). On each topic, the instructors first discuss a motivating problem, then examine a technical solution to the problem, and finally explore the real-world practicality and adoption of this solution. Far from feeding the hype, the lecturers instead examine it to produce nuggets of insights, such as:

My Thoughts on Crypto Currency Certification Consortium's (C4's) Certified Bitcoin Professional (CBP) certification

What is this?

The Crypto Currency Certification Consortium (C4) is a non-profit organization that issues Bitcoin certifications. Currently, the only certification they offer is the Certified Bitcoin Professional (CBP), though a more advanced version, the Certified Bitcoin Expert (CBX), is being developed. Given Bitcoin’s decentralized nature, there can be no official certifying authority – anyone can issue anything. In this environment, the only thing that carries weight is reputation, and C4 has a solid roster on their board and advisors, including Andreas M. Antonopoulos (prominent Bitcoin evangelist) and Vitalik Buterin (co-founder of Ethereum).

Creating a Steem bot using Python, Piston, and Heroku

Steem for the people

When someone writes a great post on Reddit that goes viral and is widely shared, the party that benefits most is Reddit itself. Realizing this and wanting to give back to the community responsible for its success, Reddit toyed with the idea of giving shares of the company to users in the form of a cryptocurrency. This plan was later put on indefinite hold.

Steem is the embodiment of what Reddit wanted to achieve – a blockchain-based, social news platform where posters and upvoters, i.e. “curators”, are rewarded directly with cryptocurrency (actually three currencies: STEEM, Steem Power, and Steem Dollars). I was first exposed to Steem via Steemit, a website built on top of the Steem blockchain. My first thought after learning about Steemit and reading the white paper was “wouldn’t it be neat if I could write a bot that would ‘curate’, upvote posts for me, and make me rich overnight?” Of course, it wasn’t that easy, but at least no one can say I didn’t try to get rich quick.

2017 Priorities - Family First

It’s 11:30pm and I’m in the family kitchen by myself munching on a box of palmiers1 with a glass of milk and it dawns on me that I feel uncharacteristically good. I feel safe, calm, clear-headed, and full of food.

Thinking back to my pre-holiday rush to close out everything before 2017, I was over-whelmed, anxious, and really not that productive. With a list of 2017 priorities in front of me, I start planning out the first few months of 2017 and it’s soon obvious there’s no way I can do all of this. I just started putting together a schedule and I’m already over-allocated? What am I doing wrong?

6 weeks of Uberman

Introduction

This post is about my experience with the Uberman (UM) sleep schedule, the popularized and extreme polyphasic sleep schedule that achieves 2-3 hours of total daily sleep through periodic 20 minutes naps. The benefits are enticing. Assuming you currently sleep 8 hours/day and follow the 3 hours/day schedule, you can have 21 more hours a week to enjoy and to get stuff done. With all that extra time, surely I’d be able to get through my to-do backlog! The requirements – a flexible work schedule and a two-week adaptation period during which you are a brain-dead zombie – are steep though, which is why I didn’t give UM any serious consideration until recently. UM success stories1 would pop up a few times a year and the idea stayed in the back of my mind. Finally a change in my job’s working hours (with a 5 week break in-between the transition) gave me an opportune window to adjust to and potentially stick with the schedule.