JSLint’s ‘unexpected end of line’ vs. JQuery style

June 10, 2010

I recently added a script to run JSLint over any javascript files that were changed in my last batch of commits when I push changes to our main repository (if you’re interested, you can take a look).  Immediately, I had my feelings hurt when it started reporting a bunch of errors and warnings.

Most of them I agreed with, but the ambiguous end of line warning when the line was catching syntax that I had very purposefully used to increase readability (for me).  Read the rest of this entry »


Beijing Coworking Status

June 6, 2010

A few minutes ago, I sent out an email update on Judy and my coworking idea that I talked about recently in A New Place To Work.  Then, I realized people who aren’t actually going to be able to participate in Beijing might be interested in our status as well, so I decided to post it on my blog, too.  Here you go: Read the rest of this entry »


OutdoorsBeijing

June 5, 2010

One of the first software projects I built in China was an Appspot.com application to visualize the air pollution in Beijing hour-to-hour.  You can see it at outdoorsbeijing.appspot.com.  I did this for a combination of reasons: Read the rest of this entry »


mysql_connect and ‘No such file or directory’

June 2, 2010

I was working with a friend to get him started with PHP development on OSX, and we were stumped by a ‘No suck file or directory’ error message for a long time.  It seemed to be coming from the following line:

$this->linkid = @mysql_pconnect($host, $user, $password) or die(mysql_error());

At first, we didn’t understand it, because it doesn’t look like PHP is trying to connect to a file there.  However, we eventually discovered that the file that wasn’t found was the MySQL socket.  Because he had used Ports to install MySQL instead of downloading the .dmg from mysql.com, he didn’t have the same default socket as most other people on the internet. Read the rest of this entry »


A new place to work

May 29, 2010

On Tuesday, I went to a networking event with Geeks on a Plane, who were visiting Beijing at the time. One of them, Mike Prasad, and I were talking about the startup community in Beijing and I mentioned that it was actually really nice to have the Geeks in town, because I also ended meeting other local entrepreneurs. I mentioned that there aren’t quite as many places and events for startups as there are in places like Silicon Valley.

Mike mentioned that Los Angeles didn’t have much community either a few years ago, but that he and some like-minded people got together to really push it. After enough time, they reached a critical mass and now the community is pretty lively even without them organizing everything. He encouraged me to do the same thing here. Read the rest of this entry »


Difference with sed in-place editing on Mac OS X vs. Linux

May 27, 2010

I ran into this problem about a month ago with a bash script that I was writing on my MacBook Pro.  For some reason, in place editing with ‘sed -i’ just wouldn’t work, no matter what I did, and I couldn’t find any solution online.

When running something like

sed -i 's/before/after/' test.txt

you get the error message sed: 1: "test.txt": undefined label 'est.txt'.

Eventually, it turned out to be because sed’s ‘-i’ option takes a parameter to indicate what extension to add to the file name when making a backup.  For example,

sed -i '.bak' 's/before/after/' test.txt

leaves you with two files, ‘test.txt’ and ‘test.txt.bak’, where ‘test.txt.bak’ is the original version.  Unlike Ubuntu and other linux versions, on OS X, this extension parameter is required.  If you really know what you’re doing and don’t want a backup made, you need to provide an empty string ”.

The correct way to run this command on OSX is

sed -i '' 's/before/after/' test.txt.


Production, Step 1

May 9, 2010

Judy and I have spent a bunch of time over the last few months learning as much as we can about tailoring and working with product suppliers.  We finally agreed to work together with a particular tailor and factory yesterday.  I think they’ll be able to provide us with high quality clothing at reasonable prices and have a fast turn-around.

It took us a long time to find a supplier that would interested in working with us, partially because we aren’t really sure how much volume we can provide at first.  We found out pretty quickly that when you aren’t able to promise really large volume immediately, a lot of places won’t even want your business because it’s not worth the hassle.

To overcome this, we first talked to a lot of tailors to find some that would be interested, but what I think was most important at the end was that we went from just telling them what we wanted – e.g. low prices, high quality, consistent stock, to explaining a little bit more about what our vision was and why we were starting at low volumes, but that we’d like to grow together quickly.  The one we decided to go with agreed to help us out quite a bit at first to try and get Bespoke Row going.  Moreover, if we need to get things other than just clothes produced (shirt stays, labels, etc.), he can help us get in touch with people who can make them.  Just like any other relationship, it seems that working with suppliers can’t just be them giving us what we want; we need to treat it a bit more like a team venture so that they’re rooting for our success as well.


How to include git hooks in a repository AND still personalize your machine

April 6, 2010

In my new job as Director of Engineering at 25Lux.com, I’ve been dealing with a lot of the infrastructure parts of development that I mostly glossed over before because I always worked at a company that had everything set up for me.  It’s a good chance to think about in what kind of environment I’d really like to develop.

It turns out that big part of my answer involves automating everything.  Part of my reasoning is that our team is very small now, so the more we automate, the more we can concentrate on just development.  Another part of my reasoning is that I’ve read a lot about continuous deployment lately and many of the principles like decreasing the time between developing a hypothesis and learning your answer make sense and can only be achieved through extensive automation. Read the rest of this entry »


Staying Connected Overseas with Google Voice and Skype

March 11, 2010

When I first moved to China, I decided that I still wanted to stay connected to the US.  Part of that is keeping a US phone number that can both send and receive calls and text messages.  Luckily, thanks to products like Google Voice and Skype, doing so is now cheap and easy.
Read the rest of this entry »


Vistaprint Lessons Learned – Part 2: Career and Leadership

February 12, 2010

This is part two in my ‘Vistaprint Lessons Learned’ series.  I only have four lessons this time, but I think they’re important. I’m sure I learned more than just four lessons about working efficiently, but also these lessons are more about continual improvement than many of the software development lessons were.  Therefore, I’ve spent a lot of time on each of these lessons, and I’m sure I”ll continue to spend a lot more time on them in the future. Read the rest of this entry »