Alvin Kerber

math and computers and stuff

This isn’t a proper blog. But sometimes I think of things and write them down. Keep reading if you’re curious.

Nothing is organized at all. Sorry about that. Maybe one day I’ll organize it.

2019-11-12 — Undergrad Economics

Some quick notes on basic undergrad microeconomics from a mathematical perspective.

2019-10-05 — Corinna Ko Tung Reading List

This is Corinna Ko-Tung’s reading list prepared for Mrs. Bernard Tai (aka Kitty Pong) in Kevin Kwan’s China Rich Girlfriend.

Satire? What’s that?

For future reference?

2019-08-11 — Self-study for the Un-conscientious

Studying things is hard. Motivating yourself to study, and finding the time and energy to follow through, is much harder. The MOOC revolution of the mid-2010s was foiled (in my own experience) by how easy it was to simply stop paying attention and drop out of a class. For years I had only slightly better luck in my own planning and studying. I’d pick a book/course to follow, make a schedule, stress the importance of it to myself, seriously attempt to go through it, and peter out after just a couple weeks. At most, I lasted a month or two. For the first five years of my PhD things were pretty much the same. After all my exams were done, everything left to study was long-term and self-imposed, and I got basically nowhere.

It’s been a few more years now and I think I’ve improved a bit. I thought it’d be good to write down some things that seem to work for me, both for my own reference and so maybe others can benefit!

Content. King, of course. This is where most of my learning efforts fail. For me, video lectures are too slow. (Yes, I know I can watch at faster speed, but at that point the hard parts start to become incomprehensible – lectures are not amenable to skimming). Books are best. Books for general audiences tend to be more lively, but less informative. Many general audience books are uselessly soft (like, for instance, anything recommended in a newspaper). Books need to not be boring. Chapters and sections each should provide interesting insights that aren’t too inaccessible, not just building up to something mysterious or (worst of all) providing unmotivated background content. Small victories in understanding motivate progress, while small frustrations soon pile up and make it easy to give up completely. It’s really key to pick the best book possible.

Rhythm. In school, I’d always been motivated by competitive pressure and last-minute deadlines, so on my own with only self-imposed ground rules it’s easy to fall back into just mirroring the school structure. But school syllabi are primarily built for convenience of assessment, not for understanding. Basic pedagogical ideas like webs of concepts, connections to real-world problems, and even such simple things like spaced repetition are skipped entirely or left up to the students. I think the best I can do here is stay flexible. A fixed calendar that plods through one chapter at a time can’t be adjusted to cover the same things over and over, or shift to front-load more interesting topics. Courses tend to be better than books in this way, but they can have problems too. It’s hard to tell if I want to change topics because I’m bored, the topic is too hard, or I’m just having a lazy day. The best approach I can find here is just to follow my gut, and skip around and come back to things as I need.

Repetition. One of the hardest things I find when studying alone is deciding when I know a topic well enough to move on. More important than any particular topic in the learning is staying motivated! There’s nothing more frustrating than getting “stuck” on a seemingly endless stream of busywork, or conversely getting overwhelmed by difficult problems. The best solution I’ve found here is, rather than trying to work through whole books, to pick realistic-difficulty university courses and follow their content. If I know how to do all the exercises from a serious online course, I should be all set for the time being. MIT OpenCourseWare is particularly good, but plenty of course content from Stanford, CMU, etc can be found online also. (Most MOOCs are not rigorous enough to test much, and don’t use standard books either so there isn’t much to work from).

I know that this contradicts my earlier point here about not marching through school syllabi, and this is still something I don’t really know how to resolve. Reading is fun, but exercises often are not. My goal here is to answer the question “have I learned this well enough” not necessarily to say that going through the course in order is the best way to learn it. Whether or not that’s true varies a lot depending on the approach, but usually a multi-pass/multi-text approach works better for me. Even then it’s important to realize that there’s no such thing as knowing something for good, only learning it for now. Without practicing or building off something, it will disappear. So it’s vitally important to study things that are either inherently useful or that I’ll actually be building from!

