Profile

Cover photo
Bram Cohen
Works at BitTorrent, Inc.
Attended SUNY Buffalo
Lives in Marin, CA
11,226 followers|18,398 views
AboutPostsPhotosYouTube

Stream

Bram Cohen

Shared publicly  - 
9
1
derek stonehammer's profile photomorris cat's profile photo
 
Candy corn!
Add a comment...

Bram Cohen

Shared publicly  - 
 
I'm trying to get my email addresses associated with Google+ properly, and would like to ask if anyone really knows what the options mean before I accidentally delete one of my accounts.

Under 'Account Overview' it lists my email address, and lets me try to add another one. Naturally, I'd like to add my work email address, because that gets most of my mail and that's important for all the implicit adding which G+ does. Unfortunately if I try to add that it complains that that account already has an associated Google account, which sort of makes sense, because my work uses Google Apps, but I'd like my G+ social networking feature to be associated with both of them.

Also under 'Account Overview' there are the options 'Delete profile and social features' and 'Delete account'. I'm guessing 'Delete account' is something I absolutely don't want to do, but have a vague hope that using the delete profile and social from my work account will allow me to add that one to the profile I'm using now, and not implicitly remove all the existing state of other peoples's profiles knowing about the account because they've exchanged email with me.

Does anybody know how this all work, in particular answers to my very concrete questions above? It seems like G+ is getting hurt by the preexisting awfulness of Google's support for multiple accounts, but that's a whole other rant.
1
1
Paul Kelly's profile photoSonya Trejo's profile photoJered Floyd's profile photoBram Cohen's profile photo
21 comments
 
but yeah i totally feel you on the multiple account thing, very annoying when Im working on my companys Google Site under an app account and posting under my personal account. gets all mixed up... chrome is pretty good with keeping track of which account your using in which tab though
Add a comment...

Bram Cohen

Shared publicly  - 
 
Saw a shared post about 'every random hook-up I've ever had'. Not visible when looking at the person's profile. Apparently G+ lets you easily rebroadcast non-public posts. Oops.
3
Sonya Trejo's profile photoDanny O'Brien's profile photoBob Hearn's profile photoBram Cohen's profile photo
12 comments
 
fgdg df fdgfgdn ghh
Add a comment...

Bram Cohen

Shared publicly  - 
 
I have a backlog of blog posts to write. Do people want to hear about how Facebook wants you to be stupid, or about how most commentary on valuations is completely chuckleheaded? Both will probably have to wait until I set up a better blog though.
1
John Lewis's profile photoSenthil Kumaran's profile photofaried nawaz's profile photoDonny Daniel's profile photo
7 comments
 
Facebook, for absolute certain. It's the new stupidity drug.
Add a comment...
Have him in circles
11,226 people

Bram Cohen

Shared publicly  - 
 
How to get your code to work on both Python3 and Python2.

I recently got my code to run under both Python3 and Python2. Since I make a lot of use of strings and bytes, which is the hardest transition between the two, you might find my experience helpful.

First, repeat after me:

import sys
if sys.version_info[0] < 3:
import _builtin_
_builtin_.bytes = lambda x: str(bytearray(x))

That makes calls to bytes() act reasonably close to the bytes constructor in Python3, by making unencoded strings when passed an array of ints.

After that's done, the main problem is that using mybytes[i] returns an int in Python3 and a str in Python2. To make that work, replace all calls to mybytes[i] with ord(mybytes[i:i+1]). Yeah it's funny-looking, but it always works.

