Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>One very good solution but also a bit complex would be to use some extern software to compare the text "before and after" each update. Git would be a obvious choice, and you could then even have version history like github pages and wikis works now! However there is also a lot of other programs out there, with the only purpose of comparing texts and finding difference. Just search for "text comparison tool" on google. </p> <p><strong>Edit (git integration tools):</strong></p> <p>I Found these gems that can be used to call git commands from ruby:</p> <ul> <li><a href="https://github.com/mojombo/grit" rel="nofollow">https://github.com/mojombo/grit</a></li> <li><a href="https://github.com/schacon/ruby-git" rel="nofollow">https://github.com/schacon/ruby-git</a>.</li> <li>See more here: <a href="https://www.ruby-toolbox.com/categories/git_Tools" rel="nofollow">https://www.ruby-toolbox.com/categories/git_Tools</a></li> </ul> <p><strong>Edit 2 (text comparison tools):</strong></p> <p>Here is some resources i found, that could be useful to compare texts:</p> <p>Ruby Gems</p> <ul> <li><a href="https://github.com/threedaymonk/text" rel="nofollow">https://github.com/threedaymonk/text</a></li> <li><a href="http://diff-lcs.rubyforge.org/" rel="nofollow">http://diff-lcs.rubyforge.org/</a></li> </ul> <p>Online APIs</p> <ul> <li><a href="http://www.apidiff.com/en/compare/" rel="nofollow">http://www.apidiff.com/en/compare/</a></li> <li><a href="https://code.google.com/p/google-diff-match-patch/wiki/API" rel="nofollow">https://code.google.com/p/google-diff-match-patch/wiki/API</a></li> </ul> <p><strong>Edit 3 (my answers to the last questions):</strong> Good solution with the Levensthtein algorithm! I will try to answer you last two question, but there is no right answer so this is just my opinion:</p> <ol> <li><p><strong>Should I just store this in my postgres db, or should I use another store like redis?</strong></p> <p>This is not really a key/value situation, and even if you changed the implementation can't i not see any reason to use Redis. Maybe if you later one experience problems with performance but i think for now that redis would be a premature and properly unnecessary optimization.</p></li> <li><p><strong>Would it be a Very Bad Idea to not expire daily words and even track more frequently than daily, like every hour that the user writes? This would allow me to give writers a very granular history of their writing and also help them keep track of when they're most productive.</strong></p> <p>No it's not a bad idea. Postgres and most SQL databases in general are optimized to query a LOT of rows. It's faster to query one table with a lot of rows then several table (eg. joins) with few rows. </p> <p>However this also depends on how you are gonna use this data. Will you just query for the last day or so, or would you need to use the whole history of a users changes pretty often? Fx for making statistics or so? If that's the case, should you properly consider optimizing by having a table with summarized data over longer periods. I do this my self in some simple accounting software i have made, for showing stats over income and outcome (by showing summaries of each week instead of each single transaction separately).</p></li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload