The Skating Rink

Before splitting up for the holidays, I wanted to meet up with my Bay Area transplant cousins Maddy and Adam. Maddy suggested that we might go ice skating, and since Julie had coincidentally mentioned skating as well, I knew we had quorum.

Wanting to avoid downtown Oakland, we drove out to Walnut Creek on Ice, which was the next closest rink to Berkeley. It was small and crowded. There were a lot of flailing skaters to avoid. It wasn’t safe to go very quickly. All of that was very similar to my past 2 experiences skating at the Winter Lodge.

What was new, however, were the “walkers”. Instead of carefully skating with their children and occasionally getting pulled down, parents could rent big, plastic, sliding podiums (see an example here) for their children to hang onto and scoot along. I can appreciate the concept: they work like training wheels, and they provide a physical barrier around the child. However, I found them somewhat scary because they can move so much faster and unpredictably than a child sitting on their butt because they had fallen down.

Having to deal with inexperienced skaters is fairly unusual amongst leisure activities. Most activities are structured and separated: 10 people play a game of pickup basketball, and 2 play a game of chess. Some players are good and some are bad, but you generally don’t have to worry about someone else knocking over your pieces. Even in other forms of exercise, there’s enough structure to avoid chaos. Swimming pools for doing laps get divided into lanes, and when it’s just open hours at a pool, there isn’t much of a shared goal. Ski slopes are rated for difficulty, and bicyclers pass on the left.

The skating rink, however, can have an arbitrary number of people sharing the same space, and successfully skating requires a lot of awareness to avoid others interfering with you. I have heard that some rinks have inner and outer loops for different experience levels, but that isn’t a lot of granularity for the chaos that can still ensue when one person can’t stop in time.

The fact that we haven’t imposed more structure, however, is maybe a testament to its effectiveness. When people fall in a skating rink, they usually laugh despite landing on ice. I can’t remember witnessing any serious injuries while skating. Generally, the crowd successfully skates around at the same rate. Despite complaining about how choppy the ice gets and how I almost got decked trying to avoid some hapless child, I have a good time skating, and since the rinks haven’t put in rules, I guess other people do, too.

After skating, we went to Smoke’s Poutinerie for dinner to incidentally complete a very Canadian experience here in California. Despite having skated frequently as a child in Canada, I can’t remember eating poutine while there. My best hypothesis for why is similar to why I missed other food in my childhood: my mom didn’t like it. But she probably knows best. Despite how wild the skating rink looks, a pile of fries drenched in gravy and covered with bacon is probably more dangerous anyways.

Lessons from Hosting Thanksgiving: 2016 Edition

According to tradition, I hosted my company for an early Thanksgiving last week. Although I enjoy hosting and cooking for friends regularly, this event is by far the most ambitious as I cook a full meal for about 20 people. Each year has been an opportunity for me to learn more about hosting, and I have a few more lessons to share from this year.

In the past, I have done various ethnic and regional cuisines, but I have run short on ideas. Of course, there are plenty more unexplored cuisines in this world, but I have only picked cuisines that I think I have an edge on and wouldn’t be offending co-workers who know that culture better than I do. This year, I ended up doing a Canadian Thanksgiving, which was some combination of stereotypical Canadian food (butter tarts) and using maple syrup in everything. Continue reading Lessons from Hosting Thanksgiving: 2016 Edition

A Path Forward After the Election

Last night, we saw one of the most shocking results in American democracy with the election of Donald Trump as the next President of the United States. We’re shocked about how wrong the polling was. We’re shocked that the people of this country would elect Trump. But really, we’re shocked to learn that this country is not what we thought it was, and more specifically, that we as a people aren’t who we thought we were.

As the progressive movement has made tremendous advances over the past few years on gay marriage, universal health care, and more, we have distanced ourselves from the opinions of many people across this country. We have allowed righteousness and confidence in our worldview to scorn or ignore many people who feel left out of this movement. These changes have eroded trust in our government’s ability and willingness to reflect our beliefs and have a beneficial impact in the lives of regular Americans.

In defeat, our pride is hurt. We could dispute the mandate or election process. We could call others racists or sexists. We could reject Trump as being “our president” and spend the next 4 years trying to undo this election. We could retreat into our own separate spheres and ignore the wide differences in our political views.

Or we can use this moment to unite us. We can re-affirm our belief that this country is stronger together. We can harness the our shared identity and turn our empathy towards the half of the country that very clearly stated their problems and desire for change.

I am optimistic and believe this election can be a positive force in the progressive movement. Faced with the reality of how this country really feels across a swath of issues, this election can be a call for us to re-engage in civic life and create the change we want to see. I believe that our government and our institutions can and should create good, but they are only as strong as the trust and energy we put into them.

As I saw the election results develop over the course of the night, I simultaneously experienced 5 stages of grief. In the end, however, I realized that this country will endure. Through our faith in democracy, we have gone through 56 peaceful transitions and 1 very notable unpeaceful exception, and although it might be a statistical error, I’ll take those odds.

Maybe this country isn’t what I thought it was, and honestly, what democracy has revealed about who we are has me worried. However, that feeling and perception doesn’t have to define any individual or us collectively. Across every facet, this election has been about change. Let’s all be part of that change and remember that our identity isn’t defined by any individual, community, or state. No single person is American: together, we are Americans.

My Magazine Reading Paradox

Under my desk right now, I have a stack of about 52 unread magazines, and when I say “about”, I mean I just crawled under my desk, did a shoddy job of counting, and am not confident enough to give an exact number. But there are 52 of them.

I finished the September 2014 edition of “Discover” magazine and thoroughly enjoyed it. The “upcoming science events” section in the back felt dated, but the rest was interesting, including a story about reconstructing soldiers’ faces and a story about a medical tech lab using everyday items. As my backlog would indicate, I’m not very diligent about reading magazines, but I really enjoy them. My stack is a mix of “Discover”, “Wired”, “Popular Science”, “Stanford Magazine”, and a few “Makes” as well.

I have a hard time reconciling that fact with related feelings about magazines. For one, I generally dislike owning physical books and find them a burden to carry around or even own as they take space on my bookshelf. I only really like having physical copies of books that I really enjoy.

Also, I like completing things and checking them off my list. Books are big, discrete volumes that I look back at a sense of accomplishment having read this or that. Periodicals are, well, periodic, and one can never really be done reading them until they go out of business.

And most apparently, there’s a lot of stuff in magazines that I’m not really that interested in. On the internet, I will browse my reddit front page and click on a few links. On the rare occasion I have physical newspapers, I skim a lot of headlines. Magazines are also an amalgamation of topics that I would seem to skip as well, but I actually read them cover-to-cover and enjoy them thoroughly for it.

I’m not sure what the difference is with a magazine, but somehow, they are the cheese with my broccoli. I enjoy magazines because I’m willing to read all of the stories I would never select myself but often open my mind to new ideas and learn about totally different topics. They are my touch point with basic sciences, inventions in consumer electronics, and innovations in every discipline of engineering I never encountered. When I started college, I was excited about taking only computer science and psychology courses. Now, I find batteries and social dynamics just as interesting and wish I had gotten more breadth in my education.

Today, there’s a lot of concern about internet “filter bubbles” created by algorithms that feed you only information that reinforces your existing ideology. We also talk about the “echo chamber” of cable news where media outlets reinforce and amplify the same message through exclusive exposure. Selectivity in our media is very comfortable: I myself am a very picky redditor.

It feels like our media and communities have fragmented so much, but I wonder how big the gap really is. I think most people are curious. Although it takes some small amount of willpower to get there, we also enjoy the mental exercise of engaging with those ideas. Political polarization isn’t new, but types of media are, and I wonder whether we all just need to find our “magazines.”

These days, most magazines have an online presence as well with all of their print content replicated. I don’t think of myself as a nostalgic person. I honestly really can’t relate to people who enjoy the physicality of flipping through the pages of a book. Even so, there’s something really “right” about magazines that I uncomfortably can’t explain.

But I’ll still enjoy the heck out of them.

Also, if anyone in the bay area wants back issues of magazines, let me know. I have a stack of read magazines under my desk that I want to get rid of but just value too much to throw away.

The Best and Worst of Football

This past weekend, I watched 2 entire football games and saw 1 touchdown. For reference, a typical football game will have maybe 6 touchdowns. Between 2 games over 7 hours, I saw 1 guy with the football in his hands in the endzone. Rough.

I watched the first game in-person at my 5-year college reunion, where Stanford lost to Colorado. I will not attempt to summarize the game any better than ESPN: “Sloppy Colorado holds off equally bad Stanford 10-5“. I watched the second game over pizza at my friend Tom’s place, where the Seahawks and Cardinals managed to both fail to win the game and ended in a 6-6 tie. Neither game had much of a highlight reel, and yet, I had very different feelings about both games. Continue reading The Best and Worst of Football

A Beginner’s Guide to vim

(This was originally posted on GitHub. For the unfamiliar, vim is a text editor often used for programming. It’s similar to Notepad or TextEdit but much more customizable and powerful. It is also one of two sides in the great Editor war.)

Through your coding career, you have likely had brief encounters with vi while looking over your coworker’s shoulder or tweaking a server setup script. It looks arcane, and it’s hard to tell if it’s just an old habit of some coders or if it will actually make you more productive.

This guide is light on actual content and is intended to provide structure for how to learn vim. In truth, the only way to learn vim is to use it. The learning curve is steep but well worth it.

My perspective

vim is versatile, and this guide is written from the perspective an engineer who (mostly):

  • uses a Mac
  • ssh into Ubuntu virtual private servers (e.g. AWS EC2 instances)
  • writes Python/Django and JavaScript/React
  • builds a web application

Hopefully this guide is applicable to others as well.

1. Movement and editing

The basics of any text editor is being able to edit text, and vim is trickier than typing and deleting. There are plenty of cheatsheets and laundry lists of commands, so we won’t add another here. The best way to learn it is to usevimtutor, a tutorial built into vim that you can launch from your console. Go through it first to learn the basics, then do it again in a week after using vim for real.

2. Split Screen

We maintain a 100 character line length in our codebase, which is less than half of the width of a 1920px screen. Typically, I keep 2 different windows open side-by-side. You can split your screen with :vsplit and switch back and forth with ctrl-w ctrl-w.

Search online for more split commands (there are a lot).

3. Autocomplete

ctrl-p is your friend. When you’re typing, you can autocomplete the current word, where the options are drawn from words found in all open buffers.

4. Search and Search/Replace

vimtutor should have gotten the basics of find/replace, but here are some particular helpful techniques I have found

# and * search for the word currently under your cursor.

5. Editing your vim configuration

vim is extremely deep because it is extremely customizable. This includes simple settings such as tab widths or case sensitivity in search, but it also includes syntax highlighting by file type and rich plugins.

My dotfiles are available on github to see my settings in my .vimrc. There are 2 semi-standard settings that have been tremendous for me personally:

  • imap jj <Esc> – Type ‘jj’ to exit insert mode. This saves the stretch for the escape key or for ctrl-{
  • nnoremap ; :, nnoremap ; : – You type colon far more often than semi-colon, so this swaps those

Currently, I would recommend Vundle as your plugin manager.

7. GNU screen

Technically this is outside of vim, but I find screen to be indispensible in my environment. screen provides virtual shells so you can rapidly switch between vim and the shell. My typical setup has 3 screens:

  1. vim – I only have 1 instance of vim running at any time to avoid conflicts. I use multiple buffers and vim-session to maintain that
  2. shell – everything else I use outside of vim, including ack, git, scripts, file system management, etc.
  3. server – for web dev, you usually have to run a Django/Rails/Node development server, so I just keep that running in a separate shell

Note that you can also create a .screenrc to customize your screens as well.

8. Macros

Macros allow you to record a series of commands and repeat them again. Very useful for repetitive tasks

9. Marks

Marks record your cursor position, which you can use as a “bookmark” or in combination with other commands. I usually use uppercase marks because I’m bouncing between so many files

10. Registers

Registers are basically a multi-clipboard. I like using registers when I am replacing repetitive code since the unnamed register keeps getting overwritten when I delete lines of code.

11. References

  • Jim Dennis on grokking vi – a long but also deep StackOverflow answer on how vim works
  • Vim Tips wiki – it’s not very well-organized, but you will stumble across this site often while googling for vim tips
  • Vim Awesome – index of vim plugins
  • List of Django dev tools – for life outside of vim, here’s a full stack of tools you can use for Django development

12. So much more!

Although this guide is a quick read, learning to use vim can take a long time. While you are coding, be aware of the tasks at hand and keep that meta-awareness about what vim tricks you might use to be more efficient. Over time, more of it will become automatic, and everything will feel quick and intuitive.

Beyond this guide is a world of customizations and additional shortcuts to continue to learn.

Traveling Local

This past weekend, I went up to Sausalito with Julie and my cousin Adam, a fresh Bay Area transplant. After a typically slow drive through San Francisco, I drove northbound across the Golden Gate Bridge for the first time in my 3 year old car into this cute, throwback town across the bay from San Francisco.

We started with a late lunch at Lighthouse Cafe, a small throwback diner where we sat at the bar and saw our lunch come together. I learned that the trick to perfect eggs is to use a lot of oil to make sure they don’t stick. Also, if they don’t turn out perfect, throw them out and try again.

We walked over to Bay Model, a massive 2 football field sized model of the Bay with water accurately flowing to emulate tides and such. It’s a former US Army Corps of Engineers research facility turned museum because computer models made physical models outdated. Sadly, my home was not in the model because we’re too far away from water, but we did trace through various towns and roads we had traversed.

img_3695
Photo credits go to Julie who can actually appreciate visual things

Continue reading Traveling Local

D&D is the player’s game

This past weekend, I ran my Dungeons & Dragons* (D&D) game like I do once a month. Unlike most months, however, I came out of the 2 1/2 hour session feeling like I had run a pretty good adventure.

It helped that I was better prepared than usual. Over past sessions, I have wavered from totally improvised scenarios to meticulously detailed maps and character personalities, and I certainly prepared more rather than less this time. I also planned out the adventure more intentionally in how I wanted the story to flow rather than just filling in blanks.

I think the biggest change came when I realized there is no perfect way to play D&D: it’s a game entirely subject to the players’ preferences, and a DM does best by preparing and running the game their players like.

As a DM, I had been moving to a style that I thought would be more fun. I was interested in RPG systems with more improvisational play like Dungeon World. In those systems, the players and DM act and react quickly and fluidly to make up the story and world as they go. Although the DM needs to have a general direction for the adventure, there aren’t a lot of details. Rather than laying out a sandbox, the DM is always supposed to present a pressing situation to keep the scene moving forward.

In recent sessions, I had prepared according to that style, which is to say that I didn’t prepare much. As the party moved through a dungeon, they asked specific questions about the exact appearance of the area and tried to compose a complete understanding of the scene in order to reason through a safe course of action. This ended up being very difficult for me since the details didn’t exist until the questions were asked, and I ended up not creating a rich, satisfying experience.

Put differently, I think my players expected that the game was set in a fully fleshed out world that they could observe, deliberate, and plan to deal with in response to the situation. In my improvisational style, however, I was presenting them with a very narrow perspective into a situation that would lead into another totally made up situation. Although I knew that I was running the game for the players, it didn’t really occur to me how much of my own agenda I was bringing into the game by pressing for this style.

The fascinating part about D&D compared to most games is that D&D doesn’t have an “right” way to play. In most games, there’s a optimal way to play that leads to winning. That may be having the perfect basketball shot, or developing perfect aim in Halo, or executing the perfect strategy in Settlers of Catan. Of course, most games have imperfect information or randomness to leave something to chance. Despite that, many games have fixed win conditions and requires skills that you can practice and improve. If you look back after the game, you can see how “I could have done that a little better” or “if I hadn’t made that mistake, I could have won.”

In D&D, it’s about the experience of playing and the story that you have created that matters, not the act of winning or losing per se. Different styles of play aren’t just different strategies to try to win: different styles of play are how different people choose to enjoy the game. You get better over time at figuring out how to use your class abilities or spells, but so much of the enjoyment and purpose of the game is about the roleplaying that players who are overly focused on the numbers are derisively called “munchkins.”

The flexibility of D&D as a game is quite liberating compared to sports, video games, and even much of life, where the competition and relentless optimizing take over. Although I think I consciously was aware of that freedom, I am still seeing different impacts of that structure years later, and hopefully, it makes me a better DM, too.

*If you’re unfamiliar with the concept, D&D is a storytelling game where each player is a hero in a Lord of the Rings-esque adventure. the Dungeon Master (DM) comes up with the setting and premise for the adventure, and the players describe (in normal prose) how their character attacks a pack of orcs or parleys with a royal diplomat. The DM responds (sometimes in turn or sometimes requesting a dice roll to let chance determine the player’s success), and the story moves forward. D&D is one of many roleplaying game (RPG) rule systems that add some structure to basically imaginary play.

My DNC Speech Rankings

I didn’t watch much of the DNC live, but I have been catching up on YouTube. I won’t go so deep as to talk about the issues, but I had enough thoughts about the rhetoric that I figured I would offer up my rankings on the best speeches at the convention. Overall, I thought that they were generally pretty good. I was particularly impressed by the variety of topics and approaches across the speeches: I underestimated the number of appeals that they could make and how they could use different speakers.

Anyways, here were my rankings.

10. Corey Booker

Not a lot of emotional range in his speech: pretty much all of it was pretty equally intensely positive. I thought the structure of the speech was pretty clever in starting with an appeal to moral values and community. However, I don’t think he talked about it in a very accessible way (though maybe I was just getting bored because I had watched his speech after 3 others). At least he got the “we will rise” in there to get the crowd going.

Continue reading My DNC Speech Rankings

A Few Tips from our Wedding

Julie and I are married! We had our wedding a few weeks ago here in the Bay Area, and we had a fantastic time. It’s hard to imagine what could go wrong surrounded by friends and family to celebrate, but regardless, we were glad that all of our plans came together so well.

On our honeymoon, we spent a lot of time talking about the experience and musing about what we would do differently for that 2nd time that presumably will never come to pass. Amongst the tons of internet advice available on how to plan a wedding, we came up with a list of a few things that we thought went particularly well or poorly.

As such, this particularly post has been written in long discussion with Julie who deserves credit for the good ideas here.

1. Use Asana and Google Drive.

We dumped proposals, contracts, guests lists, and plenty more into Google Drive to share with our parents. Having a single place to use as reference and share the schedule avoided a lot of back-and-forth and confusion.

Longtime blog readers know my obsession with task management systems, and I definitely wanted it for wedding planning, too. We started with an empty Asana project, brain dumped tasks, never *cough* forget to do something.

2. Check in on your hotel blocks.

When we booked our hotel blocks, the hotel staff had standard block sizes for us with the understanding that it would be adjusted as necessary. Around the wedding, I found out from guests that the hotel where we were holding most peripheral events was apparently booked up, and we had no idea. In retrospect, we should have either checked in directly with the staff or tried booking ourselves.

3. Test out your wedding dress for dancing.

Julie and I hadn’t danced together in the full get-up until about a half-hour before our first dance. This wasn’t a big deal for me, but it was a big deal for Julie. I would recommend increasing that lead time by several orders of magnitude to avoid embarrassing accidents. Specifically, Julie would have tried walking backwards in her wedding dress during shopping and tailoring.

4. Put your guests in touch ahead of time.

For cliques of friends or family, it’s helpful to plan logistics around transportation and lodging if they know who else will be attending. It can be somewhat awkward for potential guests to ask directly (and accidentally inquire a non-invitee), so I just made a big email list and included everyone on it. I thought all of the social events surrounding the wedding went well and was glad to support that in any way possible.

5. Get lots of sleep before the wedding.

The wedding day itself is long, but even before that, we had plenty of guests coming through with whom we wanted to spend as much time as possible. The casualty of all of the excitement, of course, was sleep. The final 2 weeks before the wedding kept us up late with planning, and that time should have literally been work, plan, and sleep with everything else cut out to make more time for those.

6. Plan the cake cutting.

Through almost the entire wedding, we knew what would happen, but even more importantly, we had someone else specifically cueing or directing us on what we needed to do. The one gap was cake cutting: we went over to cut the cake, and suddenly, everyone was looking at us, and we were just supposed to do it. It was not hard, but it was a surprise after following instructions all day. It’s hard to practice, and we should have had a plan there.

7. Direct the DJ.

We are very fortunate to have very enthusiastic dancers amongst our friends and family, but not everything is going to work for the crowd. When the dancing was dying down, Julie told the DJ to “play stuff that people know”, and that re-invigorated the crowd.

8. Step back for a moment and take in the wedding.

One of Julie’s cousins gave us this advice during the wedding, and I wish I had followed it. Once I started getting dressed for the wedding, things never really stopped until Julie and I got in the car and drove away. Having everyone gathered together for us was a awe-inspiring thought, but we were so caught up in the action that I don’t think I ever really took it in. That would have been worth the 30 seconds to hang onto that feeling forever.

A photo posted by Nicole Cross (@43rdavephoto) on