HN user

bendotc

688 karma
Posts4
Comments115
View on HN
PopCap Update 14 years ago

Who asked? Most of the game industry. This and the lay-offs at Funcom today have been the talk of the town(/Twitter) before they came out and posted this.

I'd be interested to compare the "seek time" though. Platter drive seek times can be pretty nasty, but I'd be interested to see if Dropbox or some competitor could serve up better with network latency involved.

Yeah, I wasn't crazy about the implication that str and int only do this via special built-in magic. In reality, you can overload __new__ to return whatever you want, including object interning.

I didn't mean to "alienate the president" from this in policy position terms, but speaking of rhetorical style and flourishes, it seems a little silly to use "Obama says" to cover anything written by anyone officially on behalf of his administration.

This is way premature optimization, and it's based on a lot of assumptions. Did you know that, on CPython, your integer increment creates a new object each time (outside of the range -5 to 255 or so, IIRC)? Now, xrange might do its own increment, so let's call it even on object creation.

If either xrange or list comprehensions are implemented in C instead of Python, do you still think your version will run quicker? What do you think the likelihood of either or both of these being the case is on your Python implementation? How many name lookups and function calls do you think each version does? Do you think you should find out before writing longer and more complicated code to attempt to out-perform it?

On my machine, your implementation performed ~3 times slower than the naive idiomatic "[0 for _ in xrange(100)]" and closer to 4 times slower when I bumped the list size up to 20000. And your version was ~32 times slower than "[0] * 100" and around 60 times slower when I bumped the list size up to 20000.

So please, don't optimize without measuring and instead just write idiomatic code the first time.

The code, for reference:

    def mk_list_1(size):
        ls  = []
        cnt = 0

        while cnt <= size:
            ls.append(0)
            cnt += 1

        return ls


    def mk_list_2(size):
        return [0 for i in xrange(size)]

    def mk_list_3(size):
        return [0] * size

    from timeit import timeit
    args = {
        "number":1000000,
        "setup":"from __main__ import mk_list_1, mk_list_2, mk_list_3"
    }
    print "Executing %i runs:" % args["number"]
    print "mk_list_1 took %i s" % timeit('mk_list_1(100)', **args)
    print "mk_list_2 took %i s" % timeit('mk_list_2(100)', **args)
    print "mk_list_3 took %i s" % timeit('mk_list_3(100)', **args)
Output on my machine:
  Executing 1000000 runs:
  mk_list_1 took 32 s
  mk_list_2 took 10 s
  mk_list_3 took 1 s

Hey, I see you're new here.

You may be wondering why your comment got down-voted. It's not that we're a community of jerks, I promise. People just really prize a high signal-to-noise ratio here, and while we appreciate that you enjoyed the link, a better way to express that without adding noise is to up-vote the comment.

In general, you should post comments here only when the comment will provide value to someone else. That's largely the rubric by which it will be judged.

This immediately made me think of a quote about folks wanting to get into the games business:

"Thinking that 'Hey, I like playing games, so maybe I'd like making them' is sort of like saying, 'Hey, I really like taking baths, maybe I'd like to be a plumber." -- Jesse Schell

To be a successful game developer, you not only have to love games, you really have to love MAKING games, too.

I looked at "Elder Scroll series" and "Fallout series" and wondered how these met the 30 hour rule. Then I remembered that the advice also suggests skipping all side-quests. If you're only playing the main-quest stuff in those games, though, you're missing out on the best content.

I'm not a big fan on limiting game play in this way, but I also recognize that different things work (or don't) for different people.

Right, again, I think there's a political dimension to this, but I don't think Reagan created the problems two years before he got into office. My gut tells me economic repercussions like this probably lag their causes by several years, and looking at the graph, there's reason to think the problem started even earlier in the seventies.

In short, saying Reagan had a big part in this is a claim I would support, but saying it's all Reagan's fault is clearly untrue, barring time travel.

To be fair, Carter's reign wasn't exactly an economic wonder-time, and I don't think Reagan was influencing the economy that much as governor.

I do think there's a political dimension to the change, but laying the blame at Reagan's feet exclusively seems like simple political point-scoring.

Edit: it's funny seeing this comment getting down-modded. I think I'm significantly more liberal than most people here, but it looks like people are upset that I called out empty partisanship? I fail to see anything particularly inflammatory about what I wrote.

"So you'd bet that if I shadowed 1,000 self-made millionaires while they were building their businesses, and then shadowed a random sampling of (employed) Americans, the millionaires would work LESS than average? Really?"

No, I never said anything of the like. In fact, I said that the qualities more likely to make you successful are also likely to predict working long hours. What I would say is that if you could make two copies of the world, one where entrepreneurs work reasonable hours and one where they work extensive hours, they would generally have better outcomes with the former.

In essence, it seems that working in crunch mode for extended periods of time is a bad habit of highly motivated people.

"Entrepreneurial success generally requires a wide variety of different tasks."

Obviously, there are all sorts of businesses and all sorts of entrepreneurs, but I'm not sure that the data available suggests that working with varied tasks alleviates problems of fatigue. Additionally, the penalties of multitasking are generally well documented. If the tasks just need to be completed and are straight-forward, or if you're in a short lead-up to a deadline, certainly there are times when it makes sense to work extended hours.

I have no doubt that determination and enthusiasm are positively correlated with both success and with working long hours. However, as a rational skeptic, I've yet to see evidence that working long hours has a causal relationship to success.

However, there is evidence to suggest an inverse relationship may exist. Furthermore, hazing is effective in building solidarity, and people are generally more likely to retroactively justify hardship, which makes me think there may be a psychological bias towards overvaluing poor work/life balance.

In my particular line of work, Daniel Cook put it better than I ever could: http://www.lostgarden.com/2008/09/rules-of-productivity-pres...

What he's calling "a mess" certainly is debt.

In money, debt is debt, whether you acquired it by taking out a responsible mortgage or running up your credit card on bottles of Dom Perignon to impress your friends. In software, technical debt is technical debt whether it was wise or not. The point is, you're paying for it when you try to do other work on the project (interest) and it's gonna take time to fix (principle).

Saying "A mess is not technical debt" is silly. The metaphor is useful whether it was a good idea to get into debt or not.

Edit: s/Don/Dom/ -- thanks for the pointer!

While I agree that being defensive at first does use up the most important part of a post, I don't think it necessarily undermines it. If you can disarm people's preconceived prejudices even a bit, it may well have been worth it to avoid the knee-jerk groupthink down-vote that plagues every site, including HN.

To the extent that my use of cliche distracted from point, I am sorry I used it. Similarly, I find meta-discussion, such as critique of the language of each others posts to be distracting from important discussion.

Finally, you should hate the game. The voting system on sites like Digg, Reddit, HN, have very serious problems, and the "rhetorical tricks" like prefacing a post with "I'll probably be downvoted for saying this..." are an unintended consequence of a poorly designed incentive system. Maybe I'm oversensitive to this sort of thing as a game developer, but it seems to me worthwhile to address an incentive system which encourages people to write suboptimal posts that use these "rhetorical tricks".

I'm not advocating for the abolition of self-moderation, karma systems, etc. -- I'm just saying that the systems in place are rudimentary and leave much to be desired.

"And if you feel the need to deploy 'defense' against downvotes, you are either saying things that don't need to be said, or you are being needlessly defensive and thereby undermining your own point."

The place I have used this rhetorical technique (and I'm ashamed to admit I have, 'cause I find it irksome myself), is when I'm posting something I believe is correct or worth considering, but which goes against the overriding sentiment of the site. I believe it disarms people's unthinking, reflexive downvote, though I have only my own experience to draw this from.

Maybe you think this is being "needlessly defensive", but that sounds like someone who's never had a comment downvoted to oblivion only because its sentiment is unpopular.

I'm not really sure why being defensive would undermine someone's point.

"If what you're saying isn't worth potentially being downvoted for, delete it."

The point isn't the negative karma (though that is a motivator for most people), the point is that down-votes mean something is less likely to be read (due to mechanical filtering), or will be read as a troll rather than as a reasonable opinion. People put some stock in the hivemind's opinions.

To reiterate what the post you replied to said: don't hate the player, hate the game.

In my personal experience, the difference between a crappy CFL and a good CFL is huge. Low-end CFLs are dim, flickery, have a large warm-up period and often worse color. High-end CFLs, on the other hand, can have really nice quality light, good color balance (though I used whiter "full-spectrum" incandescent bulbs, so YMMV), and very little in the way of noticeable warm-up time.

You may still dislike CFLs and that's fine, but you may also have just been exposed to crappy ones.

I agree that these are no small feat, and while I honestly think that these things were huge gaps in the service previously, I do applaud the quick implementation of them.

However, even if they could not be implemented immediately, coming out early, before the story really blew up, talking about it openly and frankly, and announcing these changes would have done wonders. Instead, they've been beaten up in the press for the last week or two for their relative silence.

This is pretty much exactly what they should be doing. The fact that it took them several weeks to do it is what constitutes a poor response to the crisis.

Regardless, it looks like they're doing what they should be doing, and I hope it works out both for them and their customers.

You seem to be arguing against a point I didn't make. I didn't say that "Hacker News is more qualified on economic issues than Cato" as you put it. I said that I found the case made in this blog post to be questionable and that this political content is not well-suited to Hacker News.

I was not impeaching the intellectual output of the Nobel laureates associated with the Cato institute, but I do have to note here that none of them wrote this blog post, nor is there any indication that any of them reviewed it. I could further debate your name-dropping, but I've wasted enough key-strokes on this as is.

I agree. And I have no problem with people having their opinions. I know it feels like my own beliefs are in the minority here, and I don't have a problem with that, but Hacker News is always a better site when it sticks to what it's best at: hacking, technology and entrepreneurship. The politics and religion discussions here are always huge distractions.

While "juicy" interface elements are certainly found in games, the "+1" pop-up circle is no more a game mechanic than a text input box is.

(I realize I'm being pedantic. As a game developer, this sort of playing fast-and-loose with words annoys me in the same way people talking about "programming in HTML" may annoy you.)

Regardless, while I think it overstates the case a bit, I do think that that pop-up is actually a good driver of user behavior, at least on a moment-to-moment level.

super() was introduced in CPython 2.2, but it changed in Python3: http://www.python.org/dev/peps/pep-3135/. The link you posted uses super as "super(cls, instance)", but the main article uses Python 3's super, which can just be called as "super()", and it figures out the class and instance.

So no, super really has changed, and the syntax in the article does not work with very old version of Python.

Are you saying people usually ask you to produce your wallet at the beginning of a meal when you eat at a restaurant?

By ordering off the menu, you agree to the price on it. Similarly, when you sign an agreement to pay someone for work done, one would hope you'll pay that person when the work is done. Sadly, reality teaches us that this is not always the case.