<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Power Overwhelming - Personal</title><link href="https://toa.evanchen.cc/" rel="alternate"/><link href="https://toa.evanchen.cc/feeds/personal.atom.xml" rel="self"/><id>https://toa.evanchen.cc/</id><updated>2023-09-06T13:37:00-04:00</updated><subtitle>The blog of Evan Chen</subtitle><entry><title>Slice of life of the OTIS GM</title><link href="https://toa.evanchen.cc/slice/" rel="alternate"/><published>2023-09-06T13:37:00-04:00</published><updated>2023-09-06T13:37:00-04:00</updated><author><name>Evan Chen 《陳誼廷》</name></author><id>tag:toa.evanchen.cc,2023-09-06:/slice/</id><summary type="html">&lt;p&gt;Here&amp;rsquo;s a snapshot of what running OTIS looks like these days.
Starts from last Sunday afternoon until Monday lunch.
Timestamps indicate when the action was completed (rather than started).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Sunday 13:04&lt;/strong&gt;: Process a late financial aid request from someone who forgot
  to request it earlier.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 13:14&lt;/strong&gt;: &lt;a href="https://github.com/vEnhance/otis-web/commit/d0d3dd64c4ee90b7eaba6734c3dde34684491c5d"&gt;Edit OTIS website&lt;/a&gt;
  to clarify that if you haven&amp;rsquo;t had your registration approved within 48 hours,
  then you should email Evan to ask.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 13:15&lt;/strong&gt;: Process a student who wants to drop the fall semester and
  come back to re-join in the spring.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 13:55&lt;/strong&gt;: Answer a question from a student on Discord on applying
  AM-GM on the inequality that I was trying to do in my head when I failed my
  driving test 11 years ago.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 14:04&lt;/strong&gt;: Fix a reported typo in the problem statement of
  &lt;a href="https://aops.com/community/p4619594"&gt;China TST 2015/2/3&lt;/a&gt;
  in the OTIS …&lt;/li&gt;&lt;/ul&gt;</summary><content type="html">&lt;p&gt;Here&amp;rsquo;s a snapshot of what running OTIS looks like these days.
Starts from last Sunday afternoon until Monday lunch.
Timestamps indicate when the action was completed (rather than started).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Sunday 13:04&lt;/strong&gt;: Process a late financial aid request from someone who forgot
  to request it earlier.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 13:14&lt;/strong&gt;: &lt;a href="https://github.com/vEnhance/otis-web/commit/d0d3dd64c4ee90b7eaba6734c3dde34684491c5d"&gt;Edit OTIS website&lt;/a&gt;
  to clarify that if you haven&amp;rsquo;t had your registration approved within 48 hours,
  then you should email Evan to ask.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 13:15&lt;/strong&gt;: Process a student who wants to drop the fall semester and
  come back to re-join in the spring.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 13:55&lt;/strong&gt;: Answer a question from a student on Discord on applying
  AM-GM on the inequality that I was trying to do in my head when I failed my
  driving test 11 years ago.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 14:04&lt;/strong&gt;: Fix a reported typo in the problem statement of
  &lt;a href="https://aops.com/community/p4619594"&gt;China TST 2015/2/3&lt;/a&gt;
  in the OTIS materials.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 14:10&lt;/strong&gt;: Follow up on questions related to the driving test
  inequality.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 14:14&lt;/strong&gt;: Student reports that the solution to problem 3 in the
  BFW functional equations unit is incorrect. Fix the solution.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 14:25&lt;/strong&gt;: &lt;a href="https://github.com/vEnhance/otis-web/commit/1ebab2a6fb84b37012e869ee598984a7401450c8"&gt;Fix a bug on OTIS website&lt;/a&gt;
  that would double-count units towards your level if you submitted the
  same unit in different years.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 14:35&lt;/strong&gt;: Write &lt;a href="https://github.com/vEnhance/otis-web/commit/6ff81e14046cd3468f998a7036acc433fc9d7a71"&gt;unit tests&lt;/a&gt; for problem set grading script,
  because apparently I somehow managed to never do that.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 14:48&lt;/strong&gt;: Merge pull requests to clean up the &lt;a href="https://github.com/vEnhance/otis-web/commit/081366fa5efdc468937078eb5df1d76b886ec155"&gt;level system&lt;/a&gt;
  and to remove an &lt;a href="https://github.com/vEnhance/otis-web/commit/1545bd078ee478c00c3245b6b036543220ac69eb"&gt;unused view&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Eat lunch. Yes, at 3pm.&lt;/li&gt;
&lt;li&gt;Watch a few episodes from &lt;em&gt;A Series of Unfortunate Events&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Work on stuff unrelated to OTIS. Sleep a bit.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 21:03&lt;/strong&gt;: Answer an email about the rational root theorem based
  solutions to &lt;a href="https://aops.com/community/p3160553"&gt;Shortlist 2012 A4&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 21:09&lt;/strong&gt;: Answer an email from a student about motivating the
  construction in &lt;a href="https://aops.com/community/p14169205"&gt;BAMO 2020/4&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 21:13&lt;/strong&gt;: Write hints for the problem ARML 2023 T-6 on the OTIS
  website, since a student emailed asking for hints and none were written yet.
  Notice a typo in the ARML 2023 T-6 solution and fix it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 21:18&lt;/strong&gt;: Rewrite hints for IMO 2004/4 since the ones
  currently on the OTIS website don&amp;rsquo;t make sense.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 21:18&lt;/strong&gt;: Process a unit petition from a student who wants to work on
  the Homography unit.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 21:19&lt;/strong&gt;: Process an OTIS registration from a new incoming student.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 21:20&lt;/strong&gt;: Read a submission for Int Poly and mark it as completed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 21:27&lt;/strong&gt;: Read a submission for Entry Combo and mark it as completed.
  Include a short comment about JMO 2021/4 in the feedback.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 21:27&lt;/strong&gt;: Read a submission for AIME Geo and mark it as completed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 21:30&lt;/strong&gt;: Read a submission for Expon NT and mark it as completed.
  Include a short comment that checking &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msup&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mn&gt;16&lt;/mn&gt;&lt;/msup&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;2^{16}+1&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span aria-hidden="true" class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.8974em;vertical-align:-0.0833em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord"&gt;2&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist" style="height:0.8141em;"&gt;&lt;span style="top:-3.063em;margin-right:0.05em;"&gt;&lt;span class="pstrut" style="height:2.7em;"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mtight"&gt;16&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.2222em;"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;+&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.2222em;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.6444em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; is prime only requires you to
  try two different prime numbers, &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;97&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;97&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span aria-hidden="true" class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.6444em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;97&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;193&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;193&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span aria-hidden="true" class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.6444em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;193&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, because any prime divisor has
  to be &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mspace&gt;&lt;/mspace&gt;&lt;mspace width="0.4444em"&gt;&lt;/mspace&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mrow&gt;&lt;mi mathvariant="normal"&gt;m&lt;/mi&gt;&lt;mi mathvariant="normal"&gt;o&lt;/mi&gt;&lt;mi mathvariant="normal"&gt;d&lt;/mi&gt;&lt;/mrow&gt;&lt;mspace width="0.3333em"&gt;&lt;/mspace&gt;&lt;mn&gt;32&lt;/mn&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;1 \pmod{32}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span aria-hidden="true" class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.6444em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;1&lt;/span&gt;&lt;span class="mspace allowbreak"&gt;&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.4444em;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:1em;vertical-align:-0.25em;"&gt;&lt;/span&gt;&lt;span class="mopen"&gt;(&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord"&gt;&lt;span class="mord mathrm"&gt;mod&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.3333em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;32&lt;/span&gt;&lt;span class="mclose"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 21:32&lt;/strong&gt;: Read a submission for Harmonic and mark it as completed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 21:34&lt;/strong&gt;: Read a submission for Rigid and mark it as completed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 21:36&lt;/strong&gt;: Read a submission for Entry Combo and mark it as completed.&lt;/li&gt;
&lt;li&gt;Get ready for bed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sunday 22:05&lt;/strong&gt;: Respond to a student who can&amp;rsquo;t figure out how to log in to
  the OTIS website because they never set a password.&lt;/li&gt;
