Monday, December 30, 2013

Disabling Wi-Fi on a Comcast Xfinity Cable Modem

Judging by traffic and comments, my last technical "how-to" post was a moderate success, and was found by folks Googling for the solution—so I'm back with another quickie.

A few months ago Comcast sent me an Arris TG862G cable modem, an upgrade from the previous Motorola device to enable higher speed internet access. On the upside it did the job more than handsomely:

On the downside it insisted on being a firewall, DHCP server, and Wi-Fi access point—when I already have something I'm perfectly happy with for those functions. And while some aspects could be tweaked via the admin console, the Wi-Fi couldn't be disabled.

I wanted it disabled.

So if, like me, you want to disable Wi-Fi on your Xfinity Arris TG862G cable modem (how about that for SEO), here's what you need to know: just call Comcast and ask them to put your device into "bridge mode". I did, it was painless, it took them a minute or two, and the box became exactly what I wanted: a transparent bridge between co-ax cable and my Asus router. The N16 now has a the public IP and does its job as firewall, Wi-Fi access point, ssh tunnel endpoint, DHCP server, and so on.

Enjoy.

Saturday, November 23, 2013

Working at Twitter

I find myself interviewing a lot of people for positions at Twitter. In my time here I've been on panels for Product Management, Business Development, Engineering, Product Counsel, Country Director, Brand Strategy, Data Scientist, Corporate Counsel, Media Partner Manager, Business Operations, Program Management, Corporate Development, Marketing & Communications, Procurement, Finance, Product Specialist, and likely a few others—I've interviewed hundreds of people in all.

Most of these interviews are 30 minutes. I try to leave five minutes at the end of each for a candidate to ask me questions, and the one I most often get is "what do you most like about working here?".

The answer I give comes in two parts.

This is the big thing for me even though it's not even Twitter, Inc., which makes the ultimate product—it's Twitter users who make Twitter the experience so educational, addictive, moving, thought-provoking, hilarious, informative, and entertaining. To be a part of the team which enables something so amazing, though, is a tremendous source of joy and pride.

But there's also this:

It was February this year that Twitter acquired Bluefin Labs. A few months later I was talking to Deb Roy, one of its founders, and as a new Twitter employee at the time he shared with me the observation that “credit flows very freely at Twitter”, with the result that the organization is less political than most.

That resonated with me, and I've thought a lot about it.

It's not that Twitter, Inc., is devoid of internal politics but it is the case that—in my experience at least—it's a uniquely collaborative environment where credit is shared willingly, genuinely, sincerely, and amazing things are accomplished as a direct consequence. It's refreshing and energizing to work at a place with such a unified sense of purpose and, for the most part, lack of ego.

 

If the above sounds appealing, join us! As of today, there are 260 open positions at Twitter worldwide.

Thursday, July 18, 2013

Twitter Hackweek, July 2013

I'm pretty proud of this, which I produced during Twitter's most recent hackweek:

It's a map of verified users of Twitter. The layout is calculated according to the mutual follow graph connecting these users, ie. relationships where @x follows @y and @y follows @x. The coloring is determined by user category (eg. sport, music, etc).

The Twitter Media blog post has some good information about how to think about the visual and what we can deduce from it; what follow here are the gory details behind how it was built—for data visualization dilettantes and cargo-culters like myself.

What on earth

First of all: what exactly is this thing? In technical terms it's a force-directed layout of the largest connected component of the verified user mutual follow graph. That single large connected component happens to contain over 99% of verified users; a handful are off on islands of their own, not connected to this clown hairball by mutual follows, and they're not shown.

How it came to be

Here's how it looked at the beginning of hackweek; this is a first quick pass at the force-directed layout of a random sample of verified users:

(More detail below on the tools that I used to make this image but for those already wondering, the hard work was done by Graphviz, specifically sfdp and neato)

This was looking promising (and attractive in its own way, I thought) but as I added more and more users it just became a big dense white blob with no apparent structure. I figured I'd have a go at coloring the nodes by user category (sports, music, news, and so on) to see if some structure would reveal.

I started off by just highlighting TV-related accounts, which you can see in this graph of a 10% sample:

Verified user mutual follow graph, early cut
and this showed enough promise to add colors for other high-level categories.

I liked the way colors clustered together, but now my diagram was looking a bit drab:

Verified user mutual follow graph, early cut
The density of the gray edges was just sucking the saturation out—and their uniformity was obscuring further structure, I figured.

So I colored the edges: any edge connecting two nodes of the same color would be colored accordingly: a yellow line to connect two sports people following each other; a red line to connect two musicians following each other; and so on.

Now the clusters were really clear. I liked this a lot, and I rendered a really large version:

The result is what you see in the Twitter Media blog post. Not quite a gigapixel, but near enough.

The generation process in detail

Obviously, the process starts by capturing the follow relationships between verified users on Twitter. You can do this yourself easily enough using the Twitter API:

  • find verified users by looking at who @verified follows;
  • for each, find who they follow;
  • filter this dataset down to mutual follows.
A good place to end up is with a tab-separated file of two columns, of users who follow each other:
screen_name_1 [tab] screen_name_2
screen_name_1 [tab] screen_name_3
screen_name_4 [tab] screen_name_5
to the tune of a few million lines.

Once you have this you can use your favorite awk or perl or bash one-liners to turn this into a bare graph in DOT format:

digraph my_graph {
    screen_name_1 -> screen_name_2
    screen_name_1 -> screen_name_3
    screen_name_4 -> screen_name_5
}

At this point I used Graphviz's comps utility to extract the largest connected component of the graph:

