I Updated my Blog!

When I set my 2017 goal of “Learn Web Design,” I wanted to do something creative. Because I spend all day building websites designed by others, I could learn more about how those designs came together and explore my artistic side. Earlier this year, I already redesigned at Spawning Tool and foodmarks. My last design project of the year is my last major website: this blog. Continue reading “I Updated my Blog!”

“Spies Like You” is published!

I’m excited to announce that I have achieved #4 of my 2017 New Year’s Goals: I published a one-shot RPG adventure called “Spies Like You” earlier this month. Although it was self-published, six people (with only one self-proclaimed shill) have purchased it so far, so with a grand total of $1.94, I am officially a professional writer.

Thank you WordArt for at least one graphic.

Continue reading ““Spies Like You” is published!”

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.

Farm Fresh to Me

You may or may not have noticed that I never really concluded my dinner table tournament. Despite my claim to be good at maintaining commitments and projects, I definitely stopped well short of goal to cover all of the options. I did, however, make it slightly further than my blog would indicate because Julie and I did end up trying a CSA about 6 months ago, so here’s my extremely belated post about it.

Farm Fresh to You

Farm Fresh to You is a community supported agriculture provider. The idea is that consumers can cut out the grocery store middleman and get produce directly from local farms. There are various schemes of how it works, but the basic setup is that I, as a consumer, pay a farm, and they send me shipments of whatever they’re current growing on a weekly or bi-weekly basis.

Many people have opinions about the benefits or issues with this, but I was interested in trying it primarily for 2 reasons. First, I would get better, fresher, riper produce. The story goes that produce at the grocery store has to be picked early so that it will not rot en-route before getting to the consumer. Since CSAs cut out that step, the produce can be picked at perfect ripeness. Second, I would get different stuff. I like the novelty of eating, cooking, and cooking with different things. When I go grocery shopping, I will naturally tend to buy produce that I know how to use and how to cook with. With a CSA, I would be forced to use whatever showed up and, as a consequence, try new things.

We ended up signing up at a booth during a community event in downtown Mountain View. Although I could tell that they guy was going through his sales shtick, I felt okay going along since we intended to try a CSA anyways. He got us a discount for our first couple boxes, and in the end, each bi-weekly shipment was somewhere in the range of $30-40.

Delivery

Our box showed up early Friday morning, so we opened it up over breakfast and discussed our options.

IMG_1441

The mix included a few different types of fruit, 2 types of peppers, 2 types of grapes, some greens, tomatillos, and a few other items I can’t identify several months later. Overall, we were quite satisfied with the variety and set about planning how to use everything.

Preparation

IMG_1450

Prior to that day, I could not have told you what was in green salsa. Maybe just green bell peppers? It turns out that green salsa is mostly just tomatillo with something spicy (peppers) in it. We found a recipe for green salsa, and it turned out great. The fresh salsa listed on the same page was not good. I would not recommend that. But the roasted salsa was good, and I definitely learned why I should be less impressed with the salsa options at Mexican restaurants.

The peppers ended up as fajita vegetables for fajita night.

IMG_1451

and we also roasted and sauteed the other vegetables for another meal.

I'm pretty sure we got those potatoes in the box, too. I forgot about those, I think.
I’m pretty sure we got those potatoes in the box, too. I forgot about those, I think.

The butter lettuce ended up as part of our salads. I sadly realized a long time ago that I didn’t know how to make good salads. I think I leaned too much on vegetables (all bitter) without balancing it out. With Julie’s guidance, we stepped up our salad with apple, dried cranberries, blue cheese, and candied nuts.

IMG_1463

The Followup

Given just the text above and the pictures, you might have been led to believe that we had a good experience with it. You would be correct. We liked the CSA enough that we got another 4-5 boxes.

Unfortunately, I don’t think a box ever went that well again. We got the first box on a signup promotion, so subsequent boxes ended up with much less in them. We also noticed that they often were filled with less exciting staples, like onions and green lettuce, which didn’t really taste any better to us than what we got at the grocery store. Because it was just produce, we ended up having to go to the grocery store anyways to fill out our meals for a week.