&lt;li&gt;Go to sleep.&lt;/li&gt;
&lt;li&gt;Wake up and sit down at computer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 07:03&lt;/strong&gt;: Read an email from a student asking about
  &lt;a href="https://aops.com/community/p25555422"&gt;Singapore 2022/5&lt;/a&gt;.
  Read through the problem statements and posts on AoPS, and think for a bit.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 07:39&lt;/strong&gt;: Decide that the Singapore problem is actually pretty good.
  Write up solution completely and add it into the Global unit.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 07:46&lt;/strong&gt;: Read a submission for Config Geo and mark it as completed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 07:50&lt;/strong&gt;: Read a submission for Induction and Recursion II.
  Student notes that there is a better solution to
  &lt;a href="https://aops.com/community/p3041823"&gt;USAMO 2013/2&lt;/a&gt; than the one
  I have in the OTIS lecture notes.
  Read through the solution posted on AoPS.
  The solution has a neat symmetry idea that I&amp;rsquo;d missed,
  but the handling of the edge cases looks slightly off.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 08:35&lt;/strong&gt;: Rewrite the OTIS solution to incorporate the symmetry idea,
  cutting the length of the OTIS solution significantly.
  Post briefly on AoPS pointing out the fix for posterity.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 08:36&lt;/strong&gt;: Process unit petitions from students;
  one student wants to switch difficulties of Russian Combo,
  one student is switching from the Formulas unit to AIME Geo,
  one student is requesting the Global and Local unit,
  one student is requesting the recently created Integration Bee unit.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 08:37&lt;/strong&gt;: Read a submission for Equality and mark it as completed.
  Include a short note that the student&amp;rsquo;s solution to the
  &lt;a href="https://aops.com/community/p3551877"&gt;Taiwan problem&lt;/a&gt;
  (one of Evan&amp;rsquo;s favorite problems of all time, by the way) is backwards.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 08:47&lt;/strong&gt;: Read a submission for Inversion and Spiral and mark it as completed.
  Student has included a question about motivating the construction of the points
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;X&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;X&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span aria-hidden="true" class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.6833em;"&gt;&lt;/span&gt;&lt;span class="mord mathnormal" style="margin-right:0.0785em;"&gt;X&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;Y&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;Y&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span aria-hidden="true" class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.6833em;"&gt;&lt;/span&gt;&lt;span class="mord mathnormal" style="margin-right:0.2222em;"&gt;Y&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; in the solution to &lt;a href="https://aops.com/community/p3477448"&gt;Russia 2014&lt;/a&gt;.
  Edit the OTIS solution to make it more clear by defining &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;X&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;X&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span aria-hidden="true" class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.6833em;"&gt;&lt;/span&gt;&lt;span class="mord mathnormal" style="margin-right:0.0785em;"&gt;X&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;Y&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;Y&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span aria-hidden="true" class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.6833em;"&gt;&lt;/span&gt;&lt;span class="mord mathnormal" style="margin-right:0.2222em;"&gt;Y&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
  as the arc midpoints directly rather than as the intersection of lines with circles.
  Then decide that the dotted circles in the solution are too hard to see,
  so edit the diagram too to make the circles solid unsaturated colors,
  and move some point labels around. Increase diagram size from 9cm to 12cm.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 08:49&lt;/strong&gt;: Read a submission for Gen Func and mark it as completed.
  Include a counterexample to the student&amp;rsquo;s proposed construction for
  &lt;a href="https://aops.com/community/p2325361"&gt;Putnam 2003 A6&lt;/a&gt;.
  Notice that the Putnam URL is missing from the database, and add it in.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 08:52&lt;/strong&gt;: Read a submission for Entry Combo and mark it as completed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 08:55&lt;/strong&gt;: Read a submission for Invert and mark it as completed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 08:58&lt;/strong&gt;: Read a submission for Expon NT and mark it as completed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 09:00&lt;/strong&gt;: Read another submission for Expon NT and mark it as completed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 09:02&lt;/strong&gt;: Read a submission to Anti Problems and mark it as completed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 09:04&lt;/strong&gt;: Read a submission to Func Eqn and mark it as completed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 09:05&lt;/strong&gt;: Read another submission for Entry Combo and mark it as completed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 09:15&lt;/strong&gt;: Read follow-up email about &lt;a href="https://aops.com/community/p3160553"&gt;Shortlist 2012 A4&lt;/a&gt;.
  Realize that the reply I gave last night was incorrect.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 09:30&lt;/strong&gt;: Reply to student about &lt;a href="https://aops.com/community/p3160553"&gt;2012 A4&lt;/a&gt; indicating
  that I don&amp;rsquo;t know the answer to their question, but will ask around.
  Post on AoPS and OTIS Discord asking if anyone understands how
  rational root theorem was used for the 2012 A4 solution.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 09:34&lt;/strong&gt;: Answer an email from a prospective student complaining
  about being unable to afford coaching, indicating that OTIS is need-blind
  and the student is welcome to apply to my program.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 09:44&lt;/strong&gt;: A different student replies on the OTIS Discord
  indicating they also don&amp;rsquo;t see how rational root theorem was used for
  &lt;a href="https://aops.com/community/p3160553"&gt;2012 A4&lt;/a&gt;, but suggesting how Vieta can be used to patch.
  Report back the Vieta patch to the original email question.&lt;/li&gt;
&lt;li&gt;Finally get out of chair to eat breakfast.&lt;/li&gt;
&lt;li&gt;Do some unrelated work for OTIS.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 11:43&lt;/strong&gt;: answer another email from another prospective student
  asking if OTIS is a good fit and if there is financial aid.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 12:15&lt;/strong&gt;: answer a question from a student who is unsure whether they
  paid for OTIS or not, because they just left the page that said
  &amp;ldquo;please check back later&amp;rdquo; open overnight expecting something to happen.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 12:21&lt;/strong&gt;: update the payment success page
  to &lt;a href="https://github.com/vEnhance/otis-web/commit/50b32cd3db9db2f6cc8785c63b76988d1a85b54c"&gt;redirect to the invoice page after 10 seconds&lt;/a&gt;
  so that the above issue never happens again.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 12:25&lt;/strong&gt;: email a potential instructor for OTIS.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 12:30&lt;/strong&gt;: answer a question about multiplicatively of the Jacobi
  symbol from a student.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 12:38&lt;/strong&gt;: answer a question about the walkthrough to
  &lt;a href="https://aops.com/community/p3104304"&gt;ELMO 2013/1&lt;/a&gt; from a student.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 12:42&lt;/strong&gt;: respond to a suggestion about writing a
  unit on conic geometry.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 13:00&lt;/strong&gt;: respond to yet another student who can&amp;rsquo;t figure out
  how to log in to the OTIS website because they never set a password.&lt;/li&gt;
&lt;li&gt;Nap for a bit.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 14:08&lt;/strong&gt;: respond to a follow-up question about ELMO 2013/1.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 14:23&lt;/strong&gt;: update the login view with &lt;a href="https://github.com/vEnhance/otis-web/commit/397fda8530a1d936c8e7db8f4745b564c4171cf0"&gt;instructions&lt;/a&gt;
  indicating that if you never set a password,
  you should log in with whichever social connection you used to register,
  because, well, there&amp;rsquo;s no password.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monday 14:35&lt;/strong&gt;: finish rewriting the solution to ELMO 2013/1,
  because the one in the database was terrible.&lt;/li&gt;
&lt;li&gt;Head out for lunch.&lt;/li&gt;
&lt;/ul&gt;</content><category term="Personal"/><category term="otis"/><category term="slice of life"/><category term="teaching"/></entry><entry><title>Things to tell 18-year-old Evan</title><link href="https://toa.evanchen.cc/18yo/" rel="alternate"/><published>2023-08-30T13:37:00-04:00</published><updated>2023-08-30T13:37:00-04:00</updated><author><name>Evan Chen 《陳誼廷》</name></author><id>tag:toa.evanchen.cc,2023-08-30:/18yo/</id><summary type="html">&lt;p&gt;Early in 2023 the MIT Undergraduate Math Association had an event where course
18&amp;rsquo;s could get paired with a graduate student and chat over coffee.
So naturally I got asked what I wish I knew as an undergraduate.
This post records some subset of the things I said.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Undergraduate math isn&amp;rsquo;t deep after all &amp;mdash; &lt;strong&gt;it&amp;rsquo;s broad but shallow&lt;/strong&gt;.
    (Graduate school is a different story.)
    For years, I was told that when I got to university,
    math would be way harder than in high school,
    because blah-blah-blah contests aren&amp;rsquo;t real math blah-blah-blah.
    &lt;a href="https://web.evanchen.cc/faq-school.html#S-9"&gt;Turns out I was somewhat misled&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;I wish I had taken fewer math classes.&lt;/strong&gt;
    For someone that&amp;rsquo;s taken circa 30 semesters of math classes,
    I remember astonishingly little of what was covered.
    All too often I&amp;rsquo;ve had the rather depressing experience of not
    understanding chapters of Napkin, despite being the author.&lt;/p&gt;
&lt;p&gt;Time as …&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;</summary><content type="html">&lt;p&gt;Early in 2023 the MIT Undergraduate Math Association had an event where course
18&amp;rsquo;s could get paired with a graduate student and chat over coffee.
So naturally I got asked what I wish I knew as an undergraduate.
This post records some subset of the things I said.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Undergraduate math isn&amp;rsquo;t deep after all &amp;mdash; &lt;strong&gt;it&amp;rsquo;s broad but shallow&lt;/strong&gt;.
    (Graduate school is a different story.)
    For years, I was told that when I got to university,
    math would be way harder than in high school,
    because blah-blah-blah contests aren&amp;rsquo;t real math blah-blah-blah.
    &lt;a href="https://web.evanchen.cc/faq-school.html#S-9"&gt;Turns out I was somewhat misled&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;I wish I had taken fewer math classes.&lt;/strong&gt;
    For someone that&amp;rsquo;s taken circa 30 semesters of math classes,
    I remember astonishingly little of what was covered.
    All too often I&amp;rsquo;ve had the rather depressing experience of not
    understanding chapters of Napkin, despite being the author.&lt;/p&gt;
&lt;p&gt;Time as an undergraduate is really valuable,
  so in hindsight I don&amp;rsquo;t think this was worth the opportunity cost,
  since (a) I didn&amp;rsquo;t remember most of it later anyway,
  (b) math is easier to learn by yourself than many other fields.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Instead I should&amp;rsquo;ve taken more music and linguistics&lt;/strong&gt; or similar.
    They were better taught than the math classes,
    and far harder to replace after graduating.
    In general, at MIT at least I thought the humanities classes
    were stronger than the technical classes, pedagogically.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;But you don&amp;rsquo;t have to drown in classwork&lt;/strong&gt;.
    I started every semester by signing up for eight classes,
    and then taking the four that took the least time.
    Also, being a math major means you have
    &lt;a href="https://math.mit.edu/academics/undergrad/major/course18/general.html"&gt;almost no major requirements&lt;/a&gt;;
    you can get a math major by taking one math class per semester.&lt;/p&gt;
&lt;p&gt;I think being intentionally light on classes was the correct decision,
  because &amp;mdash;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Living on campus next to your friends is absurdly underrated&lt;/strong&gt;.
    Now I&amp;rsquo;m at the age where most of my peers have graduated, gotten jobs,
    moved to one of the coasts, etc. In some cases they&amp;rsquo;ve gotten married
    and basically disappeared off the face of the Earth.
    And I wish I had taken more advantage of the time when
    everyone was basically within a 2-mile radius of each other.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Besides, &lt;strong&gt;meeting new people is much easier in college&lt;/strong&gt;.
    It&amp;rsquo;s much harder when you get older.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Growing up is horrible&lt;/strong&gt;. Seriously.
    Besides crappy dorms and tuition, I really miss being an undergrad.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;</content><category term="Personal"/><category term="advice"/></entry><entry><title>Everything I need is on the ground</title><link href="https://toa.evanchen.cc/ground/" rel="alternate"/><published>2023-03-11T13:37:00-05:00</published><updated>2023-03-11T13:37:00-05:00</updated><author><name>Evan Chen 《陳誼廷》</name></author><id>tag:toa.evanchen.cc,2023-03-11:/ground/</id><summary type="html">&lt;p&gt;For me the biggest difference between undergraduate math and PhD life
