skysight-inc/HackerNews huggingface dataset:
> In practice, what assumptions one should make here about optimizing compilers?

> It seems like it would take a lot of compiler intelligence to figure out that even though we are modifying the string in place, we are never terminating the string, and thus strlen() remains constant. Thus my instinct would be to never use it in a loop like this.

You're completely right, I just tried it on several gcc settings and it is O(n^2) every time. I thought the 'n' is invariant across the execution of the loop but it might be changed because we're modifying the string and the compiler realizes that and re-runs strlen every time.

> By contrast, my instinct was to do this with in a single pass with two incrementing pointers. I'm not sure if the code is clearer (http://gist.github.com/416170), but at least the assembly turns out simple enough to read!

That's pretty much what I sent in as a solution, and I figure there will be a lot of them isomorphic with yours.
Actually most of is to get legs on ground in fear of anarchist protests. The Olympics was an investment, not this. Now looks like the auditor general is getting involved to find what caused the spike in the security budget. again, more cost.

very frustrating!

but the idea of hosting these large events at a permanent location seems pretty economical to me. :S
I need to work on my attempt at humor.
The reasons the author states are all why I'm not getting an iPhone, primary Apple's unwelcome control over the app store.

I'm eager to "jump on the Android bandwagon" but I have to figure out how to deal with the ETF on my current featureless Motorola phone with Sprint. Apparently replacing a broken phone resets your contract date.
Great TED talk in the same vein: http://www.ted.com/talks/dan_gilbert_asks_why_are_we_happy.h...
Working link:

http://www.kypost.com/dpp/news/region_central_cincinnati/dow...
Well, everything needs a comparison point. Compare to New York or LA :)
Google needs guidance like this all around. (To be fair, recent trajectory is already good.)
Chartreuse is basically the fluorescent green colour of 80s (and now!) fashion.

Strong fluorescent colours, particularly the pink, do terrible things to my eyes in some circumstances particularly when they have contrasting writing on them.
I really want to switch and get the Incredible or the EVO 4G on Sprint, but I'm too addicted to Instapaper which is iPhone only.
Why am I still reading about bad reception in San Francisco? I've been hearing about this for years. Why hasn't it been fixed? Is there some technical problem?

Genuinely curious. (Not interested in conspiracy theories or guesses, though. I can come up with those on my own.)
It's worth noting that crackers have been working on the Starcraft 2 battle.net for months and still don't have working multiplayer. Server emulation is a lot harder than cracking a single player game.

The future of profitable software is in architectures that allow you to keep a significant portion of the code on your own servers and only "sell" the client application.
But that puts you in a tough spot: deciding you know a legal issue better than your lawyer. Similar to telling your doctor "OK, fat and salt are bad for me; but I like them so I'm going to keep eating them". Why did you even ask?
Apropos your first example it really was O(n^2) all the time, I just ran a bunch of tests on various optimization settings and the strlen gets called every iteration of the loop.

I think you owe 'bwithe' a beer.
I'm not an expert. I'm just passing along what I hear Prof. Bea of UC Berkeley saying (and that makes intuitive sense to me).

One of the big risks of the top-kill procedure is a kind of "you push in here, it pops out there" problem. There's a big pipe down into the ground, right? It's constructed in segments. We have limited amounts of information about what condition it's in.

There is risk that they throw mud down, that does indeed slow or stop the current flows, but the flows find a new path busting through the pipes or the joints between segments - and the net result is a flow just as bad or worse as before the top kill but even harder to fix.

That they've only so far "slowed" the flow doesn't give me much encouragement yet. Both plots ("it works" and "it fails and makes things worse") start that way.
FWIW, I have an unofficial third-party Instapaper client for Android on the Android Market, still needs a bit of polish though, nowhere near the user experience of the iPhone client.
The ancient Greeks even had an initial stream engine, but never put it to practical use, relegating it to parlor/temple game.

http://en.wikipedia.org/wiki/Aeolipile
This reminds me of an investment strategy Iain Banks described in his novel Complicity: Leverage yourself and load up on the most unethical companies you can find.

