HNHacker News
TopNewBestAskShowJobs

r_sreeram

51 karma · joined April 3, 2012

submissionscomments
r_sreeram··on Supreme Court rules ex-presidents have immunity for official acts
The article explains this concern:

> One example not relevant to this case but which came up in arguments was the hypothetical payment of a bribe in return for an ambassadorial appointment.

Under Monday’s decision, a former president could be prosecuted for accepting a bribe, but prosecutors could not mention the official act, the appointment, in their case.

So, imagine:

Prosecution: You took a bribe!

Defense: Bribe? No! It was just a gift.

Prosecution: It preceded the intended action, so it WAS a bribe.

Defense: What action?

Prosecution: Oops.

r_sreeram··on Airlines make more money from mileage programs than from flying planes
Here's an excellent example of what GP said: https://www.youtube.com/watch?v=FJJTYQYB1JQ (long video, skip to 26:00 if you are in a hurry)

The key is that code isn't running in a vacuum. It's operating on data (or controlling systems, etc). A smaller amount of code may be operating on the data in an inefficient manner, whereas a larger amount may be doing it more efficiently.

In the above talk, this contrast is very stark, because the "more code" version does some stuff and then does the exact thing the "less code" version does, yet is faster.

This kind of thing is common enough (albeit less stark than in the above example), that "less code is faster" is not a great "default" assumption to make.

r_sreeram··on WhatsApp loses millions of users after terms update
I think the GP was saying that email was already popular before Hotmail entered the picture. I agree with the claim that it didn't need centralized players to become popular.
r_sreeram··on We can do better than DuckDuckGo
That's not what it was. "ncr" was "No Country Redirect".

When you were in a different country (e.g., India), and you typed in google.com out of habit, it would recognize your IP-geo and redirect you to the country-specific domain (e.g., google.co.in).

If you really just wanted google.com for whatever reason, then you'd type google.com/ncr. It then wouldn't redirect you based on your IP-geo, and you'd stay on google.com.

In other words, google.com/ncr _always_ redirected you back to google.com. Then, and now.

r_sreeram··on Facebook's Desperate Smoke Screen
> Does nobody remember the 80s? TV was turning people into fricken' zombies.

You may be right that cries of "society is being ruined" are nothing new. However, I think Facebook is different enough from what came before (such as TV) in a few ways that matter, that we should take this more seriously.

* FB is _interactive_. The effects of somebody responding to you, liking your posts, etc., are much deeper than you passively consuming some content on a screen.

* FB is _intrusive_. It sends you notifications on your phone, reminder emails, inserts calls-to-action in your news feed, etc. It's really hard to ignore.

* FB is a lot more _personalized_. It knows a lot about you. Ads are personalized. Content is specifically targeted towards your interests. Stuff is "recommended by <your-friend>". This makes it a much harder addiction to kick.

FWIW, I don't think FB is _that_ bad. Many mobile "free to play" games, on the other hand, ... They use so many dark patterns and insidious techniques to purposely capture people's (and especially kids') attention and time, while simultaneously trying to get them to spend real money. Geez. I hate them with a passion.

r_sreeram··on Questions to Ask Founders Before Joining a Startup
> failure is accounted for in their portfolio math. But you might!

Exactly. Assuming the common claim of "90% of startups fail" (i.e., assuming each startup is IID with 90% chance to fail), an investor that invests in 7 or more startups has a more than 50% chance of seeing at least one succeed (1 - 0.9^7 > 50%), whereas as an employee of one of those startups, you still have a 90% chance of failure.

r_sreeram··on Uber Hires Former Google Search Chief Amit Singhal as SVP of Engineering
Amit joining Uber after a year's break coincides with the common "1 year no-solicitation" clause in employment contracts. I wonder if we are about to see some top people in Google get poached. Not that there's anything wrong with that.
r_sreeram··on Startup Employees Invoke Obscure Law to Open Up Books
> I eventually ended up leaving and not exercising my options

Knowledge of this law might not have helped directly, since you're not a shareholder if you haven't exercised your options yet. It may have spurred you to exercise some/all of your options, just to be able to peek into the books, though.

r_sreeram··on Cities to Untangle Traffic Snarls, with Help from Alphabet Unit
Related: Strava (a popular mobile app used by fitness enthusiasts, especially bicyclists) also tries to do something similar with their Metro program: http://metro.strava.com/
r_sreeram··on Go channels are bad
> Can someone explain the initial goroutine leak that is being addressed?

The "for score := range g.scores {" loop runs forever, since nothing ever closes the g.scores channel. I.e., the "range" only terminates when the channel is explicitly closed. Even if there are no current senders on the channel, and even if nobody else holds a reference to the channel (and thus nobody else could potentially create a new sender and start sending on that channel), Go doesn't realize it (garbage collection doesn't help here). The "range" waits forever.

Thus, all goroutines that run this code (via calls to NewGame(), via "go g.run()") will run forever, and leak, as long as something else in the program is running. When the rest of the program is done, Go will correctly detect that all these leaked goroutines are blocked and thus it's a deadlock, leading Go to panic ("no goroutines can proceed") and terminate.

r_sreeram··on Go channels are bad
> N=1 was most common

Why would somebody use "select" for this at all? I.e., if you were going to write:

  select {
    case send/receive statement:
      statement
      ...
  }
Why not just write:

  send/receive statement
  statement
  ...
What am I missing?
r_sreeram··on Friction Between Programming Professionals and Beginners
Agreed. This is one of the things I appreciated about the now-defunct Google Answers. The professionals there would not only answer your question, but also include a set of steps that they tried, including Google search terms and such. This let you understand their thought process, the things they tried and the places they looked in, as to how they found the answer.
r_sreeram··on In Arbitration, a ‘Privatization of the Justice System’
> And unlike the outcomes in civil court, arbitrators’ rulings are nearly impossible to appeal.

> When plaintiffs have asked the courts to intervene, court records show, they have almost always lost. Saying its hands were tied, one court in California said it could not overturn arbitrators’ decisions even if they caused “substantial injustice.”

This seems like a really serious problem. If arbitrations are, as they are claimed to be, generally better on the average (cheaper, faster, better compromises, etc), one could tolerate even "forced" arbitrations (by way of fine print that few people read). But the lack of avenues to appeal (if true) seems to me a fatal flaw.

Is this generally true of all arbitrations? Or is this only a few unusual cases?

r_sreeram··on Is Tesla Doomed? (Bob Lutz's Commentary on Tesla)
> As of 2Q2015, Tesla had sold fewer than 12,000 Model S vehicles in total - ever, not just for that quarter.

Do you have a citation? The number I see is over 90,000. It includes Q3 of 2015, but clearly Tesla didn't sell over 78,000 units in that quarter alone.

The 90k number is from http://www.hybridcars.com/tesla-model-s-is-americas-best-sel... which is linked from the intro of https://en.wikipedia.org/wiki/Tesla_Model_S.

r_sreeram··on Children of the Yuan Percent: Everyone Hates China's Rich Kids
On Human Nature by Edward Wilson is supposed to be a classic on this subject (the mix of biology, evolution and sociology).

https://en.wikipedia.org/wiki/On_Human_Nature