Fun. Unlike school, there is no real stick, only carrots. People go their whole lives without studying extra topics. Most of the stuff I want to study isn’t really fun in the same way that, say, video games are. It’s satisfying, but that doesn’t really help day to day. Stupid tricks like framing stories and anecdotes are surprisingly helpful. I should really focus on weird, cartoony treatments, trashy “fun fact” books, and these sorts of things. After all, it’s the trashiness of the internet (bite size articles! Pictures! Silly stories!) that makes it so fun to get information from. What books can provide the same stimulation should still be more reliable and organized.

(Lack of) Accountability. This is the part where I’m supposed to say that you find an different person to serve as your stern taskmaster. These people are really hard to come by, and really expensive when you do find them. So maybe I’ll just say that trying to motivate myself with accountability doesn’t really seem to work in this setting. There are too many external factors that can really throw things off, and at the end of the day it’s all just my own ideas. I think instead it’s more important to keep reminding myself why I’m doing this, stay bored enough to give it a try, and make sure to celebrate each success even if they’re disorganized and out-of-order!

Subconscious. Something deep down in people loves learning new things. This is the guiding principle of the unschooling movement. People also find satisfaction from slowly getting better at things they practice. And people naturally practice things they think are interesting. Sure, they don’t practice them enough to be truly world-class, but I have an actual day job and don’t need to have world-class expertise in anything I study. I’ve gone very far in the past by just picking up things as they interested me. Perhaps instead of organized study goals (which have done little beyond get me in trouble, ever since my organized classes ended) a more long-term productive strategy is to just gather books, go through parts of them when I feel like it, and slowly glue concepts together. Practice problems are good, but it might be best to just do them for fun – think “pop quiz” vs “problem set”. Organized study time might not be as good as just reading what I feel like when I feel like it. I made it pretty far that way, after all – and in much less time than people following the school strategy.

Boredom. The problem with relying on people’s love of learning new things is there’s too many easy to learn things nowadays. This is the heart of the information revolution – tons of interesting stuff. In some ways this is good, but for creative motivation it’s a terrible, terrible thing. Even worse, most of I find sort of feels like learning but doesn’t really teach me anything. But luckily, if I stay far enough away from them for long enough, I really do still get bored. And that’s when all the learning and creativity happens!

2019-08-08 — Adversarial Time

I learned some basics today about adversarial training for image recognition models. I think it’s interesting how these techniques are so generic (basically, attacking the model by introspecting its structure and/or searching its detailed output), but there hasn’t as far as I know been much discussion of these techniques in other domains. Of course, the whole concept of adversarial examples and adversarial testing is very new, but as someone who’s particularly interested in time series modeling, I’d be curious to try and see what applies in that domain. Time series is just an example; we could of course study similar situations with any complex, high-capacity-high-variance model. I bet something interesting could come out of this!

2019-08-07 — Big O Function Space

One fun fact / alternative perspective that occurred to me as I was working through some elementary problems on big O notation: if viewed as a class of functions, each big-O set {f(x)|f(x)=O(g(x))} is a linear subspace of the function space under consideration. For instance, if we’re looking only at polynomials of degree <= n, as subspaces O(1) in O(x) in O(x^2) in … gives us a flag of subspaces. I suppose one could use this to draw pictures of the sets of functions that satisfy certain relations. I wonder if this would be helpful to explain the concept, or if it just makes things more confusing.

It would be great if this told us something cool for more general spaces of functions, but of course they’re all infinite-dimensional so it’s hard to say much about what’s happening, other than that I suspect it’s a drastically reduced subset. It’s hard to think of a nice map either way. (If we’re being silly about things, the set of functions that actually come up in CS theory is basically finite-dimensional anyways!)

Note: big theta is a bit difference as it’s more like equivalence relations / equivalence classes than it is like a linear subspace.

Disclaimer: I’m not really sure this is right/sensible. Usually we only talk about big O for the positive side of things, so I’m using a somewhat vague/made-up more general definition that probably just boils down to some sort of Lipschitz condition. Please forgive me as this is all speculative and I’m not an analyst by training.

2019-08-03 — Results vs Practices

I spend too much of my life setting goals for myself. Especially when I’m in periods of high-stress, it gets to be too much. There’s so many things I’m trying to do, and I don’t have enough time in the day/week to make substantive progress on all of them. This makes me sad.

