Hacker News new | past | comments | ask | show | jobs | submit login

Funny bit about this is that someone will give these people millions in funding or acquihire. All for a:

    from random import randint

    choice = randint(1, 6)
    delete = randint(1, 6)

    if choice == delete:
        print "Today is not your lucky day."
    else:
        print "Try again tomorrow."

    print "Today's choice was {0}.".format(choice)

    #I felt like writing some bad python.



FYI "choice" is the name of a function in the random module:

    from random import choice

    if choice(range(6)):
        print "Try again tomorrow."
    else:
        print "Today is not your lucky day."


No one liner? Im disappointed. Did you read the commnt at the end?


    alert(Math.floor(Math.random()*5)<1?"Boom!":"Click!");


    puts "Bam" if rand(6).zero?


    print ("Click", "Bam!")[input()%6==4]
Tee hee.


There's a bug in your code, the chance of deleting is less than 1/6.


While the code could use streamlining by only drawing one randint and comparing it to a static number, the probability of orangethirty's way of doing it still gives the correct probability of 1/6. Think of it as two dice, the chance of rolling doubles is 6/36 = 1/6.


I think the point of the post you're responding to is that the code doesn't actually delete anything.


How could it delete what is not there? Or did you really expect me to write python script with fb graph integration?


I know what you mean. In a sense the backend code is probably pretty simple. But that just goes to show how important the implementation / design really is. I just survived the game, and I thought the spinning revolver wheel is what made the experience.


My point is that the code really doesnt matter in many "startups". Just the fact that someone will buy.


As a programmer I think that well-written code can be beautiful. A pithy, innovative Python script should be worth more than, say, a script that powers a run-of-the-mill to-do list app.

At the same time, I think it's understandable that users and investors don't evaluate startups the way I do, using a programmer's mindset. They're more interested in how well the overall idea has been executed from design, marketing and user experience standpoints.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: