HNHacker News
TopNewBestAskShowJobs

h2s

2,206 karma · joined February 26, 2012

submissionscomments
h2s··on Life is wasting my time
What if being aware of this mindset problem and yearning to be more content and calm is just another iteration of the exact same generalised problem of being overly mindful of the imperfections in one's life?
h2s··on EA Apologizes For SimCity Disaster, Says It Was “Dumb”..
My favourite part was this:

    > The good news is that SimCity is a solid hit in
    > all major markets
In other words, "Don't worry guys, I know this looks bad right now, but we're making plenty of money so it's okay". Gotta put something in there to reassure the investors, I guess?
h2s··on Apache OpenOffice Brand Refresh Project

    > I know this may fall on deaf ears, but couldn't you
    > people join forces and create ONE open-source office
    > suite
Most people have already joined forces to create one open-source office suite. It's called LibreOffice. As far as I'm aware, the vast majority of developers who used to work on OpenOffice now work on LibreOffice.

OpenOffice is a brand that survives on the fumes in its fuel tank. I still occasionally catch semi-technical people (tech management types etc) recommending OpenOffice, but invariably it's because they haven't heard of LibreOffice and were unaware that it's the default in most distros these days.

h2s··on Exceptions for control flow considered perfectly acceptable
It was a dumb mistake on my part to mention the 300 range of HTTP status codes.
h2s··on Yes, your code does need comments.
The example given is an example of using comments very effectively as a countermeasure against the confusion caused by imperfect code. Look what it actually uses that oh-so-well-documented ssl variable for:

    if self.ssl:
        relay_host = smtplib.SMTP_SSL(hostname, self.port)
    else:
        relay_host = smtplib.SMTP(hostname, self.port)
Half the constructor parameters and the entire configure_relay function could be ditched completely if this class stuck to a single responsibility and instead allowed the configured smtplib object on which it depends to be injected.

Here's some more comments from that class:

    def send(self, To, From, Subject, Body):
        """
        Does what it says, sends an email. If you need something more
        complex then look at lamson.mail.MailResponse.
        """
Look at that comment: "Does what it says, sends an email". It's a terrible comment. The method should be called send_email, and that sentence should be deleted.

This codebase is a poor example of how to use comments, overall.

    def process_message(self, Peer, From, To, Data):
        """
        Called by smtpd.SMTPServer when there's a message received.
        """
The above comment simply reiterates what happens in some unknown distant piece of code. This is a classic example of bad commenting: somebody could very easily change the behaviour of the referenced code without updating this comment.

http://www.informit.com/articles/article.aspx?p=1326509

h2s··on Exceptions for control flow considered perfectly acceptable
To truly minimise the potential for confusion with this approach, you'd need to be throwing and catching within the same method. And if you're doing that, you might as well just come out of the closet and use goto.
h2s··on Document the Why
People who document the "how", or worse, the "what", generally do so because they're bad at reading code. I work with a few people that do this and they readily admit that that is the reason why they feel the need for comments of the form...

     // set the user data
     var userData = {
The thing that grates with me is that this is apparently an acceptable stance on the issue. These people don't see this inability to read plain code as a flaw, or something they should work on.
h2s··on Exceptions for control flow considered perfectly acceptable
Because using exceptions as control flow introduces a very awkward and strange type of coupling between components: dependence by one component on the presence of another known component higher up in the call stack.

Dependencies between components should ideally be as explicit and as few as possible. Dependency injection is one good way of achieving this, but even global variables or singletons are more clearly self-documenting than exceptions. A piece of code that returns a value or makes a call to some functionality in another piece of code is easy to understand. If instead, that code throws an exception, then it sends the reader on a voyage of discovery throughout the codebase to investigate all the places that catch this type of exception, and which of those pieces of code can ever potentially be higher in the call stack than the piece that throws it.

The only reason we even put up with such complexity in the case of handling errors is that it is the one problem that is ubiquitous to every piece of software ever written and therefore merits its own first-class language support.

h2s··on Exceptions for control flow considered perfectly acceptable
Exceptions exist so that you can treat error handling as a separate concern and thus deal with it in a different area of the code. For example, you might have a REST API which catches authorisation exceptions and validation exceptions from the libraries it calls and turns them into appropriate HTTP 30* or 40* error codes, with runtime or null pointer exceptions instead becoming 500 Internal Server Errors.

An example of misusing exceptions for control flow in this context would be throwing a "caching exception" to indicate that a cached version of the requested resource has been found and is to be returned to the client without any further processing.

h2s··on Exceptions for control flow considered perfectly acceptable

    > Argument by meaningless blither. What distinguishes
    > “exceptional conditions” from “control flow”? I have
    > reached the end of a million element list. This
    > happens one time in a million! That sounds pretty
    > exceptional to me!
Unless you were expecting the list to have infinite length, then this would be a misuse of exceptions. The true logical fallacy here is the author of this post's argument from personal incredulity. The fact that he hasn't yet learned how to distinguish between exceptional conditions and control flow doesn't mean that it's an impossible or meaningless distinction.
h2s··on Programming is not a Glamorous Job
It's the ultimate irony. People of all walks of life will tell you that the way their profession is depicted in the media is unrealistic and silly. And yet we all seem to share the equally silly misconception that those who work in the media are attempting to depict us realistically and failing.
h2s··on Book of the Day: Effective JavaScript
Actually, I think the fact that the referral is payable after any purchase is a red herring. The review author is incentivised by their Amazon Affiliate status to choose words that will make me click on their link and get that money-making tracking cookie into my browser. Criticism of the book would not be conducive to that goal.

I think this blog is an egregious blurring of the line between content and advertising. I urge you to go and look at its archive of posts. Every post somehow contrives to include at least one Amazon referral link. Svbtle is a business looking for a long-term business model, and I sincerely hope this isn't it.

h2s··on Book of the Day: Effective JavaScript
You say you don't understand the problem? Allow me to explain.

Referral links in book reviews are a problem because of the conflict of interest they create. If the author of the review chooses to put a referral link into it, they create a financial incentive to bias their own review in favour of the book. Rather than a means of helping people determine which books to buy, reviews become a hollow call to action with a conversion rate measured in referral dollars. A review with a referral link in it has absolutely no credibility.

On top of that, they call the very purpose of the review itself into question. Is the author of the review really reviewing anything at all, or are they simply writing reviews as a means of generating cash? This particular blog is brimming with glowing reviews of Javascript books, each with Amazon referral links inside. Are there really so many must-have Javascript books on the market? If so, do we really need the dubious help of a blogger to find a good one?

h2s··on Book of the Day: Effective JavaScript
While this book sounds good, to me this looks a little like a shady attempt to make a quick buck off of Amazon referrals. Reassure me?
h2s··on Show HN: I made a site that calculates the market price of items on ebay
Bug report: choosing US, UK or AUS from the country select dropdown causes the form to submit as if you'd typed in the country code as your search term.

This is a really killer piece of kit though. I'm very impressed. It's something I think many of us have idly imagined when struggling to determine a good starting price for a new eBay auction.

h2s··on No more remote work at Yahoo
You make a really good case against remote work. The only thing I can say about it is that you make a case from the point of view of an employer, or maybe an extremely loyal employee.

It may well be true that it's easier to enforce cultural homogeneity on colocated teams, which makes it easier to treat individuals as interchangeable cogs that can be transplanted between different parts of the wider machine.

Whose interest that's in is an interesting question. It's a obvious win for the employer. And employees who want to work for an "apex predator" employer are better off because in their case, utility for the employer is utility for the employee.

The point of the 37signals post is that only "apex predator" companies like Google can legitimately demand this sort of dedication. Given your statement that you actually work at Google, I think perhaps it makes sense that your opinion is what it is.

My point - to sum it up - is that productivity and cultural homogeneity aren't the only important metrics to optimise for.

h2s··on Stanford Female CS Student: I Fight Impostor Syndrome
This has absolutely nothing to do with anybody's X or Y chromosomes, genitalia, or gender identity. It's part of growing up and people of all university majors, professions, genders, shapes, colours and sizes experience it.
h2s··on The Humble Programmer (1972) [pdf]

    In this sense the electronic industry has not solved a
    single problem, it has only created them, it has
    created the problem of using its products. To put it in
    another way; as the power of available machines grew by
    a factor of more than a thousand, society's ambition to
    apply these machines grew in proportion, and it was the
    poor programmer who found his job in this exploded
    field of tension between ends and means.
This is a beautifully succinct and profound summation of the entire history of software engineering. I enjoyed this all the more because I initially skimmed past the introductory page and have only just realised that Dijsktra wrote it.

    As an aside I would like to insert a warning to those
    who identify the difficulty of the programming task
    with the struggle against the inadequacies of our
    current tools, because they might conclude that, once
    our tools will be much more adequate, programming will
    no longer be a problem.
I think this is as true today as it was 40 years ago. In fact it almost makes the idea of "No Silver Bullet" seem derivative.
h2s··on We Should Expect To Pay For Small Open Source Projects
Software engineering is one of the more well-paid professions available. And yet occasionally on Hacker News there seems to be somebody who doesn't feel they have quite enough money yet. Usually they manifest this by trying to top up their bank account with some underhanded Amazon referral link couched within a blog post. Today it's another "open source software should cost money" plea.

Last time I saw it manifested in this particular form, it was Zed Shaw's "Premium Branch Manifesto" (http://premium-branch.org/) in which he breathlessly warned of impending doom:

    > If this balance of power is not corrected I
    > fear FLOSS will actually die. 
I think it's kind of sad that so many people apparently don't see one of the main things I find so amazing about free software. We're a community of people who give stuff away to others for free often for no other reason than the fact that building it is fun enough in itself. This is simply not a thing on this kind of scale in most other professions, and I feel a little defensive when somebody says we should put a stop to it.
h2s··on Vim After 11 Years
Lots of people seem to declare ; or , to be useless keys and remap them. They're two of my most used movement keys in certain circumstances.

I used to have , remapped to <leader> but switched back when I realised what I was missing out on. I'd advise anybody else to reconsider if they've made the same mistake I did.

h2s··on Poll: Would you like to have "hide" button for stories
This is because people who aren't interested in the idea simply move on and look at the next link on the page. It's an enormous selection bias and it makes the results of this poll absolutely meaningless.
h2s··on I'd like to use the web my way, thank you very much Quora
It's good to see a dissenting point of view, but I disagree with your point about a collective sense of entitlement. It's more of a shared set of expectations about how the web works. In fact I'd argue that perhaps this point could be turned back on itself: it's the entrepreneurs who are guilty of a sense of entitlement because they want to build a closed system on top of an open one out of some perceived "right" to acquire signups.

If everybody on the web were using this tactic it would be a valueless platform. The only rational reaction, then, to those that use it, is rejection.

h2s··on What Should We Call the Language of Mathematica?
As far as I was aware everybody was already calling this language "Mathematica".
h2s··on Balancing text for better readability

    1. Open blog post about readability.  
    2. Notice that text is unreadable without zooming in.
    3. Close blog post about readability.
h2s··on Codeq. Code quality as a service
The advantage of this approach is that it can be integrated into a public build process as e.g. a GitHub service hook. This gives the results a URL, which is a powerful thing.
h2s··on Codeq. Code quality as a service
Code Climate (https://codeclimate.com/) is a similar service for Ruby projects that I think does a really good job of this.
h2s··on Aggressive negative advertising by Microsoft against Google.
Microsoft has trotted their old friend "Get The Facts" out again! Back in the 2000s, they ran a very long anti-Linux campaign under the "Get The Facts" banner. Under this program they paid for many dubious "Total Cost of Ownership" studies, all of which found that Microsoft products were cheaper than those based on Linux.

It was a PR disaster for Microsoft as far as the geek community was concerned and they eventually pulled the plug. I can't believe anybody in Redmond actually gave the green light to bring this slogan back. This type of aggression just makes MS look like smug pricks.

h2s··on Why I won't steal your idea
An enjoyable read!

The only thing I would change is the overuse of bold text. When used too much, it detracts from the readability of the text as a whole more than it serves to emphasise any particular sentence fragment.

h2s··on Speaking up

    > The average man has no more power than the average woman.
Can the average woman apply for any given technical position with an equal chance of being interviewed by a person of her gender? When the average woman's colleagues organise a social event outside of work, does she feel as powerful as the average man when she's the only female in a room full of inebriated men? When the average woman's colleague accidentally says something sexist and nobody else notices because she has no female colleagues, is she as powerful as the average man?
h2s··on Speaking up
I think you're right that it's a less overt form of sexism, but I support what you're doing and I hope one day this clicks for Tim and he sees what a minor concession this is and what a positive thing it would be.

I'm a Vim user myself, and a big fan of his work. It's not nice to mention his name in a thread like this, however tangentially related. But given the topic, I thought for once it might be forgiveable to err on the side of those without male privilege.

← PreviousPage 4 of 9Next →