HN user

cgmorton

75 karma
Posts0
Comments34
View on HN
No posts found.

Eh. Your construction is perhaps easier to understand if you've never used the language, and are trying to learn it just by reading arbitrary source code. But who writes code for such a person?

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)

Undo 13 years ago

The correct solution would be to tell you what's happening.

"Your data will be deleted in 24 hours. You can undo this deletion at any time before then."

> Second: Six months, you say? Can any of us think of a cohort of job seekers that routinely needs to contend with 6+ month employment gaps? I wonder, maybe, just maybe, do you think that has a powerful "objective" stigma attached to it disproportionately often might find it difficult to compete equitably in the job market? I wonder which 50% of the population I might ask to find out more about this.

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.

They wouldn't even need to trade securities. Just search the future data for some successful tech IPOs and then invest in those companies early and heavily. Returns would be fantastic, and the risk of feedback from your future-influenced actions would be much lower.

Pixels don’t care 13 years ago

Or, one was a good salesman and the other was not. Or maybe the second one was strapped for cash and really needed the sale.

I'd rather not theorize until we get some more data points.

I played a different game called 'which one appeals to me more on first glance'. I ended up with a perfect 10/10 split.

Could it be that different fonts will be more aesthetically pleasing for different uses? Even if they're typographically similar??

My question is, what are you doing 'enjoy[ing] things that you can buy with money'? Hasn't it been well enough established that things don't make you happy? The Greeks figured that out two thousand years ago, guy!

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.

Singularity Chess 14 years ago

This sheds some light on this comment about the pawns: '(Move "forward" indicated in white.)' The 2006 picture has white lines and this new one doesn't.

Life as a Service 14 years ago

This argues equally well for completely supporting the family indefinitely for any reason. The only difference between paying medical bills and paying for the whole lifestyle is a matter of cost, and medical bills can be really expensive.

Doesn't it bother you that an even-handed application of this principle leads to absurdity?

Life as a Service 14 years ago

But then you can easily, heck trivially, argue that people should be forced to exercise or to eat a particular diet that makes them more productive. Look, more goods and services are rendered! It's a public situation!

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.

Hold on. I might have misread, but I thought the point was he -didn't lie-. He put 'Mensa' because he was in Mensa. It stood out because so many other people had an 'education' section at that spot on their resumes.

If the universe is infinite in size, does that automatically imply that it is infinite in mass?

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...

Everyone who is getting angry, listen:

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.

Tell, don't ask 14 years ago

It's an interesting point about the speed. In this case, since it's just a function pointer, there's no polymorphic overhead, so avoiding branches is a no-brainer.

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.

Tell, don't ask 14 years ago

I'm not clear on how that makes your code more maintainable though. The first case makes it explicit that any of the actions can fail to occur, whereas the second one, on first glance, seems to have all the actions occuring. I, as a newcomer to this code, will almost definitely make that mistake, which will make debugging or maintenance harder.

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-).

So all the clever people have concluded that this system is useless, because you can pull a gun on someone and force them to play the game. Not to mention: it's not even that much entropy! So let's all just forget about it move on with our lives, right?

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?

DIY B&B 14 years ago

If my friend grows tomatoes in her back yard, should I be prohibited and fined for eating one without it first being inspected?

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.

"This is the problem of intelligent people doing stupid things for selfish reasons."

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.

Why go out? 14 years ago

This is actually really easy.

"but I need to go out a lot (every day, or more, if I can help it"

Therefore, you are an extrovert.

Do What You Love 14 years ago

So you're planning to buy your kid a ferrari, because he wants it?

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.

Take my money, HBO 14 years ago

Okay lets do some simple math on this.

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.

I think the confusion here is that 'short selling' is a misnomer - it doesn't involve any merchandise at all.

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.

There's a lovely browser addon called 'Facebook Disconnect' than blocks all third-party calls to the Facebook API. Available in Chrome and Firefox, and probably others.

Not to be glib, but has this guy never heard of IRC? First thing I do if I'm learning a new language is join the IRC channel. Frankly, there are smarter people in there than you're likely to find at a local meetup.

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.

"In return, you must recognize that the success of the projects on which we work together depends largely upon the degree to which you treat us with respect, both as skilled professionals and as a diversity of autonomous living people."

It's probably this part.

Another excellent trick I read somewhere is to map 'jj' or 'jk' to esc when in insert mode (so 'inoremap jj <ESC>'). As a digraph they never occur in a natural language, so you'll never type it accidentally. And you can hit it on the home row easy-peasy.

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