I think one simple strategy is to bear in mind that there are different kinds of goals. Most are long-term objectives or results. These are often things outside my control, or even if they’re in my control are dependent on many constantly-changing factors. Some examples include:

I loosely think of these as big results – they’re things where it’s clear whether I pulled them off or not, but pulling them off will require a combination of hard work, circumstances, and good fortune. Have too many simultaneous results I’m working toward at once is a big source of stress in my life. A result can become especially stressful if it’s really big/far off and any progress toward it day-to-day is so small that it feels like I’m getting nowhere. For instance, “complete my PhD” was definitely a result like that for me.

I hoped after I finished my degree I wouldn’t have concerns like that, but obviously I have new big goals and the stress is becoming a fact of life. A very standard piece of advice is to divide the goals into smaller manageable subgoals. Obviously this is good. But instead of even setting small goals that are subject to externalities – and which I thterefore often make too difficult, and then derail things right away – I think it’s best to focus on things that can be done with only my own effort. A practice, instead of a subgoal.

For instance, say I want to learn data structures and algorithms in detail. One subgoal is to finish the chapter I’m currently on. This is an important step, but if I sit around and feel like “I have to finish it”, I tempt myself to rush through it as quickly as possible, and if I don’t do it as fast as I’d hoped I feel behind. Instead, a more constructive phrasing is “practice studying and working with data structures and algorithms.” Then the key indicator of my success isn’t results achieved, but time and effort put in.

If there’s one thing I can say about the things I’ve practiced for many years, it’s that years of consistent effort yield results in a way that I’m not good at noticing or feeling in the moment. “Practicing” maybe sounds rote or boring, but for someone like me who spent most of his life practicing something and usually enjoyed the practice times better than the results-oriented work times, it feels like a godsend.

Practicing also has good connotations of having a regular time and place, repetition and setbacks being totally ok, and not being directly accountable for external results. Obviously there are still better and worse practicing habits – a struggle which I went through as a kid – and better habits will give better results, but those can come slowly. The important thing is just to put in the time and effort.

I will try to follow this in my own life. Hopefully it will help me be less stressed out.

I added some regular practices to my goals/studying page to track them.

2019-08-01 — Math Emoji

During a recent discussion it occurred to me that mathematical notation is a never-ending quest for symbolic density. We add superscripts, subscripts, overlines, underlines, special fonts, special characters, and if we’re desperate even images. But the world has recently moved on to using high-density symbols throughout written communication!

Emojis. We should use emojis in math. Yes, I’m serious.

The only problem I can see is that unlike mathematical symbols which are highly abstract, emojis have visceral, concrete meaning. But honestly that may be an advantage! Many symbols in math are meant to immediate “gut meaning” but it’s just difficult to convey to the reader in such a limited medium. I’ll think more about this and see if I can put together an exmaple of some kind. I think differential geometry or algebraic geometry both quickly run into the requisite symbol complexity.

2019-07-28 — Power And Public Choice

I just learned about a subfield of economics called Public Choice Theory. Apparently it tries to explain how governments and bureaucracies work as distinct from competitive markets. I wonder to what extent they consider the role of power as a currency within these institutions. Monetary utility is I suspect not always the best way to consider interactions and transactions within a firm, especially when people’s basic needs are already addressed. (This is generally the case for almost all decision-makers of importance within a large bureaucratic body, as far as I know.) Such an analysis would likely extend to large private corporations as well, especially those with substantial monopoly power.

2019-07-22 — Internet -- Just Say No

I really should stay off the internet. This probably doesn’t need too much elaboration, but it’s just too difficult for me personally. Reasons include:

With all that in mind, there are some good reasons to stay.

With all that in mind, I’ll be keeping a timer on my study/goals page of how many days I’ve successfully gone without wasting time on the internet. This is a pretty loosely defined thing. Last time I tried this project, I made it about 40-50 days before my definition of “wasting time” started slipping, and about 70-80 days before I quit. I would like to make this a permanent lifestyle choice, not just a sprint. It is healthier for me. Really, when it comes to wasting time, I know it when I see it – but here’s a quick list:

