<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>vivi.sh</title>
    <description>Vivian&apos;s website</description>
    <link>https://vivi.sh/</link>
    <atom:link href="https://vivi.sh/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Tue, 17 Jun 2025 05:31:56 +0000</pubDate>
    <lastBuildDate>Tue, 17 Jun 2025 05:31:56 +0000</lastBuildDate>
    <generator>Jekyll v3.10.0</generator>
    
    
      <item>
        <title>Installing memusage on Ubuntu</title>
        <description>&lt;p&gt;For some annoying reason, Ubuntu does not package &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;memusage&lt;/code&gt; in their libc.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Download a version of &lt;a href=&quot;https://www.gnu.org/software/libc/sources.html&quot;&gt;glibc&lt;/a&gt;
that’s old enough to match your version of Ubuntu.&lt;/li&gt;
  &lt;li&gt;Compile and install into a destination that’s &lt;em&gt;not&lt;/em&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/usr/local&lt;/code&gt;, I used
 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PREFIX=~/glibc&lt;/code&gt;. Weird compiler errors probably means you need to try an
 older version.&lt;/li&gt;
  &lt;li&gt;Add &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$PREFIX/bin&lt;/code&gt; to your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$PATH&lt;/code&gt;. In &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$PREFIX/bin/libmemusage&lt;/code&gt; you might
have to change the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;memusageso=...&lt;/code&gt; line to where &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;libmemusage.so&lt;/code&gt; lives
(&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$PREFIX/lib/libmemusage.so&lt;/code&gt;) for the script to run successfully.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Speaking from experience: keep this thing far, far away from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/usr&lt;/code&gt; or
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/usr/local&lt;/code&gt; or else you might brick your machine when you &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ldconfig&lt;/code&gt; and your
entire system links into this glibc.&lt;/p&gt;

&lt;p&gt;Maybe the real solution is to use Debian :-).&lt;/p&gt;
</description>
        <pubDate>Sun, 01 Mar 2020 00:00:00 +0000</pubDate>
        <link>https://vivi.sh/blog/technical/memusage/index</link>
        <guid isPermaLink="true">https://vivi.sh/blog/technical/memusage/index</guid>
        
        
      </item>
    
      <item>
        <title>CS graduate school applications</title>
        <description>&lt;p&gt;I finished applying to graduate school programs last year! Here’s my recounting
of the process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Table of Contents&lt;/strong&gt;&lt;/p&gt;
&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#advice-that-really-helped-me&quot; id=&quot;markdown-toc-advice-that-really-helped-me&quot;&gt;Advice that really helped me&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#deadlines&quot; id=&quot;markdown-toc-deadlines&quot;&gt;Deadlines!&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#getting-organized&quot; id=&quot;markdown-toc-getting-organized&quot;&gt;Getting Organized&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#gre&quot; id=&quot;markdown-toc-gre&quot;&gt;GRE&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#transcripts&quot; id=&quot;markdown-toc-transcripts&quot;&gt;Transcript(s)&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#writing-the-sop&quot; id=&quot;markdown-toc-writing-the-sop&quot;&gt;Writing the SOP&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#recommendation-letters&quot; id=&quot;markdown-toc-recommendation-letters&quot;&gt;Recommendation Letters&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#submit--wait&quot; id=&quot;markdown-toc-submit--wait&quot;&gt;Submit &amp;amp; Wait!&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;advice-that-really-helped-me&quot;&gt;Advice that really helped me&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;Jean Yang’s &lt;a href=&quot;https://jxyzabc.blogspot.com/2008/08/cs-grad-school-part-4-applications.html&quot;&gt;whole series on CS grad school&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Philip Guo’s advice on &lt;a href=&quot;http://www.pgbovine.net/grad-school-app-tips.htm&quot;&gt;graduate school applications&lt;/a&gt; and &lt;a href=&quot;http://www.pgbovine.net/fellowship-tips.htm&quot;&gt;fellowships&lt;/a&gt;
    &lt;ul&gt;
      &lt;li&gt;His &lt;a href=&quot;http://www.pgbovine.net/PhD-memoir/pguo-PhD-grind.pdf&quot;&gt;memoir&lt;/a&gt; is a fun read too!&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Justine Sherry’s &lt;a href=&quot;https://people.eecs.berkeley.edu/~justine/advice.pdf&quot;&gt;advice&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Mor Harchol-Balter’s &lt;a href=&quot;https://www.cs.cmu.edu/~harchol/gradschooltalk.pdf&quot;&gt;advice&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;deadlines&quot;&gt;Deadlines!&lt;/h1&gt;
