Hacker Newsnew | past | comments | ask | show | jobs | submit | 2012-03-11login
Stories from March 11, 2012
Go back a day, month, or year. Go forward a day, month, or year.
31.How Tablets Will Transform Construction (techcrunch.com)
62 points by rsuttongee on March 11, 2012 | 27 comments
32.The Go-Nowhere Generation (nytimes.com)
61 points by wallflower on March 11, 2012 | 49 comments
33.Tell HN: Steal my ideas
60 points by pbj on March 11, 2012 | 36 comments
34.Great CEOs Must be Either Technical or Financial (forbes.com/sites/venkateshrao)
54 points by ___Calv_Dee___ on March 11, 2012 | 26 comments
35.Efficient data transfer through zero copy in Java (ibm.com)
53 points by mixmasteralan on March 11, 2012 | 12 comments
36.IPad as hip flask (johndcook.com)
53 points by SoftwarePatent on March 11, 2012 | 21 comments

Its kinda amazing but this article contains the primary thesis-es of Ayn Rand's Atlas Shrugged. This brings up some important questions that I think its worth pondering.

Namely, that government creates crimes to control people, ("There is no way to rule an honest man. The only power government has is over criminals. Thus we create more and more laws until every man is a criminal.")

...and that this control relies on people accepting the easier way out, rather than standing up for their rights. (In Atlas, the alternatives offered the strikers were always easier than striking.)

At the end of the day, the question they both pose is this: If some action really is immoral, is it not immoral for you to support it? If the war on drugs is immoral, is it not immoral for you to pay for it? If you're going to pay your taxes (a practical choice to be sure, even if you feel its immoral) why not match them by supporting organizations working to reform or eliminate the immoral actions those taxes fund? (e.g.: anti-drug war orgs, or a org that underwrites defense attorneys for people charged with drug crimes who want to fight them with a jury trial.)

If you're on a jury, are you going to listen when the judge tells you that you have to convict if you conclude that the person charged did in fact have drugs on them? Or are you going to judge the law (one purpose of the jury) as well as the facts, and stand proud and hang the jury if you're unable to convince them the drug war is immoral? Are you willing to lie on the jury questionnaire in order to get on the jury in the first place (since the questionnaire is designed to weed out people who will be immune to the jury tampering judges regularly engage in with their instructions.)

Or do you recognize this as immoral, but still think that the "justice" system itself IS moral because... its the government?

These are all rhetorical questions. I'm sure my position is obvious by the questions I'm asking, but I'm not looking to debate here, I'm just providing a perspective. And my amusement that the NYT would write a story with such parallels to Atlas Shrugged.

One final parallel is that in Atlas, the system continues to deteriorate, even when most people know its wrong, because most people fool themselves into thinking that injustice is justice. (or are anti-mind, have adopted a philosophy that is against reason.)

So a final question- does an immoral law have any power? Or is it null and void simply because its immoral? (In Maybury v. Madison the supreme court ruled that unconstitutional laws are invalid the day they are signed, no need for supreme court review to invalidate them... yet we had to have a constitutional amendment to create prohibition, but we never had one for the war on drugs...)

If a cop pulls over a driver and then searches his car and finds drugs, and you believe the drug laws are immoral, are you willing to admit that the cop is a criminal? (Or is "just doing your job" an excuse that gets him off the hook?)

If morality is objective, and the "law" he's enforcing is immoral, then the cop is the criminal in this hypothesis. If morality is subjective, then the cop somehow is made moral when doing this, because law somehow conveys morality on otherwise immoral acts. (Again all rhetorical. I'm going to log out now and enjoy my Sunday.)

38.Outsmarting Yourself for Success (dextronet.com)
47 points by jirinovotny on March 11, 2012 | 12 comments
39.Typed Set Theory in C++11 (bleedingmind.com)
43 points by mahrz on March 11, 2012 | 3 comments
40.The Web Browser is a Transitional Technology (eventer.com)
42 points by jarek-foksa on March 11, 2012 | 15 comments
41.Find|xargs like a boss (Real Example) (r-bloggers.com)
41 points by g-garron on March 11, 2012 | 20 comments
42.NameCheap DNS servers are down
41 points by jitbit on March 11, 2012 | 28 comments
43.Learning: the Hacker Way (jclaes.blogspot.com)
41 points by Nemmie on March 11, 2012 | 1 comment

A close family member of mine was just arrested for possession of marijuana. They allegedly had a sizable amount, more than your normal 1/8th of an ounce, but nothing obscene. Due to a felony 10 years ago when they were a teen, they are looking at 5-10 years. Granted, Oregon is known to go easy on pot offenses, however even 6 months in jail is ridiculous. The real cost however, is not having their prior felony expunged - it will be another 10 years before that is a possibility, well into middle age for this person :( Try finding yourself a job with a felony record. If you can, it is probably paying a wage that will doubtless encourage the same illegal behavior that landed you a felony in the first place. When your only hope the rest of your life won't be utter shit is getting off on a technicality, something is messed up.
45.How to correctly use code you didnt write (patrick-wied.at)
38 points by ranit8 on March 11, 2012 | 24 comments

As an Indian who has spent all but two years of his life in India, when I read stories like this I think of two possibilities:

1. Propaganda by affluent and successful Indians claiming the country is as successful as they are.

2. Westerners overstating Indian progress to feel more comfortable that there is a friendly and reliable challenger to China from the developing world.

I don't know, I may be wrong on both counts but the reality is that we are a dirt poor country with not just deep institutional problems, but also moral and psychological ones.


Whenever this question is asked, it's almost always std::sync_with_stdio.

People on reddit or 4chan getting upset because IP rights are not being respected? Sorry I think my hypocrisy meter just exploded.

How this works, for the interested:

Python internally compiles to a bytecode for a stack-based virtual machine. If you import the module `dis` and execute `dis.dis` on a function, you can see this bytecode.

Like most bytecode VMs, there are jump instructions for compiling for and while loops to. For example,

  def foo(n):
      a, b = 0, 1
      for i in range(n):
          a, b = b, a + b
      return a
compiles to

  2           0 LOAD_CONST               3 ((0, 1)) 
              3 UNPACK_SEQUENCE          2 
              6 STORE_FAST               1 (a) 
              9 STORE_FAST               2 (b) 
  
  3          12 SETUP_LOOP              37 (to 52) 
             15 LOAD_GLOBAL              0 (range) 
             18 LOAD_FAST                0 (n) 
             21 CALL_FUNCTION            1 
             24 GET_ITER             
        >>   25 FOR_ITER                23 (to 51) 
             28 STORE_FAST               3 (i) 
  
  4          31 LOAD_FAST                2 (b) 
             34 LOAD_FAST                1 (a) 
             37 LOAD_FAST                2 (b) 
             40 BINARY_ADD           
             41 ROT_TWO              
             42 STORE_FAST               1 (a) 
             45 STORE_FAST               2 (b) 
             48 JUMP_ABSOLUTE           25 
        >>   51 POP_BLOCK    
  
  5     >>   52 LOAD_FAST                1 (a) 
             55 RETURN_VALUE                 
Note the `JUMP_ABSOLUTE` bytecode at position 48 (which jumps to the `FOR_ITER` at position 25). What we want to do is insert more of these instructions by manually modifying bytecode (something Python allows us to do).

The rest is a simple job of identifying the syntax (`goto .x` is really `goto.x`, an attribute access, which is simple to identify as the `LOAD_ATTR` instruction) and inserting the proper jumps. So in fact this is a pure-python modification, which works solely by changing how Python compiles to bytecode.


I personally hate graph algorithms and all the stupid associated questions. I have to spend two weeks reviewing all that stuff every time I change jobs to go ahead and never ever use it again. It simply never comes up in the type of work I do.

At my current place of employment, one of the engineering managers was complaining that an interviewee bombed a graph algorithm question. I asked, "Where -- if anywhere -- in our codebase do we use any graph algorithms?" Answer: "We don't." At all. Yet knowing graph algorithms is apparently a requirement for working here, which means that at minimum, I am unqualified to do my job. Sigh.

I'd much rather candidates spent time understanding memory implications of different types of java/jvm data structures, or know how to diagnose and fix memory pressure, or have experimented with design patterns to reduce memory requirements, etc. But nobody asks me. If you know off the top of your head that in the hotspot jvm an Integer is 4x as big as an int and that a Double is 24 bytes, and can figure out the rough size (8.5KB!!!) of a 100 entry TreeMap<Double, Double>, and know what compressed oops does and why it works, you'll almost certainly get a "please hire" vote from me.

edit: note that knowing a bunch about jvm memory use isn't a requirement, but knowing it will impress me. It probably also means you've been burned by jvm memory use before and that's why you know this stuff.


Interesting tidbit: it's taken us months to get approved for the App Store b/c we were a bit stubborn in our refusal to offer an audio-only version of Sal's videos to people w/ crappy cell connections.

Since his stuff is so low-bitrate, we thought we could get all videos down to the lowest of Apple's HTTP Live Streaming requirements -- even having the crappiest of crappy video is 1000x better than audio only when trying to learn algebra.

We were able to make a <64kbps version for most of the videos, but couldn't do it for everything. Some were just over the mark. We hoped for a little app store leniency given the content.

Eventually we had to give up on some problematic videos and offer audio-only versions for crappy streaming connections. Gotta ship.


India is a big, diverse country in terms of people, culture and economy. The article is pigeonholing a country with over a billion people in sparse categories. Any article talking about "India" is mostly generalizing based on a small dataset.

The filty rich, people dressed in filty clothes, and "people in between" co-exist in India. The first experience of India starts right where the airport ends - the crowd of touts and cabs fighting for your attention will come as quite a shock if you haven't faced it already.

The divide between rich and poor will become more profound once you leave the airport and enter the city. One second you are in a neighourhood rivaling the most plush cities in the world, another you are standing by a heap of garbage, watching children in rags hunting the trash for recyclable objects which they sell to earn their living.

India, specially the big cities, are complete chaos, owing to their large population. Someone from a quite neighourhood will be a bit taken aback when he is subjected to insane amounts of traffic accompanied with honking. For the most roads, you will have to jaywalk. However, don't concern yourself too much, as this is standard practice and drivers are used to it.

Apart from the traffic, cows and other animals roaming the strets isn't uncommon. They are big, but mostly harmless.

As far as society goes, the Indian society takes pride in being closely knit and valuing familial values. You will find people living with their parents, which is very uncommon in the west. Also, people don't display intimacy in public - even married people generally keep distance. On the other hand, boys with hands over other boys' shoulders, and girls holding each others' hands is a common sight.

Also note that the Indian states differ in culture at the macro level, and the country loves to fragment itself at both macro and micro levels. People from the northern part of India(believed to be Arayn descendents) and people from southern India(believed to be Dravidian descendents) are an example of culture difference at a macro level, and Tamil(South Indian) brahmins differentiating themselves from Non-brahmins is an example at a micro level.

India, as a country, has a different sense of privacy and personal space. People will ask all sorts of personal questions, without meaning any offence. It's just the Indian version of small talk, and they feel delighted if the same questions are asked of them.

Talk about programmers - you will find the bell curve at work. But since the number of people who are supposedly programmers is large, and you mostly come across the middle of the normal distribution, it's easy to get the impression that most people are incompetent.


Unfortunately, this isn't really practical.

- It requires solidarity by criminal defendants, many of whom will go to jail for a long time absent a plea agreement. It is literally, the prisoner's dilemma.

- Absent posting bail, you stay in jail until you go to trial (which can be a long time in a scenario where everyone is in fact going to trial). The "excessive bail" clause of the 8th Amendment, in practice, has been eviscerated. Bail is routinely set so high that the only way it is affordable is to pay a bondsman. This means that it's easy to punish people prior to a trial for exercising their rights. A stay in jail prior to trial can be as or more destructive than being convicted - you likely lose your job, your housing, possibly custody of your children, all without any process.

The judicial system has ~ a thousand years practice at maintaining control and getting the outcomes (overall) that the State desires. It is not a simple matter to "force" it to do anything.

54.Schemer: New Social Network by Google (schemer.com)
31 points by patrickaljord on March 11, 2012 | 29 comments

"The point that I’m trying to make is if you’re going to spent months of your time and thousands of your dollars drafting a concept, hiring a team, and building a free and completely open source video game as a hobby, you better use zombies as your theme."

That is not the right thing to have learned from this. I suggest this one:

If you're going to take a bunch of ideas and content wholesale from a community for your new thing, it might be good if you engage with that community and make something that respects the context of the stuff you're taking, instead of making something they'll perceive as cheap and foreign.


I ain't gonna lie. I was imagining an iPad's guts being removed and it's husk being filled with whiskey or home made absinthe or something when I first saw this.


Ayn Rand doesn't usually admit any precedent for her ideas, but anarchists and some socialists have had a similar diagnosis since the 19th century. For instance, Kropotkin's "Law and Authority", published in 1886.

I think it more shows that just picking C/C++ over Python doesn't mean you automatically get awesome performance. You still need to know what your doing.

> Namely, that government creates crimes to control people, ("There is no way to rule an honest man. The only power government has is over criminals. Thus we create more and more laws until every man is a criminal.")

Things like public health directly contravene this concept. There is a collective public good (say vaccination), it only works if some percentage of the population opts in, either through incentive or obligation.

Infants are protected from whooping cough only by our ability to guarantee vaccination of other citizens (since they are protected not by the vaccine itself, but the cocoon effect of having a vaccinated population that is not susceptible to whooping cough).

In other words, governments definitely do have power over honest people.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: