Deck of Cards
Dev tools
web api
SHOW HN2015
How HN took it
9 positive, 43 neutral or asking, 4 mixed, 21 critical, out of 77 comments about the project. Thread score -0.10.
Design: 2 for, 10 againstIdea: 3 for, 3 againstExecution: 0 for, 4 againstPrivacy: 0 for, 4 againstDocs: 1 for, 0 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Simple, clean, straightforward API design
From 3 comments
While this looks to me like a pretty clean and straightforward API, it's definitely not a REST API (not that it claims to be): * The API doesn't really follow HTTP. It allows GET…
alangpierce on HNPretty cool! Love that theres no authentication and I can start straight from curl. Nit: drawing from an empty deck does not throw an error: > curl…
xxbondsxx on HNKudos! Simple and to the point.
jaideepsingh on HN
Good work putting it out there
From 3 comments
Hey, you did a thing and told people [0]! Good for you. Is it perfect? No idea, but from reading the comments here a lot of people don't think so. Who cares though [1]! You're so…
aarondf on HNNice one! Good on you for building a thing and putting it out there. A few comments/suggestions: * You have DEBUG = True in your production Django config. (eg.…
hartror on HNNeat! Nice work! Some are definitely criticizing, but hey - you'll always have critics. Unless they're following through with a pull-request, don't mind them. Great job on…
tjbiddle on HN
Objections
GET used for state-changing actions breaks HTTP semantics
From 3 comments
While this looks to me like a pretty clean and straightforward API, it's definitely not a REST API (not that it claims to be): * The API doesn't really follow HTTP. It allows GET…
alangpierce on HN> Is an api that [...] uses only GET requests for [...] state changes really a horrible api? Yes, it is. Because HTTP clients (including browser) rely on the common method…
vog on HN> Drawing a card is definitely a GET. I see where you're coming from ("I'm drawing / taking / GETting some cards"), but drawing cards is not an idempotent action. I would…
xnxn on HN
Not RESTful: uses verbs in URLs and action parameters
From 2 comments
While this looks to me like a pretty clean and straightforward API, it's definitely not a REST API (not that it claims to be): * The API doesn't really follow HTTP. It allows GET…
alangpierce on HNAs a general rule "action" parameter is pretty non-RESTful. Sometimes RPC-style interfaces like that are ok, but don't pretend that they are RESTful. Also PUTs are supposed to be…
nl on HN
Errors returned with success 200 and DEBUG enabled in production
From 2 comments
Nice one! Good on you for building a thing and putting it out there. A few comments/suggestions: * You have DEBUG = True in your production Django config. (eg.…
hartror on HNPretty cool! Love that theres no authentication and I can start straight from curl. Nit: drawing from an empty deck does not throw an error: > curl…
xxbondsxx on HN
Shuffle randomness and deck id entropy questioned
From 2 comments
This seems like a really cool project! But how are you shuffling the cards, and how are you identifying unique shuffled decks? It looks like the deck_id is 12 characters, numbers…
gabemart on HNWhat's being used for RNG?
adanto6840 on HN
Requests
Support custom deck sizes and card subsets
From 2 comments
Sounds straightforward and simple. Well done. Would like an option to set parameters of a deck. Some card games use only 8 cards from a set and not the whole 13.
carrotleads on HNAdding and subtracting from the starting deck would very useful. Adding Jokers, playing with only 1-10 (scopa), ect
comrh on HN
Support multiple players and passing cards
From 1 comment
If it supported the idea of multiple players, keeping track of what cards each player has, and facilitating passing cards between players; it could be a cool backend for lots of…
evan_ on HN
Return SVG card images
From 1 comment
I wonder if returning SVG would be possible - https://code.google.com/p/vectorized-playing-cards/ Edit: Could be an excellent idea - 8 of Clubs is: * 28kb as a PNG. * 14kb as an…
voltagex_ on HN
Questions
What RNG is used for shuffling?
From 1 comment
What's being used for RNG?
adanto6840 on HN
How are shuffled decks uniquely identified?
From 1 comment
This seems like a really cool project! But how are you shuffling the cards, and how are you identifying unique shuffled decks? It looks like the deck_id is 12 characters, numbers…
gabemart on HN
Alternatives named
Local random number generator shuffling
From 2 comments
Seriously, why wouldn't you just use a local RNG? Do you realize it's actually less work than reading API documentation?
hurin on HNI like the website design but shuffling cards is extremely trivial to code. Also cards are mostly used for gambling games and it's a huge security hole to use a third party api…
soup10 on HN
Vectorized playing cards on Google Code
From 1 comment
I wonder if returning SVG would be possible - https://code.google.com/p/vectorized-playing-cards/ Edit: Could be an excellent idea - 8 of Clubs is: * 28kb as a PNG. * 14kb as an…
voltagex_ on HN