This is because there is a lot of money that seeks to invest only in ethical business, so the prices of unethical companies are permanently depressed from their true value, and in the long term the return from their dividends should thus beat the average of the market.

It's scary how it almost made sense.
While Thorium reactors are cool and all, they aren't necessary. It's not like we're about to run out of uranium any time soon. Hell, you can take your basic 1970's uranium reactor, incorporate everything we've learned about nuclear safety over the past 40 years, throw in some generic improvements to basic turbine technology and have a fully functional power plant that will do a splendid job for decades to come.
I jumped because I'm in NYC. I thought I'd be disappointed but I love the custom keyboards (swype) and that you can press and hold (aka long press) the search button and say "Directions to 88th and 2nd" or "hacker news" or "pizza" and it magically does what I want it to do. As such, I actually think android is the better platform for people who don't use apps.
> I'd rather take greater risk and relax while I'm driving.

I'm sure the rest of the people around you appreciate you making this risk assessment on their behalf as well.
And she stops on green lights because of people like her.
If you're aware of what they're doing with your information and you still shop there, it is NOT an invasion - it's a price. There are lots of items I consider too expensive and that buying it would be an invasion of my wallet. There are lots of expensive things I buy that I'm ok with paying for.
Even if the keys are 128 bits long, if there's only 10000 of them, it doesn't do much good.
there is a million and one reasons that have gone over the benefits of web applications.

as for "What happens when we don't have cell reception or and Internet connection?"
that seems like a solvable problem to me. (and web application can work offline these days)
Hm. We have one in town - 3 roads, 2 lanes, one of which doesn't go all the way around. A "map" posted 100 yards in front listing all the options. I've seen people stop to look at the map before going on. This is not more efficient.
Too bad Aza Raskin's already got a gig.
You're right, I should have left in 'int len = strlen(z_terminated);'
Winners of Sunlight Labs 'Design for America' visualization contest
Keep designing and we'll end up in a hole. Look at brake lights. First just two little lights. Then big, reflective lights. Then another light in the rear window. Then one on the mirror. Soon every car will look like the Vegas strip. Why all this inflation? Because we get lazy the more obvious the light becomes? How about one tiny bulb, that you have to really strain to see. Cheaper, keep us all "in the drivers seat" instead of making our way to work in a zombie state.
I wish there was software to do this. There's an app that does tiling for two or four windows, but that's not enough for a 30" IMO.
It's nice to see this coming from Blizzard, but it's not the 'full' story. They are just counter-acting piracy of the game by adding value through Battle.net. But they will defend Battle.net to the death.

The statements sound progressive and to a point they are, but this is just accomplished by moving the battle somewhere else. It's a lot easier to squash people trying to create alternate Battle.net servers/networks than it is to squash all of the cracking groups out there.

At least Blizzard is a company that is known for not abandoning their older titles (IIRC, you can still connect to Battle.net from the original StarCraft).

See:

- http://en.wikipedia.org/wiki/Bnetd

- http://www.eff.org/cases/blizzard-v-bnetd

[On a side note...] I came across this Battle.net 404 page while searching, anyone know which came first?

- 404 Page http://eu.battle.net/starcraft-universe.shtml?rhtml=y

- Original http://knowyourmeme.com/system/icons/185/original/nickcage.j...
He's also just told everyone of his millions of readers to by BP, even at a small percentage uptake the prices should lift a little now? Once they start rising then people will think it's for a good reason.

Basically I think he's gaming the market ;0)

At least for today he won 3.5-5% on his gamble depending on the exchange.
The blowout preventer has a valve. They turned it. The oil didn't stop.
The last I heard, there is a lot of red-tape dealing with permitting and placement. Plus, the geography of SF requires a lot of cell locations.
Their progress was hindered http://www.escapistmagazine.com/news/view/100197-Blizzard-Su.... The costs of a lawyer will likely stop anyone from continuing to crack it, since I'm guessing these guys are mostly computer science students having some fun.
What ugly stick?
Lawyers run startups all the time. They're called law firms.
tl;dr version

1. crappy at&t service.

no argument here, except i've yet to find a cell provider that doesn't have crappy service (chicago), including sprint and verizon.

2. apple app store policies and requisite adobe/flash dig.

get over it. some people like consistent ui controls between apps (hello, HIG) for a less confusing user experience.
and really folks, flash has never been allowed to be in the store, yet somehow they've built a 200,000+ app ecosystem worth > $4B in revenues.

3. I'd have to buy a new iPhone for 4.0

let's breeze past the android fragmentation topic. 3g, 3gs, and the to-be-name next version iphone are all capable of supporting 4.0. the author has a 3g.

Ultimately, my reason for switching can be summed up thusly: I used to feel that, to get the best smartphone software and hardware experience, I had to live in Apple's walled garden.

like the other points, this is highly subjective and up to each individual. in my opinion, having played with the droid, incredible, and hero, the best hardware/software experience is inside the apple garden.
Can you give concrete examples of things that needs to be totally revamped, or are you just parroting the Apple fanboism here?
That's pretty obvious, but since that was the requirement that's what you do.

For all you know the length of the original string is kept around somewhere for future reference when the buffer is re-used, it's not uncommon for buffers used like this to be limited to some fixed size larger than the maximum expected string length + 1 for the terminating nul char, and to have a string copied in to a buffer for processing.

You're in deep trouble when you try to insert stuff into strings like that though...

The bytes that got condensed and are wasted would be wasted even worse in the way you describe, if you re-allocate the memory then you'll have to free the original one, leaving the larger portion sitting unused, instead of just a few bytes...

Sure, that could be re-used by some other call to the allocator by a different part of the program, but the most important issue here is that that was not what was specified.

