From f16ae4ff0b97262c2431fa567717429ed4e0ffd6 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sat, 23 Jul 2022 17:33:57 +0530 Subject: [PATCH] fix(model): drop unused `User#karma` field and update test cases --- api/src/test/kotlin/dev/msfjarvis/claw/api/ApiTest.kt | 2 +- api/src/test/kotlin/dev/msfjarvis/claw/api/FakeApi.kt | 2 +- api/src/test/resources/post_details_d9ucpe.json | 1 - api/src/test/resources/post_details_tdfoqh.json | 1 + model/src/commonMain/kotlin/dev/msfjarvis/claw/model/User.kt | 1 - 5 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 api/src/test/resources/post_details_d9ucpe.json create mode 100644 api/src/test/resources/post_details_tdfoqh.json diff --git a/api/src/test/kotlin/dev/msfjarvis/claw/api/ApiTest.kt b/api/src/test/kotlin/dev/msfjarvis/claw/api/ApiTest.kt index 8d0b4ea3..e73dd01d 100644 --- a/api/src/test/kotlin/dev/msfjarvis/claw/api/ApiTest.kt +++ b/api/src/test/kotlin/dev/msfjarvis/claw/api/ApiTest.kt @@ -40,7 +40,7 @@ class ApiTest { @Test fun `post details with comments`() = runBlocking { - val postDetails = api.getPostDetails("d9ucpe") + val postDetails = api.getPostDetails("tdfoqh") assertEquals(7, postDetails.comments.size) } diff --git a/api/src/test/kotlin/dev/msfjarvis/claw/api/FakeApi.kt b/api/src/test/kotlin/dev/msfjarvis/claw/api/FakeApi.kt index c257a415..c7b1fd33 100644 --- a/api/src/test/kotlin/dev/msfjarvis/claw/api/FakeApi.kt +++ b/api/src/test/kotlin/dev/msfjarvis/claw/api/FakeApi.kt @@ -12,7 +12,7 @@ class FakeApi(private val delegate: BehaviorDelegate) : LobstersApi private val json = Json { ignoreUnknownKeys = true } private val hottest: List = json.decodeFromString(getJson("hottest.json")) private val postDetails: LobstersPostDetails = - json.decodeFromString(getJson("post_details_d9ucpe.json")) + json.decodeFromString(getJson("post_details_tdfoqh.json")) private val user: User = json.decodeFromString(getJson("msfjarvis.json")) override suspend fun getHottestPosts(page: Int): List { diff --git a/api/src/test/resources/post_details_d9ucpe.json b/api/src/test/resources/post_details_d9ucpe.json deleted file mode 100644 index e4722a80..00000000 --- a/api/src/test/resources/post_details_d9ucpe.json +++ /dev/null @@ -1 +0,0 @@ -{"short_id":"d9ucpe","short_id_url":"https://lobste.rs/s/d9ucpe","created_at":"2021-04-03T16:16:02.000-05:00","title":"What problems do people solve with strace?","url":"https://jvns.ca/blog/2021/04/03/what-problems-do-people-solve-with-strace/","score":18,"flags":0,"comment_count":7,"description":"","comments_url":"https://lobste.rs/s/d9ucpe/what_problems_do_people_solve_with_strace","submitter_user":{"username":"technetium","created_at":"2020-02-06T19:52:39.000-06:00","is_admin":false,"about":"A sentient lump of a certain high-density material","is_moderator":false,"karma":1811,"avatar_url":"/avatars/technetium-100.png","invited_by_user":"ngoldbaum"},"tags":["programming"],"comments":[{"short_id":"42bzeq","short_id_url":"https://lobste.rs/c/42bzeq","created_at":"2021-04-03T17:43:55.000-05:00","updated_at":"2021-04-03T17:43:55.000-05:00","is_deleted":false,"is_moderated":false,"score":2,"flags":0,"comment":"\u003cp\u003eI’ve always felt like my usage of strace was very contrived, but this makes me feel much better, thank you!\u003c/p\u003e\n","url":"https://lobste.rs/s/d9ucpe/what_problems_do_people_solve_with_strace#c_42bzeq","indent_level":1,"commenting_user":{"username":"garymoon","created_at":"2019-01-08T12:00:44.000-06:00","is_admin":false,"about":"","is_moderator":false,"karma":8,"avatar_url":"/avatars/garymoon-100.png","invited_by_user":"jonahx"}},{"short_id":"kejbct","short_id_url":"https://lobste.rs/c/kejbct","created_at":"2021-04-03T17:31:39.000-05:00","updated_at":"2021-04-03T17:31:39.000-05:00","is_deleted":false,"is_moderated":false,"score":2,"flags":0,"comment":"\u003cp\u003e\u003ccode\u003estrace\u003c/code\u003e is an invaluable tool for reverse engineering and learning. Recently I wanted to know exactly what happened when I played with a Rust \u003ccode\u003eio_uring\u003c/code\u003e wrapper. I could see how syscalls were made to learn more about it. I did the same when I wanted to quickly know how \u003ccode\u003etail -f\u003c/code\u003e was implemented under the hood without reading any C source code. (Btw, it uses \u003ccode\u003einotify\u003c/code\u003e + \u003ccode\u003eepoll\u003c/code\u003e if I remember correctly.)\u003c/p\u003e\n","url":"https://lobste.rs/s/d9ucpe/what_problems_do_people_solve_with_strace#c_kejbct","indent_level":1,"commenting_user":{"username":"enz","created_at":"2019-02-24T08:01:30.000-06:00","is_admin":false,"about":"Independent software engineer living in France. I like Python, ML languages, Linux and I am learning Rust. I run a small software company called [Piqotera](https://www.piqotera.com/en/) in France.\r\n\r\nMy blog: https://www.ecalamia.com/blog/","is_moderator":false,"karma":853,"avatar_url":"/avatars/enz-100.png","invited_by_user":"gerikson","github_username":"enzzc","twitter_username":"CalamiaEnzo","keybase_signatures":[{"kb_username":"enz","sig_hash":"dee15db718701675cf1e5bdd5c59b5fe54f9d6a9718ecfcc7be6bd083b2986920f"}]}},{"short_id":"vvs5qn","short_id_url":"https://lobste.rs/c/vvs5qn","created_at":"2021-04-03T20:38:09.000-05:00","updated_at":"2021-04-03T20:38:09.000-05:00","is_deleted":false,"is_moderated":false,"score":2,"flags":0,"comment":"\u003cp\u003eltrace is also quite useful.\u003c/p\u003e\n","url":"https://lobste.rs/s/d9ucpe/what_problems_do_people_solve_with_strace#c_vvs5qn","indent_level":1,"commenting_user":{"username":"jxy","created_at":"2017-08-03T12:24:47.000-05:00","is_admin":false,"about":" \\int d\\eta_i =0 \r\n\r\n \\int d\\eta_i \\eta_i = 1 \r\n\r\nRubber Duck method of debugging, the \r\n\r\n1. Beg, borrow, steal, buy, fabricate or otherwise obtain a rubber duck \r\n (bathtub variety) \r\n2. Place rubber duck on desk and inform it you are just going to go over \r\n some code with it, if that's all right. \r\n3. Explain to the duck what you code is supposed to do, and then go into \r\n detail and explain things line by line \r\n4. At some point you will tell the duck what you are doing next and then \r\n realise that that is not in fact what you are actually doing. The duck \r\n will sit there serenely, happy in the knowledge that it has helped you \r\n on your way. ","is_moderator":false,"karma":455,"avatar_url":"/avatars/jxy-100.png","invited_by_user":"friendlysock"}},{"short_id":"6gmzsf","short_id_url":"https://lobste.rs/c/6gmzsf","created_at":"2021-04-03T23:57:47.000-05:00","updated_at":"2021-04-03T23:57:47.000-05:00","is_deleted":false,"is_moderated":false,"score":1,"flags":0,"comment":"\u003cp\u003eIs there a working strace equivalent for Windows? It’s the tool I always miss when I have to debug anything there.\u003c/p\u003e\n","url":"https://lobste.rs/s/d9ucpe/what_problems_do_people_solve_with_strace#c_6gmzsf","indent_level":1,"commenting_user":{"username":"dmbaturin","created_at":"2018-08-08T16:44:02.000-05:00","is_admin":false,"about":"","is_moderator":false,"karma":2258,"avatar_url":"/avatars/dmbaturin-100.png","invited_by_user":"erkin","github_username":"dmbaturin","twitter_username":"dmbaturin"}},{"short_id":"flr1hj","short_id_url":"https://lobste.rs/c/flr1hj","created_at":"2021-04-04T01:39:39.000-05:00","updated_at":"2021-04-04T01:39:39.000-05:00","is_deleted":false,"is_moderated":false,"score":1,"flags":0,"comment":"\u003cp\u003eProcmon?\u003c/p\u003e\n","url":"https://lobste.rs/s/d9ucpe/what_problems_do_people_solve_with_strace#c_flr1hj","indent_level":2,"commenting_user":{"username":"kodfodrasz","created_at":"2018-03-16T03:12:36.000-05:00","is_admin":false,"about":"I'm a software developer living in Hungary.\r\n","is_moderator":false,"karma":943,"avatar_url":"/avatars/kodfodrasz-100.png","invited_by_user":"gerikson"}},{"short_id":"oeggxb","short_id_url":"https://lobste.rs/c/oeggxb","created_at":"2021-04-03T21:01:58.000-05:00","updated_at":"2021-04-03T21:01:58.000-05:00","is_deleted":false,"is_moderated":false,"score":1,"flags":0,"comment":"\u003cp\u003eI saw the headline and started thinking about it some before reading the article… only to discover that I’ve used strace on \u003cem\u003eall\u003c/em\u003e the problems they’ve listed. Fantastic list!\u003c/p\u003e\n","url":"https://lobste.rs/s/d9ucpe/what_problems_do_people_solve_with_strace#c_oeggxb","indent_level":1,"commenting_user":{"username":"tonyarkles","created_at":"2021-02-18T10:08:33.000-06:00","is_admin":false,"about":"Lead \"flying system designer\" at a drone startup. Love solving hard tech problems.","is_moderator":false,"karma":28,"avatar_url":"/avatars/tonyarkles-100.png","invited_by_user":"hoistbypetard"}},{"short_id":"pvti5i","short_id_url":"https://lobste.rs/c/pvti5i","created_at":"2021-04-03T19:55:48.000-05:00","updated_at":"2021-04-03T19:55:48.000-05:00","is_deleted":false,"is_moderated":false,"score":1,"flags":0,"comment":"\u003cp\u003eA recent “why is this process hanging?” I needed to turn to strace for: a daemon was trying to send mail out, but it had either connected to a STARTTLS-capable port expecting TLS, or vice versa, forget which. It hung until timeout because the handshake wasn’t working in any way, and of course it couldn’t email me the error report like it was meant to. At this stage I didn’t even know it was a mail issue. Seeing the process writing one thing to the socket and receiving another (i.e. plain SMTP one way and TLS handshake the other) made it clear as day where I’d misconfigured it.\u003c/p\u003e\n","url":"https://lobste.rs/s/d9ucpe/what_problems_do_people_solve_with_strace#c_pvti5i","indent_level":1,"commenting_user":{"username":"kameliya","created_at":"2014-01-12T22:27:37.000-06:00","is_admin":false,"about":"","is_moderator":false,"karma":2212,"avatar_url":"/avatars/kameliya-100.png","invited_by_user":"ralish"}}]} \ No newline at end of file diff --git a/api/src/test/resources/post_details_tdfoqh.json b/api/src/test/resources/post_details_tdfoqh.json new file mode 100644 index 00000000..3b245e0a --- /dev/null +++ b/api/src/test/resources/post_details_tdfoqh.json @@ -0,0 +1 @@ +{"short_id":"tdfoqh","short_id_url":"https://lobste.rs/s/tdfoqh","created_at":"2022-07-22T12:06:59.000-05:00","title":"Ranking comments by sum of replies' scores","url":"","score":15,"flags":0,"comment_count":7,"description":"\u003cp\u003eThere are often cases where comments with a poor score (say, 1 point), invite high-quality replies that receive many upvotes.\u003c/p\u003e\n\u003cp\u003eThese threads are not shown at the top of the story’s comments page because their “root comment” has a low score.\u003c/p\u003e\n\u003cp\u003eAn example, as of 2022-07-22 17:00 UTC, is \u003ca href=\"https://lobste.rs/s/ekvqcf/random_wallpaper_with_just_bash_systemd#c_vop9bt\" rel=\"ugc\"\u003ehttps://lobste.rs/s/ekvqcf/random_wallpaper_with_just_bash_systemd#c_vop9bt\u003c/a\u003e:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003ethe root comment has 1 point,\u003c/li\u003e\n\u003cli\u003ethe first reply has 12 points,\u003c/li\u003e\n\u003cli\u003eand, in total, 18 points have been accumulated by all the replies with score \u0026gt; 1 point.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eBecause the root comment has only 1 point, it remains at the bottom of the page, bringing down with itself also the good comment with 12 points and all the other upvoted comments.\u003c/p\u003e\n\u003cp\u003eCould an alternative ranking system be put in place, where the threads and subthreads are not sorted by the score of their root comment, but by the \u003cem\u003esum of all the scores of their children\u003c/em\u003e?\u003c/p\u003e\n\u003cp\u003e(Maybe taking into account only children with \u003ccode\u003e\u0026gt;1\u003c/code\u003e point, to avoid giving importance to superficial back-and-forth discussions.)\u003c/p\u003e\n","description_plain":"There are often cases where comments with a poor score (say, 1 point), invite high-quality replies that receive many upvotes.\r\n\r\nThese threads are not shown at the top of the story's comments page because their \"root comment\" has a low score.\r\n\r\nAn example, as of 2022-07-22 17:00 UTC, is \u003chttps://lobste.rs/s/ekvqcf/random_wallpaper_with_just_bash_systemd#c_vop9bt\u003e:\r\n* the root comment has 1 point,\r\n* the first reply has 12 points,\r\n* and, in total, 18 points have been accumulated by all the replies with score \u003e 1 point.\r\n\r\nBecause the root comment has only 1 point, it remains at the bottom of the page, bringing down with itself also the good comment with 12 points and all the other upvoted comments.\r\n\r\nCould an alternative ranking system be put in place, where the threads and subthreads are not sorted by the score of their root comment, but by the _sum of all the scores of their children_?\r\n\r\n(Maybe taking into account only children with `\u003e1` point, to avoid giving importance to superficial back-and-forth discussions.)","comments_url":"https://lobste.rs/s/tdfoqh/ranking_comments_by_sum_replies_scores","submitter_user":{"username":"gioele","created_at":"2018-04-25T11:31:25.000-05:00","is_admin":false,"about":"https://gioele.io","is_moderator":false,"karma":609,"avatar_url":"/avatars/gioele-100.png","invited_by_user":"pushcx"},"tags":["meta"],"comments":[{"short_id":"ncdsfc","short_id_url":"https://lobste.rs/c/ncdsfc","created_at":"2022-07-22T14:04:36.000-05:00","updated_at":"2022-07-22T14:04:36.000-05:00","is_deleted":false,"is_moderated":false,"score":13,"flags":0,"parent_comment":null,"comment":"\u003cblockquote\u003e\n\u003cp\u003eto avoid giving importance to superficial back-and-forth discussions\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eMaybe take the max, instead of the sum? That way it’s still comparing the score of individual comments. A highly-upvoted child would rank higher than a less-upvoted toplevel comment, but long threads wouldn’t get any bonus.\u003c/p\u003e\n","comment_plain":"\u003e to avoid giving importance to superficial back-and-forth discussions\r\n\r\nMaybe take the max, instead of the sum? That way it's still comparing the score of individual comments. A highly-upvoted child would rank higher than a less-upvoted toplevel comment, but long threads wouldn't get any bonus.","url":"https://lobste.rs/s/tdfoqh/ranking_comments_by_sum_replies_scores#c_ncdsfc","indent_level":1,"commenting_user":{"username":"dpercy","created_at":"2019-09-06T11:52:32.000-05:00","is_admin":false,"about":"","is_moderator":false,"karma":282,"avatar_url":"/avatars/dpercy-100.png","invited_by_user":"glowe"}},{"short_id":"m3wyu5","short_id_url":"https://lobste.rs/c/m3wyu5","created_at":"2022-07-23T01:04:43.000-05:00","updated_at":"2022-07-23T01:04:43.000-05:00","is_deleted":false,"is_moderated":false,"score":5,"flags":0,"parent_comment":null,"comment":"\u003cp\u003eFor better or worse, the deeper you go into threads the less likely it is that the discussion is still about the original submission. Your proposal, or the max variant presented elsewhere, I fear would unduly reward flamebait and off-topic discussion.\u003c/p\u003e\n","comment_plain":"For better or worse, the deeper you go into threads the less likely it is that the discussion is still about the original submission. Your proposal, or the max variant presented elsewhere, I fear would unduly reward flamebait and off-topic discussion.","url":"https://lobste.rs/s/tdfoqh/ranking_comments_by_sum_replies_scores#c_m3wyu5","indent_level":1,"commenting_user":{"username":"friendlysock","created_at":"2014-02-20T00:43:41.000-06:00","is_admin":false,"about":"*Literally* full of ants.\r\n\r\nFriendly engineer and human being.\r\n\r\nStrong opinions held weakly, sometimes weekly.\r\n\r\n\u003e Gentrification is the process by which nebulous threats are pacified and alchemised into money. \r\n","is_moderator":false,"karma":37904,"avatar_url":"/avatars/friendlysock-100.png","invited_by_user":"MasonJar"}},{"short_id":"9vyyu5","short_id_url":"https://lobste.rs/c/9vyyu5","created_at":"2022-07-22T13:39:20.000-05:00","updated_at":"2022-07-22T13:39:20.000-05:00","is_deleted":false,"is_moderated":false,"score":4,"flags":0,"parent_comment":null,"comment":"\u003cp\u003eJust like to point out that the assumption here is that upvotes is a metric of quality. On lobste.rs as in any other social context, upvotes/support is a measure of popularity.\u003c/p\u003e\n\u003cp\u003eThere are many instances where the two are correlated, and some important instances where they are not.\u003c/p\u003e\n","comment_plain":"Just like to point out that the assumption here is that upvotes is a metric of quality. On lobste.rs as in any other social context, upvotes/support is a measure of popularity.\r\n\r\nThere are many instances where the two are correlated, and some important instances where they are not.","url":"https://lobste.rs/s/tdfoqh/ranking_comments_by_sum_replies_scores#c_9vyyu5","indent_level":1,"commenting_user":{"username":"kghose","created_at":"2014-09-03T12:48:11.000-05:00","is_admin":false,"about":"Electrical Engineer, Software writer, fascinated by mathematics, visualizations and the human brain, currently a novice bioinformatician. [Long form articles and coding diary](http://kaushikghose.wordpress.com)\r\n","is_moderator":false,"karma":3684,"avatar_url":"/avatars/kghose-100.png","invited_by_user":"hdevalence"}},{"short_id":"owddle","short_id_url":"https://lobste.rs/c/owddle","created_at":"2022-07-22T13:57:19.000-05:00","updated_at":"2022-07-22T13:57:19.000-05:00","is_deleted":false,"is_moderated":false,"score":7,"flags":0,"parent_comment":"9vyyu5","comment":"\u003cblockquote\u003e\n\u003cp\u003eJust like to point out that the assumption here is that upvotes is a metric of quality. On lobste.rs as in any other social context, upvotes/support is a measure of popularity.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eI fully agree: upvotes are a metric of popularity and not of quality. But this proposal does not assume that.\u003c/p\u003e\n\u003cp\u003eRegardless of what upvotes represent, currently threads are sorted in descending order of (upvotes, time). All that this proposal suggests, is to change that to (sum(upvotes of root-and-children), time).\u003c/p\u003e\n\u003cp\u003eThe only assumption here is: if ranking a thread by upvotes of its root comment is considered good (and at the moment it is), then ranking by the sum of the upvotes of the whole thread is better.\u003c/p\u003e\n","comment_plain":"\u003e Just like to point out that the assumption here is that upvotes is a metric of quality. On lobste.rs as in any other social context, upvotes/support is a measure of popularity.\r\n\r\nI fully agree: upvotes are a metric of popularity and not of quality. But this proposal does not assume that.\r\n\r\nRegardless of what upvotes represent, currently threads are sorted in descending order of (upvotes, time). All that this proposal suggests, is to change that to (sum(upvotes of root-and-children), time).\r\n\r\nThe only assumption here is: if ranking a thread by upvotes of its root comment is considered good (and at the moment it is), then ranking by the sum of the upvotes of the whole thread is better.","url":"https://lobste.rs/s/tdfoqh/ranking_comments_by_sum_replies_scores#c_owddle","indent_level":2,"commenting_user":{"username":"gioele","created_at":"2018-04-25T11:31:25.000-05:00","is_admin":false,"about":"https://gioele.io","is_moderator":false,"karma":609,"avatar_url":"/avatars/gioele-100.png","invited_by_user":"pushcx"}},{"short_id":"lqqn3a","short_id_url":"https://lobste.rs/c/lqqn3a","created_at":"2022-07-22T14:28:14.000-05:00","updated_at":"2022-07-22T14:28:27.000-05:00","is_deleted":false,"is_moderated":false,"score":2,"flags":0,"parent_comment":"owddle","comment":"\u003cp\u003eTangential to your effort here, on a personal note, if I find a discussion interesting I read all the posts regardless of ranking. On the discussions I find worthwhile I find that post quality is unrelated to upvotes.\u003c/p\u003e\n\u003cp\u003eOn some discussions I find the top voted comment has devolved into a long tail of niche discussion, often acrimonious, which is not as useful as later posts.\u003c/p\u003e\n\u003cp\u003eWorst to pick out of the noise are replies to replies which are great but buried in not so great comments.\u003c/p\u003e\n","comment_plain":"Tangential to your effort here, on a personal note, if I find a discussion interesting I read all the posts regardless of ranking. On the discussions I find worthwhile I find that post quality is unrelated to upvotes.\r\n\r\nOn some discussions I find the top voted comment has devolved into a long tail of niche discussion, often acrimonious, which is not as useful as later posts.\r\n\r\nWorst to pick out of the noise are replies to replies which are great but buried in not so great comments.","url":"https://lobste.rs/s/tdfoqh/ranking_comments_by_sum_replies_scores#c_lqqn3a","indent_level":3,"commenting_user":{"username":"kghose","created_at":"2014-09-03T12:48:11.000-05:00","is_admin":false,"about":"Electrical Engineer, Software writer, fascinated by mathematics, visualizations and the human brain, currently a novice bioinformatician. [Long form articles and coding diary](http://kaushikghose.wordpress.com)\r\n","is_moderator":false,"karma":3684,"avatar_url":"/avatars/kghose-100.png","invited_by_user":"hdevalence"}},{"short_id":"4l8mzk","short_id_url":"https://lobste.rs/c/4l8mzk","created_at":"2022-07-22T12:30:20.000-05:00","updated_at":"2022-07-22T12:30:20.000-05:00","is_deleted":false,"is_moderated":false,"score":1,"flags":0,"parent_comment":null,"comment":"\u003cp\u003eI really like this idea but have no idea what its implementation would represent in terms of additional load to the server.\u003c/p\u003e\n","comment_plain":"I really like this idea but have no idea what its implementation would represent in terms of additional load to the server.","url":"https://lobste.rs/s/tdfoqh/ranking_comments_by_sum_replies_scores#c_4l8mzk","indent_level":1,"commenting_user":{"username":"feoh","created_at":"2016-01-11T11:27:16.000-06:00","is_admin":false,"about":"Automation Junkie, Geek, Freemason. I wave my freak flag high :)","is_moderator":false,"karma":7677,"avatar_url":"/avatars/feoh-100.png","invited_by_user":"derekprior","github_username":"feoh","twitter_username":"feoh","keybase_signatures":[{"kb_username":"feoh","sig_hash":"b3a82d7fb3adf54a619afefce9f2543ab857626b34915bfb52b19eca48604c750f"}]}},{"short_id":"qy0l9k","short_id_url":"https://lobste.rs/c/qy0l9k","created_at":"2022-07-22T16:12:09.000-05:00","updated_at":"2022-07-22T16:12:09.000-05:00","is_deleted":false,"is_moderated":false,"score":4,"flags":0,"parent_comment":"4l8mzk","comment":"\u003cp\u003eI’ve moved most of the \u003ca href=\"https://github.com/lobsters/lobsters/blob/cf52ab9f3f0b3ac805effc2e718f15922cb67332/app/models/comment.rb#L340\" rel=\"ugc\"\u003evote\u003c/a\u003e into the db, but \u003ca href=\"https://github.com/lobsters/lobsters/blob/cf52ab9f3f0b3ac805effc2e718f15922cb67332/app/models/comment.rb#L219\" rel=\"ugc\"\u003enot all\u003c/a\u003e. If \u003ccode\u003ecalculated_confidence\u003c/code\u003e finished its move into the db almost any algorithm would be faster than the current implementation.\u003c/p\u003e\n","comment_plain":"I've moved most of the [vote](https://github.com/lobsters/lobsters/blob/cf52ab9f3f0b3ac805effc2e718f15922cb67332/app/models/comment.rb#L340) into the db, but [not all](https://github.com/lobsters/lobsters/blob/cf52ab9f3f0b3ac805effc2e718f15922cb67332/app/models/comment.rb#L219). If `calculated_confidence` finished its move into the db almost any algorithm would be faster than the current implementation.","url":"https://lobste.rs/s/tdfoqh/ranking_comments_by_sum_replies_scores#c_qy0l9k","indent_level":2,"commenting_user":{"username":"pushcx","created_at":"2012-08-14T20:25:08.000-05:00","is_admin":true,"about":"Hi, I'm [Peter Bhat Harkins](https://malaprop.org), a programmer and entrepreneur from Chicago. From June 2014 to winter of 2015 I typically posted a dozen stories per day to [help](https://lobste.rs/s/9pm09z/what_is_on_topic_what_is_not/comments/nie0yn#c_nie0yn) the site reach a critical mass of regular visitors. In October 2017 I became the site administrator after the site creator @jcs stepped down.\r\n\r\n * Please don’t message me for an invitation if we're complete strangers; check \u003ca href=\"https://lobste.rs/u\"\u003ethe user list\u003c/a\u003e for someone you know or ask [in chat](https://lobste.rs/chat).\r\n * Submit a [`meta`](https://lobste.rs/t/meta) post for feature requests (including new tags) to let the community discuss. Bug reports and \"is this a bug?\" should go to [the issue tracker](https://github.com/lobsters/lobsters/issues).\r\n * [Message me](https://lobste.rs/messages?to=pushcx) for administrative and moderator things. I don't see everything and I gotta sleep sometime.\r\n * E-mail my first name @malaprop.org regarding site security or if you can't log in to message me. If I've posted or commented about something here or in the chat room, I'd almost certainly love to talk more about it.\r\n","is_moderator":true,"avatar_url":"/avatars/pushcx-100.png","invited_by_user":"jcs","github_username":"pushcx","twitter_username":"pushcx","keybase_signatures":[{"kb_username":"pushcx","sig_hash":"de6fb28b501c211e88fabddeacc834c6b922d738efd6b4108ce871879d039e510f"}]}}]} \ No newline at end of file diff --git a/model/src/commonMain/kotlin/dev/msfjarvis/claw/model/User.kt b/model/src/commonMain/kotlin/dev/msfjarvis/claw/model/User.kt index 3f70ef14..9917b485 100644 --- a/model/src/commonMain/kotlin/dev/msfjarvis/claw/model/User.kt +++ b/model/src/commonMain/kotlin/dev/msfjarvis/claw/model/User.kt @@ -7,7 +7,6 @@ import kotlinx.serialization.Serializable class User( val username: String, val about: String, - val karma: Long, @SerialName("invited_by_user") val invitedBy: String, @SerialName("avatar_url") val avatarUrl: String, @SerialName("created_at") val createdAt: String,