Doesn't the world have enough issues without jumping on the "fuck Ulrich Drepper" bandwagon? Keep a mental note that you'd rather avoid him in your career and personal life, then move on. You're heading for an ulcer.
2,034 karma · joined April 15, 2011
Doesn't the world have enough issues without jumping on the "fuck Ulrich Drepper" bandwagon? Keep a mental note that you'd rather avoid him in your career and personal life, then move on. You're heading for an ulcer.
L = [] if L is None else L >>> reversed([1, 2, 3])
<listreverseiterator object at 0x107265650>
>>> [1, 2, 3][::-1]
[3, 2, 1]
To clarify your point, list(reversed(a)) and a[::-1] are equivalent. It's a slightly subtle point, but extremely important if you're keeping the result of reversed() around for any length of time. If you're just iterating at the moment that you use it, yes, they're effectively equivalent. >>> def f(x):
... return x + 5
>>> type(f)
<type 'function'>
>>> dis.dis(f.func_code)
2 0 LOAD_FAST 0 (x)
3 LOAD_CONST 1 (5)
6 BINARY_ADD
7 RETURN_VALUE
>>> g = f
>>> g(10)
15
>>> g is f
True
They're just variables in the current scope. If you're quite clever, your brain is already figuring out that has some interesting implications that some libraries use: >>> import socket
>>> socket.gethostbyname('www.google.com')
'74.125.71.103'
>>> socket.gethostbyname = lambda i: '10.0.0.1'
>>> socket.gethostbyname('www.google.com')
'10.0.0.1'
I will not pass judgement on monkey patching like this, just pointing out it's doable. I know for a fact Ruby can as well.Functions just being variables has useful properties when you're doing something like fancy switch/case type things (the readability of this is questionable, but it's cool to look at it, like a Duff's device):
>>> i = 1
>>> { str: func1, unicode: func2, int: func3 }.get(type(i), func1)(i)
in func3
Also consider something like this, which is how decorators work (and they're incredibly useful), sort of like a closure: >>> def maker(i):
... def ret(x):
... return x + i
... return ret
>>> f, g = maker(10), maker(100)
>>> f(5), g(10)
(15, 110)
I'd be surprised if Ruby couldn't do everything I just did. def f(x=0, y="foo", z=3.14159):
This, however, is a perfectly Pythonic idiom: def f(L=None):
if L is None:
L = []
[1]: http://docs.python.org/reference/compound_stmts.html#functio...You can never go too Star Trek when it comes to cool graphs. It's not a pissing contest, either, honest; I genuinely need all of that information in front of me in a crisis.
They might be hiring at a normal rate but unable to keep up with operational demand -- which is a real pickle of a spot to be in -- or you're right, they're too choosy. I sincerely doubt there's a shortage of folks to work on Amazon and AWS.
My colleagues in big iron, however, are much choosier about who they hire.
That's all, no discussion, just a thanks from at least me and I'm sure a bunch of other folks that feel the same way. It's to the point now where I see a story like this and mentally wager that you're here, at the top, before I click.
Update your model? Don't forget to update your validation in both the client and server. Otherwise, you'll validate something on the client but not the server (bad UX), invalidate something on the client but not the server (bad UX), or corrupt your data slowly when validation entirely fails (bad UX).
Since it's a pain in the ass to remember to update two places when you make a change, you're seeing people make ridiculous leaps of programming ingenuity by choosing a server-side language that allows them to not have to update two places at once, and Javascript absolutely sucks for server programming. Every time I have to do any client-side Javascript I, quite literally, hate my life. People that love Javascript and want to apply it to everything have arguments about the stupidest things, like using semicolons, which is telling about how awful of a programming environment it can be.
Easier: Just don't validate on the client, and make a round trip. If you're doing mobile or on a high-latency link, there's an argument for doing client-side validation but then you just need the discipline to update both sides at once, which hopefully integration tests should help with.
Just not my experience that this is the case. Though I might be old-fashioned.
I'm proud of you for lending your username on HN to remind everybody how truly awful of a person he can be, but I fear that even your clout cannot save this comment from people that love him.
[citation required]
> One day that spring, Jeffrey Bezos observed that Internet usage was increasing by 2,300 percent a year. He saw an opportunity for a new sphere of business, and immediately began considering the possibilities.
> In typically methodical fashion, Bezos reviewed the top 20 mail order businesses, and asked himself which could be conducted more efficiently over the Internet than by traditional means.[1]
Idea: Build a better mail-order business using the Internet. He saw the potential for the efficiency of the Internet and automation to make mail-order businesses obsolete. He didn't look at the Internet and say, "gee, I want to be an entrepreneur, what company can I start here?"
I want to say Microsoft, in Word, and green did not originally exist until later versions (if my memory serves). Not sure that they put spell check in a word processor for the first time (Wordstar?), but I think red underlining was originally a Word thing. I could be wrong.
Anybody know for sure? Now I'm curious, and it's tough to Google.
The lessons learned will be meaningless that quickly. It will take more time than that to discern the real impact.
A couple guys had an idea for a cheap computer and a great search engine, respectively. And they executed it well. You're kidding yourself if you think the Steves sat around and said, "what is it we should do with our lives? We need an idea." They knew what they wanted to do, and did it, and continued to believe in it (in Steve Jobs's case, for his entire life).
It was their passion for the ideas that determined how successful their respective companies were, perhaps combined with traits about themselves. Do you think Apple will ever be as successful without Jobs's dedication? Maybe successful, but not innovative, and doomed to eventually run out of steam. Google is already failing because they are losing focus on the idea that made them great.
I don't think a company can be truly successful unless the people founding it truly believe that the idea will change the world (and how can you truly believe in an idea that you haven't discovered yet, and that you have to go to an incubator to work on?). Of course, this is meaningless in today's perceived-value bubble, which might be why Y Combinator is trying it.
In the end, and I hope I'm wrong, I suspect this will draw out people who are just looking for a cash-out vehicle. "I heard there was money to be made in Silicon Valley, but I don't know what company to start. Help me find an idea!"
Edit: They fixed it. It lives on in the URL, and a comment below.