Whoever spec'd it needs it like that, so that's what gets built.
I know a divorce lawyer (no I'm not divorced) that says to the other lawyer "cut the crap, come to terms immediately, I won't stand for pitting these two people against one another just to pad our bill". He's my hero.
This post helps raise some of the issues. I agree with webwright that it's just one factor though. It seems like considering pre money valuation as an output aligns you with the kind of thinking on the other side of the table - though I'm not an investor so can't really say.

That said, the big one seems to be finding an investment partner that you really like, that will be there through the ups and downs and who has well aligned motives.

Either way, what I can say from experience is that it is very useful to understand how the math works backwards and forwards. Investors go through this many more times then we do as entrepreneurs. So the better you understand the financial administration aspect of raising money the easier time you'll have when the conversation goes there. And you do want it to go there.
One just has to wonder will the new hire bow to A/B testing for 40 shades of green Android logo should be colored…
Great post! I'll paraphrase Scott Rafer: "An entrepreneurs success should be measured by the cash he puts in his pockets." By that measure, I think Dropbox is currently a success-- Drew is (or should be) making more money than he could if he'd gotten a job instead of founding Dropbox. For Drew, it'll be MORE successful when it exits. But if it crashed/burned now, it'd still be a success for him.

Of course, every startup has a different objective-- and every stakeholder has an objective.
This is closer to how I would do it in practice.

void condense_by_removing (char *z_terminated, char char_to_remove)
{
char *next = z_terminated;

while (1) {
while (*z_terminated == char_to_remove) ++z_terminated;
if (!(*next++ = *z_terminated++) ) break;
}
}
A win for Google, and a loss for HP. These types of thing tend to lead to cherry picking. Google will end up with many of the people Matias Duarte considers to be winners, while leaving HP with a higher % of dead weight
People Are Going To Copy; So Build A Better Business Model
One interesting data point:

I popped over to SF for a week, taking with me my UK 3g iPhone. At no time did I have less than stellar reception from AT&T. I travelled from SF to San Jose or so, it seemed pretty solid to me.

Is the US version of the iPhone different hardware? :/ Maybe it's only crappy if you have a contract with AT&T? Maybe 'roaming' phones are given priority? idk...
Ditto, and I'm also regularly vexed by Apple's neurotic control over the iPhone platform and sync process. It took me 45 minutes to put an audiobook on my phone the other day, and that was after it told me syncing would cause me to lose 30 apps (or all of them, if I decided not to sync applications at all).
No. The real-life risk to lack of GSM coverage is that people can't use the phones during emergencies, and that a huge variety of industrial and municipal control networks that piggyback on commercial GSM networks will be rendered inoperable.

As for the markets, what does the SEC do when they get shut down by an electronic attack, other than hold a press conference?

And yes. I'm pretty sure you should just take my word for it on the utilities stuff.
I don't have a kitchen computer (Well, technically, I have a laptop which I sometimes use in the kitchen,) but it's the kind of thing I've always wanted if I could find a machine that would fit my needs exactly and I had the money.

I would like to use it not only for recipes, but also calenders and email, as well as seeing the weather and the news and maybe checking Facebook and the like. For me, not sitting down in my office just to check the weather or morning traffic helps to prevent me from accidentally living my life in the office.
It's considered old-fashioned because in the olden days, you didn't really have a choice. Programs started on mainframe systems (client/server with a very dumb client) then moved to PCs once they had enough horsepower. For most applications, a network architecture was just not feasible.

About the same time the Web was spinning up, network bandwidth and computer performance both started to drop in price, giving software designers the option of retaining a portion of the processing on their end. While it does not replace the standalone desktop app, a "cloud" app affords many advantages which are too great to ignore. (Compare Google Maps to the Road Atlas CD-ROM.)

You make a good point about "what happens when we're offline". We suddenly can't use those awesome cloud apps, but that's the nature of the game -- these apps do things which are just impossible for a standalone app to do. Networking is the price of admission.

I hope we'll see a popularization (commercialization?) of mesh networking in the not-too-distant future. Pervasive mesh networking becomes more and more feasible as we have more and more wireless devices around us, and while it comes with its own set of unique technical constraints, it would go a long way to achieve a self-healing network at its outer edges.
Linux for Consumers: MeeGo Updates
They let a former politician on Dancing with the Stars, I would think Ballmer would have a better shot.
I'd spend a little more time in my car on an empty road than less time in a typical downtown, and this is hardly radical. Obviously there are situations where I'd rather spend more time in my car.

My issue is not with any particular intersection design. Maybe the roundabout was better in that Dutch city than a traffic light, and probably all things considered, some intersections will be better if drivers are forced to pay more attention. What bothers me is the assumption that there is no cost to forcing people to solve puzzles when they otherwise wouldn't have to. You can't have something so important as an afterthought.
"Apparently replacing a broken phone resets your contract date."

What? This is legal in the US? oh dear...
App Store analysis: Here's the difference between the iPad and the iPhone
question: why didn't they try this first before they tried the "drop a big box on it" method? seems like a much more sensible solution.
Some things that are better in Eclipse: refactorings. Adding method parameters, changing their order, extracting methods, promoting or demoting classes, etc. At least when it comes to Java, Eclipse seems to have more options and a greater success rate than VS2008 with C#.

Debugging Java with Eclipse is about the same as debugging C# with VS in my experience, though it seems that VS's output console is slower than Eclipse's, and both are slower than a pure terminal.
People are addicted to money. That includes you and me.
This isn't exactly on topic but wow, having now used to HN, I can see that Reddit really has bad commentary!

Reddit was the best thing in the world when it happened but I'm not missing it at all since I left around two years ago.
You make risk assessment on behalf of other people anytime you choose to drive. If you see anything wrong with this particular risk assessment on behalf of others, say what it is so I don't have to guess.
DHH: Being at the right time at the right place is not the secret ingredient.
According to this article your options when deciding what to do are: be completely introspective and derive a conclusion purely from internal feelings, or be completely reflexive and derive a conclusion solely from external information.
Good idea. I'll try to think of a way to integrate something like that.
"What do you consider a commercial success, then?"

A commercial success to me is the ability to live comfortably off of the business (and quit your day job). I suppose Patrick has quit his day job for $30K/year, which I think will make it difficult to survive without savings. (even in Japan).
Of those 400 million apps, the best guesses suggest that fewer than 10% of downloads are paid. Estimates have put the values at about 10-20 cents per dollar app. The costs are fixed though, so they do make much higher profits on more expensive apps. But the app store ecosystem hasn't made that a huge factor.

Even under optimistic assumptions: 100% profit, average sale price of $5, 15% paid downloads, the numbers are not good:

400,000,000*0.15*5*0.3 = 90,000,000

That's nothing compared to the billions they are posting in profit each quarter.

The hardware margins are also almost certainly much higher than 20%, probably over 30% on a lot of the higher end hardware.
They won't. The app does work like a Twitter client when you're inside it though. Still some users missing that, so we're working on something to communicate the process better.

It's actually been interesting to see how hard the new wave of privacy concerns are hitting the apps. We didn't think we would need a privacy policy for a while; but our /privacy got 18 hits without anything existing there, and without it being linked to.
Yeah. Basically, that's it. They don't even have to litigate until the end of time - just until you run out of money, and unless you're made of it, that won't be all that long. Meanwhile, while you're defending yourself, you're not running your business, or being a parent, or really anything. Maybe you'll settle out of court rather than go through that - but the key is, they don't really care.

I sometimes think I should go to law school in order to figure out a way to get rich breaking that system.
After enough of these articles, I'm fairly sure they did it for the page views.
Have you tried places like Elance?
Is he going to email a daemon that answers the questions?
I don't know about keyboard mappings. I'd rather press F10 to step through code rather than apple key + Shift + P or whatever it is. I'd also rather press F5 to debug than apple key + enter. I also like that tab in visual studio tabs lines if you highlight them instead of replacing them with a tab like xcode does.
Agreed, Swype is utterly fantastic, any other keyboard input feels primitive in comparison.
That assumes I know enough about law to be able to tell. :) I do know that Germany has really odd laws about cease & desist notices. (receiver has to reimburse legal costs of the C&D - even though they're probably overblown)
Maybe this page: http://critiquewall.com/2007/12/10/blindness
While i think that the current 2.2 UI is great, one thing that always striked me is the inconsistency of colors on widgets (well, since there are widgets, not always ;) ).

