75 karma · joined Jan 18, 2012 (14y ago) · 34 submissions
comment 13y ago · link · parent
You might as well spell out:
int iterator; for (iterator = ...
But everybody uses 'i', because it's faster and simpler, takes less time to read, and doesn't fill up your screen so that surrounding elements can be easily associated (e.g. a[i].do(x) vs myArray[iterator].doCoreFunction(element_x) <- yuck)
comment 13y ago · link · parent
Oh, wait, you mean women? For a most of that rant I thought you meant ex-convicts, because there is definitely an objective stigma against them (and they're certainly out of the job market). Now that I think about it, it's possible that the amount of ex-cons in the 6-month+ unemployment bracket, plus maybe ex-mental-institution or ex-rehab individuals, is significant enough to skew the results. The original paper doesn't address this, at least not that I can see.
comment 13y ago · link · parent
Let me tell you, I bought a used car just this year and I appreciate it way more because I didn't bankrupt myself to do so.
comment 14y ago · link · parent
Doesn't it bother you that an even-handed application of this principle leads to absurdity?
comment 14y ago · link · parent
People should be forced to live within 5 miles of work, because they're not being productive during their commute. Also, HackerNews and reddit should be forcibly taken down because of their contribution to idleness at work.
comment 14y ago · link · parent
That is, I can imagine a mass distribution that decreases as it moves away from the center, such that the total amount of mass is finite. In which case these problems don't apply.
I'm not sure whether that's possible though. If space-time is flat, that means there's a specific mass density in that universe, in which case infinite mass exists. For an infinite universe to have finite mass would mean a density that tends to zero, in which case we should observe a saddle shape in the experiments described. That is, unless space is just -locally- (in 14.6 billion light years) flat.
I don't claim to be right. But, you can use this possibility to ease your existential dread at being one of infinitely many near-identical copies. Of course you still have to deal with many-world quantum physics...
comment 14y ago · link · parent
This isn't a test for suitability for the position. It's a matter of signalling.
This is a cheap test (surely can't take more than 5 minutes to complete a grammar test), but with the property that the only candidates who will -fail- it are candidates unsuitable for hiring. Since the author gives no statistics, we can only assume that enough people are weeded out to make it worthwhile.
It's much the same as a FizzBuzz test. I certainly don't feel offended if I'm given such a test at an interview, I just smile and do it.
comment 14y ago · link · parent
On the other hand, if you were actually extending a class to make a DoNothingClass version, then the overhead of dynamic binding plus the function call would make it somewhat slower (branch prediction on a NULL comparison will cost at most 5 clock cycles in a single-thread pipeline, or none if you predict right) on those checks where the DoNothingClass is the one you find. For instance, if you had a sparse array of Class* and wanted to iterate over them, the NULL check would probably be more efficient than pointers to a singleton NullClass, especially since branch prediction will start correctly predicting NULLs more often.
So, you know, trade-offs.
comment 14y ago · link · parent
The only way the second is even -as good- is if I'm constantly holding in my mind the various idioms you've used in the code, in this case that your function pointers are never null but will instead refer to an action that might do nothing. As far as I can tell, this is more work for me, for no gain.
I would love to hear your reasoning why this way of doing it is -better-, as opposed to just -more object oriented- (or -marginally less typing-).
comment 14y ago · link · parent
No. Of course not. What this system provides is a unique -extra- method of authentication. I really doubt this is meant for putting this on your laptop in place of a password scheme. But you might use something like it as part of multi-factor authentication, e.g. into a secure facility. Remember all those movies where somebody's eyeballs are removed/replaced/copied in order to fool a retina scanner? I can't comment on how plausible that is, but I can certainly tell that if it were this system, they could not have broken it, period. I think that's pretty useful don't you?
comment 14y ago · link · parent
Inspections are there because large institutions don't always take the care they should, and as a consumer I sure as hell want -somebody- to look into it. If it weren't a government institution then I'd expect some sort of company to do it, and any restaurant that hadn't gotten inspected I would avoid.
On the other hand I -don't- worry when I use Air-BnB, because it has reviews that signify quality, and because there's not much that can go wrong with sleeping on a couch.
comment 14y ago · link · parent
I'm gonna disagree. What these people are doing is very much the smart thing to do. They make huge, I mean HUGE amounts of money by doing just these sort of things, and yet what was the risk for them? Even those people who are directly implicated by this scandal will probably just have to pay some fines, or maybe even be forced to resign! Dear god how will they survive? Oh that's right, they'll survive off their massive net worth that they stole.
I personally support a minimum sentence of life in prison. Not because I hate them or anything, no, it's a matter, as everyone says, of incentives. In any other crime the magnitude affects the sentencing, and these guys colluded and stole money in the billions, maybe trillions of dollars. If they don't all end up in prison, what does that say to any future banker criminals? It says: steal as much as you want, because even if you get caught there's really nothing we can do about it.
comment 14y ago · link · parent
Screw that. If my kid is the kind of person who wants a ferrari, that will motivate him to get rich and buy one. But I would be really disappointed in myself as a parent if that's what my kid grows up to value.
comment 14y ago · link · parent
If I buy a song off iTunes, the artist gets $.09
Every time I listen to it on Rhapsody, they get $.0022
Some quick division: .09/.0022 = ~41
What this means is that, if I've listened to a song less than 40 times, the artist makes more if I buy it off iTunes. But once I've listened to it 41 times or more, the artist is making more profit if all those listens were on Rhapsody.
Now I don't know about you, but when it comes to songs I like I listen to them a hell of a lot more than 40 times. You say you buy the records you find yourself listening to more often? Then you are taking money out of the artists' pockets, because every 40 listens through the album on Rhapsody is equivalent to buying the album anew on iTunes.
To make it even more lopsided, consider just how many times more you would listen to those songs throughout your lifetime. Buy the CD once, and the artist will never see another cent from you, whereas the streaming services continue to pay them, forever.
comment 14y ago · link · parent
From the article: "In other words, 107% of all Overstock shares available for trade were short – a physical impossibility, unless someone was somehow creating artificial supply in the stock."
That is to say, there were more Overstock shares in the market than actually existed, because they were borrowed from thin air.
With a retailer, the merchandise will get delivered, and then the buyers will have it forever. With 'naked shorting', the merchandise is created from nowhere, lent out, sold, rebought, returned, and then disappeared. The shares never actually exist. But they affect the market as if they do exist - e.g. more shares existing in a company means every share is less valuable, so by magicking these shares into existence the price is equally magically dropped, which helps makes the shorting auto-succeed. It is straight up cheating.
Imagine a grain holding company lends you some paper 'shares' that are stand-ins for X amount of grain. It produces many of these shares, flooding the market with 'grain', and as a result the price falls. At this point their lenders buy up the grain from grain farmers at these lower prices, thus making a profit, and then return the grain to the company who then hands it out to the people who bought the shares. In this way, the grain farmers lose money because their product is devalued, while the company and its investors make money. This is the only mechanic at play: money flowing from the people who create value into the pockets of the market manipulators. Oh, and this 'grain holding company'? They never had any grain to begin with. All they had was the know-how and connections to lie and get away with it.
comment 14y ago · link · parent
It sounds more like the OP's problem was more along the lines of 'didn't have any coder friends', which is a much less universal problem.
comment 14y ago · link · parent
Although personally I type in Colemak, I still use this, just with 'yy' instead. To be honest, it's a barely noticeable slow-down but it's much less stressful for my hands.
There are really a lot of ways to do this. See: http://vim.wikia.com/wiki/Avoid_the_escape_key