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.
Of specific interest to language nerds may be the recent addition of interfaces (http://doc.rust-lang.org/doc/tutorial.html#interfaces), which cover some of the same ground as both C++ classes and inheritance as well as Haskell's typeclasses.
Attempting to alienate the President from an official press release from the White House is pushing a bit too far on a technicality. His administration is responsible for the ideas expressed in that release, whether his name is on it or not.
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
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.
Frank Lantz, Ian's friend mentioned in the article who used to work at Area/Code and now at Zynga NYC wrote a response: http://gamedesignadvance.com/?p=2383