Live data from Hacker News

Show HN: March Madness for Hackers

codersbracket.com

21–30 of 63 posts

Re: Show HN: March Madness for Hackers

#22
post #11

This is awesome! I went to UConn, so I'll obviously hard-code a UConn win there. But I heard on NPR today that, historically, a 12 seed has a 50% chance of upsetting a 5 seed in the first round. If I'm biasing towards the higher seeds everywhere else, that means my code looks like this: function (game, team1, team2) { var winner_team = "Connecticut"; if (team1.name == winner_team) { team1.winsGame(); } else if (team2…

[deleted]

Re: Show HN: March Madness for Hackers

#24
Could you add the last couple years' brackets and stats as an algorithm tester?

Would be cool to run your algorithm against previous years to see how it would have done so you can refine it before submitting.

I'm imagining coloring the final bracket green/red for correctly/incorrectly predicted games in the simulation.

Re: Show HN: March Madness for Hackers

#25
post #24

Could you add the last couple years' brackets and stats as an algorithm tester? Would be cool to run your algorithm against previous years to see how it would have done so you can refine it before submitting. I'm imagining coloring the final bracket green/red for correctly/incorrectly predicted games in the simulation.

Hey yeldarb, Nimit here from Fullstack. Good idea! We did have the 2013 data up last week before the 2014 bracket came out yesterday but will work on adding more years and the comparison to how the previous brackets turned out!

Re: Show HN: March Madness for Hackers

#26
post #11

This is awesome! I went to UConn, so I'll obviously hard-code a UConn win there. But I heard on NPR today that, historically, a 12 seed has a 50% chance of upsetting a 5 seed in the first round. If I'm biasing towards the higher seeds everywhere else, that means my code looks like this: function (game, team1, team2) { var winner_team = "Connecticut"; if (team1.name == winner_team) { team1.winsGame(); } else if (team2…

This is exactly the reason we built this - it's much harder to keep all these various rules in your head while you're making your bracket, but simple to execute in code. Thanks for the awesome example!

Re: Show HN: March Madness for Hackers

#27
This is a super neat idea. Thanks so much for making it!

Some small comments:

I found the tutorial video painfully slow, but maybe you're targeting beginning programmers. All I was looking for was-- what's the language, what's the api.

The determining function could easily be a pure function. I.e., it could designate the winner by returning true, or false, or an enum/constant.

Actually, I think I would prefer this API:

function (team) { return team.off_reb * team.win_pct; }

And then play the teams by calculating the scores for each team and comparing them. But then of course, you can't have different scores depending on the opponent. I wouldn't use that information, but perhaps others would.

Re: Show HN: March Madness for Hackers

#30

This is awesome! I took the time to create a pretty in-depth function only to find out you apparently can't do that :(

Hey mmcclure - sorry about that. We don't have any check's against in-depth functions ;) so maybe there's a bug on our side. Can you send me your function at nimit@fullstackacademy.com and I'll get back to you about what may have gone wrong!
Post reply on HN