&lt;p&gt;Most CS graduate applications are due in mid-December.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HOWEVER&lt;/strong&gt;, most fellowship applications are due 1-2 months before that!
Finishing fellowship applications puts you in a good position to coast through
your graduate school applications. Your ducks (rec. letters, SOP, misc.
materials) will be properly lined up.&lt;/p&gt;

&lt;h1 id=&quot;getting-organized&quot;&gt;Getting Organized&lt;/h1&gt;
&lt;p&gt;I was casting a wide net, which means I had &lt;em&gt;a lot&lt;/em&gt; of applications to
submit. I found that a &lt;a href=&quot;https://trello.com&quot;&gt;Trello&lt;/a&gt; Board was the
most effective way of tracking my deadlines for each application.&lt;/p&gt;

&lt;p&gt;I created four columns: overall application status and one for each
recommendation letter writer. In each column, I put one card for each
application I (or my recommender) had to complete.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;trello_board.png&quot; alt=&quot;trello board layout&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I used labels to color-code the status and type of each card. Then, I could
hover over each card and quickly label them by pressing &lt;kbd&gt;1&lt;/kbd&gt; through
&lt;kbd&gt;5&lt;/kbd&gt;.&lt;/p&gt;

&lt;div align=&quot;center&quot;&gt;
  &lt;p&gt;&lt;img src=&quot;trello_labels.png&quot; alt=&quot;trello_labels&quot; width=&quot;200px&quot; /&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;I also added a link to the application in the “Description” field
of the card and set the deadline on the card to be one day before the
application’s real deadline.&lt;/p&gt;

&lt;h1 id=&quot;gre&quot;&gt;GRE&lt;/h1&gt;
&lt;p&gt;I don’t have a lot to say about the GRE. From what I’ve heard, it’s not the most
important part of your application, but schools don’t necessarily ignore it
either. I prepared by taking the two tests that came with the registration fee,
and studying these free &lt;a href=&quot;https://gre.magoosh.com/flashcards/vocabulary&quot;&gt;Magoosh
flashcards&lt;/a&gt; to build up my
vocabulary.&lt;/p&gt;

&lt;p&gt;Make sure to send scores to 4 schools of your choice &lt;strong&gt;at the testing center&lt;/strong&gt;.
Those 4 reports are free. I thought those 4 reports would still be free if I
chose those schools later, but they actually cost $27 each if you don’t enter
them at the testing center. &lt;i class=&quot;em em-white_frowning_face&quot;&gt;&lt;/i&gt;&lt;/p&gt;

&lt;h1 id=&quot;transcripts&quot;&gt;Transcript(s)&lt;/h1&gt;
&lt;p&gt;Some schools ask for a scanned copy of your official transcript. I would order
the transcript (mailed to yourself) a few weeks before the deadline. Transcripts
at some universities (&lt;em&gt;cough&lt;/em&gt; UC Berkeley) take a few days to fulfill, so
ordering early guarantees peace of mind.&lt;/p&gt;

&lt;h1 id=&quot;writing-the-sop&quot;&gt;Writing the SOP&lt;/h1&gt;
&lt;p&gt;In my experience, writing the SOP/NSF Personal History Statement was pretty
difficult.&lt;/p&gt;

&lt;p&gt;What helped me was spending the entire day enumerating all the research I did (a
few paragraphs for each project), and using that to help me string everything
together into a cohesive story. It feels much better once you have some words
(even if they’re crap, you can always change the sentences and swap words out
for fancier ones) to knead instead of staring at a blank page waiting for some
godly narrative to hit you.&lt;/p&gt;

&lt;p&gt;Here’s some questions that I found helpful answering:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;What are specific part of [CS AREA] you interested in? Why?&lt;/li&gt;
  &lt;li&gt;What do you want to pursue in graduate school?
    &lt;ul&gt;
      &lt;li&gt;I don’t think you need a detailed agenda, but more of a rough idea. I
wrote that I was open to anything in the realm of systems and networks,
but I supported this by explaining what I enjoyed about each research
project and what they had in common.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Why do you want to go to graduate school?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For each project:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;A few sentences explaining the problem.&lt;/li&gt;
  &lt;li&gt;A few sentences describing your contribution. Note anything interesting.&lt;/li&gt;
  &lt;li&gt;A sentence on it’s result (in publication, published, etc.)&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;recommendation-letters&quot;&gt;Recommendation Letters&lt;/h1&gt;