has been something I&amp;rsquo;ve never seen anyone else talk about:
it&amp;rsquo;s the feeling like I could no longer see the ground.&lt;/p&gt;
&lt;p&gt;To explain what this means, imagine that mathematics is this wide tower,
where you start with certain axioms as a foundation,
and then you build upwards on it.
At first learning math felt like slowly climbing up this tower.
When I reached a landmark, it felt like I was on the balcony
of the 30th or 50th or 100th floor, enjoying the view,
with an appreciation of the floors I had ascended to get here.&lt;/p&gt;
&lt;p&gt;In theory, proofs in math can be formalized as a
long sequence of logical steps from the axioms that could be
&lt;a href="https://en.wikipedia.org/wiki/Proof_assistant"&gt;computer-verified&lt;/a&gt;.
This turns out to way too cumbersome to actually do &lt;em&gt;in practice&lt;/em&gt; given
the current state of technology (though …&lt;/p&gt;</summary><content type="html">&lt;p&gt;For me the biggest difference between undergraduate math and PhD life
has been something I&amp;rsquo;ve never seen anyone else talk about:
it&amp;rsquo;s the feeling like I could no longer see the ground.&lt;/p&gt;
&lt;p&gt;To explain what this means, imagine that mathematics is this wide tower,
where you start with certain axioms as a foundation,
and then you build upwards on it.
At first learning math felt like slowly climbing up this tower.
When I reached a landmark, it felt like I was on the balcony
of the 30th or 50th or 100th floor, enjoying the view,
with an appreciation of the floors I had ascended to get here.&lt;/p&gt;
&lt;p&gt;In theory, proofs in math can be formalized as a
long sequence of logical steps from the axioms that could be
&lt;a href="https://en.wikipedia.org/wiki/Proof_assistant"&gt;computer-verified&lt;/a&gt;.
This turns out to way too cumbersome to actually do &lt;em&gt;in practice&lt;/em&gt; given
the current state of technology (though &lt;a href="https://www.cs.rug.nl/~wim/fermat/wilesEnglish.html"&gt;this is changing&lt;/a&gt;),
but I was at least satisfied that all the results I had seen
&lt;em&gt;could in principle&lt;/em&gt; be compiled to a formal proof.&lt;/p&gt;
&lt;p&gt;As soon as I started doing my PhD,
this feeling of internal consistency and safety completely vanished.
It felt like someone had put me a rocket
and boosted me to the 100,000th floor.
I had no vision of the ground or any of the floors below me.
I could actually be on Neptune for all I know.&lt;/p&gt;
&lt;p&gt;It was scary enough having &amp;ldquo;black boxes&amp;rdquo; (quoting a theorem
without having gone through the proof yourself).
At this point, I don&amp;rsquo;t even know the &lt;em&gt;definitions&lt;/em&gt; of half
the objects that I&amp;rsquo;m playing with.
It&amp;rsquo;s like, I&amp;rsquo;m trying to prove a result about an
irreducible tempered cuspidal automorphic representation &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;π&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\pi&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span aria-hidden="true" class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.4306em;"&gt;&lt;/span&gt;&lt;span class="mord mathnormal" style="margin-right:0.0359em;"&gt;π&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;,
except I don&amp;rsquo;t know what any of the five words before &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;π&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\pi&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span aria-hidden="true" class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.4306em;"&gt;&lt;/span&gt;&lt;span class="mord mathnormal" style="margin-right:0.0359em;"&gt;π&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; means.
So I just take someone&amp;rsquo;s word for it that the only thing I need
for this calculation are the &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;n&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span aria-hidden="true" class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.4306em;"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; Satake parameters
&lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;α&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/msub&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mo&gt;…&lt;/mo&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;α&lt;/mi&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;/msub&gt;&lt;mo&gt;∈&lt;/mo&gt;&lt;mi mathvariant="double-struck"&gt;C&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\alpha_1, \dots, \alpha_n \in \mathbb{C}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span aria-hidden="true" class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.7335em;vertical-align:-0.1944em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal" style="margin-right:0.0037em;"&gt;α&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist" style="height:0.3011em;"&gt;&lt;span style="top:-2.55em;margin-left:-0.0037em;margin-right:0.05em;"&gt;&lt;span class="pstrut" style="height:2.7em;"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist" style="height:0.15em;"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mpunct"&gt;,&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.1667em;"&gt;&lt;/span&gt;&lt;span class="minner"&gt;…&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.1667em;"&gt;&lt;/span&gt;&lt;span class="mpunct"&gt;,&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.1667em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal" style="margin-right:0.0037em;"&gt;α&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist" style="height:0.1514em;"&gt;&lt;span style="top:-2.55em;margin-left:-0.0037em;margin-right:0.05em;"&gt;&lt;span class="pstrut" style="height:2.7em;"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist" style="height:0.15em;"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.2778em;"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;∈&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.2778em;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.6889em;"&gt;&lt;/span&gt;&lt;span class="mord mathbb"&gt;C&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; attached to &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;π&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\pi&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span aria-hidden="true" class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.4306em;"&gt;&lt;/span&gt;&lt;span class="mord mathnormal" style="margin-right:0.0359em;"&gt;π&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;,
except I don&amp;rsquo;t know what a Satake parameter is either,
but at least I know it&amp;rsquo;s a complex number, so yay?&lt;/p&gt;
&lt;p&gt;I will tell you a sobering story about my 2016 paper
&lt;a href="https://arxiv.org/abs/1608.04146"&gt;arXiv:1608.04146&lt;/a&gt;.
I was really nervous when writing it because the arithmetic geometry
involved was &lt;em&gt;well&lt;/em&gt; above my pay-grade, and even asked
a more knowledgeable colleague to sanity-check it before submission.
When it reached the journal, one referee said it looked good
modulo six minor typos (like &amp;ldquo;we map pick&amp;rdquo; to &amp;ldquo;we may pick&amp;rdquo;);
the second referee never replied.&lt;/p&gt;
&lt;p&gt;Then just as the paper was about to be published,
the second referee suddenly replied with a document saying the paper
&amp;ldquo;need[s] a deep revision to fix the proof of the main result
and to improve the exposition which up to now is not accurate&amp;rdquo;,
followed by a 3-page list of ambiguities and errors.
My original paper was only 10 pages!
I was extremely grateful to the second referee.
(And no slight to the first referee; math is hard,
and the point of peer review is sanity-checking, not deep verification.)&lt;/p&gt;
&lt;p&gt;I guess I&amp;rsquo;m scared of heights.
I wonder if I&amp;rsquo;m supposed to just get used to it.&lt;/p&gt;</content><category term="Personal"/><category term="math"/></entry><entry><title>But look at me now</title><link href="https://toa.evanchen.cc/oliveira/" rel="alternate"/><published>2023-02-14T13:37:00-05:00</published><updated>2023-02-14T13:37:00-05:00</updated><author><name>Evan Chen 《陳誼廷》</name></author><id>tag:toa.evanchen.cc,2023-02-14:/oliveira/</id><summary type="html">&lt;figure&gt;&lt;a href="https://toa.evanchen.cc/oliveira/images/oliveira.gif" rel="noopener" target="_blank"&gt;&lt;img alt="Congratulations!" src="https://toa.evanchen.cc/oliveira/images/oliveira.gif"&gt;&lt;/a&gt;&lt;figcaption&gt;Congratulations!&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Last weekend in StarCraft, the world championship at &lt;a href="https://liquipedia.net/starcraft2/IEM_Katowice/2023"&gt;IEM Katowice 2023&lt;/a&gt;
saw a so-good-it-must-be-scripted Cinderella story,
where Oliveira won the world championship in a totally unexpected way.
It was a whole roller-coaster of upset after upset from Oliveira,
and up until the grand finals we were all still asking,
&amp;ldquo;this can&amp;rsquo;t be, is this really happening?&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Some context: StarCraft has one of the lowest upset rates
of any competitive game out there, and Oliveira (formerly known as TIME)
was ranked something like &lt;a href="https://tl.net/forum/starcraft-2/606796-power-rank-iem-katowice-2023"&gt;#21&lt;/a&gt; coming in.
Last November at DreamHack Atlanta (which I was at!),
he didn&amp;rsquo;t win a single map. And just a month before IEM 2023,
Blizzard had shut down its Chinese servers.
But he&amp;rsquo;d been practicing 12 to 15 hours a day lately, and it showed.&lt;/p&gt;
&lt;p&gt;The final &lt;a href="https://www.youtube.com/watch?v=SknnGr_-KuI&amp;amp;t=35664s"&gt;winner interview&lt;/a&gt;
was so emotional not only did Oliveira start crying,
the host &lt;em&gt;also&lt;/em&gt; started crying …&lt;/p&gt;</summary><content type="html">&lt;figure&gt;&lt;a href="https://toa.evanchen.cc/oliveira/images/oliveira.gif" rel="noopener" target="_blank"&gt;&lt;img alt="Congratulations!" src="https://toa.evanchen.cc/oliveira/images/oliveira.gif"&gt;&lt;/a&gt;&lt;figcaption&gt;Congratulations!&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Last weekend in StarCraft, the world championship at &lt;a href="https://liquipedia.net/starcraft2/IEM_Katowice/2023"&gt;IEM Katowice 2023&lt;/a&gt;
saw a so-good-it-must-be-scripted Cinderella story,
where Oliveira won the world championship in a totally unexpected way.
It was a whole roller-coaster of upset after upset from Oliveira,
and up until the grand finals we were all still asking,
&amp;ldquo;this can&amp;rsquo;t be, is this really happening?&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Some context: StarCraft has one of the lowest upset rates
of any competitive game out there, and Oliveira (formerly known as TIME)
was ranked something like &lt;a href="https://tl.net/forum/starcraft-2/606796-power-rank-iem-katowice-2023"&gt;#21&lt;/a&gt; coming in.
Last November at DreamHack Atlanta (which I was at!),
he didn&amp;rsquo;t win a single map. And just a month before IEM 2023,
Blizzard had shut down its Chinese servers.
But he&amp;rsquo;d been practicing 12 to 15 hours a day lately, and it showed.&lt;/p&gt;
&lt;p&gt;The final &lt;a href="https://www.youtube.com/watch?v=SknnGr_-KuI&amp;amp;t=35664s"&gt;winner interview&lt;/a&gt;
was so emotional not only did Oliveira start crying,
the host &lt;em&gt;also&lt;/em&gt; started crying along with him.
Along with a lot of the audience in Poland,
and myself as I was watching the broadcast at home.&lt;/p&gt;
&lt;p&gt;A rough translation of the teary part (it was in Chinese):&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I think, I&amp;rsquo;ve waited so long, so long for this world championship.
Last year was really hard for me, when I lost 0-6 in Atlanta,
I thought it&amp;rsquo;s over, my career in StarCraft II is over.
But since the last defeat, I told myself:
I could practice more, I could practice more,
and if one day, I really lift the world champion trophy,
maybe I&amp;rsquo;ll prove… I&amp;rsquo;ll prove to you all.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Personally, my favorite part was the opening lines:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I mean … like… like, many people sometimes tell me, like,
you should finish StarCraft 2, you should retire.
And maybe, and, like, you should give up…&lt;/p&gt;
&lt;p&gt;But look at me now.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That&amp;rsquo;s going on my quotes list.&lt;/p&gt;</content><category term="Personal"/></entry><entry><title>The silver lining</title><link href="https://toa.evanchen.cc/silver/" rel="alternate"/><published>2023-01-02T13:37:00-05:00</published><updated>2023-01-02T13:37:00-05:00</updated><author><name>Evan Chen 《陳誼廷》</name></author><id>tag:toa.evanchen.cc,2023-01-02:/silver/</id><content type="html">&lt;p&gt;A while ago someone asked me how COVID had affected the students I worked with.
I replied that, on average, the pandemic had tripled my students&amp;rsquo; productivity.&lt;/p&gt;
&lt;p&gt;And I&amp;rsquo;m gonna brag about it like the proud teacher I am.&lt;/p&gt;</content><category term="Personal"/><category term="teaching"/></entry><entry><title>poem</title><link href="https://toa.evanchen.cc/poem/" rel="alternate"/><published>2022-11-15T13:37:00-05:00</published><updated>2022-11-15T13:37:00-05:00</updated><author><name>Evan Chen 《陳誼廷》</name></author><id>tag:toa.evanchen.cc,2022-11-15:/poem/</id><content type="html">&lt;p&gt;don&amp;rsquo;t ask why it just came in my head&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Quandary&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;So you have a fair coin that you found on the ground,&lt;br /&gt;
or at least that&amp;rsquo;s what everyone says.&lt;br /&gt;
But on each of N times that you&amp;rsquo;ve tossed it around,&lt;br /&gt;
you see every flip has been heads.&lt;/p&gt;
&lt;p&gt;For which value of N should you start to suspect&lt;br /&gt;
that the coin isn&amp;rsquo;t actually fair?&lt;br /&gt;
For which values of N can you firmly declare&lt;br /&gt;
that the tails side is not even there?&lt;/p&gt;
&lt;/blockquote&gt;</content><category term="Personal"/><category term="writing"/></entry><entry><title>Book pitch</title><link href="https://toa.evanchen.cc/book-pitch/" rel="alternate"/><published>2021-08-16T13:37:00-04:00</published><updated>2021-08-16T13:37:00-04:00</updated><author><name>Evan Chen 《陳誼廷》</name></author><id>tag:toa.evanchen.cc,2021-08-16:/book-pitch/</id><summary type="html">&lt;p&gt;This is a pitch for a new text that I&amp;rsquo;m thinking of writing.
I want to post it here to solicit opinions from the general community before
investing a lot of time into the actual writing.&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;There are a lot of students who ask me a question isomorphic to:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;How do I learn to write proofs?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I&amp;rsquo;ve got this on my Q&amp;amp;A. For the contest kiddos out there,
it basically amounts to saying &amp;ldquo;read the official solutions to any competition&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;But I think I can do better.&lt;/p&gt;
&lt;h2&gt;Requirements&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;Calling into question the obvious, by insisting that it be &amp;ldquo;rigorously proved&amp;rdquo;, is to say to a student,
&amp;ldquo;Your feelings and ideas are suspect. You need to think and speak our way.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Now there is a place for formal proof in mathematics, no question.
But that place is not a student’s first introduction to mathematical argument.
At …&lt;/p&gt;&lt;/blockquote&gt;</summary><content type="html">&lt;p&gt;This is a pitch for a new text that I&amp;rsquo;m thinking of writing.
I want to post it here to solicit opinions from the general community before
investing a lot of time into the actual writing.&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;There are a lot of students who ask me a question isomorphic to:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;How do I learn to write proofs?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I&amp;rsquo;ve got this on my Q&amp;amp;A. For the contest kiddos out there,
it basically amounts to saying &amp;ldquo;read the official solutions to any competition&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;But I think I can do better.&lt;/p&gt;
&lt;h2&gt;Requirements&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;Calling into question the obvious, by insisting that it be &amp;ldquo;rigorously proved&amp;rdquo;, is to say to a student,
&amp;ldquo;Your feelings and ideas are suspect. You need to think and speak our way.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Now there is a place for formal proof in mathematics, no question.
But that place is not a student’s first introduction to mathematical argument.
At least let people get familiar with some mathematical objects, and learn what to expect from them,
before you start formalizing everything.&lt;/p&gt;
&lt;p&gt;&amp;mdash; Paul Lockhart&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There was a while I tried to look around to find an introduction-to-proofs textbook that I liked.
I specifically wanted to have the following requirements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pragmaticism&lt;/strong&gt;: the textbook should not start with foundational issues like
  logical quantifiers or set theory.
  I have held a long belief that these are emphatically not the right way to start proofs,
  because &lt;em&gt;in practice&lt;/em&gt; when one really does proofs,
  one is usually not thinking too much about the axioms of set theory.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Substantial&lt;/strong&gt;: the results one proves as practice should feel interesting. They should have meat.
  For example, the statement that a tree always has one fewer edge than vertex is not obvious at first,
  so when one sees the proof it gives an idea.
  I believe this is important because I want to develop a student&amp;rsquo;s intuition,
  rather than try to teach them to work against it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Intuitive&lt;/strong&gt;: I reject the approach of some other instructors in which
  students start by proving basic results from first principles like the well-ordering principle,
  &amp;ldquo;all right angles are congruent&amp;rdquo;, etc.
  I think this is an experience that is worth having, but it should not be the first experience one has.
  (This is the same reason people&amp;rsquo;s first programming language is Python and not assembly.)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Combinatorial&lt;/strong&gt;: for competition reasons.
  My currently recommended combinatorics textbook by Pascal96 is a bit on the difficult side.
  It would be nice to cover some ground here.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The closest I got was Joseph Rotman&amp;rsquo;s &lt;em&gt;Journey Into Mathematics&lt;/em&gt; textbook,
which satisfies the first three conditions but not the fourth (the book draws from algebra, geometry,
and number theory). I adore Rotman&amp;rsquo;s book and the copy I read at age 12 is tattered from extended use.
I&amp;rsquo;d like to get the combinatorics in, too.&lt;/p&gt;
&lt;h2&gt;Picking a fight&lt;/h2&gt;
&lt;p&gt;I should state now this is against common wisdom.
&lt;a href="https://terrytao.wordpress.com/career-advice/theres-more-to-mathematics-than-rigour-and-proofs/"&gt;Terence Tao&lt;/a&gt;
for example describes mathematical education in three parts: pre-rigorous, rigorous, post-rigorous.
Relevant quotes:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[In the rigorous stage], one is expected to be able to comfortably
manipulate abstract mathematical objects without focusing too much on what such objects actually &amp;ldquo;mean&amp;rdquo;.
… The transition from the first stage to the second is well known to be rather traumatic.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;My thesis is that &lt;strong&gt;for high school students with an enriched math background,
the rigorous and post-rigorous stages should be merged or even inverted&lt;/strong&gt;.
Attending a math circle, going to math camps,
or participating in competitions gives you a much better intuition than a
typical starting undergraduate would otherwise have access to.
I propose that we take advantage of this intuition, rather than ignore or suppress it.&lt;/p&gt;
&lt;h2&gt;Content&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;m eyeing graph theory as a topic to start off on, if not use wholesale.
I think it is an amazing topic for teaching proofs with.
Definitions that make sense, proofs that are intuitive but not obvious,
lots of pictures that don&amp;rsquo;t lose rigor, and so on. I imagine I would start there and see where it takes me.&lt;/p&gt;
&lt;p&gt;If I go through with it, I think it would take about a year for me to get some
initial drafts available to the public.&lt;/p&gt;
&lt;h2&gt;Pay-what-you-want model&lt;/h2&gt;
&lt;p&gt;I want to try this out. I think it would look something like:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You can download the nicely typeset PDF for 20 dollars;&lt;/li&gt;
&lt;li&gt;The entire source code is publicly readable on GitHub,
    so if you can&amp;rsquo;t pay or don&amp;rsquo;t want to pay just download the source and compile it.
    It might not have some formatting polishes or whatever but all the content is going to be there.&lt;/li&gt;
&lt;li&gt;If you don&amp;rsquo;t have a computer to compile things on, email me nicely and I&amp;rsquo;ll send you a copy.&lt;/li&gt;
&lt;li&gt;Pull requests welcome, and if you fix some sufficient number of typos or
    some major errors I&amp;rsquo;ll add your name to acknowledgments.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;But I&amp;rsquo;m not sure yet.&lt;/p&gt;
&lt;h2&gt;Questions for the audience&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Is this something people would want to see?&lt;/li&gt;
&lt;li&gt;Is there any existing text that already satisfies my requirements?&lt;/li&gt;
&lt;li&gt;Is the payment model fair?&lt;/li&gt;
&lt;li&gt;Other comments or suggestions?&lt;/li&gt;
&lt;/ol&gt;</content><category term="Personal"/><category term="math"/><category term="teaching"/></entry><entry><title>I reserved a Steam Deck!</title><link href="https://toa.evanchen.cc/steam-deck/" rel="alternate"/><published>2021-08-10T13:37:00-04:00</published><updated>2021-08-10T13:37:00-04:00</updated><author><name>Evan Chen 《陳誼廷》</name></author><id>tag:toa.evanchen.cc,2021-08-10:/steam-deck/</id><summary type="html">&lt;p&gt;I might be going too far with this Arch Linux brand loyalty, but I am so psyched I don&amp;rsquo;t care.&lt;/p&gt;
&lt;figure&gt;&lt;a href="https://toa.evanchen.cc/steam-deck/images/steam-deck.png" rel="noopener" target="_blank"&gt;&lt;img alt="💸" src="https://toa.evanchen.cc/steam-deck/images/steam-deck.png"&gt;&lt;/a&gt;&lt;figcaption&gt;💸&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;There&amp;rsquo;s three pieces of hardware that I&amp;rsquo;ve always kind of wanted but never been
willing to spend money on in isolation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A handheld gaming console&lt;/li&gt;
&lt;li&gt;A laptop with a touch screen&lt;/li&gt;
&lt;li&gt;A laptop with enough power to play games on a Steam library (my laptop is a bit too old for this)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So when I heard the Steam Deck existed and it would be running an Arch Linux system beneath it,
I totally caved.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m just sad I didn&amp;rsquo;t hear about in time to be early enough in the queue to get it by Christmas. Ah well.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;In unrelated news, careful readers might notice that the blog has been moved to blog.evanchen.cc.
I think the old URL usamo.wordpress.com will continue to …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I might be going too far with this Arch Linux brand loyalty, but I am so psyched I don&amp;rsquo;t care.&lt;/p&gt;
&lt;figure&gt;&lt;a href="https://toa.evanchen.cc/steam-deck/images/steam-deck.png" rel="noopener" target="_blank"&gt;&lt;img alt="💸" src="https://toa.evanchen.cc/steam-deck/images/steam-deck.png"&gt;&lt;/a&gt;&lt;figcaption&gt;💸&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;There&amp;rsquo;s three pieces of hardware that I&amp;rsquo;ve always kind of wanted but never been
willing to spend money on in isolation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A handheld gaming console&lt;/li&gt;
&lt;li&gt;A laptop with a touch screen&lt;/li&gt;
&lt;li&gt;A laptop with enough power to play games on a Steam library (my laptop is a bit too old for this)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So when I heard the Steam Deck existed and it would be running an Arch Linux system beneath it,
I totally caved.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m just sad I didn&amp;rsquo;t hear about in time to be early enough in the queue to get it by Christmas. Ah well.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;In unrelated news, careful readers might notice that the blog has been moved to blog.evanchen.cc.
I think the old URL usamo.wordpress.com will continue to redirect for the foreseeable future, though.
But I picked that wordpress username when I was like 12,
so I&amp;rsquo;m glad to not be as tied to it anymore now.
(The name &amp;ldquo;vEnhance&amp;rdquo; isn&amp;rsquo;t going anywhere, though.)&lt;/p&gt;</content><category term="Personal"/><category term="linux"/></entry><entry><title>Story: the morning after Valentine's Day</title><link href="https://toa.evanchen.cc/valentine/" rel="alternate"/><published>2019-02-15T13:37:00-05:00</published><updated>2019-02-15T13:37:00-05:00</updated><author><name>Evan Chen 《陳誼廷》</name></author><id>tag:toa.evanchen.cc,2019-02-15:/valentine/</id><summary type="html">&lt;p&gt;When I finally open my eyes and look at the clock, it is 8am.
It doesn&amp;rsquo;t &lt;em&gt;feel&lt;/em&gt; like it&amp;rsquo;s only been eight hours, though.
I&amp;rsquo;ve just had a long and complicated dream that I can&amp;rsquo;t remember much of anymore,
except that I think I was running a lot, and trying to not die, so I somehow feel sore.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;That NyQuil stuff really works&lt;/em&gt;, I think to myself, and crawl out of bed.
(Even though it&amp;rsquo;s like trying to drink mouthwash.) I haven&amp;rsquo;t slept that soundly all week.
Or maybe I&amp;rsquo;m finally slowly recovering from my cold, and that&amp;rsquo;s why that night was better?
All I know is that I&amp;rsquo;m glad I didn&amp;rsquo;t spend another night coughing my lungs out
and struggling to get some shut-eye.&lt;/p&gt;
&lt;p&gt;I drag my sorry butt out of bed and head over to my nearby computer …&lt;/p&gt;</summary><content type="html">&lt;p&gt;When I finally open my eyes and look at the clock, it is 8am.
It doesn&amp;rsquo;t &lt;em&gt;feel&lt;/em&gt; like it&amp;rsquo;s only been eight hours, though.
I&amp;rsquo;ve just had a long and complicated dream that I can&amp;rsquo;t remember much of anymore,
except that I think I was running a lot, and trying to not die, so I somehow feel sore.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;That NyQuil stuff really works&lt;/em&gt;, I think to myself, and crawl out of bed.
(Even though it&amp;rsquo;s like trying to drink mouthwash.) I haven&amp;rsquo;t slept that soundly all week.
Or maybe I&amp;rsquo;m finally slowly recovering from my cold, and that&amp;rsquo;s why that night was better?
All I know is that I&amp;rsquo;m glad I didn&amp;rsquo;t spend another night coughing my lungs out
and struggling to get some shut-eye.&lt;/p&gt;
&lt;p&gt;I drag my sorry butt out of bed and head over to my nearby computer.
It&amp;rsquo;s the Friday morning before &lt;a href="http://www.hmmt.co/"&gt;Harvard-MIT math tournament&lt;/a&gt;,
which means that the server is getting more traffic than usual,
and I was supposed to have upgraded the server in anticipation yesterday night.
But Valentine&amp;rsquo;s Day was too hectic for me this year, and I never got around to it.&lt;/p&gt;
&lt;p&gt;Not hectic for any romantic reasons.
It was because I had 5.5 hours of class more or less consecutively,
after which I rushed back to my place to teach for another four hours straight,
all the while coughing like a banshee. Okay, so maybe I would have slept fine without the NyQuil.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Officially, this is supposed to be the software team&amp;rsquo;s job.
But the HMMT website has become a complete mess that I think I might be the only
person left that still knows more than half of what it&amp;rsquo;s doing.
(Well, actually, Banana seems have figured out a lot of it too.) It is sort the
equivalent of Frankenstein&amp;rsquo;s monster,
with parts being sewn in and out over the last who-knows-how-many-years by
random undergraduates with various degrees of competence,
and held together by the seams with spit and prayers. The top of the main settings files still reads&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;Django&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;settings&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;mysite&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;project&lt;/span&gt;.
&lt;span class="k"&gt;For&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;more&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;information&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;on&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;this&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;file&lt;/span&gt;,
&lt;span class="nv"&gt;see&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;https&lt;/span&gt;:&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="nv"&gt;docs&lt;/span&gt;.&lt;span class="nv"&gt;djangoproject&lt;/span&gt;.&lt;span class="nv"&gt;com&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;en&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;.&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;topics&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;settings&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="k"&gt;For&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;full&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;list&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;settings&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;their&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;values&lt;/span&gt;,
&lt;span class="nv"&gt;see&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;https&lt;/span&gt;:&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="nv"&gt;docs&lt;/span&gt;.&lt;span class="nv"&gt;djangoproject&lt;/span&gt;.&lt;span class="nv"&gt;com&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;en&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;.&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;settings&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;where the &amp;ldquo;1.6&amp;rdquo; version number still makes me wince every time I see it (that
means this file was created &lt;em&gt;before&lt;/em&gt; I made the IMO).
I am looking forward to the end of this tournament season so I can burn the
whole website to the ground and re-write it.&lt;/p&gt;
&lt;p&gt;(Making matters worse, in terms of &amp;ldquo;various degrees of competence&amp;rdquo;, I am on the low end,
with no formal CS experience at all. Not good I am in charge.)&lt;/p&gt;
&lt;p&gt;So it&amp;rsquo;s time to bump up the servers belatedly.
I need to bump the web server and then the database up from t2.micro to m1.medium.
There will be some downtime, but no big deal &amp;mdash; everyone&amp;rsquo;s probably still asleep.
This should only take a few minutes,
and then I can work on getting the grader ready for the approximately 100,000
grading inputs that we&amp;rsquo;re going to force-feed it on Saturday.&lt;/p&gt;
&lt;p&gt;So I push a few buttons, and let Amazon Web Services do its magic,
just like the last five times I had to do this.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Something&amp;rsquo;s wrong. It&amp;rsquo;s been ten minutes already, and the website still won&amp;rsquo;t load.
The upgrades should be done by now. I refresh again, and realize that it&amp;rsquo;s throwing a 500 error.&lt;/p&gt;
&lt;p&gt;I feel a twinge of despair, which causes my cough to start to return.
Looks like the NyQuil wore off. &lt;em&gt;It always starts like this.
One little error, followed by another, and then…&lt;/em&gt; I clench my teeth and SSH into the new server,
and navigate to the log files (which I remember having to set up myself a few years ago,
precisely for situations like this).&lt;/p&gt;
&lt;p&gt;And indeed, when I get there, the same message is repeated, over and over,
for the last several minutes, like a harbinger of doom:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;OperationalError&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1045&lt;/span&gt;,&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Access denied for user &amp;#39;ebroot&amp;#39;@&amp;#39;xx.xx.xx.xx&amp;#39; (using password: YES)&amp;quot;&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Oh, well, here we go.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;My first guess is &lt;a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html"&gt;VPC groups&lt;/a&gt;,
which have bitten me plenty in the past.
Unfortunately, tinkering with these has no effect, so it seems like there is something new going on.&lt;/p&gt;
&lt;p&gt;I double-check and triple-check the password, but it seems right.
(This is the same error you get if you enter the wrong password!) So that&amp;rsquo;s not it, either.&lt;/p&gt;
&lt;p&gt;This is a connection issue, so,
the first thing I want to do is figure out whether the issue is with the
upgraded server or the upgraded database.
So, I go to my command bar and launch MySQL workbench, which promptly gives me&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mysql-workbench: command not found
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Oh, right, I don&amp;rsquo;t have Workbench installed on my desktop.
So I go over to my laptop, which does have it, and try to fire up a connection to the database.
This time, it gives me&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;喊叫 org.freedesktop.secrets 發生錯誤
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Uhh, what? Okay, I have a keyring error of some sort here.
I decide it&amp;rsquo;s not worth it to try to fix the workbench, and decide to do it the old fashioned way.
I fire another terminal and call mysql, which promptly returns with:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;mysql&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;not&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;found&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Great. Okay, well, I guess I can install it, no problem.
So I type in &lt;code&gt;sudo pacman -S mysql&lt;/code&gt; which gives&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;:: 有 2 個提供者可供 mysql：

:: 軟體庫 extra

1) mariadb