The final realization, however, came when I went shopping the day after receiving a box and seeing a few of the more unusual items at the Milk Pail. I walked through the store and tallied up the cost of buying an equivalent amount and realized that I would come out far ahead doing my own shopping–which I do anyways. I immediately added a task for myself to cancel my subscription, which took probably another month because I had to call in during work hours to do it, and I’m bad at completing tasks that require phone calls during work hours.

Overall

I had a good experience with Farm Fresh to You. I have realized that I enjoy the process of cooking, and a CSA mostly lets me do that. However, I think I am mostly spoiled to have the Milk Pail just down the street from me, where I can get cheap, local, fresh produce. In the end, the CSA just provided me the convenience of delivering a few of the same items at a premium, and that wasn’t worth it to me.

Here are my rankings:

  1. Blue Apron
  2. Farm Fresh to You (CSA)
  3. HelloFresh
  4. Munchery
  5. Plated

You may be surprised to see the CSA not first despite it being the closest to my normal pattern. Were normal home cooking not an option, it would be first, but I think that I would be more likely to mix Blue Apron into my meals than the CSA.

There’s a chance I will continue the Dinner Table Tournament in the future, but in the spirit of sunsetting responsibilities for my New Year’s Hopes, I think I will declare it done. I will probably continue to blog about food, but it will likely be in a far less structured format.

This post is part of the Dinner Table Tournament where I pull Julie along my need for novel experiences in “staying in” dinner options to generate blog content. I have not been compensated by Farm Fresh to You for this in any way for this post. Yet.

Saying Hello to HelloFresh

This past weekend, I was talking with my friend Jenni about a personality trait that affects how people approach food: novelty seeking. Some people enjoy novelty for its own sake; others find comfort in known pleasures. Would you rather try out that new restaurant you don’t know anything about, or would you rather go back to that restaurant you love? Same question goes for cooking.

It is a spectrum, and we all have moments in both directions, but I think Julie and I tend to be novelty seekers. I have lamented to many friends recently about how I rarely go back to my favorite ramen place in town: I would rather go to a new restaurant in the same area rather than go back to the same place. The novelty in itself is worth a try.

Whenever we go out to eat, Julie and I always agree on the 2 things we’re going to order, then switch half way through the meal. Sometimes one of us ordered something better than the other, but we are almost always glad to have tried both. And if you set a dessert bar in front of me, I will try to cut the smallest piece of everything so I can taste every different things I can.

I would probably vary my cooking just as much if it wasn’t so much work. The ease of pointing at a different menu item or walking one restaurant over certainly encourages novelty, and that is hard to replicate at home. Hopefully the Dinner Table Tournament brings about that same ease.

HelloFresh

HelloFresh is a service that ships out boxes of measured ingredients to prepare a series of dinner menus with recipes included. By default, they provide 2 broad options for vegetarians or not, but you can customize your order week to week depending on what they have available. You order by the meal for roughly $10 each with no additional tax or tip.

Screen Shot 2015-08-01 at 2.53.03 PM Continue reading “Saying Hello to HelloFresh”

A Typical Week of Home Cooking

Going through the Dinner Table Tournament, I have discovered many different ways to cook. The process of writing and documenting those different services changed the way I thought about the cooking experience. To put it on an even comparison against our typical routine, I decided to write up what a typical week of cooking looks like.

Home Cooking: Take about a couple hundred

Julie and I usually start our weekly meal planning on Sunday morning over brunch. That way, we can go grocery shopping that afternoon. Brunch is typically eggs (scrambled, omelet, soft boiled, fried, poached, or whatever Julie is in the mood for), toasted leftover whole wheat sandwich bread ends, and fruit. We had guests over on Friday, so we substituted in strawberry long-cake and salad greens. Continue reading “A Typical Week of Home Cooking”

Donning a Blue Apron

I don’t really get calories. Every time I go to In-n-Out, I am stuck by the fact that the french fries have more calories than the burger and that both are far below that of the milkshake. Since I already know what I’m going to get, I stare at the calorie counts on the menu and rationalize all of the sides by going for a grilled cheese.

