Better HN
topnewbestaskshowjobs
Log inSign up

bcoates

5,109 karma · joined Jun 27, 2012 (14y ago) · 1,639 submissions

ben blueskylabs com
Submissions

comment 14y ago · link · parent

Why don't the anti-patent people use the simpler rule "Software cannot violate a patent".

So if someone makes a physical invention that does something they can patent it but if it's something a general purpose computer can be programmed to do, writing that program does not cause the computer to violate the patent.

comment 14y ago · link · parent

That's fine. Trade secrets are already how most things work in software and it's a much better model. I don't want their dumb ideas; I don't want their bad code; and I don't care about not being able to repurpose subsidized hardware.

All I care about is removing the veto power the patent system gives random strangers have over my ability to develop things they have nothing to do with.

comment 14y ago · link · parent

I don't think the average internet user, or even the average early adopter/techie type, knows what TechCrunch is and is even less likely to know about random VC firms. It's all inside-baseball stuff to users.

comment 14y ago · link · parent

Electricity isn't very fungible at all, at least across space and time: It is expensive to transport and almost impossible to store. The limiting resource on power production is facilities, not fuel.

Any electrical power source that doesn't displace a power plant is a toy.

comment 14y ago · link · parent

3^n gets you a Sierpinski gasket and 4^n Cantor's dust

comment 14y ago · link · parent

Give up on the idea of an apolitical, independent bureaucracy and move to the patronage ("spoils") system. The government becomes incapable of credibly promising rents beyond the horizon of the next election and the value of monopoly rights gets priced more appropriately as a wasting asset.

You could give existing civil servants tenure both to be fair to them and ensure a gradual transition.

comment 14y ago · link · parent

But the right answer isn't "avoid OO", at least not any more than the answer is "avoid if statements". The answer is to use the library function your language already provides to solve the problem in front of you and get on with your life. This is something applicable to any paradigm or language.

comment 14y ago · link · parent

The big problem with the ppoop paper isn't that OO is bad, it's that it confuses OO vs Procedural with YAGNI vs Extensibility. (also, both the "hacker" and "OO" solutions are lame as OP points out)

If you actually have a reason to believe you need a gold-plated general-case OS identification system then throwing all those patterns at it is no worse than the nested-if spaghetti procedural code that would be the naieve procedural solution.

But in both cases it's just a stupid answer to a stupid question ("How do I overengineer a string->string table lookup?")

comment 14y ago · link · parent

I live in a reliably Democratic area of California and I've both seen and been in long poll lines.

I'm not saying there isn't somewhere where local politicians are conspiring to suppress turnout, but often long lines are just a matter of understaffed or under-hosted polling places, which presumably means that the various campaigns would rather have their election-day volunteers calling people or driving them around than running a polling place.

comment 14y ago · link · parent

US elections are an adversarial system run almost entirely by volunteers. If you don't like how it works in your area or think it disadvantages your guy, you don't have to wait for anyone else's permission to do something about it, you can just create a polling place or volunteer at one, or go help people vote.

There is no shortage of money, they can support all the volunteers they can get.

comment 14y ago · link · parent

Nate Silver predicted a range of outcomes including closer losses and victories for Romney. Republican "Get Out The Vote" outperforming history was probably a necessary condition of that 10% shot at winning. Instead it looks like the Romney campaign dropped the ball on it. No conspiracy theory needed.

comment 14y ago · link · parent

One thing you have to watch out for on Intrade-Betfair arbitrage is the not insignificant risk of not doing the trades you think you're doing. I know Intrade has rules that various events will cause trades to be stopped and completed trades will be undone. Betfair might as well, but the two markets don't have any synchronization on when or why.

Since you'll constantly have many times what you expect to gain in a day at risk on the markets, a single rollback event could put you very deep in the red.

comment 14y ago · link · parent

Why? It's one thing if it can be framed as something you intentionally did, but as long as it's deniable, there's lots of folks for whom there's no such thing as bad publicity. As a politician trying to stay in the limelight Santorum qualifies.

comment 14y ago · link · parent

Are the fraudsters using the charity website itself for confirmation that the card works?

Could you run them off by just always displaying success for any sane-looking small value donation, without leaking the result from your payment processor?

comment 14y ago · link · parent

I very rarely experience chrome crashes, but when it happens, it's always the entire browser. I'd be a lot more worried that crashes almost certainly imply security holes than how much it interrupts my browsing session.

comment 14y ago · link · parent

I was getting nag emails from facebook on a test account. I did a password recovery and then went to the delete page listed here: http://www.facebook.com/help/224562897555674

When I try to login or do account recovery with the email address linked to the account it, I get

  No Accounts Found
  The email you entered does not belong to any account.
The account didn't have any "friends" so I'm not sure if the account vanished or is just not usable now. This was in September 2012.

comment 14y ago · link · parent

That's a compelling article and I think I'm going to be a lot more cautious about using pie charts in the future, but the thin-doughnut design they're using here looks OK to me.

When you're summarizing coarse relative size across arbitrary categories, bar charts and tables give your selection of categories too much weight: everyone looks at the biggest bar or the biggest number and it's really hard to measure a long tail distribution visually.