:: 軟體庫 community

2) percona-server

輸入某個數字（預設=1）:
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Huh? Oh, &lt;a href="https://wiki.archlinux.org/index.php/MySQL"&gt;Arch Linux prefers MariaDB over MySQL&lt;/a&gt;,
I remember now. That means SQL, unlike MariaDB, is not pre-packaged,
and I&amp;rsquo;ll need to download it from the &lt;a href="https://wiki.archlinux.org/index.php/AUR"&gt;Arch User
Repository&lt;/a&gt; and compile it form source.
So I download the PKGBUILD and let it start going.&lt;/p&gt;
&lt;p&gt;Unfortunately, this means that the binary needs to build from source,
and so maybe minutes later I&amp;rsquo;m staring at the build progress and it&amp;rsquo;s at 14%.
All the while the website is down, and people are starting to notice.
I can feel the tension all over my body as I realize that the tournament will
simply not function if I can&amp;rsquo;t get this back up and working,
and the &lt;a href="https://s3.amazonaws.com/hmmt-archive/february/2018/apology.html"&gt;nightmare from February
2018&lt;/a&gt; starts
coming back to my mind again.
I explode into a symphony of coughs as I struggle to gain my composure.&lt;/p&gt;
&lt;p&gt;The compile-from-source doesn&amp;rsquo;t respond to my please.
I decided that&amp;rsquo;s not good enough, and I have to do something faster.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;At this point I decide I maybe should get help,
so I hit up Banana who has saved HMMT on numerous occasions as well,
and ask him why I can&amp;rsquo;t connect to the HMMT database.
He&amp;rsquo;s done so successfully on his computer in the past,
and he even has a little script he&amp;rsquo;s written to do so. His response puzzles me:&lt;/p&gt;
&lt;p&gt;&amp;ldquo;Seems connectable. Might need to reset your DNS?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Uh, what?&lt;/p&gt;
&lt;p&gt;This is the only lead I have to go after, so I start prodding him like crazy,
since I can&amp;rsquo;t seem to get it to do anything from my end.
At first I get a couple suggestions, which don&amp;rsquo;t work, but eventually Banana finally gives me:&lt;/p&gt;
&lt;p&gt;&amp;ldquo;Uhhhh. Can you try running db-connect on your machine and going from there?
I have to start hauling.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Right. Unlike me, Banana is actually helping the directors move around the 30
gallons of apple juice and 50 gallons of mango nectar and way-too-many gallons
of water that will be used today or tomorrow. So I am really on my own.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;At least I now know that it&amp;rsquo;s on the database end, sorta.
I quickly locate db-connect: it&amp;rsquo;s the mini-script that Banana has been using to do the connection.
Maybe this will let me get in and see what&amp;rsquo;s happening. I type:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;.&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;db&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="k"&gt;connect&lt;/span&gt;.&lt;span class="nv"&gt;sh&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;dev&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;which promptly gives&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;mysql&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;not&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;found&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Ah right, we&amp;rsquo;re still working on that, huh?
The sql compilation is going nowhere fast, and so I have to think of something else.&lt;/p&gt;
&lt;p&gt;I think of one possible approach: the workbench won&amp;rsquo;t work on my laptop,
but maybe it&amp;rsquo;ll work on my desktop?
I order pacman to install MySQL Workbench on my desktop too,
and after a couple dozen agonizing seconds, the download is all done.
To my delight, there is no error about org.freedesktop.secrets,
and so I impatiently set everything up and login to find:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;ERROR&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1045&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;28000&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;:
&lt;span class="nv"&gt;Access&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;denied&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;user&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;ebroot&amp;#39;&lt;/span&gt;@&lt;span class="s1"&gt;&amp;#39;xx.xx.xx.xx&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;using&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;password&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;YES&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Oh, no, no, no.&lt;/em&gt; I explode into another fit of coughs which prevent me from
screaming at the monitor in frustration.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;At this point, I decide this isn&amp;rsquo;t worth fighting. I can figure it out another time.
For now, &lt;em&gt;the show must go on&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;That means that if I restore a backup of the old database &amp;mdash; reverting it back
to how it was yesterday, when everything went totally fine &amp;mdash; then I can at
least get the computer to work now, and worry about what the error was later.&lt;/p&gt;
&lt;p&gt;Unfortunately, this is a painfully slow process.
(The way backups work is that they don&amp;rsquo;t &lt;em&gt;replace&lt;/em&gt; the existing database.
Instead, it creates a brand new database somewhere on the cloud,
but that has a copy of the same data as the point in time.) I load the backup,
and twitch in agony as it slowly creates a new database from the image,
setting everything back to how it was earlier. I hope that&amp;rsquo;s good enough.&lt;/p&gt;
&lt;p&gt;After what feels like an eternity, the database is all set.
I change the pointer of my now-working WorkBench to the new database and try to
connect to see what happens, only to be greeted with 45 seconds of nothing,
followed by a simple error message telling me that the connection failed.&lt;/p&gt;
&lt;p&gt;Why? Oh yeah, I didn&amp;rsquo;t send the VPC for the new database.
I do that, exhaling, it should be fine now, and connect to the new restored database, only to find:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;ERROR&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1045&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;28000&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;:
&lt;span class="nv"&gt;Access&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;denied&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;user&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;ebroot&amp;#39;&lt;/span&gt;@&lt;span class="s1"&gt;&amp;#39;xx.xx.xx.xx&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;using&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;password&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;YES&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I practically choke on my own spit,
which results in another several seconds of me wheezing like heck.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Nooooooooooooooooooooooo.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Okay, I have to fix this now.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;The only clue I have is that the database script from Banana still works.
But on my computer I can&amp;rsquo;t for some reason run it.&lt;/p&gt;
&lt;p&gt;I go back to Google (which I have been using extensively the whole time),
and then after another few minutes of frantic searching,
realize that MariaDB is actually good enough for me: once I have that installed,
I&amp;rsquo;ll have a (slightly different) SQL client, but the script should work. Hmm.&lt;/p&gt;
&lt;p&gt;Since MariaDB is pre-packaged, that means the installation is easy, and I run it. This might be it.
I fire the script again, and run into:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;mysql&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;unknown&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;option&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;--enable-cleartext-plugin&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Oh, huh. Okay, well, maybe it doesn&amp;rsquo;t matter. I delete that flag from the script, and get&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;mysql&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;unknown&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;variable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;ssl-mode=VERIFY_IDENTITY&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Uhh. Let&amp;rsquo;s cross our fingers that doesn&amp;rsquo;t matter either?
I try that again, and &amp;mdash; much to my amazement &amp;mdash; the connection works.&lt;/p&gt;
&lt;p&gt;I start examining the db-connect script closely,
and see that instead of the user &lt;code&gt;ebroot&lt;/code&gt; it&amp;rsquo;s connecting using some user name &lt;code&gt;dev&lt;/code&gt;.
So maybe there is some new permission issues with &lt;code&gt;ebroot&lt;/code&gt;? With my new connection, I try to&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;GRANT ALL PRIVILEGES ON &lt;span class="gs"&gt;*.*&lt;/span&gt; TO &amp;#39;ebroot&amp;#39;@&amp;#39;%&amp;#39;;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;which then returns with the following message:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;ERROR&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1045&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;28000&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;:
&lt;span class="nv"&gt;Access&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;denied&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;user&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;dev&amp;#39;&lt;/span&gt;@&lt;span class="s1"&gt;&amp;#39;%&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;using&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;password&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;YES&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Uhhh.&lt;/p&gt;
&lt;p&gt;Okay, maybe something else. I read the db-connect script again.
Is there anything else that&amp;rsquo;s different?
Well, there&amp;rsquo;s one more change in the code that I can at least work with:
there is a CA certificate that&amp;rsquo;s being used.&lt;/p&gt;
&lt;p&gt;I fire up WorkBench again, and try to log in again,
but this time I pass a newfound CA certificate (appropriately named
&lt;em&gt;rds-combined-ca-bundle.pem&lt;/em&gt;) and to my relief, I find that I can now log in as ebroot.
That&amp;rsquo;s the issue!&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Except I have no idea how to make Django do that and I have no intention if finding out.
But another Google search suggests the answer: now that I&amp;rsquo;m finally connected with ebroot I type&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ALTER USER &amp;#39;ebroot&amp;#39;@&amp;#39;%&amp;#39; REQUIRE NONE;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And breathed a sigh of relief when I refreshed hmmt.co, and harmony was restored in the world.&lt;/p&gt;
&lt;p&gt;I looked at the clock. It was 11am. There goes my whole morning.
I go downstairs to drink a bottle of Soylent for breakfast,
resolving to never become a programmer for a living,
or at least to get some proper training first if I ever consider it.&lt;/p&gt;
&lt;p&gt;Meanwhile, the rest of the Harvard-MIT math tournament go on with their day,
blissfully unaware of the debacle narrowly averted.&lt;/p&gt;</content><category term="Personal"/><category term="linux"/><category term="slice of life"/></entry><entry><title>Conversations</title><link href="https://toa.evanchen.cc/conversations/" rel="alternate"/><published>2015-08-05T13:37:00-04:00</published><updated>2015-08-05T13:37:00-04:00</updated><author><name>Evan Chen 《陳誼廷》</name></author><id>tag:toa.evanchen.cc,2015-08-05:/conversations/</id><summary type="html">&lt;p&gt;I&amp;rsquo;ve recently come to believe that &amp;ldquo;deep conversations&amp;rdquo; are overrated. Here is why.&lt;/p&gt;
&lt;h2&gt;Memory&lt;/h2&gt;
&lt;p&gt;Human short term memory is pretty crummy.
&lt;a href="http://en.wikipedia.org/wiki/Center_embedding"&gt;Here is an illustration from linguistics&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A man that a woman that a child that a bird that I heard saw knows loves&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is a well-formed English phrase. And yet parsing it is difficult, because you need a stack of size four.
Four is a pretty big number.&lt;/p&gt;
&lt;p&gt;And that&amp;rsquo;s after I&amp;rsquo;ve written the sentence down for you,
so your eyes could scan it two or three times to try and parse it.
Imagine if I instead &lt;em&gt;said this sentence aloud&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Other examples include any object with some moderately complex structure:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Let ABC be a triangle and let AD, BE, CF be altitudes concurrent at the orthocenter H.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is not a very complicated diagram,
but it&amp;rsquo;s also very difficult to capture in your …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I&amp;rsquo;ve recently come to believe that &amp;ldquo;deep conversations&amp;rdquo; are overrated. Here is why.&lt;/p&gt;
&lt;h2&gt;Memory&lt;/h2&gt;
&lt;p&gt;Human short term memory is pretty crummy.
&lt;a href="http://en.wikipedia.org/wiki/Center_embedding"&gt;Here is an illustration from linguistics&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A man that a woman that a child that a bird that I heard saw knows loves&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is a well-formed English phrase. And yet parsing it is difficult, because you need a stack of size four.
Four is a pretty big number.&lt;/p&gt;
&lt;p&gt;And that&amp;rsquo;s after I&amp;rsquo;ve written the sentence down for you,
so your eyes could scan it two or three times to try and parse it.
Imagine if I instead &lt;em&gt;said this sentence aloud&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Other examples include any object with some moderately complex structure:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Let ABC be a triangle and let AD, BE, CF be altitudes concurrent at the orthocenter H.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is not a very complicated diagram,
but it&amp;rsquo;s also very difficult to capture in your head unless you&amp;rsquo;ve seen it before &amp;ndash; and again,
that&amp;rsquo;s after I&amp;rsquo;ve written it down for your viewing pleasure.&lt;/p&gt;
&lt;p&gt;Now imagine what you&amp;rsquo;re talking about isn&amp;rsquo;t just six lines and seven points,
but &amp;ldquo;what do you think the point of college is?&amp;rdquo;,
or &amp;ldquo;should a high school diploma be required to obtain a driver&amp;rsquo;s license?&amp;rdquo;,
or &amp;ldquo;what is algebraic geometry about?&amp;rdquo; (all examples from my life, mind you).
The answer to these questions is far more complex than the trivial examples I&amp;rsquo;ve given above.
To try and talk about these things merely by voice seems fruitless.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s worth pointing out that you can get away with things that have a lot of
&lt;em&gt;breadth&lt;/em&gt; as long they do not have &lt;em&gt;depth&lt;/em&gt; &amp;ndash; loosely, as long as there are not too many dependencies.
To give an example, the linguistics example is tricky because all the subjects
and verbs depend on each other.
The geometry diagram is tricky because the points are all tied together in a certain way.
But I could read the first chapter of &lt;em&gt;And Then I Thought I Was A Fish&lt;/em&gt; out loud,
or tell you the story of the cute girl I met three summers ago,
because the parts don&amp;rsquo;t depend (as much) on one another:
at any point in a story you can remember the last couple sentences and still enjoy the story.
But if I try to read you the first chapter of &lt;em&gt;&lt;a href="http://math.stanford.edu/~vakil/216blog"&gt;The Rising Sea:
Foundations of Algebraic Geometry&lt;/a&gt;&lt;/em&gt;,
it would make a good bedtime story only because you&amp;rsquo;d probably fall asleep.&lt;/p&gt;
&lt;p&gt;It just strikes me as bizarre that people talk about &amp;ldquo;deep&amp;rdquo; issues without writing a single thing down.
I think if you&amp;rsquo;re having lunch with a friend and discussing something like this,
you ought to at least have a piece of paper out on the table where you can both
jot down the main ideas of what&amp;rsquo;s been said.
It doesn&amp;rsquo;t need to have every word because then you just get bloat, but still,
at least get the key insights somewhere visible.
(That&amp;rsquo;s what presentation slides and blackboards are for, right?)&lt;/p&gt;
&lt;h2&gt;Computation&lt;/h2&gt;
&lt;p&gt;The other strange thing is that in conversations, you have to process and respond in real-time.
You can only spend as long thinking about a sentence as it takes for the next one to be said.&lt;/p&gt;
&lt;p&gt;This is fine if I ask you a question such as &amp;ldquo;what is your birthday?&amp;rdquo;, because lookup queries are fast.
It&amp;rsquo;s fine if I ask you &amp;ldquo;what did you think of X book you read?&amp;rdquo;, again because it is just a lookup query.
Note that this is true &lt;em&gt;even if&lt;/em&gt; you spent a long time reading and thinking about the book,
because the computation was already done.
It&amp;rsquo;s even fine if I ask &amp;ldquo;what is two plus five?&amp;rdquo; because it takes not very long to add.&lt;/p&gt;
&lt;p&gt;But if I ask &amp;ldquo;what do you think about the war on drugs?&amp;rdquo; and you haven&amp;rsquo;t been thinking much about it,
then the best answer you can give is &amp;ldquo;I don&amp;rsquo;t know&amp;rdquo;;
because you can&amp;rsquo;t do a lookup query for an answer you haven&amp;rsquo;t computed yet.&lt;/p&gt;
&lt;p&gt;Put another way, suppose someone asks me some complex question like &amp;ldquo;how do I get better at math contests?&amp;rdquo;,
and I respond &amp;ldquo;do a lot of problems that are right above your ability&amp;rdquo;.
One of two possible things just happened:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I had already thought about this question,
    and this is a &lt;a href="/success"&gt;pre-computed answer&lt;/a&gt;,
    or&lt;/li&gt;
