HNHacker News
TopNewBestAskShowJobs

chandrew

217 karma · joined October 17, 2013

submissionscomments
chandrew··on Ask HN: You want Atom invites/you have invites to give?
Can I get an invite? chandrew@utexas.edu
chandrew··on [dead]
I'm a fan of the occasional Bitcoin news :P
chandrew··on PostgreSQL 9.4 – What I was hoping for
Very nice approach, I didn't think of trying to log names with only INSERT. I see how it handles concurrency. My solution is likely to fail if my database gets bombarded...My app was supposed to be a simple one I made for a few friends and also for me to learn a few things in node / postgres.

For more detail, here is my initial table: CREATE TABLE names(name_id serial, name text, count integer)

I was planning to access the name count a good numbers of times, so I went with a simple SELECT from names. I don't necessarily need "on demand" counts so having the summary process run 5 or 10 mins would be a better!

Thanks for your insight!

chandrew··on Thousands play one game of Pokemon simutaneously
LOL, very funny.
chandrew··on PostgreSQL 9.4 – What I was hoping for
I wanted to update a record if it existed, otherwise use insert. So if a name is in the database, update the times I've seen it. If the name does not exist, insert. I was keeping track of the number of times a name is seen.
chandrew··on PostgreSQL 9.4 – What I was hoping for
I used postgres for the first time last week, and was wondering, "WHERE IS UPSERT?" Ended up going with a "UPDATE table SET field='C', field2='Z' WHERE id=3; INSERT INTO table (id, field, field2) SELECT 3, 'C', 'Z' WHERE NOT EXISTS (SELECT 1 FROM table WHERE id=3);" (as seen on http://stackoverflow.com/questions/1109061/insert-on-duplica... - although, not the chosen answer). Anyone come up with better or their own solutions?
chandrew··on Ask HN: Saw a really cool portfolio yesterday on HN...
Yes, that is it! THANKS! I just couldn't find it in my history, wishing I bookmarked it.
chandrew··on FlapBot – Bot for FlapMMO.com
very nice!
chandrew··on Show HN: Coinwell - the easiest way to mine litecoins
promos for early users, to get the word out, etc. so yes, discounts.
chandrew··on Show HN: Coinwell - the easiest way to mine litecoins
Maybe a referral program like CEX will help Coinwell out
chandrew··on Show HN: Coinwell - the easiest way to mine litecoins
are you running any promos? :P
chandrew··on Ask HN: What's the best way to learn Git for a version control (mostly) newbie?
http://rogerdudler.github.io/git-guide/
← PreviousPage 2 of 2