&lt;p&gt;Most applications (except Hertz, which asks for 4) ask for 3 letters. My letters
came from faculty who supervised my research over the past 2.5 years. I asked my
recommenders at least a month before, but I also consistently reminded them as
the deadline neared. They’re busy people–thank the stars for the Trello board!&lt;/p&gt;

&lt;p&gt;If my recommender wanted more background information, I would give them a folder
that contained by application materials (SOP, transcript, names of other
recommenders) and some supplemental materials (description of research I did,
teaching reviews).&lt;/p&gt;

&lt;h1 id=&quot;submit--wait&quot;&gt;Submit &amp;amp; Wait!&lt;/h1&gt;
&lt;p&gt;Weep at the state of your wallet, and wait for things to happen! &lt;i class=&quot;em em-open_mouth&quot;&gt;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;Some schools will interview starting in January, so it’s good to be aware of
that while you’re on winter vacation. I have found that these interviews
generally follow the same format: they ask you to explain your current research,
and the discussion builds from there. They also give you the opportunity to ask
about their program. One professor asked me for samples of my technical writing.&lt;/p&gt;
</description>
        <pubDate>Mon, 04 Feb 2019 00:00:00 +0000</pubDate>
        <link>https://vivi.sh/blog/school/grad-school-apps/index</link>
        <guid isPermaLink="true">https://vivi.sh/blog/school/grad-school-apps/index</guid>
        
        
      </item>
    
      <item>
        <title>Making iTerm2 render faster</title>
        <description>&lt;p&gt;I really like using tmux and vim, but it was unbearably slow on iTerm2 (afaik,
this is due to tmux. Running vim standalone is fine).
&lt;a href=&quot;https://github.com/tmux/tmux/issues/353&quot;&gt;Googling&lt;/a&gt; and profiling vim didn’t
really help. &lt;a href=&quot;https://news.ycombinator.com/item?id=14798211&quot;&gt;I concluded that the Mac terminal emulator is just slow
(?)&lt;/a&gt;.  Unfortunate.&lt;/p&gt;

&lt;p&gt;I tried switching to Alacritty, which is very buttery, but I missed
some of the features that iTerm2 has (e.g., the hotkey window).&lt;/p&gt;

&lt;p&gt;In an attempt to make rendering faster, I turned off anti-aliasing (iTerm2 &amp;gt;
Preferences &amp;gt; Profiles &amp;gt; Text &amp;gt; Uncheck Anti-Aliased). Anti-aliasing “smoothes”
the jagged edges of curves. This makes your text look crisper. So, while
tmux/vim performs well now, the terminal doesn’t look so good, but it’s fine for
me. Trade-offs…&lt;/p&gt;

&lt;p&gt;Aesthetic comparison:
&lt;img src=&quot;anti-alias-comparison.png&quot; alt=&quot;anti-aliasing-comparison&quot; /&gt;&lt;/p&gt;
</description>
        <pubDate>Sun, 20 Jan 2019 00:00:00 +0000</pubDate>
        <link>https://vivi.sh/blog/technical/making-terminal-render-faster/index</link>
        <guid isPermaLink="true">https://vivi.sh/blog/technical/making-terminal-render-faster/index</guid>
        
        
      </item>
    
      <item>
        <title>Reading List</title>
        <description>&lt;h1 id=&quot;graduate-school-advice&quot;&gt;Graduate School Advice&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://marcua.net/writing/gradschool-guide/&quot;&gt;The N=1 guide to grad school (and hopefully, knowledge work)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;to-read&quot;&gt;To Read&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.cs.princeton.edu/~jrex/advice.html&quot;&gt;Jen Rexford’s (Unsolicited) Advice for Young Researchers&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://freedom-to-tinker.com/2010/09/27/advice-new-graduate-students/&quot;&gt;Advice for new Graduate Students&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Tue, 01 Jan 2019 00:00:00 +0000</pubDate>
        <link>https://vivi.sh/blog/misc/readling-list/index</link>
        <guid isPermaLink="true">https://vivi.sh/blog/misc/readling-list/index</guid>
        
        
      </item>
    
      <item>
        <title>I migrated laptops and everything broke.</title>
        <description>&lt;p&gt;A few weeks ago, my laptop’s screen gave out. I switched to a new laptop, and