&lt;li&gt;I came up with this in the half second between the end of your question and the start of my response.
    (Though you can increase this time by prepending &amp;ldquo;uh&amp;rdquo;, &amp;ldquo;like&amp;rdquo;, &amp;ldquo;I think&amp;rdquo;.)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In other words, &lt;em&gt;the fast nature of conversations prevents anything other than
cache lookups and first impressions&lt;/em&gt; (or I suppose possibly a combination of both).
And if the issue you&amp;rsquo;re talking about is sufficiently complex,
first impressions are likely not so insightful.
So if I sound really smart in a conversation,
the only reason is that you&amp;rsquo;re asking questions I already pre-computed good answers for.&lt;/p&gt;
&lt;p&gt;In other words, the best you can do from a typical conversation is learn what people&amp;rsquo;s existing ideas are.
There isn&amp;rsquo;t a tractable way to generate new ideas from feedback,
just because the time-scale involved is too small.
Eliezer Yudkowsky makes a similar point in a &lt;a href="http://lesswrong.com/lw/k8/how_to_seem_and_be_deep/t1_fjv"&gt;Less Wrong
Post&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If you want to sound deep, you can never say anything that is more than a
single step of inferential distance away from your listener&amp;rsquo;s current mental state.
That&amp;rsquo;s just the way it is.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Hypothesis&lt;/h2&gt;
&lt;p&gt;I will now point out that both issues I mentioned have easy partial fixes.
If I&amp;rsquo;m correct, then deep conversations can be substantially enhanced if we use
paper or blackboard or anything else, and agree it is socially acceptable to take a minute to respond.
Neither of these actions will completely alleviate their respective problems,
but trust me when I say having 60 seconds to think is a world of difference compared to 2.&lt;/p&gt;
&lt;p&gt;Both of these initially struck me as weird conclusions, but they do seem to make sense on closer inspection.
In fact, I have actually seen both done in practice (albeit not simultaneously).
So this means I have a way to test what I&amp;rsquo;ve written in this post now…&lt;/p&gt;</content><category term="Personal"/></entry><entry><title>Transferring</title><link href="https://toa.evanchen.cc/transfer/" rel="alternate"/><published>2015-06-28T13:37:00-04:00</published><updated>2015-06-28T13:37:00-04:00</updated><author><name>Evan Chen 《陳誼廷》</name></author><id>tag:toa.evanchen.cc,2015-06-28:/transfer/</id><summary type="html">&lt;p&gt;Apparently &lt;a href="https://www.quora.com/Why-did-Evan-Chen-transfer-from-Harvard-to-MIT"&gt;even people on Quora&lt;/a&gt; want to
know why I transferred from Harvard to MIT.
Since I&amp;rsquo;ve been asked this question way too many times, I guess I should give an answer, once and for all.&lt;/p&gt;
&lt;p&gt;There were plenty of reasons (and anti-reasons).
I should say some anti-reasons first to give due credit &amp;ndash; the Harvard math department is fantastic,
and Harvard gives you significantly more freedom than MIT to take whatever you want.
These were the main reasons why transferring was a difficult decision,
and in fact I&amp;rsquo;m only ~70% sure I might the right choice.&lt;/p&gt;
&lt;p&gt;Ultimately, the main reason I transferred was due to the housing.&lt;/p&gt;
&lt;p&gt;At MIT, you basically get to choose where you live.
All the dorms, and even floors within dorms, are different:
&lt;strong&gt;living on 3rd West versus living on 5th East might as well be going to different colleges&lt;/strong&gt;.
Even if for some …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Apparently &lt;a href="https://www.quora.com/Why-did-Evan-Chen-transfer-from-Harvard-to-MIT"&gt;even people on Quora&lt;/a&gt; want to
know why I transferred from Harvard to MIT.
Since I&amp;rsquo;ve been asked this question way too many times, I guess I should give an answer, once and for all.&lt;/p&gt;
&lt;p&gt;There were plenty of reasons (and anti-reasons).
I should say some anti-reasons first to give due credit &amp;ndash; the Harvard math department is fantastic,
and Harvard gives you significantly more freedom than MIT to take whatever you want.
These were the main reasons why transferring was a difficult decision,
and in fact I&amp;rsquo;m only ~70% sure I might the right choice.&lt;/p&gt;
&lt;p&gt;Ultimately, the main reason I transferred was due to the housing.&lt;/p&gt;
&lt;p&gt;At MIT, you basically get to choose where you live.
All the dorms, and even floors within dorms, are different:
&lt;strong&gt;living on 3rd West versus living on 5th East might as well be going to different colleges&lt;/strong&gt;.
Even if for some bizarre reason you hate 90% of the students at MIT you can
still have a fantastic social experience if you&amp;rsquo;re in a dorm you like.&lt;/p&gt;
&lt;p&gt;This is not true at Harvard, which shoves you in dorms &lt;strong&gt;more or less at random&lt;/strong&gt;. Specifically,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In freshman year, you are assigned a random dorm,
  and eat in a segregated dining hall (Annenberg) exclusively with freshman.
  All students are placed on a mandatory unlimited meal plan, I guess to discourage them from eating out.&lt;/li&gt;