The following are NOT wasting time:

And when I’m tempted to go surf the web, here are some things I’ll do instead:

Finally, the hardest part of avoiding temptation is persistence over time. Nowadays, friction to start surfing the web is very low, especially when I’m at work. Luckily work is when I have the most willpower and motivation to focus. As for the rest of the time, here are some ground rules / strategies I’ll follow to keep the internet “at arm’s length.” Think of this as being like a dieter choosing not to buy junk food at the store (so they have to go out and buy it each time).

I look forward to a happier, more productive, and more relaxed life.

2019-07-20 — Configuring a minimal Linux dev environment

Current total boot time: 22 seconds. (from BIOS load to full boot: less than 10 seconds).

Goals

Keyboard

Terminal environment

It is sadly impossible to configure the console terminal very much. But I tried my best.

Development Software

I was surprised that there’s a new end user interface to install Debian/Ubuntu software. The new (to me) command is called apt and it’s a replacement for things like aptitude which I used to use. It provides nicely configured wrappers around apt-get, apt-cache, dpkg, etc.

Programs (all installed with sudo apt install ____):

Offline documentation:

That’s it! My tiny SSD only has 5GB used – 90% free space!

References

Addendum (update 2019-07-28)

For some inexplicable reason, sometimes when rebooting my laptop it fails to pick the correct font and reverts back to the ugly, tiny default font. I don’t know how to fix this long-term. I fixed it short-term by re-running

sudo dpkg-reconfigure console-setup

a bunch of times, and rebooting until it worked. My best guess is some kind of race condition / misconfiguration of the boot process. But I really have no idea how that could happen.

2019-07-19 — Confidence

While reading about the history of “language used to express probability” (Sherman Kent, Rachel Kesselman, etc) it occurs to me that perhaps it’s worth analyzing text for confidence in addition to sentiment. This could start with just simple word usage (“I’m sure that”, “Everyone knows”) vs (“I think”, “It’s likely”) but could maybe develop into sophisticated phrases just like sentiment analysis has. I haven’t done any research so this may be old hat, but I wonder if it’d be illuminating for things like analyzing social media graph relationships and how information (including eg fake news) spreads.

2019-07-13 — Fixing up Linux on an old laptop

Currently I do most of my typing and coding at home on a 2010 MacBook Pro. It is pretty good, but has the following issues:

I first tried installing Ubuntu on the / partition.. Reasons for picking Ubuntu:

I’ll be installing on an old Lenovo x300 that I previously ran Arch Linux on. It works fine, but Arch is now 3+ years out of date (I haven’t used this computer in ages). I’m terrified to think what will happen if I try to upgrade it. Unfortunately, my Ubuntu install failed!

Notes on Ubuntu install:

I next tried upgrading my existing Arch system with pacman -Syu. However, this ran into a bunch of problems. Checking the forums, this is basically impossible and a clean install is heavily encouraged. I was going to try that next, but after sleeping on it (and remembering all the forums like “you should really update your system every week”) I decided I’m too old and busy to mess around with Arch. I slept on it at this point.

After more investigation:

Thinking about it, it seems like the best strategy will be to back up my data and do a completely fresh install (rewriting the partitions and everything). Some more misc reasons this is probably a good idea:

It turns out thumb drives nowadays are REALLY big (64GB is cheap!) so it was straightforward to get a thumb drive and do the backup. I did the backup with rsync -rtv --delete --size-only. (It took a long time to figure out this command — in the process of trying to get rsync -av to work, I ended up deleting a lot of settings, cache files, VM images etc on the laptop.

Anyway, after that long headache, the actual from-scratch Ubuntu install was not difficult at all.

References

Various AskUbuntu threads:

2019-07-12 — Idle thoughts on a London trip

2019-07-04 — Queues

There is such a thing as queueing theory, but in CS there’s nothing special about a queue. Why hasn’t anyone invented “stacking theory” or better yet “treeing theory” or “graphing theory”. I suspect there are just as many processes (industrial or otherwise) where these apply.

Knuth may have something about this. I can’t imagine anywhere else, but I’m no expert.

2019-07-03 — test post please ignore

test post please ignore