used Apple’s handy-dandy &lt;a href=&quot;https://support.apple.com/en-us/HT204350&quot;&gt;migration
assistant&lt;/a&gt;, which worked well for
everything &lt;strong&gt;except my development environment&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The first sign of trouble was when I tried to run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bundle&lt;/code&gt; and got&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/usr/local/bin/bundle: /usr/local/opt/ruby/bin/ruby: bad interpreter: No such
file or directory 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;…what? I tried reinstalling Homebrew’s ruby, which didn’t work.&lt;/p&gt;

&lt;p&gt;When I ran &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;brew upgrade&lt;/code&gt;, many packages could not be built because it could not
find dependencies in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/usr/local/opt&lt;/code&gt; (double what?).
I started individually re-installing packages (via &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;brew unlink&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;brew
link&lt;/code&gt;, but realized that most of the errors laid in a bunch of files in
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/usr/local/share&lt;/code&gt;. Luckily, anything in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;usr/local&lt;/code&gt; is &lt;a href=&quot;https://docs.brew.sh/FAQ&quot;&gt;not critical to the
OS&lt;/a&gt;, so you can remove files (at the risk of
reinstalling missing dependencies, which I was
doing anyways).&lt;/p&gt;

&lt;p&gt;I ended up doing this to fix my troubles:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Empty &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/usr/local/share&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;brew update &amp;amp;&amp;amp; brew upgrade&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;brew list | xargs brew reinstall&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;For good measure, run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;brew doctor&lt;/code&gt; and fix what it complains about.&lt;/li&gt;
  &lt;li&gt;I also started using &lt;a href=&quot;https://github.com/rbenv/rbenv&quot;&gt;rbenv&lt;/a&gt;. Even though I
  never use ruby, it’s nice (I can run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jekyll&lt;/code&gt; without prepending &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bundle&lt;/code&gt;!)&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Wed, 21 Nov 2018 00:00:00 +0000</pubDate>
        <link>https://vivi.sh/blog/technical/i-migrated-macbooks-and-everything-broke/index</link>
        <guid isPermaLink="true">https://vivi.sh/blog/technical/i-migrated-macbooks-and-everything-broke/index</guid>
        
        
      </item>
    
      <item>
        <title>Live word count in vim airline</title>
        <description>&lt;p&gt;This was a result of using vim to write my essays. I started writing them in
notes (&lt;a href=&quot;https://github.com/xolox/vim-notes&quot;&gt;vim-notes&lt;/a&gt; plugin) files and wanted
&lt;a href=&quot;https://github.com/vim-airline/vim-airline&quot;&gt;vim-airline&lt;/a&gt; to display a live word
count.&lt;/p&gt;

&lt;h1 id=&quot;the-easy-way&quot;&gt;The Easy Way&lt;/h1&gt;
&lt;p&gt;As of &lt;a href=&quot;https://github.com/chrisbra/vim-airline/blob/0d128940ad3cd9fa14b48c93d98eb321bb5f6b1a/autoload/airline/extensions/wordcount.vim&quot;&gt;this version&lt;/a&gt; of vim-airline’s wordcount plugin.&lt;/p&gt;

&lt;p&gt;In your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vimrc&lt;/code&gt;, add:&lt;/p&gt;

&lt;div class=&quot;language-vim highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;&quot; Enable wordcount&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;g:airline&lt;/span&gt;#extensions#&lt;span class=&quot;nb&quot;&gt;wordcount&lt;/span&gt;#enabled &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;&quot; Add notes to filetypes&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;g:airline&lt;/span&gt;#extensions#&lt;span class=&quot;nb&quot;&gt;wordcount&lt;/span&gt;#filetypes &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;\vnotes|help|markdown|rst|org|text|asciidoc|tex|mail&apos;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;By default, files of the type &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;help|markdown|rst|org|text|asciidoc|tex|mail&lt;/code&gt; run
the wordcount plugin.&lt;/p&gt;

&lt;h1 id=&quot;the-complicated-way&quot;&gt;The Complicated Way&lt;/h1&gt;
&lt;p&gt;&lt;em&gt;Note: When I came up with this, I was really frustrated because I could not
figure out `The Easy Way’ – the wordcount plugin went through a few re-writes
that left the documented format of expressing filetypes outdated. So I decided
to figure out how to write it by myself. Of course, I would figure out the easy
way after I finished documenting the complicated way. Go Vivian.&lt;/em&gt;&lt;/p&gt;

&lt;div align=&quot;center&quot;&gt;
  &lt;p&gt;&lt;img src=&quot;normal-mode.png&quot; alt=&quot;normal mode word
count&quot; width=&quot;300px&quot; /&gt;
&lt;img src=&quot;visual-mode.png&quot; alt=&quot;visual mode word count&quot; width=&quot;300px&quot; /&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;You can get word count by typing &lt;kbd&gt;g&lt;/kbd&gt; &lt;kbd&gt;Ctrl&lt;/kbd&gt;+&lt;kbd&gt;g&lt;/kbd&gt; in
normal mode, or in visual mode (which will tell you how many words are
selected).&lt;/p&gt;

&lt;p&gt;First, I define a function that grabs the word count using the above command.
First, it saves the position of the cursor. Then, it parses &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;v:statusmsg&lt;/code&gt; by
looking at whether you’re in Visual mode or not.&lt;/p&gt;

&lt;div class=&quot;language-vim highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;!&lt;/span&gt; WordCount&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; position &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;getpos&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;.&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    exe &lt;span class=&quot;s2&quot;&gt;&quot;:silent normal g\&amp;lt;c-g&amp;gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; stat &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;statusmsg
    &lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;s:word_count&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; stat &lt;span class=&quot;p&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;--No lines in buffer--&apos;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;V&quot;&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;s:word_count&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;str2nr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;stat&lt;span class=&quot;p&quot;&gt;)[&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;s:word_count&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;str2nr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;stat&lt;span class=&quot;p&quot;&gt;)[&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;11&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;endif&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;endif&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;call&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;setpos&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;.&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; position&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;s:word_count&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;endfunction&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This is how I made it show up in airline for files of the type &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;note&lt;/code&gt;.
Note that vim-airline automatically handles this for some set of default
filetypes (see &lt;a href=&quot;#the-easy-way&quot;&gt;The Easy Way&lt;/a&gt;).&lt;/p&gt;

&lt;div class=&quot;language-vim highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;!&lt;/span&gt; AirlineWC&lt;span class=&quot;p&quot;&gt;(...)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &amp;amp;&lt;span class=&quot;k&quot;&gt;filetype&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;notes&apos;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;w&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;airline_section_b &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;%{WordCount()} words&apos;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;endif&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;endfunction&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;call&lt;/span&gt; airline#add_statusline_func&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;AirlineWC&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Mon, 15 Oct 2018 00:00:00 +0000</pubDate>
        <link>https://vivi.sh/blog/technical/live-wordcount-vim-airline/index</link>
        <guid isPermaLink="true">https://vivi.sh/blog/technical/live-wordcount-vim-airline/index</guid>
        
        
      </item>
    
      <item>
        <title>A collection of tips</title>
        <description>&lt;blockquote&gt;
  &lt;p&gt;I graduated! I decided to leave some updates/comments in text like this.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I’ve been at UC Berkeley for ~3 semesters now, and it’s been a blast! Here’s a
fun list of tips I’ve compiled for this semester (Fall ‘16).&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;I took classes for a total of 6 semesters. Currently, I am working as a
research assistant and applying to graduate school. Here are tips as of Fall
‘18!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3 id=&quot;general&quot;&gt;General&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Don’t kill yourself with techs.&lt;/strong&gt;&lt;/p&gt;
&lt;div align=&quot;center&quot;&gt;
$$\text{your happiness} \propto \frac{1}{\text{classes you&apos;re taking}}$$
&lt;/div&gt;
&lt;p&gt;Unless you’re crazy good at classes. I took 4 CS classes this semester
(61C/70/168/188), and while I learned a lot, I didn’t do the best I could in
each class. Additionally, I didn’t get to spend a lot of time on other
interesting things (teaching, research). It’s really a matter of your own
happiness and what you’re optimizing for.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;There is some serious FOMO when it comes to taking classes, especially at the
upper-div level. Take the classes that are interesting.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Figure out your passion.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Maybe I’m a contrarian, but… AI/ML is a really sexy field right now, and
&lt;em&gt;everyone&lt;/em&gt; wants to get into it. Does that mean you should automatically apply
for every AI lab on this campus? &lt;strong&gt;No&lt;/strong&gt;, you shouldn’t. Instead, ask yourself,
are you genuinely interested in AI/like math or are you interested because it’s
hot shit right now and all the cool kids are talking about it? Realize that
there are so many other fields in CS that are neat and worthy of your time.
Don’t come in with a narrowed list without exploring all the options first.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;I had no clue what I was interested in my first year. I just said “AI” to
anyone that asked since it seemed like everyone was talking about it.
I’m ended up becoming interested in another sub-field.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Reward yourself and go outside!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There’s a lot of cool things to do in Berkeley that don’t include school or
studying. Here’s a few suggestions:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Big C hike&lt;/li&gt;
  &lt;li&gt;Go up the Campanile (free for students!)&lt;/li&gt;
  &lt;li&gt;Rose gardens&lt;/li&gt;
  &lt;li&gt;Tilden Park&lt;/li&gt;
  &lt;li&gt;Movie theaters
    &lt;ul&gt;
      &lt;li&gt;I ended up watching more movies in college than high school &lt;i class=&quot;em   em-sweat_smile&quot;&gt;&lt;/i&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://recsports.berkeley.edu/group-ex-schedule/&quot;&gt;Yoga @ RSF&lt;/a&gt; (free for
  students!)
    &lt;ul&gt;
      &lt;li&gt;They provide mats, which is good for your first couple times, though I
  think it’s worth it to invest in your own mat.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Eating poutine after finals lol&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
  &lt;p&gt;Let me add some more:&lt;/p&gt;
  &lt;ul&gt;
    &lt;li&gt;Explore beyond the bubble that is UC Berkeley’s campus (and anything within a
  0.5mi radius…).
      &lt;ul&gt;
        &lt;li&gt;San Pablo Ave is filled with great food: Middle Eastern Market has the best kebabs, ever. Baklava too. Super Super Restaurant has excellent pho.&lt;/li&gt;
        &lt;li&gt;Walk a few blocks west, cross the bridge, and you’ll reach the marina. It’s
  BEAUTIFUL.&lt;/li&gt;
        &lt;li&gt;Go north on Shattuck and you’ll hit:
          &lt;ul&gt;
            &lt;li&gt;Cheeseboard, Gregoire, Saul’s &lt;i class=&quot;em em-heart&quot;&gt;&lt;/i&gt;&lt;/li&gt;
            &lt;li&gt;(like 2 miles north) Indian Rock. Great view.&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
        &lt;li&gt;BART over to SF and just walk around. Bask in the consumerism.&lt;/li&gt;
        &lt;li&gt;BART to Oakland.
          &lt;ul&gt;
            &lt;li&gt;Walk around Lake Merritt. Look at the birds!&lt;/li&gt;
            &lt;li&gt;Go to Chinatown and eat your heart out.&lt;/li&gt;
            &lt;li&gt;Every Friday night, many food trucks gather around OMCA. The museum is
  also open for extended hours. Students get a discount on museum
  admission!&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
        &lt;li&gt;The Bay Street Mall in Emeryville has a Dippin Dots vending machine. Just sayin’.&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;Join a club. It’ll help you meet people outside of your major!&lt;/li&gt;
  &lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h3 id=&quot;eecs--cs-specific&quot;&gt;EECS / CS Specific:&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Getting that sweet summer internship shouldn’t be your life goal.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hear me out here - &lt;em&gt;especially&lt;/em&gt; if you’re a freshman. I find that people come in
rushing to find an internship, before even checking out other things you can do
over the summer - research, teach, take classes, &lt;strong&gt;chill&lt;/strong&gt;, etc.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;I still agree with this. Chilling is important.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Classes I like:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;CS 168 - If you have the opportunity to take this (it’s usually offered in the
  Fall), I highly urge you to do so! Scott Shenker is one of the most caring
  and inspiring professors I’ve met. Also, don’t you want to learn more about
  one of the biggest CS innovations (the Internet)?&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
  &lt;p&gt;More classes!&lt;/p&gt;
  &lt;ul&gt;
    &lt;li&gt;CS 162 - How do operating systems work? How does it all add up? Really makes
  what you learn in 61C make sense. Also, learn how to write lots of C.&lt;/li&gt;
    &lt;li&gt;CS 262a - Take this if you like 162. The class is structured differently –
  you’re reading a bunch of papers every week instead of completing
  programming homeworks/projects. But, wow, these papers are really valuable.
  Your term project is usually a research project related to OS/Systems.&lt;/li&gt;
  &lt;/ul&gt;
&lt;/blockquote&gt;
</description>
        <pubDate>Mon, 26 Dec 2016 00:00:00 +0000</pubDate>
        <link>https://vivi.sh/blog/school/a-collection-of-tips/index</link>
        <guid isPermaLink="true">https://vivi.sh/blog/school/a-collection-of-tips/index</guid>
        
        
      </item>
    
  </channel>
</rss>
