HNHacker News
TopNewBestAskShowJobs

eipi

44 karma · joined January 12, 2012

submissionscomments
eipi··on PyCon Code of Conduct changed to avoid public shaming
Until the day a man feels equally comfortable telling a sex-related joke to a woman as to another man, all such jokes are, by definition, sexist. We as a society are not open towards sex and the real sexist men feel that it is to their advantage that women should feel more embarrassed about sex jokes, even a woman have no reason whatsoever to feel that way.
eipi··on Two Billion Pixel Photo of Mount Everest (can you find the climbers?)
Wow!
eipi··on Programming is not a craft
There are two kind of "technical" people. The "Science" kind, and the "engineering" kind. If you appreciate the "beauty" of an mathematical equation, or the "elegance" of a proof, you are the "Science" kind. If you appreciate the preciseness of a tool, or speed to achieve a task, you are the "Engineering" kind. Science provide the backbone behind engineering, but engineering re-invigorates science. Unfortunately, programming can fall into either categories. Argument like this is mostly pointless without a specific context. As a programmer, it is a life long effort to find the "zen" of the two.
eipi··on World's tallest skyscraper to be built in just 90 days
Because city and local officials make huge profits with these development. Remember, land is owned by the government. And no one is accountable for failed investment. Cheapest materials are used, getting done fast is important because the developer wants to get out of it as quickly as possible. It fits the prevalent theme in China right now: get rich quick and leave the country fast.
eipi··on Diffing code by program structure (not by text)
For one, it will be useful to catch cheating program homework that simply renames variable names and re-arranges function definitions.
eipi··on The Evolution of a Python Programmer
Memoized version:

  class Factorial(object):
    def __init__(self):
        self.n = 0
        self.fact_n = 1

    def next_fact(self):
        self.fact_n *= (self.n + 1)
        self.n += 1

    def prev_fact(self):
        self.fact_n /= self.n
        self.n -= 1

    def fact(self, n):
        if n == self.n:
            return self.fact_n
        elif n > self.n:
            # start from self.n working forward
            self.next_fact()
            return self.fact(n)
        else:
            # start from fact_n working backwards
            self.prev_fact()
            return self.fact(n)


  fobj = Factorial()
  print fobj.fact(6)
  print fobj.fact(8)
  print fobj.fact(3)
eipi··on Waking up at 5am to code
This is essentially what I have been doing for the last 6 months and it works great for me. But it only works great because 1) I go to bed at 9 pm - I am literally falling asleep with 5 minutes. 2) Coffee is only allowed before 9am.