skysight-inc/HackerNews huggingface dataset:
Mine is:

-- find index of thing in sorted things in the range [first, last)
function bsearch_2(things, thing, first, last)
if first == last then return nil end
assert(last > first)

local midpoint = math.floor((first + last) / 2)
assert(midpoint >= first)
assert(midpoint < last)

local test = things[midpoint]
if test == thing then return midpoint end
if test > thing
then return bsearch_2(things, thing, first, midpoint)
else return bsearch_2(things, thing, midpoint+1, last)
end
end

function bsearch(things, thing)
return bsearch_2(things, thing, 1, #things+1)
end

That's Lua, which uses 1-based indices. I'd be happy to hook up input-output stuff to it if you like.
It's probably most accurate to say that the blame is shared.
This seems like a very natural tie-in with your facebook friends. One of the few times fb connect makes sense!
> few people I did try to ask usually have the repulsive smirky grin.

Many people in office jobs are like this. Brute force search till you find helpful and intelligent people who are not insecure and might actually be fun. You never need to turn to the jerks after that!
No, but he likes watching the internet explode with speculation that the new iphone will cure cancer and world hunger, at the same time.
Exchanging money doesn't mean exchanging ownership. If you pay an agency $10,000 to photograph a model, you don't own that model. Why would a telephone be any different?
Not entirely true. I ask EVERYONE I interview what their biggest screw up has been career wise. If they don't have anything interesting to share, I don't want them working for me. This guy has a great story to tell and a real lesson learned.
"scumbag, leech, bottom feeder"

Describing actions that Nick Denton did that you didn't like would advance this discussion, but I don't see any value in name-calling. I really don't like these sorts of comments on Hacker News.
Maybe not (don't know him), but teaching is an entirely different skill set. Perhaps he's not a great developer, but is a great teacher?
I don't even own an iPhone. I hope that answers your question.
I don't see how this does either of those things. On insulating him, it's not like Apple ever cared what public opinion was. They just spent the last week basically pushing back against their own developers. So if they want to fire him they'll do it public opinion be damned.

As for proving it was an innocent mistake. I don't think it does that either. If I were an Apple engineer and I just sold the newest iPhone prototype I'd ask the news site that broke the story to claim it was someone else too. Plus, it's gawker media so most believe they would be dishonest enough to lie about their source.

I'm not saying that's what he did but if I was already suspicious of him that story wouldn't make any difference.
Not true: http://en.wikipedia.org/wiki/Shield_laws_in_the_United_State...
"the array is all one value" got me. After fixing that, despite of the excessive verbosity, my experiment in literate programming passes the other tests - but I'm sure I coded a few more bugs in it - if you have some stock suite to get it through - would be very interested to know how many!

http://stdio.be/mybsearch/mybsearch.txt for the text and the http://stdio.be/mybsearch/mybsearch.c for the notangle-d C code, if you fancy to look at it.
The US DoD health care systems supports approximately 10 million beneficiaries and has a budget of approximately 40 billion dollars, http://en.wikipedia.org/wiki/Military_Health_System.
Andreessen Horowitz Drops Out of Funding Race for Foursquare
Apple puts in a lot of effort to maintain an air of secrecy. It's part of their pubic image.

AFAIK this is the first time there has been a leak this big. It is a big deal to Apple.
Going back to Bentley, the point was not to code without testing but whether you could think through a small piece of code <i>before</i> testing.

raganwald says, "It feels very retrograde to try to write the whole thing out and only then start thinking about [...] edge cases." Nobody said you had to write it before thinking about edge cases! The idea is to think about the edge cases and incorporate that thinking into the code before you actually test the code--whether you can be--actually whether you know the steps to be--that thorough in your head.

One way to think about edge cases, of course, is to write the test code before the function. But after writing the tests, try writing the function correctly before testing it.

Of course, one of the potential bugs in binary search doesn't occur to people before they write and then try it. And, that bug is hard to test for, ahem, don't want to explain why.
I have to say that the usual way of writing binary search recursively doesn't help break the problem down. It's already as broken down as it gets, and you're just tweaking the single case. The loop version wins for clarity.

I think second runner-up is the recursive version where you use slices... does lisp have slices?
I don't think that's fair. What Gizmodo did would violate the ethics policy of any serious news gathering organization. I don't consider them press.
Gizmodo isn't the reason that the owner of the phone will be caught. First of all, he lost it, so it's originally his fault. Second of all, it was remotely wiped, which implies that Apple knew what had happened to the device and they knew exactly which device it was so that they could wipe it. Third of all, there were clear shots of the backside of the phone which had several serial numbers, most likely linking it to its owner for Apple's purposes.
As much as I hate to defend Gawker I don't think you can blame them for the negative impact on his career. Say what you will he is guilty of what they claim he did. I would hope future employers would be willing to look past it and realize it was an innocent mistake but they have a right to know. In the end this incident is relevant to how much you trust him with prototypes in the future.

Beyond that Gawker is a news source. It's their job to report on stories. So while it was dishonest to buy the stolen prototype this post is just reporting the story and I'm not sure it's out of the bounds of what a news organization should do.
Imgur: The Simple Image Sharer | Image Gallery
The TechCrunch40 2007: Where are they now?
Cable/TV News fairly regularly pay subjects for stories.
After this event, I'll bet you can trust him with future prototypes more than anyone else on this planet.
The article states the phone was lost on the April 18th, but Engadget had the same bar story and pictures on April 17th.

http://www.engadget.com/2010/04/17/iphone-4g-is-this-it

Does this not add up, or am I missing something?
These blog posts are kind of like those "Learn this language in 24 hours" books. They're not bad per se, but it's as if becoming a great developer is some kind of <insert-number-here>-step process. Becoming great is, in my opinion, not a final destination. You can be great from day #1 by pushing yourself to learn more, for every day in your life as a developer.
Well you have information about the person including his name, perhaps hobbies, passwords from Google, Yahoo or other sites, which will provide them if they are fed some "terrorist threat, brown alert" mumbo-jumbo. In rest NSA and Choicepoint and help you on that front.

Then you just start building a customized keyspace from that information. Include some common substitutions: letters for numbers, numbers for letters. If you have other passwords, look for general patterns. Some people use long passphrases, but they have a pattern or algorithm on how they build all their passphrases! There you just might need a human expert to take a look.

In the end, yes, it is very difficult but it is still a lot better than plain brute-force.

But yeah, I doubt Customs have the equipment or knowledge to do this. That is something that NSA would do. They would have access to the best tools. I can imagine there might be some kind of very constrained cooperation between them. "You send us a disk clone + personal info of the owner, and we'll try to send you back the cracked passphrase. You don't ask as questions how we got it, and you don't even mention that we got involved at all."
201 days ago I asked for your opinion regarding savendar.com, here we go again.
Late last year I asked you to review my new startup, Savendar.com. I received a trickle of feedback from this community, but I ended up making so many changes I ultimately realized I needed to re-think my business.

I took a few months off active development to escape my self-created "Savendar bubble" and eventually reached a place where I could view the feedback from online communities, friends and family with some sense of objectivity. Needless to say the comments I received here were spot on.

http://savendar.com

I can't list all the changes I have made, but here are some of the major changes:

(1) Redesign the homepage. Explain more clearly what the site does.

(2) Lose the keyword search, use categories instead.

(3) Many people complained the site was only useful if they knew exactly what they were looking for, to help remedy this problem I have introduced alerts.

I think Savendar is a much more solid product today. I apologize for only including US and Canadian cities, I intend to add more if the site is successful.

I am anxiously awaiting your new feedback.
This outrage is misplaced and the example he uses comparing the iPhone to a naked picture is ludicrous.

Of all the attacks we have against people's personal character by blogs and the old and new media, attaching this guy's name to the phone he lost is practically nothing.

It's just business, not some attack on his character. As an employee of Apple, Gray Powell represents Apple. His name is part of the story. Due to a mistake of his Gizmodo scored a huge coup and got their hands on an unreleased iPhone and a big story. Good for them.
Bullshit. There's a big difference between making a mistake, and having that mistake sprayed across the internet for all to see.
Apple encourages two App business plans. They encourage high-volume cheap/ad-based apps, and expensive niche apps. Either of those can be profitable, but nobody's going to sell a $10+ App to an appreciable fraction of iPhone/iTouch/iPad users.

The high-volume cheap apps (free to $10) are for the general public, and in that area, the blog post is correct - Apple is mostly interested in competition resulting in cheap and good general-interest apps, because it enhances "there's an App for that".

If you want to sell a $50+ iPhone app, you need to look at niche fields. There's a bar exam prep app for $1000[1], and one of the apps demo'd before the App store launch. In general, the really expensive iPhone apps add a killer-app feature - a feature that justifies buying the iPhone itself. Like the "check your security cameras while patrolling"[2] app, or the "every medical and pharmacological reference ever written in the palm of your hand and instantly searchable" app (#8 on the list in [2]) or the "control your multi-thousand-dollar home automation system" app from ROSIE[3]. These types of Apps literally sell iPhones by themselves. I mean, the tuning forks you need to tune a high-end piano cost $450[4], so a $300 app which is a million times easier to use is a no-brainer if you're a piano repairman or performer.

[1] - http://www.edibleapple.com/bar-exam-preparation-app-for-the-...
[2] - http://www.businessinsider.com/the-10-most-expensive-iphone-...
[3] - http://www.businessinsider.com/most-expensive-iphone-apps-20...
[4] - http://www.mypianoshop.com/store/product.php?productid=16630...
if gizmodo had not outed him, it could have been successfully sued for theft. Apple considers the phone stolen - an excuse given by powell to obviously save his ass - and had giz not explained the events as to how they got the phone - they would have got screwed. So yeah, everyone makes mistakes - but you've got to learn from them :)
Guilty? As in, culpable? I am baffled by your willingness to burn someone at the stake for an honest mistake. Have you never misplaced anything valuable, left something behind by accident?

Also, Gawker could have easily reported on this story and kept the engineer's name private. For example, read the NY Times article re-reporting the story, you won't see the engineer's name. http://www.nytimes.com/2010/04/20/technology/companies/20app...
Cyber Slim Center - Lose weight
The parent wasn't talking about productivity, I was trying to rebut his claim of California's busybody-ness compared to Texas'. 1700 bills seems pretty busy to me.
The first time I flew into Austin, I hopped into a cab at the airport. On the way to the hotel, the cabbie asked if I had ever been to Austin before, to which I responded that I had never been to Texas.

He turned around, looked directly at me, and said "Austin ain't Texas son."
I'd argue that they're an excellent design company with good marketing, good hardware, and mediocre software.
If Apple would fire him over this, they probably would (or did?) fire him a week or so ago when it first went missing and got remote-wiped. The fact that it was later found and he was publicly humiliated shouldn't change anything in this case - they already knew it was lost and they knew this situation was a real possibility. If they hadn't fired him yet, I don't see how it makes sense to fire him now that someone found and published it. It's not like he could control who happened to find it.
The engineer in question is a good friend of several of us here at HN. We sincerely appreciate the support he's being shown here and elsewhere around the internet.

So there is no doubt: Gray is one of the smartest engineers I've ever had the pleasure of knowing, and I'm sure he feels terrible about this. Although I'm sure this is going to be one of the worst weeks of his life, he will land on his feet, wherever that may be.

If he becomes available for hire, I highly recommend him to any startup in the SF area. Its rare to find such a combination of raw talent and work ethic in one engineer.
A 1GB instance costs $90/mo? A plain 1.7GB instance costs $30/mo.
A 50GB instance costs $3500/mo? A plain 68GB instance costs about $1/hr, or $1k/mo. What's the other $2k/mo?

These prices look like 3x cost.
Avoiding software project overruns: watch the ratio
"The first problem is that it isn’t professional. Dressing properly is one way we signal to clients, other attorneys, and judges that we take our work seriously and we take court seriously."

Though I also think typography is important, you end up with a lot of non-serious and bad lawyers simply looking serious with good typography because that's what the serious and good lawyers do. Bad content is still bad content no matter how you dress it up.

And when typography is used as a signal, as more bad lawyers adopt it, it becomes a less and less effective signal--until it becomes standard fare, and not useful at all for telling serious lawyers from non-serious ones.
March 2010 Browser Market Share Numbers
http://en.wikipedia.org/wiki/Journalism_ethics_and_standards
ooEEuuuuuuu killer tofuuuuuu
Another reason is that by desk checking, you spend substantially more time working on the program - which means more billable time as a consultant.
It maybe becoming time to require at least one programming course in college/high school, the same way schools require some math/history/science/etc....

I suspect if we could find a way to teach kids a little programming in grade school we would to them and society a world of good... but as far as I can tell we haven't yet been able to find a way to teach programming at that level.
Hey, you're back submitting articles.
I don't see how this helps keep him from getting fired at all. Apple knew it was missing. They knew who lost it. They knew all this at least a week ago since Gizmodo claimed to have had it that long. If they were going to fire him, they already would have. (Maybe they already did?)
broad generalization - cost of switching varies GREATLY depending the type of service.
Honestly you can find most of the useful articles online - and if not, you can always email the author, ask politely to get a copy.
They could have done without the gigantic photo of the guy...
I am wondering is there any market place now for both "making beautiful things" and "being cool".
The DoD also funds the National Defense Science and Engineering Graduate (NDSEG) Fellowship, which funds (among other areas) biomedical research being carried out by graduate students.

More about the fellowship: http://ndseg.asee.org/
One thing I really liked about Northwest was that just before they were bought out, they had redesigned their boarding passes to print all your flights on one sheet. Seems Delta has chosen not to run with that, though.

The old NW boarding cards had an easy to read table that showed your flight number, seat, and departure date/time for each connection, with the confirmation number, FF#, etc across the bottom. A lot easier to read, and less paperwork to fish out of my travel bag.
So you're saying that because Gizmodo published some text on a blog that their version of the story is now more true than Gary's may have been? You're assuming Gary didn't simply tell Apple the truth when he lost it. Why?
I agree. They had their story. At worst but acceptable they could have said that it was an Apple employee. They completely went over the line by naming said employee.

The question they should have asked themselves first was: "Does naming this person CONTRIBUTE to the story?" This is clear Journalism 101. The answer was and is clearly "no." The best line of defense for them is they have none.

Sometimes I hate the internet and its cache. This is one of those times. Anyone can ruin anyone. The really good news is that it appears he has many people on his side.
Maybe so, but first we need to consider the requirements:

- There's a reference implementation, because the whole point is that the asset specification is executable

- At least one implementation is open-source, so it can be validated independently (could compromise here, but why bother these days), and cross-platform

- Financial-industry programmers, including investors, are already familiar with it and want to use it

- More readable and concise than legalese (since the goal is transparency)

- Has a built-in XML parser, or simple bindings for one, since XML configuration is another part of the proposal

I'm not sure how important type-checking or automatic code verification is here, but since Python was even mentioned in the proposal, it must not be crucial -- the main point is that investors can download the code and play with it. If the emphasis was more on creating a rigorous specification of how things work, I'd expect SML or maybe Prolog would be at the top of the list.
I don't know whether it's the same guy, but some other blogger was saying about the same thing - to code in public, and get over your fear. Good advice for the long run.
Entertainment Trumps Politics on Chinese Web Sites
How to open the Typography panel in the picture:

1. press Command-T or choose Format > Fonts > Show Fonts
2. click the gear icon in the lower left
3. choose Typography…
Yet no one ever would want to
I was going by total state+local govt revenues divided by population, which ends up allocating as taxes things like vehicle registration fees, excise taxes, alcohol taxes, corporate taxes, etc., probably even lottery revenues. The Tax Foundation's method might be more meaningful, depending on what you're comparing.

But either way it's not all that much of a difference in absolute terms, even if it is in percentage terms. I mean, $1500 on average. Even if you make a lot over the average, it still seems like Texas's biggest win will be the $300,000 difference in the price of a house, or $1000/mo difference in rent, not a few $k savings in taxes.
I didn't like that first design. Whatever typeface that is that is long and tall makes it hard to read.

I was surprised (or maybe not so surprised) that none of the designs cut the length in half, like the Virgin America boarding tickets. When I flew Virgin for the first time, I found it pleasantly nice that I could fit the entire boarding pass in my pocket without it flapping out awkwardly and me worrying that the tab will come off.

Design is how it works, no?
Chipworks confirms more iPad A4 details, mystery remains
Now android has to try harder with it's marketplace software and infrastructure, where it will really make a large difference in getting developers over.
I totally agree, without an actual means of measurement of "how much better" these multipliers seem to be useless. Also, often it is one or two key features that distinguishes one product from another. For me, Gmail's "how much better" was the better storage and the fact that conversations are organized better.
Simultaneously fascinating and disgusting.

I've watched this a couple of times; anyone else notice the considerably faster blips at the top of the map? Spy plane?
I will celebrate the day when HN front-page is not filled with Apple drama and gossip.
I think (hope) this is a useful target market because I've been working on something similar (but completely different). This looks clean and simple to use, and I think the categories are definitely a better way to go.

Are you only monetizing through the PPC advertising, or will you leverage affiliate marketing from user submitted links? The latter was my plan (although my idea was only ever a 'beer money' concept and Savendar is much more impressively executed.)
As web sites go, this one is pretty decent. There are some navigation issues, sure, but the design is simple and the text is a readable size, with a good line width.
How does Rtm find time to work on YC while being a prof at MIT? Does he do much of the work from boston? Or does he split his time 50/50 between the coasts?
You know, though I agree, I think this is a POV issue. Some people believe one side and merely understand the other.

Consider a person who both wants to be a doctor, because they admire the direct nature of a doctors work, but they don't enjoy people themselves. And, also wants to be an engineer because they find it all more interesting and valuable, but they never particularly liked math. Depending on the person one choice will be more desirable and will be easier to learn motivation for.
Right, but we can't compare them to each other without more information, so I don't think your rebuttal works. Given the political differences between California and Texas, there is the possible scenario that these ~1700 bills in Texas were very small, relatively pointless pieces of legislation, while California's ~700 were enormous and relatively overbearing.

In case we're just debating the meaning of "busy"... Texans want their politicians to be busy doing relatively nothing, for the most part, and I think this is the general attitude expressed in the parent comment.
Came here to say this. If Gizmodo truly burned this guy then yes, they are way out of line, but in this case it seems pretty obvious to me that Apple knew who lost their phone a week ago when this all started.

The proof is in the first paragraph of almost every article on every site covering this story. The phone was remote wiped the next morning.

You can all put down your pitchforks now. Let's wait and see what actually happens before nailing someone to a cross.
I'm missing the back story -- tell me more about Peter Norvig's solver?
You're missing something :-) the phone was lost on March 18th, not April.
Those quotation marks don't mean what you think they do. I wrote that he was a "well known scumbag" and (separately) "a leech and bottom feeder". Listing his primary attributes like you did would be totally out of line.

Anyway, my comments would stand up in court. Truth is an absolute defense. Nick Denton is infamous. Google him. He runs such gems as Valleywag, Gawker, and Defamer. Self identifies as a "gossip merchant" and the title of his own web site is "Nick Denton: The long and illustrious history of bile", which is entirely accurate.