As 2019 comes to a close, I’m continuing my tradition of reviewing posts from the past year. This year was divided into two halves. In the first half, I covered topics in discrete math, math for competitive programming, and math learning in general. In the second half, I changed my blog content approach. More on that later.

## Part 1: Discrete Math

In recent years, I have structured my weekly blog posts around an annual project. The premise of this year’s project was that, for people interested in algorithmic problem-solving, there’s value in studying math separately from programming puzzles. In other words, rather than just picking up math concepts as a side-effect of algorithmic programming practice, it’s worth studying it as an independent topic. In How Important is Math for Competitive Programming?, I call this the *comprehensive strategy*, and contrast it with the more *targeted strategy* of focusing only on coding problems. The optimal strategy depends on your interests and schedule.

**Khan Academy and Brilliant**

Working math problems by hand has a long history. Ancient Egyptians had their math papyrus. Math students today still do their work using pencil and paper. But we now also have the option to practice problems the way competitive programmers do, using an online judge that supplies problems and evaluates answers. I used two “math judges” for this project: Khan Academy and Brilliant.

Khan Academy’s main strength for adult math learners is that it can generate as many problems as you need for a given topic. If you want to review, for example, finding limits of composite functions, you can keep working problems in that area until you can solve them almost without having to think. I wrote a few posts about using the Khan Academy mastery system for this type of practice:

How Useful is Khan Academy for Learning Math?: How to use mastery challenges as a simple way to navigate through the exercises in the World of Math mission, which covers math topics through Calculus.

Using Khan Academy for Post-Mastery Practice: When you finish the World of Math mission, your skills will all show a

*Mastered*status. But that doesn’t mean you know them all equally well. I recommend tracking a more granular skill level indicator to continue practicing skills after Mastery.Post-Mastery Practice Examples from Khan Academy: My suggested skill level rating system, with skill examples from Khan Academy.

The Khan Academy Math Course System: Once you have mastered the World of Math skills, the mastery challenge becomes less targeted. Since the system thinks you know everything, it has less information to decide which problems to show you. To find the best problems to practice at this point, it helps to be familiar with how math courses are organized on Khan Academy.

Although Khan Academy has some post-Calculus math courses, its coverage of discrete math is limited. This is inconvenient for our purposes, since discrete math is the most relevant math field for the study of algorithms. An alternative tool is Brilliant, which covers discrete math and computer science, among other topics. Brilliant takes a more intuition-based approach to teaching concepts, rather than the more academic approach that Khan Academy uses. The trade-off is that each Brilliant problem is hand-crafted, so you can’t just keep asking for more problems as you can with Khan Academy. Once you finish a quiz, that’s all you get on that topic unless you want to solve the same problems again.

Two general skills that math students work on from the earliest years of school through college are 1) number sense and 2) mathematical thinking. Khan Academy helps with (1), but there’s some debate about whether it has a positive or negative influence on (2). Brilliant makes more of an effort to teach intuition about a topic, so it may be more effective for (2) compared to Khan Academy’s procedure-oriented approach.

**Discrete Math**

Discrete Mathematics, as taught on Brilliant and elsewhere, is the study of discrete mathematical objects (e.g., integers). It’s relevant to the study of algorithms and other areas of computer science. Although computers can represent approximations of curves and other continuous math concepts, at the lowest level everything in a computer is stored as a finite sequence of on/off switches. So to really understand what’s going on in a computer, it helps to take a discrete perspective.

While Khan Academy and Brilliant are good for practicing problem-solving techniques, a more comprehensive reference is useful for gaining a complete understanding of math concepts. I chose Kenneth Rosen’s *Discrete Mathematics and its Applications*, for that purpose. Textbooks don’t guide you through the learning process the way online math sites do, so it’s useful to think about how to read one.

**Proofs**

College math in general and discrete math in particular focus on proofs. I wrote a few articles on this topic:

How to Practice Writing Proofs: This isn’t exactly an article about

*how to prove a theorem*(though I recommend a book on that topic). It’s a six-step process that you can use to work on each proof, with the goal of improving your understanding of the topic and improving your proof-writing skills through consistent practice.An Example Discrete Math Proof: To demonstrate the proof-writing process introduced in the previous article, I picked a discrete math theorem from Rosen and applied my process.

Why are Textbook Proofs so Short?: Although the theorem from the previous article is fairly basic, my proof is quite long. That’s because it was partly an experiment to see how useful it was to explain each step in extreme detail. But there are also good reasons to write short proofs.

Elements of Good Mathematical Writing: Proofs are a specialized type of nonfiction writing, but you can also view them as a story that describes the exploits of characters like $x$ and $n$, and how they get to their destination (QED).

**Math Problems**

If you’re self-studying math, you have to make some decisions that are mostly decided for you in a traditional class. When it comes to math problems, these decisions fit in two categories: how long, and how many:

How Long Should You Work on a Math Problem Before Looking at the Answer?: In a class, you have to fit your study time into a predefined schedule. But for self-study, it’s all about trade-offs between the benefits of getting to the solution on your own and the benefits of covering more material.

Should You Solve Every Problem In a Math Textbook?: The same breadth vs. depth trade-offs come up here. And even in a class, you have the choice of doing more problems than the professor assigns, in order to get more experience. I included some examples of notable textbook completionists, including Donald Knuth.

**Standardized Tests**