&lt;li&gt;After freshman year, you get a random House, and eat in a dining hall built into the House.
  There are restrictions that make it deliberately difficult to eat at other Houses.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The result of this random mixing is that (a) you only know people in your own year,
and (b) zero dorm culture. Lounges are deserted, doors are shut,
and people are unfindable &amp;ndash; in fact I still don&amp;rsquo;t know the names of the students who lived next door to me.
This a bigger deal than people give it credit for: students are busy and campus is large,
so &lt;strong&gt;you don&amp;rsquo;t really see someone unless you share a class, live near them, or date them&lt;/strong&gt;.
For example, I rarely talked to James Tao,
even though we&amp;rsquo;d known each other for three years beforehand and had plenty in common.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.benkuhn.net/h#fn:social"&gt;Put more harshly&lt;/a&gt;:
&amp;ldquo;Harvard&amp;rsquo;s dominant typical social tone is superficial, inane,
and too frequently alcohol-drenched to be interesting.
It actively thwarts any attempts to escape this atmosphere,
by assigning groups of students to dorms randomly &amp;ndash; thus guaranteeing all
students a more-or-less uniformly superficial, inane and alcohol-drenched experience.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;The problems I mentioned were worse for me specifically since &lt;strong&gt;I took
exclusively upper-level math courses&lt;/strong&gt;.
My classmates were all upperclassmen who all already knew each other and ate/lived elsewhere.
For my own meals, the typical Annenberg conversation was either classes or gossip,
so I had little to say to the other freshman (if I talked about my classes I sounded like a showoff).
I was often sitting alone in my room,
which was great for learning category theory but not so much for my mood.
I ended up moving in to an MIT dorm for a good chunk of the school year,
where it was much easier to find people I could relate well to (because they all lived in one place).&lt;/p&gt;
&lt;p&gt;At Harvard I was constantly isolated and bored. I got sick of it and left.&lt;/p&gt;</content><category term="Personal"/></entry><entry><title>Email, JetPack, and Wintermelon</title><link href="https://toa.evanchen.cc/wintermelon/" rel="alternate"/><published>2014-01-01T13:37:00-05:00</published><updated>2014-01-01T13:37:00-05:00</updated><author><name>Evan Chen 《陳誼廷》</name></author><id>tag:toa.evanchen.cc,2014-01-01:/wintermelon/</id><summary type="html">&lt;p&gt;So I guess I can resume blogging now, seeing that I&amp;rsquo;m done with college applications (at last!).
I&amp;rsquo;m not sure what I plan to blog about in general,
but I figured I might as well put this domain name to good use :) I also
realized that writing things out helped me clarify my thinking a lot (actually
Qiaochu Yuan recommended this for math in particular),
so I&amp;rsquo;ll be trying to do that more often this &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;2014&lt;/mn&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mo&gt;⋅&lt;/mo&gt;&lt;mn&gt;19&lt;/mn&gt;&lt;mo&gt;⋅&lt;/mo&gt;&lt;mn&gt;53&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;2014 = 2 \cdot 19 \cdot 53&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span aria-hidden="true" class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.6444em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;2014&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.2778em;"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;=&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.2778em;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.6444em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;2&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.2222em;"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;⋅&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.2222em;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.6444em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;19&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.2222em;"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;⋅&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.2222em;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.6444em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;53&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and onwards.&lt;/p&gt;
&lt;p&gt;Onto the actual content, anyways.
In this post I&amp;rsquo;ll talk about the inspiration and development for one of my afternoon projects,
which I&amp;rsquo;ve named &lt;strong&gt;wintermelon&lt;/strong&gt; for no good reason.&lt;/p&gt;
&lt;p&gt;A while back Jacob Steinhardt recommended to the SPARC alumni list that we check
our email at most twice a day.
I was able to …&lt;/p&gt;</summary><content type="html">&lt;p&gt;So I guess I can resume blogging now, seeing that I&amp;rsquo;m done with college applications (at last!).
I&amp;rsquo;m not sure what I plan to blog about in general,
but I figured I might as well put this domain name to good use :) I also
realized that writing things out helped me clarify my thinking a lot (actually
Qiaochu Yuan recommended this for math in particular),
so I&amp;rsquo;ll be trying to do that more often this &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;2014&lt;/mn&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mo&gt;⋅&lt;/mo&gt;&lt;mn&gt;19&lt;/mn&gt;&lt;mo&gt;⋅&lt;/mo&gt;&lt;mn&gt;53&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;2014 = 2 \cdot 19 \cdot 53&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span aria-hidden="true" class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.6444em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;2014&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.2778em;"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;=&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.2778em;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.6444em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;2&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.2222em;"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;⋅&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.2222em;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.6444em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;19&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.2222em;"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;⋅&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.2222em;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.6444em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;53&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and onwards.&lt;/p&gt;
&lt;p&gt;Onto the actual content, anyways.
In this post I&amp;rsquo;ll talk about the inspiration and development for one of my afternoon projects,
which I&amp;rsquo;ve named &lt;strong&gt;wintermelon&lt;/strong&gt; for no good reason.&lt;/p&gt;
&lt;p&gt;A while back Jacob Steinhardt recommended to the SPARC alumni list that we check
our email at most twice a day.
I was able to follow this suggestion for a day,
and really was impressed by the feeling &amp;ndash; I realized that I had started to use email as a distraction,
something to prevent my brain from realizing it wasn&amp;rsquo;t do anything.
The same went for the Art of Problem Solving forums (which I frequently visit) as well as Facebook,
so I also tried limiting the number of times I checked each of those each day.
Unfortunately, old habits do not die easily,
and I found myself automatically visiting those sites when I wasn&amp;rsquo;t doing anything.&lt;/p&gt;
&lt;p&gt;A couple days ago while I was reviewing my goals and realizing that I wasn&amp;rsquo;t following this one,
I remembered the title text of &lt;a href="http://xkcd.com/862/"&gt;XKCD 862&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;&lt;a href="https://imgs.xkcd.com/comics/let_go.png" rel="noopener" target="_blank"&gt;&lt;img alt="XKCD 862." src="https://imgs.xkcd.com/comics/let_go.png"&gt;&lt;/a&gt;&lt;figcaption&gt;XKCD 862.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;blockquote&gt;
&lt;p&gt;After years of trying various methods, I broke this habit by pitting my impatience against my laziness.
I decoupled the action and the neurological reward by setting up a simple
30-second delay I had to wait through, in which I couldn&amp;rsquo;t do anything else,
before any new page or chat client would load (and only allowed one to run at once).
The urge to check all those sites magically vanished&amp;ndash;and my &amp;lsquo;productive&amp;rsquo; computer use was unaffected.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Sounded like fun! The XKCD version seemed a little extreme,
but I could definitely do with a script that would make me wait 50 seconds before reading Facebook.
I estimated it would take me about two hours to read/learn the API and write the code to put this together;
it turns out my estimate was roughly correct.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m a Firefox user, so it made sense for me to try and put this together as a Firefox extension.
A quick Google search led me to &lt;a href="https://developer.mozilla.org/en-US/docs/Jetpack"&gt;Jetpack&lt;/a&gt;,
which offered to let me build an FF extension quickly using just JS.
They had &lt;a href="https://addons.mozilla.org/en-US/developers/docs/sdk/latest/dev-guide/tutorials/index.html#getting-started"&gt;very nice tutorials&lt;/a&gt;,
too.&lt;/p&gt;
&lt;p&gt;Drilling down, the things I needed to make this thing fly were:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Something to trigger every time a webpage was launched.
    This was conveniently covered under &amp;ldquo;Listen for page load&amp;rdquo;.&lt;/li&gt;
&lt;li&gt;Something to actually lock the webpage.
    This was easy, I just put &lt;code&gt;body.style.visibility = "hidden";&lt;/code&gt; in JS.&lt;/li&gt;
&lt;li&gt;Timers for a delay. This was handled by the JS &lt;code&gt;window.setTimeout()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Something to store the websites and their associated delays.
    I used regular expressions to specify the domain.
    This I did kind of painlessly through the Jetpack simple-prefs,
    but it was kind of an ugly hack in that I manually defined six settings for up to six websites.
    Maybe sometime when I&amp;rsquo;m bored I will take the time to make this work for arbitrarily many websites.&lt;/li&gt;
&lt;li&gt;A way for the individual lockdown scripts to communicate with the main script and vice-versa.
    This took me a while to figure out, but it is essentially a bunch of emit/on hooks provided in Jetpack.
    I would inject a script lockdown.js into the page and the send it a signal
    with the amount of time to lock the page.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It was actually very straightforward in retrospect, and took only a couple files of actual code.
The project (which is very small) is &lt;a href="https://github.com/vEnhance/wintermelon"&gt;posted on my GitHub&lt;/a&gt;.
My estimate was about right; it took me approximately 2.5 hours from start to finish,
although I admit that I was also chatting on Google Talk in the meantime.
Actually I&amp;rsquo;m embarrassed it took as long as that.&lt;/p&gt;
&lt;p&gt;The core of the program really is just two files. Here is lib/main.js, which is run from the start.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;tabs&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;sdk/tabs&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;self&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;sdk/self&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;prefs&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;sdk/simple-prefs&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;prefs&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// TODO make these not suck&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;regex_strings&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;regex_strings&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;prefs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;regex1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;regex_strings&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;prefs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;regex2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;regex_strings&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;prefs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;regex3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;regex_strings&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;prefs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;regex4&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;regex_strings&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;4&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;prefs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;regex5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;regex_strings&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;5&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;prefs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;regex6&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;lock_times&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;lock_times&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;prefs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;time1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;lock_times&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;prefs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;time2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;lock_times&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;prefs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;time3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;lock_times&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;prefs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;time4&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;lock_times&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;4&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;prefs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;time5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;lock_times&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;5&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;prefs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;time6&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Create regular expressions&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;N&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;regex_strings&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;regexes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;regex_strings&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;regexes&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;RegExp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;regex_strings&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;prev_hit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;lockdown&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// Are we currently in a lockdown?&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;lock&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;time&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;worker&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;tabs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;activeTab&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;attach&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;contentScriptFile&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;lockout.js&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;worker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;emit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;lock&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;time&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// tell the worker to lock&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;worker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;unlock&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;unlock&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;lockdown&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// prevent side loading&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;gateway&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;tab&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;tab&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;lockdown&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="c1"&gt;// Currently under a lockdown&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="c1"&gt;// Do not allow any other tabs to load&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;lock&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;lock_times&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;prev_hit&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;N&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;regex&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;regexes&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;regex&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;regex_strings&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;!=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;prev_hit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;!=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="c1"&gt;// Test positive, we are going to block&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nx"&gt;lock&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;lock_times&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nx"&gt;prev_hit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// Remember prev hit&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nx"&gt;prev_hit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// Still remember prev hit&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;prev_hit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// Release&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;unlock&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;lockdown&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;tabs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;ready&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;gateway&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;and here is the &lt;code&gt;data/lockout.js&lt;/code&gt; that is called by the &lt;code&gt;lock&lt;/code&gt; function:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;lock&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;time&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementsByTagName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;body&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;visibility&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;hidden&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;time&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;alert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Locking for &amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;time&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot; seconds.&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;unlock&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;time&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;alert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Locking indefinitely.&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;unlock&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;alert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Done&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementsByTagName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;body&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;visibility&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;visible&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;emit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;unlock&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;lock&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;lock&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;More pragmatically, I&amp;rsquo;ve been using it for only a couple days, but it seems to be working!
Blank pages are not very good distractions. We&amp;rsquo;ll see if this holds up.&lt;/p&gt;</content><category term="Personal"/><category term="linux"/></entry></feed>