5 ms·
CouchDB is awesome, full stop. While it's missing some popularity from MongoDB and having wide adoption of things like mongoose in lots of open source CMS-type
by splatcollision 7y ago
CouchDB is awesome, full stop.
While it's missing some popularity from MongoDB and having wide adoption of things like mongoose in lots of open source CMS-type projects, it wins for the (i believe) unique take on map / reduce and writing custom javascript view functions that run on every document, letting you really customize the way you can query slice and access parts of your data...
Example: I'm building a document analysis app that does topic + keyword frequency vectorization of a corpus of documents, only a few thousand for now.
I end up with a bunch of documents that have "text": "here is my document text..." and "vector": [ array of floating point values ...].
What I can do with couchdb is store that 20d vector and emit integers of it as a query key:
var intVectors = doc.vector.map(function(val){
return Math.floor(val)
})
emit(intVectors, 1);
Then I can match an input document's vector (calculated the same as corpus documents), calculate a 'range' of those vectors, pass it as start and end keys, and super quickly get a result from the database of 'here are documents that have vectors similar to your input'...
Super fun, quick and flexible to work with!
- xwowsersx 7y agoit's = "it is" its = possessive form of "it" So should be "it wins for its unique..".
- splatcollision 7y agoYep, thanks.
- devhead 7y agothere's always one...as in there is always one who has to poke people for grammer. sighs.
- xwowsersx 7y agoIn his original message right after "it's" he put "(I believe?)", implying he was unsure about the usage and inviting feedback so I responded to that. If I misread, my bad, but I thought he was specifically asking.
- cgh 7y ago"Grammar". Sorry!
- tomger 7y ago“Grammar.” Thanks.
- codetrotter 7y agoPersonally I wouldn't mind corrections on grammar. But I agree that the comments about grammar, even though in my opinion somewhat useful, still add noise to the discussion as a whole. I've been thinking about this and, I think having a "grammar patrol" that had the ability to alter other people's comments for grammar on a site like HN or Reddit might be useful. Maybe. Of course there is potential for abuse. So you'd need a second group of people at the very least, who were given the ability to vote on the edits themselves as good or bad. This second group would be the most difficult to establish and maintain at scale I think. Because whereas you could in theory allow anyone to volunteer as grammar patrol, you'd need to have a trusted group of people for group two. Otherwise, a group of trolls could sign up for both groups and make bad edits and then approve them. At the end of the day it would probably require a lot more effort than what it's worth. Grammar mistakes are a bit of an eyesore but at the end of the day they usually aren't the end of the world. Also, language is ever-evolving. So if in 50 years 80% of the population is consistently making a common set of grammar mistakes then that just means that the way to spell those words has changed.
- Quekid5 7y agoThat would actually be an interesting idea to pursue because I don't think it's even decidable and may require an AI/human to write back to understand. It depends on context that may not even be there. (Think of the absurdity of chain-comment-memes on Reddit, for example. The question may not even be answerable until lots of other people have replied. Now, you may not permit that as "grammar", but it speaks to the complexity of even defining grammar. Words are repurposed, etc. etc.) Maybe... just maybe memes could be the key to AI /s
- johnisgood 7y agoWe could avoid all that and just have a way of correcting comments (with history, diff, and all that) which would show up upon clicking, say, "show edited version" or whatever. By default it would display the original version, but if someone wishes, one could display the edited version. This way the noise would be hidden. Perhaps to be able to add such corrections to comments, you would have to have at least n_1 karma, be registered for n_2 months, and so forth as a defense mechanism against trolls. I am sleep deprived. I hope my idea comes across properly. It sounds good to me right now, might not sound good tomorrow. :P It is definitely complicated though and not sure it is worth the effort to implement and maintain.
- ggm 7y agoI make frequent minor grammar and spelling mistakes. Spoken english would rarely pick them up, nor would the listener be genuinely confused, but written english is different and while our Chomsky grammer parser is just one brain, we hear and read things differently. It is and It(possessive)s are not the same in semantic intent, and even sometimes in spoken flow people have to ask "did you mean it is, or it possesses" in some manner. Spelling checkers which cannot read do not help. here and hear are both legal in the sentence parse in some ways, so cannot be detected as the wrong form without a higher semantic model. Few systems have this. Therefore, many small mistakes can creep through, apart from the ones I mis-type the system may itself be making them, in ways which our own spellchecking brain do not pick up. Here what I say, Hear what I say...
- bruce_one 7y agoMy favourite technique for remembering this is to say "it is an apostrophe" (because it's is "it is", and has the apostrophe (in case that isn't clear :-) )).
- adrianmonk 7y agoYours is more amusing than mine, but... I just remember that (possessive) pronouns don't have apostrophes. "My", "your", "his", "her", "their", and "our" don't have apostrophes, so why would "its"? Meanwhile, contractions do have apostrophes. "Haven't", "should've", "that's", "you're", and "I'll" have apostrophes, so "it's" (meaning "it is" or "it has") should too.
- pookeh 7y agoI came here to read about couchdb but ended up reading about grammar for 2 mins. Does HN have an offtopic flag and if so can I by default collapse all offtopic comments?
- treis 7y ago>CouchDB is awesome, full stop. The problem I had with CouchDB is integrating it into a framework like Rails. CouchDB on its own does so much cool stuff. The "free" HTTP API and client replication via PouchDB are the two huge ones. But it just wasn't smooth enough to get the data out, use it where I wanted, and then save it back.
- teddyc 7y agoI had to write my own libs/helpers to interact and make it feel friendly to the developer when I used it with Rails in the past. But after that, it was very nice.
- ahnick 7y agoDid you open source these by chance?
- janl 7y agoCheck out https://github.com/langalex/couch_potato/ https://github.com/langalex/couch_potato/
- mikekchar 7y ago> CouchDB is awesome, full stop. I really like CouchDB. It is wonderful if you want that kind of DB. However, if you want a relational DB (and there are many, many, many reasons to want one), do not pick CouchDB. It works very poorly as a relational DB. I have a legacy project that didn't quite understand this point and we have ended up paying the price for a document oriented DB in which it is hard to migrate and where we are constantly having to worry about the bandwidth to the view server. And then all the amazing, wonderful features of couch? We don't use a single one :-P Fail all the way around. However, I still like it and instead of retiring it, I've been slowly trying to start using the features that make it awesome, while mitigating some of the problems that have piled up over the years.
- james_s_tayler 7y agoWe're in a similar boat. My main goal this year is to retire it.