Things you didn't know about Python
speakerdeck.com
speakerdeck.com
It would be very nice if these online slide presentations came with the speaker's notes that actually cover the main points of what they're saying (with explanation). This assumes that these notes exist, but I feel that the slides by themselves are not very valuable.
(No disrespect meant to Armin Ronacher — I use his work every day and I'm a big fan of what he's done for the Python community.)
That being said, seeing these presentation decks has often piqued my interest about some concept or other, and prompted me to learn it on my own. shrug
The duck typing part interested me as it seems a good fit for the problem I'm trying to solve: I have to work with a bunch of objects retrieved from a key/value store, some keys are simple attribute but others define the object class, required keys, value constraints, etc. while keeping the code generic. Are there any good references on this ?
Not all slide dumps are useful, but this was interesting to me.
[1] http://www.dustingetz.com/2012/09/24/StrangeLoop2012-monads-...
really i think it comes down to, for a lot of talks, slides aren't value-add to the audience, they're just a loose outline for the speaker
Huh? I picked at least 5 different points and techniques I can use from this specific slides, some of them with code.
Here is an implementation of `cached_property` I use:
class cached_property(object):
def __init__(self, fget):
self.fget = fget
self.__name__ = fget.__name__
self.__module__ = fget.__module__
self.__doc__ = fget.__doc__
def __get__(self, obj, objtype=None):
if obj is None:
return self
value = self.fget(obj)
# For a non-data descriptor (`__set__` is not defined),
# `__dict__` takes precedence.
obj.__dict__[self.__name__] = value
return valueThe poster said that there are some 19 year olds who are very vocal about their fanaticism and who post 4 times a day.
It's not ageism because it's not generalized to an entire group of people. So if you don't recognize yourself in the comment, it's not aimed at you. Stop being hyper-defensive.
I don't see the comment as ageism. I see the comment as constructing a strawman in order to point out that the more vocal proponents a new technology has, the more attention and interest it can draw on a site like hackernews. It's a subset of the problem that on the internet, in front of an anonymous audience, points of view (or arguments) that are forcefully presented and appear to be logically consistent can often beat out points of view (or arguments) that are less well reasoned and less forcefully presented, even if they are more factually correct.
Thus 'python is dying' becomes a thing because it doesn't have the same level of noise surrounding it as other technologies. The lack of noise doesn't mean python is dying, it means python is less noisy (whatever that actually means).
But to get back to the point I was trying to make. The comment doesn't really say anything about being 19. Sure attach an 'immature' or a 'lacks experience' and now we're trending towards stereotypes that could imply ageism. Same as if zalew had said "a 56 year old condescending, out of touch, past their prime, vocal grandfather of two, great grandfather of 6, fan boy."
But simply sticking 19 next to some other words doesn't automatically imply ageism. And anyway I was reacting to ElliotH's need to defend himself from the characterization made in the strawman argument. If you want to go around fighting all things ageism that's your right and you're welcome to do it. But to spend time fighting strawmen, well, that seems a bit ridiculous. Although, at this point no more ridiculous than the amount of time and effort I've put into this reply. So I guess we're all suffering from the same thing this morning. Must be something in the company coffee.
It's also true.
>What makes zalew believe those posts where made by 19 year olds? Last time I checked, HN did not require age verification or disclosed such information about its members.
Most of the pages linked touting new technologies have an "about" page or a bio of the author.
Also, older devs have enough years of experience with other people --on the job, on the web, on conferences etc--, to know that it's mostly young developers that go crazy over such things.
So, yeah, probably an overreaction for this particular occasion, but it's not so easy as writing it off as "sarcasm".
http://russell.ballestrini.net/explaining-cache-with-python/
Also, you might want to look into Sieve of Eratosthenes, as you only have to test up to sqrt(n) for primality: https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes