Anybody have any ideas for getting users back?
  • Generic placeholder image
    * [a]cc-d /i/ieddit 15d
         Anybody have any ideas for getting users back? (self.text)
you are viewing a single comment - view all comments
  • You shouldn't be so hard on yourself. I think you've done a great job with the website. As others have commented, this is one of the few decent alternatives to Reddit. Now that the site is more much mature, have you considered posting it to Hackernews?
  • [deleted]
  • in that commit specifically, look at the deleted file in the diff.

    all the new code added is actually decent, it's what was removed that is the utter horror show
  • I'm waiting for the site to be feature complete before posting to HN again, which hopefully should be sometime during the next few weeks.

    There were a few areas of the code which were an absolute horror show, the worst of which being the sub mod html files I just spent several hours refactoring. This was the first project I had worked on in over a year, and it really shows in some of the early code lol. While the flask-sessions bug may not of been caused by my poor code, there is certainly no shortage of horrible code I am responsible for, especially early on.

    If I had to do everything all over again, with the knowledge/practice I've re-accumulated, quite a few things would be different in terms of code structure.

    For an example:

    I spent several hours on this commit, and if you pay attention to how things were formatted, you'll see just how truly bade the code was in some places lol.

    But yeah, stuff like that I can and will be hard on myself for. Although at the end of the day, users don't give a shit about code structure, only results.
  • what exactly was the root cause of the flask/session issue? you've probably explained it before somewhere, in which case, if you can link to the explanation, if you have the time and wherewithall... have been wondering about this since.
  • the bug happened like this:

    1. 2 users send a request to the server within the same time window
    2. flask-sessions assigns BOTH REQUESTS the same backend server session
    3. flask-sessions then, completely ignoring client-side cookie, overwrites client session cookie to match server session it THINKS the request should have
    4. BOTH users now have the same client session cookie set

    it took me forever to figure out what was going on, but yeah, that's why. flask-sessions isn't thread safe apparently under certain conditions.