HNHacker News
TopNewBestAskShowJobs

jsprinkles

2,034 karma · joined April 15, 2011

submissionscomments
jsprinkles··on Didn't see this coming: The Goldman Sachs Github Account
Based on your comment, I'd say you're letting him win.

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.

jsprinkles··on A few things to remember while coding in Python
I originally had "don't do that!" in my comment with your exact code, and edited it out for brevity because I've only seen a couple people do it (and they understood the ramifications, which others have told you). If you're interested in brevity, this is as terse as it gets:

    L = [] if L is None else L
jsprinkles··on A few things to remember while coding in Python
reversed(a) and a[::-1] are not equivalent. The former produces an iterator over the given list (with all the mutability dangers that come with it), while the latter produces a copied list. For plain iteration, you're correct, reversed() is better (similar to how xrange vs. range was back in the day); however, for reversing something and keeping it around, the slice syntax is better.

    >>> 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.
jsprinkles··on A few things to remember while coding in Python
It's most certainly not a mistake; Python 3 would probably have fixed it, if it were. It is an (admittedly, strange) side effect of the way 'def' works.
jsprinkles··on A few things to remember while coding in Python
It's not designed to be useful, it just is. Functions are objects, yes, and the def statement brings them into being and assigns them to the given name in the current scope:

    >>> 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.
jsprinkles··on A few things to remember while coding in Python
Because the regularly-named ones got better.
jsprinkles··on A few things to remember while coding in Python
Actually, if you understand the way Python is evaluated (dig in, the core is pretty transparent), it's the only behavior that makes sense in this case. It's also documented as such[1], so it's quite expected. Default parameters are still just as useful for constants, such as:

    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...
jsprinkles··on When a Blow to the Head Creates a Sudden Genius
(Which is why it's being downvoted.)
jsprinkles··on NASDAQ:FB
CNBC is reporting that there are communication issues preventing the IPO from trading. 11:29AM EST.
jsprinkles··on Why Quit? Because the other company has bigger monitors.
I think it should be both. It's a lot harder to see stuff from a distance. Put it in front of me, please.
jsprinkles··on Why Quit? Because the other company has bigger monitors.
Speak for yourself. In operations, I have far too many graphs and widgets and knick-knacks, and I can really use all the real estate given to me (particularly when in command). I have duals and still don't have enough. At my last job, I even stuck a USB dongle on my iMac for a third, but it ended up being a painful experience and negatively impacted things like Exposé.

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.

jsprinkles··on All the oxygen trapped in a bubble
I imagine AWS is one big firefight, and it probably outpaced their retail business long ago. That's from outside observation, mind, and it's a guess (but an educated one).

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.

jsprinkles··on All the oxygen trapped in a bubble
The only recruiting mail I get aggressively is from startups and Google. That's it. I hear all the time that there is a significant talent shortage, but part of me wonders whether that's a combination of people that don't want to work at Google for whatever reason and developers with families that don't want to bet on a startup.

My colleagues in big iron, however, are much choosier about who they hire.

jsprinkles··on All the oxygen trapped in a bubble
Thank you for keeping a good perspective on the bubble commentary. I've been impressed with your (always top) comments on threads such as these lately, and it is always good to consider the perspective that you are sharing.

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.

jsprinkles··on To boldly go where Node man has gone before
To avoid a split-brain validation scenario.

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.

jsprinkles··on To boldly go where Node man has gone before
And which do you think is more prevalent in the world, a CRUD app or a multiplayer game?
jsprinkles··on To boldly go where Node man has gone before
Alternatively, there's an argument that one should not validate on the client to avoid this exact scenario (split-brain validation).
jsprinkles··on To boldly go where Node man has gone before
Well, whatever "medium sized" means, I work on a high-traffic Web application that reuses 0% of code from the client; in almost everything I've worked on, I've found reuse between client and server nearly impossible, enough that they're almost always segregated repositories. There's an argument for models existing on both sides (which is reiterated below), but I have a hard time seeing models as 50-70% of any application.

Just not my experience that this is the case. Though I might be old-fashioned.

jsprinkles··on Richard Stallman Collapses At Barcelona Conference
True enough. I have less of a problem with him than I do those who consider him infallible. They're already at work in this thread; your comment was gray when I replied to it, and the same fate is befalling those who reply to you.
jsprinkles··on Richard Stallman Collapses At Barcelona Conference
Bold comment. Privately, I was disappointed that he was fine after reading the news; I suspect that you're not alone in your views based on that and I had a similar moral debate internally.

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.

jsprinkles··on Richard Stallman Collapses At Barcelona Conference
Actually, if you know anything about Richard Stallman, he was probably dead serious.
jsprinkles··on SparkFun Gets A Subpoena
It went this well because no copyright was violated.
jsprinkles··on TCP Sucks
Too big to overhaul?
jsprinkles··on Facebook Stops You From Posting ‘Irrelevant Or Inappropriate’ Comments
So basically, get rid of Facebook, Jacques?
jsprinkles··on Facebook's numbers
> They can reveal a better search (since their search function is used more than the Google's one).

[citation required]

jsprinkles··on Dustin Moskovitz: Y Combinator’s “No Idea” Round Bad for Silicon Valley
Your telling is overly simplistic.

> 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?"

[1]: http://www.achievement.org/autodoc/page/bez0bio-1

jsprinkles··on Dustin Moskovitz: Y Combinator’s “No Idea” Round Bad for Silicon Valley
> Who chose red / green?

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.

jsprinkles··on Dustin Moskovitz: Y Combinator’s “No Idea” Round Bad for Silicon Valley
> We'll find out after this next YC round.

The lessons learned will be meaningless that quickly. It will take more time than that to discern the real impact.

jsprinkles··on Dustin Moskovitz: Y Combinator’s “No Idea” Round Bad for Silicon Valley
> (It's simple: what makes Apple or Google special, or more specifically, what made them special when they were starting out?).

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!"

jsprinkles··on Dustin Moskovitz: Y Combinator’s “No Idea” Round Bad for Silicon Valley
If you Google that misspelling ("Dustin Moskvitz"), it's a repetitive mistake that only pandodaily seems to make. How on earth can a publication spell his name incorrectly that many times, in multiple stories?

Edit: They fixed it. It lives on in the URL, and a comment below.

← PreviousPage 6 of 11Next →