If the message you're trying to send is, "nothing but X and Y matter, everything else combined is tiny", I still can't imagine a better visualization than a pie (or a doughnut).

comment 14y ago · link · parent

Serious question, what's wrong with doughnut charts?

comment 14y ago · link · parent

You can't do it with that syntax. 'auto' never infers constructor calls, just takes the static type of an LHS to capture a temporary into. You'd have to use a non-constructor template function that inspects the type of its argument to guess what kind of map you want.

  const auto TagDataMap = map_initializer( { "foo", { 1, 20, func }, ... } );
where map_initializer would be a template function that inspects the typedefs of its std::initializer_list<T> argument and generates an appropriate map.

In real C++ code, this would almost never be what you actually want, though, as the types in an initializer list in C++ do not imply the types being initialized, they are parameters to a constructor to be determined elsewhere.

comment 14y ago · link · parent

This is neat and C++11 is pretty exciting, but one thing that C++ doesn't need is the further propagation of tuples into non-generic code. Requiring make_tuple instead of allowing shorthand was the right decision.

Tuples in python are a reasonable tradeoff between not wanting to declare anything and the hassle of anonymous structure. This doesn't apply C++ where the equivalent is the POD struct:

  //In the olden days we could not initialize a map inline like this
  //Key -> metadata mapping. Unfortunately strutcts cannot be declared
  //inside a template declaration.
  struct TagData { int start; int length; StrToStr mapfun; };
  const map<const string, const TagData> TagDataMap {
    {"title"   , { 3,   30, stripnulls}},
    {"artist"  , { 33,  30, stripnulls}},
    {"album"   , { 63,  30, stripnulls}},
    {"year"    , { 93,   4, stripnulls}},
    {"comment" , { 97,  29, stripnulls}},
    {"genre"   , {127,   1, ord}}};
Creating a named struct pays off when it's time to use the Map, no extra locals or tie() needed to write clear code:

  //for loops over collections are finally convenient to use.
  for(auto td : TagDataMap){
    //C++ created a horrible precedent by making the data type of
    //a map pair<K,V> instead of struct ValueType { K key; V value; };
    auto tdd = td.second; 
    ret[td.first] = tdd.mapfun(sbuf.substr(tdd.start, tdd.length));
  }
http://liveworkspace.org/code/bcd52515fb7161858e974b7ff3c0aa...

comment 14y ago · link · parent

Some parts exist either for backwards compatibility with existing code or to serve very narrow use-cases and should be used sparingly or not at all in new development.

There's also a ton of redundant libraries and language features, resulting in a lot of decisions being arbitrary choices between equivalents. Having the same decision made throughout the code makes everyone who has to read the code's life easier.

comment 14y ago · link · parent

Stop-and-frisk was only new because the newly expanded federal civil rights in the early 60s would have made the long-standing police practice illegal without a special exception. It's not like the cops discovered hassling people based on stereotypes in 1968.

How would a new legal justification for something cops have been doing forever suddenly cause a crime reduction? You'd have a much better case arguing that the semi-professionalization of the police in the aftermath of Warren court rules complicating police procedure caused it.

I'm not sure I understand your larger point at all: Singapore is a police state and people there seem to be pretty on board with it, so until everywhere is like Singapore we shouldn't do anything about it?

comment 14y ago · link · parent

The Huffington post claims Chertoff's company was doing undisclosed public PR for Rapiscan's equipment in The Washington Post, etc. misrepresenting the capabilities of their equipment, which the WP partially confirmed: http://www.washingtonpost.com/wp-dyn/content/article/2009/12...

Rapiscan denies that they hired him to as a government lobbyist, so they're very specifically denying something other than what they're being accused of.

comment 14y ago · link · parent

The 1929 stock market collapse was an accurate reflection of real-world economic conditions, it wasn't a panic crash and it didn't cause the great depression. There are a ton of theories about why the depression happened but pretty much none of them claim fiddling with the stock market rules would have helped anything.

Stock prices during the depression were reasonable, they were just news nobody wanted to hear.

comment 14y ago · link · parent

Select a clump of 6-8 words from the first paragraph and put the in your search engine of choice. Or narrow your browser window to your preferred reading width.

comment 14y ago · link · parent

The SCOTUS doesn't have to rehear the case. They can and sometimes do respond to a petition by just reversing the lower court.

comment 14y ago · link · parent

If there's no right style, then couldn't the SCM just pick one arbitrarily so I don't have to worry about spending time communicating about something irrelevant to getting the product shipped?

comment 14y ago · link · parent

It would be more excellent if it were factually correct. Becoats (note spelling, and no relation) v. The State is a Georgia State Supreme Court decision about search dogs that has nothing to do with the Roberts court, which has been mixed to liberal on 4th Amendment issues.

The rule about locking your glove compartment isn't because the police have less rights to search a locked glove box than an unlocked one; it's because police lie that a search was consensual when challenged, and a broken lock makes that awkward.

comment 14y ago · link · parent

Is it that surprising that there are a lot of good ol' boy companies and that they are perverse in ways beyond just not hiring women?

I don't think anyone is seriously claiming that women are automatically better executives.

comment 14y ago · link · parent

As in Codd's 12 rules above.
1
5152535455