I have 2 big disconnects with understanding calories. First, calories don’t always match fullness or centrality in a meal. I assume that they are strongly correlated, but it turns out that those bags of chips can add up, while juice goes right through my system. Second, I still don’t get how non-meat food catches up to meat in calories. I always kind of figured that meat was the heavy-hitter, but peanut butter or pasta don’t seem so offensive.

I remember hearing awhile back that calorie counts on New York menus wasn’t decreasing consumption, though I think that it might be missing the long-term effect. Standing in line at In-n-Out, I can’t make sense of the calorie counts nor can I override my momentary desire for particular menu items. I do, however, now have a better sense for how many calories go into an entire meal: before seeing calorie counts on Munchery/Plated/Blue Apron menu items, I had no idea how many calories should be in dinner. That allows me to compare that to the snacks or other meal options I have. I may not be good at judging calories, but at least I know I’m bad at it and think about my choices along the way.

Blue Apron: Take 1

Blue Apron ships you weekly, insulated boxes full of raw ingredients for a few different meals. You can choose how many and what types of dishes you want (veggie, beef, fish, poultry, etc) as well as your preferred delivery days. The website is easy enough to use and of course features very attractive food photography. Continue reading “Donning a Blue Apron”

Still Munching

Growing up, my family ate everything, well, family style. All meals, whether stir-fry or barbecue, came out in serving dishes on the table. Even ostensibly single serving meals like hamburgers or baked potatoes were usually assembled away from the table from the big stack of food and brought over. Even these days, Julie and I often cook family style between the two of us. Portion sizes for 2 aren’t too hard to figure out, though we will often leave a half-serving of food behind for tupperware.

As such, one great contrast in restaurant food is getting a complete plate, with grains, veggies, and meat all at different clock positions. With a full plate in front of me, I feel compelled to finish as much of it as possible or to give up early for a doggie bag. There’s something about having everything already on my plate that pushes me to eat a little more, where seeing an equal portion in the serving dish doesn’t. The strange world of individual servings at home adds an element of restaurant fanciness, but also makes me overeat slightly more than I normally would.

Munchery: Take 2

Our meal schedule has been somewhat erratic for the past month, so Julie and I couldn’t commit to any of the full-week meal options recently. Despite lapsing on that, we were able to order Munchery to fill in an unusual day, and it was quite convenient. Even without considering the number of meals, it was much more convenient because we ordered our meals for the next day, while Plated needed to be ordered several days in advance. Continue reading “Still Munching”

Getting dinner Plated

Targeted ads seem to work pretty well these days. After publishing my blog post about Munchery, I started regularly getting ads for Plated on Facebook. They were quite conspicuous on my newsfeed with a list of friends who had also liked Plated.

I guess it worked, however, because I ended up using the promotion via Facebook to use Plated. The discount was worth it, but I do feel dirty about it because according to the marketing numbers, I just validated advertising my Facebook feed. Yikes.

Plated: Take 1

Plated is a service that creates menus and delivers ingredients to your home for exactly those meals. You can prepare the meal basically from scratch without having to find recipes or do any grocery shopping. Continue reading “Getting dinner Plated”

Not Too Little, Not Too Munchery

Many websites today have poor user experiences. Some are annoying. Some are cluttered. A common problem is that they make it difficult for users to do what they want to do. You know what flows typically are very easy? Anything where users are buying things.

It’s not perfect: I have many times dug out my wallet to type in the credit card number on the front of my card, then flipped it over for that XYZ or POS or whatever that number on the back is, then flipped it back over for the expiration date. But sites generally make that “Add to Cart” button very visible, and it’s only a few steps away to check out and give them money. If only we were so well-aligned and practiced in other flows on the internet as well.

Munchery: Take 1

Ordering

My Munchery journey started from the recycling bin. I found out a few days later that they had mailed coupon codes to apparently everyone, but I had initially ignored the flyer, then dug it out a few days later. I was probably hungry right then. Continue reading “Not Too Little, Not Too Munchery”