For example, the google buzz widget, youtube widget and settings widget is black.. facebook and twitter (facebook came preinstalled) is white/blue. It'd be ok for non preinstalled apps.. also atleast it should be skinnable. LevelUpStudios widgets are a good example of skinnable (Beautiful *). That's more of an issue of 3rd party components though, as i believe widgets (like apps) use the correct theme per default and 3rd parties have to change it.

Apart from that, i have no complains. But what do you know.. maybe the PalmOS design god comes up with some surprise :)
As far as we can tell, the only users who have been confused are ones who have followed HootSuite short URLs.
Porn. Lots of it.
I was riding with my friend from Romania. He had been in America for a few years, but on a college campus and had never driven here before. We were out of town and had a rental car. At the very first red light, he stopped, looked both ways, and then crossed a three lane road. I FREAKED OUT. I later realized that it was completely safe, and I was just upset because I didn't want him to get a ticket...
WIth 3G GSM and Wifi, there is hardly a time when a modern American would not be able to be 'online' but be able to use a phone/pad/laptop/whatever.
The only time in recent memory I can recall NOT having on-demand, relatively high speed internet access (or cloud access if you will) is during takeoff/landing on a flight. I wasn't allowed to use my gear then ANYWAYS.
I guess my main point is there are millions of us between NYC and San Francisco that don't have these issues and are happy with the iPhone. I've just never had any issues, but that's the price I pay for living in crappy city in a red state. Totally understand switching if you have bad service.

BTW, my experience with NYC is that the bad spots seemed "localized". Up in Washington Heights where my brother lives service is fine. But maybe that neighborhood is the boondocks by Manhattan standards.