SHARE
TWEET

Hotwheels sees the havoc

a guest Jan 30th, 2016 108 Never
  1. 09:33:03    ~copypaste  god what a mess
  2. 09:33:12    ~copypaste  how does this new stats thing even work?
  3. 09:33:17    ~copypaste  it doesn't even hook into post.php
  4. 09:33:44    linear  lmao
  5. 09:33:53    ~copypaste  it doesn't even count
  6. 09:34:03    ~copypaste  correctly
  7. 09:34:06    ~copypaste  it's just addition
  8. 09:34:12    ~copypaste  seriously what ?at
  9. 09:34:48    ~copypaste  according to the PR...
  10. 09:34:48    linear  it might be doing uhhh
  11. 09:34:51    ~copypaste  "It is automatically updated as posts are created and will allow for perfect historic records to be kept."
  12. 09:34:58    linear  oh, 'perfect', nevermind
  13. 09:35:00    ~copypaste  i see a REPLACE thing
  14. 09:35:24    ~copypaste  function updateStatisticsForPost
  15. 09:35:25    ~copypaste  lol
  16. 09:35:25    ~copypaste  ok
  17. 09:37:03    ~copypaste  god what a mess.
  18. 09:37:39    ~copypaste  just, how could it have gone this wrong.
  19. 09:38:15    linear  lmao
  20. 09:40:03    ~copypaste  oh no
  21. 09:40:23    ~copypaste  | post_id_array   | text             | YES  |     | NULL    |       |
  22. 09:42:35    ~copypaste  lel
  23. 09:43:38    ~copypaste                  ++$boardStats['post_count'];
  24. 09:43:47    ~copypaste  how does someone possibly fuck up this badly, have you never heard of race conditions
  25. 09:43:49    ~copypaste  i swear to god
  26. 09:43:56    ~copypaste  no wonder all the fast boards are incorrect
  27. 09:43:58    ~copypaste  jesus
  28. 09:44:06    ~copypaste  how fucking high do you have to be
  29. 09:44:17    ~copypaste  to put serialized PHP arrays into mysql
  30. 09:44:22    ~copypaste  and use those to generate our stats
  31. 09:44:24    ~copypaste  why why why
  32. 09:44:30    linear  aha
  33. 09:44:44    linear  i barely know what's happening becuase lack of code context, but
  34. 09:44:49    linear  20:42:51 ~    copypaste |  to put serialized PHP arrays into mysql
  35. 09:44:50    linear  ( ???)
  36. 09:44:52    ~copypaste  yeah
  37. 09:44:55    ~copypaste  we can't even use this. i might have to revert back and n-tech is ignoring me lmao
  38. 09:45:04    linear  i mean, maybe there's an argument for it, but, it /sounds/ bad
  39. 09:45:23    ~copypaste  https://camo.githubusercontent.com/a11f7752612cf60022fab87b1426424973962bba/687474703a2f2f692e696d6775722e636f6d2f65777a383672662e706e67
  40. 09:45:31    ~copypaste  trust me, it's bad.
  41. 09:45:41    linear  WHERE DID IT ALL GO WORNG
  42. 09:45:43    linear  WRONG*
  43. 09:45:49    ~copypaste  so what's happening is...
  44. 09:45:53    ~copypaste  (i think)
  45. 09:46:06    linear  ok honestly i have
  46. 09:46:10    linear  NO CLUE what that schema does
  47. 09:46:14    linear  from that image
  48. 09:46:19    czaks   big lambdas ftw
  49. 09:46:21    czaks   xD
  50. 09:46:25    ~copypaste  this is a fucking mess
  51. 09:46:32    ~copypaste  ok so every hour it makes a new row
  52. 09:46:33    ~copypaste  right
  53. 09:46:42    linear  n-no
  54. 09:46:51    ~copypaste  and post_id_array contains 0 => id, 1 => id...
  55. 09:46:55    linear  where is anonfagola when we need him
  56. 09:46:55    ~copypaste  and it uses that to count the posts
  57. 09:47:08    ~copypaste  but he didn't even think of race conditions. it edits the post_id_array on every post
  58. 09:47:13    ~copypaste  two posts made at the same time, one overwrites the other
  59. 09:47:17    ~copypaste  that's why all the fast boards are incorrect
  60. 09:47:19    czaks   i love backporting commits where
  61. 09:47:21    `7185   this is hilarious
  62. 09:47:27    czaks   beside commits
  63. 09:47:29    czaks   author also changes
  64. 09:47:31    czaks   } else {
  65. 09:47:32    ~copypaste  this is a fucking mess
  66. 09:47:33    czaks   to
  67. 09:47:35    czaks   }
  68. 09:47:36    czaks   else {
  69. 09:47:37    czaks   xD
  70. 09:47:38    ~copypaste  mhm
  71. 09:47:39    czaks   etc.
  72. 09:47:40    ~copypaste  and also
  73. 09:47:44    linear  lmao
  74. 09:47:47    ~copypaste  updateStatisticsForPost( $post );
  75. 09:47:48    linear  screenshot it and write next to it
  76. 09:47:50    ~copypaste  right below
  77. 09:47:53    ~copypaste  insertFloodPost($post);
  78. 09:47:59    linear  "// new averaging system"
  79. 09:48:00    ~copypaste  and then these same people bitch about how we don't stick to code standards
  80. 09:48:03    linear  then put cs_grad.jpg on it
  81. 09:48:03    ~copypaste  AAAAAAAAAAAAAAAAAAAA
  82. 09:50:36    ~copypaste  how does someone fuck up this badly
  83. 09:50:38    ~copypaste  i can't even
  84. 09:50:48    ~copypaste  the fix is to rewrite it again
  85. 09:50:50    ~copypaste  jesus christ
  86. 09:51:02    ~copypaste  all you have to do
  87. 09:51:05    ~copypaste  all you have to do.
  88. 09:51:09    ~copypaste  is write the max(id) every hour
  89. 09:51:18    ~copypaste  this was the simplest part of the task and it's fucked up completely
  90. 09:51:30    ~copypaste  RIP
  91. 09:51:30    ~copypaste  I
  92. 09:51:31    ~copypaste  P
  93. 09:52:23    ~copypaste  he also is using less_ip
  94. 09:52:27    ~copypaste  so the active users is off too
  95. 09:52:33    ~copypaste  because that's unique of range
  96. 09:52:34    ~copypaste  sigh
  97. 09:52:37    ~copypaste  fml
  98. 09:52:48    ~copypaste  if you want something doen right etc
  99. 09:53:45    czaks   High Quality Tinyboard Code?
  100. 09:55:34    Not-3c39    [infinity] ctrlcctrlv opened issue #470: All fast boards have incorrect PPH because the new board stats shits all over concurrency - http://git.io/vfevb
  101. 09:56:00    linear  lol
  102. 09:57:42    ~copypaste  what might be able to be done is
  103. 09:58:05    ~copypaste  run a background process to scan every board, SELECT id FROM posts WHERE date_sub...
  104. 09:58:22    ~copypaste  and then add those to his shitty array thing
  105. 09:58:32    ~copypaste  so basically run a background process to combat the shitty race condition
  106. 09:58:34    ~copypaste  ayyyyyy lmao
  107. 09:58:44    ~copypaste  or we revert because this is 75% inaccurate
  108. 09:59:20    ~copypaste  hopefully n-tech will have an idea and not just ignore the problem
  109. 09:59:21    ~copypaste  ( ???)
  110. 09:59:52    czaks   why do we have to care about race conditions
  111. 09:59:59    czaks   maybe let's run everything in one thread
  112. 10:00:03    czaks   !
  113. 10:00:05    ~copypaste  can't be done
  114. 10:00:11    ~copypaste  i have 3 machines that can run post.php
  115. 10:00:43    ~copypaste  because the dude is saving this huge array of posts every time
  116. 10:00:48    linear  lol
  117. 10:00:49    linear  how
  118. 10:00:49    linear  high
  119. 10:00:50    linear  ahahahahaha just HOW HIGH DO you  even have to BE just to DO something like that.........
  120. 10:00:51    linear  ahahahahaha just HOW HIGH DO you  even have to BE just to DO something like that.........
  121. 10:00:59    ~copypaste  yeah this is shit
  122. 10:01:29    ~copypaste  also lol i just open a github issue with a chat log
  123. 10:01:31    ~copypaste  so fucking lazy
  124. 10:01:36    ~copypaste  he'll probably be upset at that but fuck
  125. 10:02:57    linear  that issue
  126. 10:03:02    linear  hilarious
  127. 10:13:17    ~copypaste  i think i found the problem
  128. 10:13:59    ~copypaste  nope
  129. 10:14:06    ~copypaste  his code is really difficult to understand
  130. 10:14:07    ~copypaste  lol
  131. 10:22:16    ~copypaste  php > echo (int)((time() / 3600) * 3600) . "\n";
  132. 10:22:16    ~copypaste  1429496509
  133. 10:22:16    ~copypaste  php > echo time() . "\n";
  134. 10:22:16    ~copypaste  1429496517
  135. 10:22:20    ~copypaste  this is just getting ridiculous
  136. 10:22:24    ~copypaste  what the fuck are you thinking?
  137. 10:33:19    linear  21:20:50 ~    copypaste |  php > echo (int)((time() / 3600) * 3600) . "\n";
  138. 10:33:20    linear  ( ???)
  139. 10:33:41    ~copypaste  > $board['pph'] = round( $boardActivity['average'][ $boardUri ], $precision )
  140. 10:33:47    ~copypaste  i've discovered the problem
  141. 10:34:06    ~copypaste  he makes an average of the last 72 hours instead of just getting the last hour
  142. 10:34:28    ~copypaste  the race condition issue, while still there, is not as bad as i thought
  143. 10:34:36    ~copypaste  at least, it'll probably drop a post once in a while
  144. 10:34:40    ~copypaste  but not always
  145. 10:35:28    linear  hmmm
  146. 10:35:41    linear  is 'echo (int)((time() / 3600) * 3600) . "\n";'in the code
  147. 10:35:41    linear  lol
  148. 10:36:31    ~copypaste  yes.
  149. 10:36:35    ~copypaste  not the echo part
  150. 10:36:39    ~copypaste  that was me figuring out what the fuck it did
  151. 10:36:40    ~copypaste  lol
  152. 10:36:42    linear  lol
  153. 10:37:04    linear  hey do .aop add linear if you dont mind
  154. 10:37:08    linear  i need to win my /ns alist war
  155. 10:38:26    linear  or voice :>
  156. [...]
  157. 12:48:26    linear  dem commits
  158. [...]
  159. 13:38:16    n-tech  lol
RAW Paste Data
Top