cat graph.gv | ccomps -zX#0 > graph-cc0.gv

Now we have the core data of interest in graph-cc0.gv and we can iterate on the following:

  1. layout: I used sfdp to produce a force-directed layout of the graph;
  2. coloring: I wrote a handful of lines of Python to color the laid-out graph according to the category of user;
  3. rasterization: I used neato to render the graph to a PNG.
  4. presentation: I uploaded to zoom.it to share the result.

I used a MacBook Air to do this work. Step (1) typically took a few minutes, (2) was 20 seconds or so; (3) was 10–120 minutes depending on the output size; (4) was actually the slowest step—a few days to process and present the final version. The graphviz tools are single-threaded and tend to be CPU-bound; you can get some wins with better hardware on (3), but only very modest ones.

Here's how it all adds up into a single script:

Saturday, March 09, 2013

Zero-Width Space

Since Buzzfeed picked up my post about stealth fanout on Twitter a few people have asked me how one can best produce a "zero-width space" on a Mac.

Here's how you do it.

On a Mac, pretty much any time you're typing text (including when you're composing a Tweet) you can hit ⌥⌘T to bring up the "Special Characters" window, and from here you can find (and use) pretty much any Unicode character out there. Try typing "zero width space" into the search field:

Image 2013 03 06 4 06 09 PM
and you'll find the elusive character… by definition it's kinda invisible. But you can add it to your favorite Special Characters, insert it into what you're typing directly from here, or copy it to the clipboard.

If you want to make it super-easy to use a zero-width space you can create a global text shortcut in the "Language and Text" area of the Mac's System Preferences. Here below I'm setting things up so that every time I type "zws" a zero-width space is inserted:

Image 2013 03 06 4 08 40 PM

Tuesday, March 05, 2013

Deathblogging

My dad has heart failure. My mom has opinions on the matter.

A few weeks ago my dad posted one of the most beautiful and moving pieces I've ever read, about his own father.

My head spins, my heart trembles.

Friday, March 01, 2013

Stealth Fanout on Twitter

Sure, on Twitter you can use the ".@" convention to start a Tweet with a username but still have it delivered to all your followers. Like this:

Turns out, though, that instead of a "." you can use a zero-width space. It has the same effect—your Tweet is delivered to all of your followers—but the leading character is by its nature invisible:

A side effect which you may or may not enjoy is people's surprise:

Wednesday, February 13, 2013

Family

I was on the lookout for something special for Wendy's birthday. And then Josh tweeted

Josh went to high school with Alessandra, now a freelance illustrator in Brooklyn. Alessandra, it turns out, does some truly delightful drawings. I thought I'd get in touch.

Based on a set of photos I sent over, Alessandra drew this picture of me, Wendy, Lux and Cecilia:

Wendy's Birthday Gift
and I'm thrilled by it (Wendy was too). It's framed on our wall and it makes me smile.

Thursday, January 10, 2013

Working at Twitter

I did a little Q&A recently about what it's like working at Twitter. They published the piece this week but included only my answers, not the questions, which makes it read a little incoherently. I thought I'd put the Qs as well as the As here for the record.

If you could describe the essence of Twitter's culture in one word, what would that be? Explain.
Open. We're open in the sense that we have transparent internal communication and discussion. Open in the sense that the platform is open to all: from everyday individuals to news organizations to governments to entertainers and so on. Open in the sense that people at Twitter are always open to new ideas and perspectives. Open in the sense that Twitter employees Tweet freely and fearlessly about their lives and opinions.

Describe your favorite part of the office/campus.
The roof deck at Twitter is very special. It reminds us all that we're in the middle of a wonderful and vibrant city. Provides views of Twin Peaks and—often—the sunset.

How would you describe the best day you ever had at Twitter? What made it so great?
I've thought a lot about this. At Twitter I feel incredibly privileged to work at a company which makes a product that I so deeply love. I'm besotted with the thing which is Twitter, and that makes every day here special. If I had to choose one in particular, it'd be meeting Barack Obama at the White House while organizing the first ever presidential Twitter Q&A in 2011.

Describe your workspace—what does your immediate (desk) and/or surrounding work area look like? Have you done anything to customize it?
It's pretty minimalist. A laptop stand and 27" Dell monitor, wireless keyboard, wireless mouse. I've been at Twitter coming up for three years and have had 13 different desks since I've been here. I travel light.

My desk at Twitter

How would you describe the quintessential Twitter employee?
Passionate; humble; smart.

Describe one unique/goofy/crazy/weird/quirky thing your team does for a little fun.
The work in the Twitter Media team is unique and crazy enough on its own! Every week team members are meeting and hosting visits from heads of state, world-famous athletes, mega-star musicians, religious leaders, award-winning journalists, best-selling authors and media companies. We work with them to help them use Twitter ever more effectively to connect with their fans and followers, and to create unique interactive experiences on and off the platform.

If there was one thing you could describe to an outsider to make them feel like a Twitter insider, what would that be?
There's an incredible unity of purpose here at Twitter: every Twitter employee works here because they want to make Twitter the best it can be. From making the site faster to improving search algorithms, from testing new features with users to making sure our office feels like home, everyone is working passionately toward a common goal, eagerly looking toward the future and constantly amazed by the creativity of our users.

CES 2013

I went to the Consumer Electronics Show in Las Vegas once. I flew in for a single meeting, in January 2006, and remember that after that I spent over an hour waiting in a line for a cab back to the airport. In the end a dozen people in the cab line pooled resources and rented a stretch limo to the airport between us.

In 2013 I went to CES only in my imagination and on Twitter: