[{"data":1,"prerenderedAt":299},["ShallowReactive",2],{"project-6048715":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":44,"post_text":46,"what":47,"said":69,"maker_in_thread":152,"shape":161,"grid":164,"attempts":261,"same_week":262,"maker_shows":41,"maker_hidden":291,"reader_version":292,"card":293},"6048715","ArbitraryCounter","A simple persistent counting API","title","Show HN: I made a simple persistent counting API","http:\u002F\u002Farbitrarycounter.com\u002F","arbitrarycounter.com","dustyreagan",1373924414,2013,54,41,473,1739,28,"notable","web_saas","counting api","api",[24,25,26,27],"counter api","persistent counter","conversion tracking","web api","roasted",-0.345,{"positive":31,"neutral":32,"mixed":33,"critical":34},2,6,0,9,17,{"design":37,"idea":40,"privacy":42,"execution":43},{"positive":38,"critical":39},1,4,{"positive":38,"critical":41},3,{"positive":33,"critical":38},{"positive":33,"critical":38},[38,33,33,33,33,33,33,33,33,38,41,33,45,33,33,38,38,33,33,41,41,41,33,38,33,45,33,33,33,38,33,33,33,33,33,41,33,41,38,38],5,null,{"problem":48,"audience":55,"pricing":46,"motivation":62,"time_to_build":46,"stack":66,"openness":67,"stage":68,"team_size":67},{"value":49,"source":50,"evidence":51},"Needing a persistent count without setting up a database","maker",[52],{"id":53,"by":11,"text":54},"6049235","The idea was to make something easier than booting up a database. Personally, I just needed a semi-persistent count that I could discard later. This fit the bill for me, and…",{"value":56,"source":50,"evidence":57},"Developers who need a simple persistent count, such as for conversions",[58,61],{"id":59,"by":11,"text":60},"6048735","I was doing some usability testing in one of my webapps and needed a simple way to count conversions. There are lots of A\u002FB testing solutions out there, but I just wanted a…",{"id":53,"by":11,"text":54},{"value":63,"source":50,"evidence":64},"Needed a simple way to count conversions during usability testing of a webapp",[65],{"id":59,"by":11,"text":60},[],"unknown","beta",{"praise":70,"objections":79,"requests":120,"questions":135,"alternatives":140},[71],{"value":72,"source":73,"evidence":74},"Simple, does one thing well","commenter",[75],{"id":76,"by":77,"text":78},"6049015","geuis","I love simple api's like this. Its kind of the same mental model I keep around http:\u002F\u002Fjsonip.com. A simple service that does one thing really well. Its been working well and has…",[80,95,105],{"value":81,"source":73,"evidence":82},"GET requests should not modify state; incrementing should use POST",[83,87,91],{"id":84,"by":85,"text":86},"6049037","dragonwriter","Incrementing or decrementing a counter is neither side-effect-free nor idempotent, and GET should generally be both, so you really shouldn't use GET for those operations. [1]…",{"id":88,"by":89,"text":90},"6048977","pwf","GET should never modify data. I would recommend changing that to a POST before something indexes it and decides to crawl it every 5 minutes. See here for more reasons:…",{"id":92,"by":93,"text":94},"6048975","PeterisP","Perhaps POST requests would be more appropriate for incrementing\u002Fdecrementing? GET's may be either cached(skipped) or duplicated for various reasons, resulting in incorrect counts.",{"value":96,"source":73,"evidence":97},"Public URLs let anyone change the counter",[98,102],{"id":99,"by":100,"text":101},"6049021","egonschiele","> All URLs are public. We recommend using a unique group name to avoid collisions with other users. So anyone can increment your counter without you knowing? Seems like this…",{"id":103,"by":100,"text":104},"6049134","This would be an example of security through obscurity.",{"value":106,"source":73,"evidence":107},"Too trivial to need an external API",[108,112,116],{"id":109,"by":110,"text":111},"6049005","ankurpatel","Can someone explain how counters can be so hard to implement ourselves that we need to use this?",{"id":113,"by":114,"text":115},"6049043","frankcaron","\"There's an API for that\" is the new \"there's an app for that\".",{"id":117,"by":118,"text":119},"6049149","meowface","Yep. I understand this is just a little toy thing, but people are really trying to start businesses off of \"APIs\" that do not much more than OP's. The whole point of an API is…",[121,128],{"value":122,"source":73,"evidence":123},"Allow increment and decrement by amounts other than one",[124],{"id":125,"by":126,"text":127},"6048955","Jake232","I think you should be able to incr\u002Fdecr by more than 1. Maybe allow http:\u002F\u002Farbitrarycounter.com\u002Fvb\u002Ffruit\u002Fapples+N where N can be any integer > 0",{"value":129,"source":73,"evidence":130},"Add a generate GUID option for group names",[131],{"id":132,"by":133,"text":134},"6052786","benoits","I like the flexibility, but I would suggest you add a \"generate GUID\" button when choosing the group name in case the user does want a random URL, which seems quite likely.",[136],{"value":137,"source":73,"evidence":138},"Why is this needed when counters are easy to implement",[139],{"id":109,"by":110,"text":111},[141,145],{"value":142,"source":50,"evidence":143},"Running a database",[144],{"id":53,"by":11,"text":54},{"value":146,"source":73,"evidence":147},"Google Analytics and Mixpanel",[148],{"id":149,"by":150,"text":151},"6049692","tszming","I believe most anayltics platforms use\u002Fsupport GET, e.g. google analytics, mixpanel etc. If you limit yourself to use only POST, you will limit users from using your tool in…",{"comments":34,"answered":31,"key":153},[154,157,160],{"id":155,"text":156},"6049277","Yeah, ok. I agree with that. I changed incrementing and decrementing operations to POST requests only, and updated the documentation. Thanks for the feedback!",{"id":158,"text":159},"6049590","Yeah, see I'm kind of torn, because GET just makes it so dang simple. POST requests, though semantically correct, add a small amount of overhead to implementing the counter. I'm…",{"id":59,"text":60},{"commenters":162,"max_depth":45,"maker_replies":34,"first_comment_mins":41,"lifespan_hours":163},25,19,[165,167,171,174,177,179,182,184,186,188,189,193,196,200,201,203,204,206,209,211,212,215,217,220,221,223,225,229,231,234,236,239,240,243,245,248,252,254,255,259,260],[84,33,38,166,85,33],"project\u002Fcritical\u002Fdesign",[168,33,33,169,170,33],"6049064","commenter\u002Fneutral\u002Fnone","hnriot",[172,33,33,169,173,33],"6049097","wcarss",[175,33,33,169,176,33],"6050192","mnutt",[178,33,33,169,85,33],"6049112",[180,33,33,169,181,33],"6049115","angersock",[183,33,33,169,85,33],"6049128",[185,33,33,169,181,33],"6050152",[155,33,33,187,11,38],"maker\u002Fneutral\u002Fdesign",[149,33,38,166,150,33],[190,33,41,191,192,33],"6049332","project\u002Fneutral\u002Fdesign","sgarman",[194,33,33,169,195,33],"6049467","smoyer",[197,33,45,198,199,33],"6049557","project\u002Fpositive\u002Fdesign","jguimont",[158,33,33,187,11,38],[59,38,33,202,11,38],"project\u002Fneutral\u002Fidea",[92,38,38,166,93,33],[109,38,38,205,110,33],"project\u002Fcritical\u002Fidea",[207,38,33,169,208,33],"6049071","terabytest",[53,38,33,210,11,38],"maker\u002Fneutral\u002Fidea",[125,31,41,202,126,33],[213,31,41,202,214,33],"6049047","pkulak",[216,31,41,191,181,33],"6049120",[218,31,33,219,11,38],"6049385","maker\u002Fneutral\u002Fexecution",[88,41,38,166,89,33],[222,41,33,187,11,38],"6049281",[76,39,45,224,77,33],"project\u002Fpositive\u002Fidea",[226,39,33,227,228,33],"6049034","other\u002Fneutral\u002Fnone","ancarda",[230,39,33,227,77,33],"6049568",[232,39,33,233,11,38],"6049512","maker\u002Fpositive\u002Fnone",[99,45,38,235,100,33],"project\u002Fcritical\u002Fprivacy",[237,45,33,238,208,33],"6049065","commenter\u002Fneutral\u002Fprivacy",[103,45,33,238,100,33],[241,45,33,238,242,33],"6050121","cobbal",[244,45,33,238,85,33],"6049144",[246,45,33,247,11,38],"6049202","maker\u002Fneutral\u002Fprivacy",[249,45,41,250,251,33],"6049232","project\u002Fneutral\u002Fprivacy","gohrt",[253,45,33,247,11,38],"6049289",[132,45,41,191,133,33],[256,45,38,257,258,33],"6050398","project\u002Fcritical\u002Fexecution","bambax",[113,32,38,205,114,33],[117,32,38,205,118,33],[],[263,268,273,277,282,286],{"id":264,"name":265,"points":266,"category":267},"6025221","Raspberry Picrowave",423,"hardware",{"id":269,"name":270,"points":271,"category":272},"6037170","Minified.js",158,"languages",{"id":274,"name":275,"points":271,"category":276},"6059481","Distelli","infrastructure",{"id":278,"name":279,"points":280,"category":281},"6046227","WakaTime",126,"dev_tools",{"id":283,"name":284,"points":285,"category":20},"6038053","NameMonk",85,{"id":287,"name":288,"points":289,"category":290},"6025579","stps",83,"productivity",false,"v2",{"id":294,"name":5,"line":6,"ai":291,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":295,"top":18,"kw":296,"maker":11,"domain":10,"tier":19,"attempts":33,"strip":297,"url":9,"mix":298,"praise":72,"objection":81,"sub":21},6048715,-0.34,[24,25,26,27],"1000000001305001100333010500010000030311",[31,32,33,34],1793990896190]