Hack your hosts file to prevent distracting yourself at work

I suppose it’s a significant statement on the increasing marginalization of the computer as a work-only device. I hardly ever touch my Mac at home anymore. I really only use it for work. The problem is, I am permanently logged into Facebook and Twitter on my computer, and I am prone to distraction.

So I made the decision today to further that marginalization, by making it impossible for me to access Facebook and Twitter on my Mac. How? It’s easy! Assuming you have administrator access, at least. But why wouldn’t you? (If your Mac is a company computer and they have things so locked down, I’d say don’t worry about blocking social media sites… spend that time working on your résumé.)

These instructions are for Mac OS X. I’m not really sure how to do this in Windows. (And, honestly, I don’t care.) Instructions for Linux would be fairly similar, but you’d do it in a Terminal window and there’d be some sudo involved. (Actually, you can do that on a Mac too. I’ll give those instructions at the end.)

Now then. Open a Finder window and press Command-Shift-G. In the box, type /etc/hosts and click Go.

Screen Shot 2015-11-12 at 7.58.15 AM

This will take you to the “hidden” /etc directory (part of the Unix subsystem) and highlight the hosts file, which is what you need to edit.

But, you can’t do it here.

Files in the /etc folder are write-protected, but if you copy it to your desktop, you can edit it. So, drag it to the desktop. (Note that since it’s a protected system file, just dragging it to the desktop will make a copy, rather than moving it.)

Double-click the hosts file on your desktop. It should open in TextEdit. (If you’re asked to pick a program, pick TextEdit.)

Place the cursor at the bottom of the file and add these lines:

127.0.0.1 facebook.com
127.0.0.1 www.facebook.com
127.0.0.1 twitter.com
127.0.0.1 www.twitter.com

So what’s happening here? Well, the numbers are IP addresses, which are the true addresses of every device connected to the Internet. Domain names (like twitter.com) are essentially “aliases” for IP addresses. Normally your computer connects to a DNS server on the Internet to look up these associations. But before it does that, it checks this hosts file. If a domain is in there, it doesn’t bother checking any further. And 127.0.0.1 is a special IP address associated with the fake domain name localhost — basically, it’s the computer’s self identification on the Internet. “Me” in other words.

There’s probably no web server running on your computer, so loading http://127.0.0.1 in a web browser will return… nothing. But even if you do have a web server running on your computer, it’s not Facebook or Twitter, so mission accomplished.

All right. Now that we have the hosts file updated, save it, and then drag it back into the /etc folder. You’ll get a stern warning from the system.

Screen Shot 2015-11-12 at 8.06.50 AM

Click Authenticate. That gives you another annoying, but smaller, alert.

Screen Shot 2015-11-12 at 8.08.13 AM

Click Replace. Now you have to enter your administrator username/password. Do that then click OK.

Screen Shot 2015-11-12 at 8.09.15 AM

You’re done. (And note this time it moved the file from the desktop back into /etc. It doesn’t copy it like it did when you moved it to the desktop.) Now try loading Facebook or Twitter in your web browser!

Screen Shot 2015-11-12 at 8.11.22 AM

Want to do all of this at the command line instead? It’s actually a lot easier, now that I think about it. These instructions should work for either Mac or Linux. Open a Terminal window. Type sudo nano /etc/hosts and hit Enter. Move the cursor to the bottom of the file and enter the lines I gave earlier. Press Ctrl-X then Y to save your changes. That’s all! Seriously!

Note: If you’re on IPv6 (if you even know what that is), you may want or need to use ::1 instead of 127.0.0.1.

On products, services, and the trouble with Twitter

Much of the buzz this week among online geek types has been the latest step in the gradually unfolding revelation of exactly where Twitter (the business) intends to take Twitter (the service), and just how stark the difference is between that place and where these same geeks — who have been largely responsible for the establishment of Twitter as a successful platform — would like to see it go.

The latter place can most easily be summed up as, “where it started out,” but the details of where it started out, and how far it is from where the company now wants to take it, reveal a lot about the nature of the Internet as a place for commercial business, vs. the way most users see it, as a medium for communication.

Most people who use the Internet have little knowledge of, or interest in, how it actually works. Even those of us who make our living building it don’t always have a firm grasp of the technologies that make it all possible. But understanding those details, and understanding the differences between a service and a product, for lack of a more effective yet equally succinct description, can shed light on the current trouble with Twitter.

The crux of geek anger towards Twitter of late has to do with Twitter’s ongoing efforts to shut down a number of its APIs that allow third-party apps like Tweetbot (my personal favorite iPhone Twitter client) to interact with data from Twitter’s servers. Without these APIs, these third-party apps can’t function. The specifics of the situation are a lot more complicated than this, but I’ll leave the reader to investigate further; Dalton Caldwell’s post from yesterday, Twitter is pivoting, is a great place to start.

All of this may seem supremely geeky and esoteric to most Twitter users, though I suspect anyone who’s been using the Internet for more than two years would take pause at the fact that Peter Chernin, who was deeply involved in the downfall of MySpace, has just joined Twitter’s board of directors. (Especially since he chose to tweet it in a way that reveals a profound lack of understanding of how Twitter works.)

Which brings me to the topic of products and services. As I am using the terms here, a “service” is what we on the geek side of the Internet refer to as a protocol. On the Internet, a protocol is a technology, built upon a publicly documented specification, which allows particular types of interactions between devices over the Internet. A protocol is inherently public, open, and decentralized. That’s the only way they can work. Each protocol tends to have a strange acronym associated with it, some of which the creakier, older parts of the Internet may have failed to shield you from: things like HTTP (the web) or IMAP (email). All of these protocols are built upon a more fundamental, lower-level protocol: TCP/IP.

Protocols are what make the Internet work. And they’ve existed since well before anyone saw (or at least fully exploited) the Internet’s potential for profit. Protocols as services are so ubiquitous and inherent to the experience of using the Internet, we don’t even realize they exist, or what they are, or how exactly they work. And we tend to assume that anything we interact with on the Internet is kind of all the same. We might have a vague sense that something like Facebook or Twitter is a commercial enterprise, but even the geekiest among us who actively use these services products don’t often think about just how different they are at the core than things like email.

In contrast to these protocols/services, we have commercial products like Facebook or Twitter. These are not protocols. While we are all by now painfully aware of how open and public the information we share on them can be, there is nothing whatsoever that is “open” or “public” about how they actually work, and their functionality is entirely centralized within the competitive, secretive, for-profit businesses that own them.

Facebook has taken a lot of flak in recent years for its aggressive commercialization of the user experience. The information you share is not only overly public, it is parsed by their ingenious algorithms to allow them to put highly-targeted advertising in front of your eyeballs. (At least, that’s the theory; in practice it doesn’t always work so well.) As the saying goes, if you’re not paying for it, you’re not the customer… you’re the product being sold.

While it’s been easy to see how Facebook is monetizing our online interactions, the gradual creep of Twitter’s monetization has been quieter, and more insidious. It’s been easy enough to ignore promoted tweets and trending topics, and they’ve even backpedaled on occasion in response to negative user reaction. (Remember the Dickbar?) But eventually, true to the cliché, there’s a straw that breaks the camel’s back. And the latest API deprecations may represent that last straw.

You see, you can only change a product so much before eventually it ceases to resemble in any meaningful way the thing that it once was, the thing that appealed to its users in the first place. And for Twitter, the business, it is entirely their prerogative to make those changes, to “pivot,” into something completely different. But in so doing, they reveal the true nature of their product, and the fact that it was never really the service its loyal users took it to be.

Ayn Rand’s (in)famous novel Atlas Shrugged ends with capitalist Übermensch John Galt tracing the sign of the dollar with his finger. But when the dollar sign becomes the ultimate symbol of human achievement, money is the only thing in life that has value. This may be a rather heavy-handed reference (she is the most heavy-handed writer of the 20th century, after all), but profit as the primary motive of a business can easily corrupt or destroy any other values the company has.

Twitter seems to be following the standard arc of a startup, especially in the Internet age: a group of inspired geeks build something cool, it becomes a hit, venture capital comes pouring in, the founders sell out and “management” moves in, the focus of the company shifts from building something cool into turning that cool thing into a way to make money, the thing ceases to be cool (or even very useful), people move on to the next big thing, the company dies a slow death.

We’ve seen it plenty of times before (again, MySpace), but with Twitter something seems different. Twitter has become a deeply ingrained part of the Internet experience for its loyal users in a way that no other product from a for-profit business has before. It’s as essential to how many of us experience the Internet on a daily basis as email or the web itself. But while it’s just as essential, its essence is entirely different. And now the foolishness of investing so heavily and personally — in time and passion, not money — in this kind of product is becoming painfully obvious.

So, what are our alternatives? This summer, Adam Curry (yes, that Adam Curry) wrote about the value of RSS as a Twitter alternative. I think for one way Twitter is used (as a means of disseminating links to interesting news/blog posts), RSS is great, and I am a die-hard RSS user along with Twitter. But RSS can’t replace Twitter’s role as a microblogging platform.

Enter Dalton Caldwell’s (remember him?) App.net. What is App.net? It’s basically an effort to do Twitter right. For a small annual subscription fee, you get access to an ad-free social network that functions almost identically to Twitter. (The main distinction: each post is limited to 256 characters, rather than 140. Those of us who do a lot of work with databases are probably thrilled with the implications of that particular number.) Many of the geeks who were early Twitter adopters are now prominent members of the App.net community. Many of the developers of third-party Twitter clients have gotten on board with App.net sibling apps (like Netbot).

Personally, I was one of those App.net early adopters (member #5,644). But I will admit I’ve found it hard to break my old habits of working mainly with Twitter. Partly that’s because I’ve relied on Twitter’s functionality as the glue between my various social networks. I can post photos on Instagram and, via my existing Twitter-to-Facebook link, easily share my photos to both social networks with a tap. I used to have LinkedIn in the mix too, before I more-or-less abandoned it. The point is, up to now Twitter has been a geek’s paradise of a social network, with a wealth of APIs that could be used in innovative ways to do all sorts of cool things.

But Twitter doesn’t want us to do all sorts of cool things. They want us to do the things that put our eyeballs on their sponsors’ messages, because that’s the only way they’ve been able to think of (or willing to try) to make money. I would gladly pay a subscription fee for Twitter, to cut out the ads and retain access to those awesome APIs they’re so aggressively shutting down. But since they’re not interested in taking the business in that direction, a door has been opened for App.net to do all kinds of things Twitter could have done, but, it now appears, never will.

Class reunions in the Facebook era

It’s a sunny August morning. I’m sitting in front of my computer in a t-shirt, shorts and Converse sneakers, listening to Rush.

You could easily assume the year is 1992. I did spend a lot of the summer of 1992 that way. But of course, no… it’s 2012. The music and attire may be (almost) the same, but the computer is not a Tandy 1000 EX with 640 KB of RAM. It’s a MacBook Air connected to a 23-inch LCD flat panel, with 4 GB (4,194,304 KB) of RAM.

So, the more things change, the more they stay the same. (Or, as Rush and the French say, “plus ça change, plus c’est la même chose.”) That saying will be put to the test tonight when I attend my 20-year high school class reunion.

The last time I will have seen many of these people is 10 years ago, at our last reunion. But a couple of significant things have happened in the past 10 years.

First, we are now 20 years out of high school. Which means that, for the first time, we are gathering having lived more of our lives after high school graduation than before it.

My biggest fear: I won’t recognize someone who recognizes me. There was a time in my life, even some years after graduation, when I could confidently name every single one of the 200-or-so people in my graduating class. But now I look at our class photo with only a vague recollection of a lot of now-nameless faces. Even among the people in the photo I do still remember and can name, will I recognize them with all of the changes 20 years have brought? Will I recognize them without teased perms and mullets?

Second, Facebook.

Like it or hate it (or both, as seems to be the case with most people), Facebook has had a profound impact on how we keep in touch with the people in our lives, especially those on the periphery of it. And few people occupy the periphery of our lives quite like those we spent 13 years with in public school and then haven’t seen since.

There are plenty of people with whom I was at best a passing acquaintance in high school, but who are now, by Facebook terms, my “friends.” Facebook keeps us in contact with a wide network of friends, family, coworkers and acquaintances past and present in ways that were never before imaginable. But for the most part these contacts are profoundly superficial. I might know that you went to the beach last weekend, or what you had for lunch, or that you have too much time on your hands to spend looking at cat photos, or that you and I have divergent political views. But when’s the last time we actually saw each other face to face? When did we go out for a beer or come over to each other’s houses for a barbecue or work together on an exciting new project? Facebook defines trivia, in the worst possible way.

Sadder though than the superficial connections Facebook creates with people I only ever had superficial connections with in the first place, are the superficial connections Facebook creates between me and the people with whom I was actually close friends in high school. Sure, many of them are now scattered across the country (or the world) and we couldn’t really hope for a more “real” connection than what Facebook offers. But a handful of my good friends from high school currently live in the same city as I do, and yet we only have those same trivial connections on Facebook. We could get together any time we want, not just when our entire class converges on our hometown to mark the frighteningly fast passage of time.

But we don’t.

Over the past few years I’ve been looking forward to this reunion with uncertainty. What kind of impact was Facebook going to have on it? Are reunions even necessary in the era of Facebook? Now that it’s (almost) here, I’m getting a better sense that, yes, reunions do still have an important place in our lives. Because while Facebook might keep us connected, it doesn’t really keep us in touch.

It does make planning the event a lot easier though.

Dr. Heckyll is his own little guinea pig…

Much like “Dr. Heckyll” in the Men at Work song, I am my own little guinea pig.

This week Facebook released an official WordPress plugin that promises deep integration. Vaguely lewd as that may sound, it’s something I need to pursue. I keep Facebook at arm’s length, but as a web developer I cannot deny that it is by far the most popular — nay, ubiquitous — social network out there. Social network integration is a big part of what my clients want with new websites, and the more we can take advantage of these kinds of tools, the more we can achieve those goals.

And so, here I am, finding myself trying out just about everything the Facebook WordPress plugin can do, right on my very own blog. Eventually I’ll probably turn off most or all of these features, but before I do that I need to find out what they do, so I know which of them are right for my clients.

Update, about 3 seconds later… I’ve already turned off the first of the “features” of the Facebook plugin: comment integration. I have already been happily using Disqus for my comments, and Facebook (unsurprisingly) doesn’t play nicely with it.

Oversharing and paranoia

Oversharing is an inherent part of social media. Just ask anyone who’s made the mistake of clicking a Socialcam link on Facebook.

But oversharing takes different forms, and the most potentially dangerous type is one many people don’t even realize exists: the copious logging of your online activities by the social networking sites you’re logged into. Thanks to their “deep integration” with other websites, you may be “sharing” your browsing habits with Facebook, Twitter and Google even when you’re not on their sites.

Have you ever been on a site and noticed a little corner of the site looks like it’s been invaded by Facebook? That sickly blue, the font, the little profile pictures of your friends who’ve liked or commented on the page you’re currently viewing?

How did that get there? It’s because the site is integrating with Facebook, and through the magic of cookies, Facebook’s servers can tell that it’s you looking at the page and deliver content customized to your profile. Maybe you like that, but I find it a little creepy. Twitter and Google do it too, even if it’s not as obvious.

Google may be the most insidious, with so many of its tools now consolidated under a single login. If you use Gmail, and you keep your account logged in, every Google search you do is logged. Ostensibly this is to help deliver “personalized” results. More crassly, it is used to put “targeted” ads in front of your eyeballs. But that data is being collected, and regardless of what Google says their privacy policy is now, the data is there, and could stay there for a long time. Someday Google might change their policies or sell that data or the government might subpoena it or just come in and take it.

What’s worse, Google Analytics is everywhere. Heck, even paranoid old me uses it. Google says Analytics isn’t tied in with your Google account, and maybe it’s not… yet. But why assume it will always be that way?

Fortunately, there’s something very simple you can do to combat all of this data collection. It’s the online equivalent of a tinfoil hat, except it actually works. Log out. And just to be safe, clear your cookies.

I’m trying something out right now that takes all of this even a step further. It all hinges on the fact that in all three of these cases — Facebook, Twitter and Gmail — the web interface is probably the least usable, least satisfying way to experience these services. I’ve never really been a user of Gmail’s web interface; I’ve always preferred using the Mac’s built in Mail application. But now I’m also strictly using the Twitter app on my Mac. (I already use Tweetbot on my iPhone.) And I have made the decision not to use Facebook on my computer at all. I already hated the Facebook web experience anyway, so why bother with it? Now I am only going to check it using the Facebook iPhone app.