(I'm assuming that your code uses encode() and decode() properly. If your code started in Python2 and Python3 starts barfing at you about calling decode() on a bytes or encode() on a str, you probably have a bug.)

The above will result in calls to type() not really working on bytes. Maybe you could make bytes be a subclass of str if you need that functionality. I don't, so I haven't worried about it.

Also, if you need an OrderedDict, you should use the implementation linked to below.

Other than some minor library reorganization issues, that was all I had to do to get my code fully back-ported. It's surprisingly easy once you know how to handle the subtleties properly.
41
11
Erik Landry's profile photoRobert Petricioiu's profile photoDavid Ford's profile photoBram Cohen's profile photo
12 comments
 
The mutable bytearray is first introduced in 2.6 and 3.0. 2.6 was orchestrated to be released at the same time as 3.0 and contains as much back ported from 3.0 as was deemed possible (similarly 2.7/3.1). Also with 2.6/3.0 you get PEP 3119 support which clearly defines how you can extend a class to make isinstance() and issubclass() work without actually inheriting from such a base class. Incidentally, 2.6 also introduced bytes as an alias for str and byte literals but as documented the alias is primarily designed to be used with isinstance() so the 2to3 converter can tell what you mean in 2.x code. 2.6 also introduces the ability to do "from _future_ import unicode_literals" to make normal string literal notation actually generate unicode values (basically killing 2.x str literal notation).

If you plan to depend on 2.6+ features (e.g., bytearray) for portability, why not just always used "bytes(bytearray())" as that will work right in 2.6+ and 3.0+. And then instead of doing "ord(mybytes[i:i+1])" for "mybytes[i]" you can just do "bytearray(mybytes)[i]" which isn't so funny-looking (or you could just stick with the mutable bytearray instead of switching to the 3.0+ immutable byte string type bytes to begin with).
Add a comment...

Bram Cohen

Shared publicly  - 
 
Facebook wants you to be stupid.

Facebook clamps down on third party UIs for a very basic reason: Those UIs will inevitably enable functionality which they don't want you to have, because it makes other people less comfortable using the system, and they've crippled the web UI in ways which make people on the whole happier.

First and foremost Facebook doesn't want you to be able to see when people view your profile, for the simple reason that you don't want them to be able to know when you look at theirs. Scams frequently claim to deliver this functionality, for the simple reason that it's highly desired and completely unavailable. Granted alternate UIs wouldn't be able to offer this functionality, but it's a deep issue for projects like Diaspora.

Beyond that, Facebook doesn't want people to feel like they can stalk each other. First and foremost there, its chat system doesn't have the ability to record when your friends join and leave. It would be trivial to add such functionality, but it would make people feel like others had too detailed of a historical record of them, even though the information is already there in principle and only limited by the end user's ability to remember it. Likewise, the time of posts is fuzzed out, first to a minute granularity, then to the hour, and finally to the day, and times of likes isn't kept at all. People simply don't want others to be able to track their movements to the minute quite so easily.

Finally, there's the ability to delete posts. Obviously a client-side cache could simply keep all posts you see and remember them, and any custom client would undoubtedly do that, but people like being able to delete posts, for a variety of good reasons, and want others to be forced to use their own frail human memory to get back the content. Likewise you can hide comments that you make from your main feed, so even people who are permissioned to see them will have a harder time noticing them, and relationship status changes, which are impossible to hide, can be 'hidden' in the sense that people aren't actively notified of them.

Does Google+ want you to be stupid? That remains to be seen...
21
5
Subianto Duabelas's profile photoRobert Petricioiu's profile photoDeedra McKissack's profile photoBram Cohen's profile photo
14 comments
Add a comment...

Bram Cohen

Shared publicly  - 
 
Fuck you, Fandango.

I have now used exactly one online coupon deal, using livingsocial, for Fandango, where I got two movie tickets for the price of one. It sent me a code for use on the Fandango web site (which by the way sucks, but that's a different issue) and used it to buy my tickets. Of course it defaults to buying one. I did change it to two, but I might have had to backtrack and redo something in the UI. In any case, I got my confirmation number, showed up at the movie theater, and got... one ticket. Apparently it will perfectly happily let you buy just one ticket using the coupon for two. Of course I was already there and the movie was starting so I had to buy another one.

So let me just say: Fuck you, Fandango!
11
2
Sterling Ledet's profile photoMarshall Kirkpatrick's profile photoBram Cohen's profile photoGustaf Räntilä's profile photo
9 comments
 
Hi,are you ok?
Add a comment...

Bram Cohen

Shared publicly  - 
 
My question on Krugman's blog: "Do you think that if all the people in the US whose houses are underwater were to simply walk that would lower the debt burden enough to get us out of our current slump, and if so, why aren't you advocating for it?"
5
Christian Colón-Goss's profile photoSubianto Duabelas's profile photoJon Krafcik's profile photoBram Cohen's profile photo
7 comments
 
hallo bro
Add a comment...
People
Have him in circles
11,226 people
Work
Occupation
Programmer
Employment
  • BitTorrent, Inc.
    Programmer, present
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Marin, CA
Previously
New York City - Manhattan - San Francisco - Buffalo - Oakland - Berkeley - Seattle - Bellevue - Mill Valley - Novato
Links
YouTube
Other profiles
Contributor to
Story
Tagline
The BitTorrent guy
Introduction
I grew up in Manhattan, where I attended Stuyvesant high school and did fairly well on the math team there. Then I attended SUNY Buffalo and dropped out because school just wasn't for me. I later moved to San Francisco and worked at a bunch of startups you've never heard of which mostly just went under. In 2001 I started working on my own little project called BitTorrent, which grew to be about a third of all internet traffic, which it still is today. In 2005 a company was founded around BitTorrent and raised funding.
Bragging rights
Wrote BitTorrent, have 3 kids
Education
  • SUNY Buffalo
  • Stuyvesant High School
Basic Information
Gender
Male