There’s more to math, or any college subject, than tests. Paul Graham argues in an essay this month that focusing on grades and poorly-designed tests is the #1 thing for college graduates to unlearn if they want to succeed at building a startup company.

However, if you have practiced for a programming contest, you know it’s a lot like studying for a standardized test. There are clear rules and a specific curriculum to cover. With that in mind, I found some useful articles by Allen Cheng, who got a perfect score on both versions of the SAT (ten years apart), and now runs a test prep company. I think the same study techniques and strategies he recommends to students preparing for standardized math tests can also be useful for math learning in general.

**Q&A**

As with programming, it’s now easy to get answers to math questions online. Quora and Stack Exchange both have active math communities, but they each operate according to their own rules.

**Books**

As I wrapped up the first half of 2019, I wrote a few articles on two books that aren’t specifically about math, but that cover techniques that are useful for accomplishing learning projects.

James Clear’s Atomic Habits explains how to use *Four Laws of Behavior Change* to build good habits and break bad ones. The idea is to make desirable behaviors obvious, attractive, easy, and satisfying, and to do the opposite for undesirable behaviors. With those laws as a foundation, Clear presents other advice about building *systems*, using a desired *personal identity* to drive behavior, preferring *action* over inaction, and deciding when to *exploit* your existing habits or *explore* new ones. I wrote two articles suggesting how to apply the advice from the book to math learning.

My other book review from this year is more directly applicable to learning. Scott Young’s Ultralearning consolidates the advice that he has been publishing for years on his blog and in courses, bolsters it with research results, and shows how real people have approached challenging learning projects. Ultralearning is built around nine principles for optimal learning: starting a project with *metalearning*, maintaining the right level of *focus*, keeping *directness* in mind (learning things in the appropriate context), *drilling* problems to build up your weak areas, practicing *retrieval*, getting the right kind of *feedback*, focusing on information *retention*, building *intuition*, and using *experiments* to find what works best for you. Chapter 13 of the book is a guide to designing and executing a successful ultralearning project. I used it to suggest how one might plan and execute a math project like the one I worked on this year.

## Part 2: Quora

As described in A Summer 2019 Experiment, I decided that starting in July 2019, I would try something new with my weekly articles. Rather than posting a medium to long article each week on the blog, I would post one or more answers on Quora each week, and link to them from a short weekly blog post. Here are are my Quora Experiment articles from the second half of this year:

Week 1: Two answers about books: One about

*Cracking the Coding Interview*and how useful it is now that we have sites like HackerRank and LeetCode, and a short Quora adaptation of my Ultralearning book summary.Week 2: If algorithms are taught in universities, why doesn’t everyone win the ACM-ICPC competition?

Week 3: How do companies evaluate code submitted during coding interviews or coding competitions?

Week 4: What is competitive programming (other than the literal answer)?

Week 5: How does Petr Mitrichev practice for Competitive Programming?

Week 6: How do I ask complicated programming questions on Quora, like the ones on Stack Overflow?

Week 7: Do I need to be good at math to do competitive programming?

Week 8: What happens in a programming interview if you get the answer wrong but show that you understand the concepts?

Week 9: If you only knew competitive programming, could you fake being a real programmer?

Week 10: A few answers on the topic of competitive/interview programming vs. real-world programming. Also, my viral Mark Zuckerberg answer.

Week 11: Two answers about two books, and how relevant they are for competitive programming study.

Week 12: Why would you not participate in a long contest?

Week 13: Should Quora’s content policies be stricter, like the policies favored by Stack Exchange sites?

Week 14: When Microsoft interviews a software engineer, do they have a preference for which programming language the candidate uses to solve the interview problems?

Week 15: Do you think programming interviews these days are a joke?

Week 16: How to write a programming question, and why Quora isn’t the best place to do it.

Week 17: Is there a way to prepare for coding interviews that’s better that LeetCode and self-study?

Week 18: What are the benefits of being a Codeforces expert?

Week 19: Which order is better for practicing LeetCode problems: by acceptance rate (easiest problems first), or by concept?

Week 20: Is there a learning benefit to looking at the solution to a competitive programming problem after working on it for only 30 minutes?

Week 21: When companies use HackerRank for evaluating candidates, do they look at the candidate’s submitted code, or just their scores?

Week 22: Do I need to be good at algorithms to begin competitive programming, or can I start from the bottom and get better by doing?

Week 23: What’s the next step if you read a problem statement, think a bit, and realize you don’t know how to solve it?

Week 24: How many LeetCode problems should I do?

Week 25: Why are people obsessed with competitive programming when it’s not used in real-world programming jobs?

**Thoughts About 2019 on the Blog**

The big change on the blog this year was the emphasis on Quora. The results were not surprising: Quora has a huge built-in audience who are there to read about the topics they’re subscribed to. I plan to continue the Quora approach in 2020. More on that next week.

## Exploring the Archives

I also wrote retrospective posts in previous years. You can use them as a table of contents for the blog archives. So if you’re interested in what has come before, take a look.

During 2015 and 2016 I wrote about topics related to competitive programming, learning, practice, productivity, and software careers. During 2017 and 2018, I focused on specific year-long projects:

- Summer 2015 review (first half of the year)
- 2015 in Review
- 2016 in Review
- What I Learned Working on Time Tortoise in 2017
- Competitive Programming Frequently Asked Questions: 2018 In Review

(Image credit: On a trip to UCLA a few months ago, I took some time to drive out to Griffith Observatory)