Hacker Newsnew | past | comments | ask | show | jobs | submit | nlogn's commentslogin

He's right actually if the code is written sensibly. Well it should really be (N-1)! but close enough. Think about it in terms of 3 balls. I check ball1 against ball2 and ball3 then move to ball2. It gains me nothing to re-check ball2 against ball1 so I just check it against ball3. When I reach ball3, I have already checked everything and I'm done.

The loop should look like this:

  for (i = 0; i < n; ++i)
      for (j = i + 1; j < n; ++j)


That's N*(N+1)/2 steps, or order N^2. Best to visualize as the number of entries on the upper triangle of an NxN matrix.


I think you need to revisit your understand of complexity. It is O(N^2). If you want the exact count, it is N(N-1)/2. N! is an exceedingly large number even for very small N.


Yep I'm wrong. Mixed up factorial just like mistercow said. Thanks for the corrections. And here I was worrying that someone would complain that my loop wouldn't address the issues of collision response necessitating more checks, thus making a recursive solution necessary.


That's not N! . N! is (N)(N-1)(N-2)... What you have there is (N)+(N-1)+(N-2)..., which is O(N²)


I have to second the completely unbreakable part. I have dropped it whilst biking many times (seriously I'm embarrassed to say like 4 times) and it has only a few minor dings to show for it despite tumbling on asphalt at 10-15 mph. It seems like the thickness of the aluminum bezel coupled with the thinner screen width protects the screen better than the ipod touch's. I also prefer the UI and basically what it came down to when deciding between the two for me was what I wanted: a really good touchsceen mp3 player or a more generally useful device/portable gaming machine. I already have my phone for the latter purpose so I went with the best mp3 player.


I did have mine "break" but I can still use it. Somehow the screen cracked from the inside. Speculation is the battery was overcharged and swelled. I looked it up on the Internet and pretty much every discussion about it was filled with people claiming those with broken screens must be lying or had damaged it somehow. Microsoft doesn't acknowledge a problem.

Oh well. It still works, and I have my WP7 now. The Zune is just for biking.


Especially since we as a species have eliminated so many other "natural" causes of death thanks to vaccines, antibiotics, sanitation etc. What we are left with are what we have not yet solved: cancer, heart disease and strokes (mostly). http://imgur.com/6d3lK

Cancer also becomes naturally more likely as time goes on and DNA has become more damaged so as our lifespans increase, so do the odds of getting cancer.


>If it's not complicated, why do some Android users complain about it? If it's as intuitive as you say, shouldn't everyone be happy with it?

Don't you think this is a silly argument to use against Android's back button when the post we are commenting on is a complaint about iOS's home button? By your logic, that should indicate that the home button's behavior is not intuitive and complicated... you know, because somebody complained about it.


Except I never said that iOS's home button behavior is "extremely intuitive" or assert that only people who've never used it find it complicated. Of course, I also didn't give a long description of the iPhone's home button behavior, say that it's really complicated to explain, and then say it's intuitive....

Obviously some people disagree with the iPhone's home button behavior. Then again, they're not complaining that it's too complicated to understand, merely that it's not the ideal (or perhaps "correct") behavior.


Another benefit is that manufacturers can't screw with the button order.


Dibs on the color #80881E


Ironically, the Name That Color website reports the name of color #80881E is Trendy Green!

http://chir.ag/projects/name-that-color/#80881E


"horrible UX on Android"

This is more than a little hyperbolic. Sure, the animations may not run at 30fps all the time. Some animations running at 15fps != horrible UX. I am an iOS dev as well but use an Android phone and just completely disagree on it having poor UX.


It's just an overall lack of attention to detail, compounded with the need for the OS to work on 1000 different kinds of hardware combinations. It's near impossible to describe without sounding whiny or silly, because it's death by 1000 stones, not one killer thing.

Anecdotes:

- Whilst using my Nexus S, it rings. I pull it out of my pocket, only to discover I can't answer it because there's a keyboard over the Answer/Decline buttons. Later, I realize I must have pressed and held on the Menu button long enough while pulling the phone out of my pocket to force the keyboard to popover the Answer/Decline buttons. But why the heck is this possible even? It vaguely reminds me Joel Spolsky's article on the Windows shutdown menu - http://www.joelonsoftware.com/items/2006/11/21.html .

- I want to make it so there's momentum/inertial/bounce scrolling in a text view. This is impossible. Why? So phones that still have trackballs don't have whacky scrolling behavior going on for them. But the ListView has inertial scrolling. How the heck can I possible explain this to my client without sounding foolish or lazy?

- I want to animated a cell disappearing from a ListView. Again, impossible. The solutions mentioned on StackOverflow ( http://stackoverflow.com/questions/3928193/how-to-animate-ad... ) (BTW, the Android presence on StackOverflow is abysmal), in order, and summarized: 1) Rewrite the class yourself because Android is open 2) Some hacky drawing solution that isn't a good idea. 3) Wait till Adobe's dev tools get faster on Android. 4) Re-implement the class from scratch yourself.

I understand now that Honeycomb has much better animation facilities, but we're not seeing that on phones. And when we do, the problem with carriers + manufacturers holding sway means whatever apps I build won't see any improvements on phones until Ice Cream is released and manufacturers ship phones with it. We're talking June or July at this point, right? For basic animation. That was in iOS 1.0. In June 2007.


Whilst using my Nexus S, it rings. I pull it out of my pocket, only to discover I can't answer it because there's a keyboard over the Answer/Decline buttons.

Huh? I'm running Android Gingerbread on a Nexus One, and when the phone rings, I see the usual "unlock" screen, with one option for answering, and one for ignoring the call. There's no way to get a keyboard, no matter which buttons I press.

Is your phone fully awake and unlocked in your pocket? Is there something weird about Gingerbread (or the buttons) on the Nexus S?


On any version of Android, dating back to the introduction of the virtual keyboard in version 1.6, long-pressing on the menu button will pop up the keyboard, which allows you to, for instance, bring up the keyboard in applications without needing a specific textbox to select. This allows you to have applications like ConnectBot, where the entire screen is a terminal emulator, and you can pop up the keyboard at any point and start typing without having to type into a textbox and then "send" the text to the terminal. On the home screen, you can bring up the keyboard and just start typing a search query without needing to press (or even have) the search button or widget.

And for the record, when the virtual keyboard is shown, pressing the back button will always dismiss it without sending the back action to the current activity, so in your case you could have pressed back to dismiss the keyboard, and then pressed the button to receive the call.


Exactly, completely understand where this is coming from - but why in the world is this a default!?


This has happened to me. I'm a geek, so I knew that hitting the back button would get rid of it, but come on. Anyone else in the world would have missed the call while starting at their phone and listening to it ring.


Couldn't tell ya. :/ I'll have to test it and get back to you.


> The Xoom was superior in terms of all hardware, but it failed to make a dent against Apple simply because Apple executes the tablet exquisitely.

Do you have any hard numbers to back up this assertion?



I googled it before I commented, thank you. Note that I asked if you had any numbers. In each of your sales comparisons links, they point to the very same short quote from an analyst. Not the most compelling data, wouldn't you agree?


They cite Misek, Chowdhry and Sterling--only 2 are redundant though they use the quotation in different contexts--but i see what youre getting at. Thats fair.

Sales of the iPad 2 havent been released officially yet to my knowledge but sales in the first 3 days are thought to be around 600000--more than the original iPad made in its first week and look how well it did in the long run--and to sell around 5.5 million units in its first quarter.

http://online.wsj.com/article/SB1000142405274870402750457619...

http://www.wowtechy.com/apple-ipad-2-sales-forecast/

Furthermore, iPad is meeting current projections of 45 million (though this likely includes sales of the iPad2).

http://www.knowyourmobile.com/blog/626826/45_million_ipad_sa...

On the other hand, Xoom was projected to ship only 800,000 in its first quarter and 1 million if lucky.

http://www.onlinesocialmedia.net/20110110/motorola-xoom-sale...

however, actual sales for the Xoom have been so terrible that they're not even releasing them and theyre planning to cut back production for future quarters.

http://www.benzinga.com/news/11/03/914761/motorola-xoom-sale...

http://www.zdnet.com/blog/btl/motorola-xoom-sales-tepid-prod...

I cant provide any more information than that right now because it literally isnt available to the public as far as I know; however, we can induce from whats above that Apple really isn't feeling the effects predicted by Xoom analysts, if they are feeling effects at all. And this is despite the superior hardware listed in my previous post.

Sure, Motorola dominated at CNET this year, but so did Palm when it announced the Pre and we've seen how that worked out. Like I said earlier, I have no allegiances to Apple but I think its rather difficult to deny that theyre dominating the tablet platform. You seem hypercritical of my evidence which is fine but I have yet to see any to the contrary. If its out there I'm happy to be enlightened.


Not only that, but there is no reason that the physics loop would have to be run in real-time. They could just as easily run the physics loop for a few frames as fast as the hardware would let them with fixed deltas of average frame length (probably 1/30th of a sec). Chances are they could run half a second of simulation in just a few milliseconds without the need to render.


And yet there is a functioning work-around that is extremely simple: https://supportforums.motorola.com/message/332363


The forum manager (Matt) on that thread is being very cool about the whole thing; bravo, Motorola.


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: