It’s finally complete! The site is not overly complicated, it’s a Reddit-style site called Linkditt.com (I know what your thinking, I will replace that logo!). Essentially, users can view links posted by other users as well as vote them up and down, which in turn add or subtract points from the user’s overall score (like Karma). There is a “comment and share” page where users can use the Disqus commenting platform and share the post on their favourite social media platform.
There are several implementations that you will notice as you navigate the site:
- Infinite scrolling for posts, like you would see on Twitter
- Automatic sign in following signup (no need to remember your username!)
- Responsive design for mobile
- Password retrieval email system
- View all your past posts and edit them
There are tons of other little nuances that took me a while to wrap my head around. For instance, when you vote on a post the system knows how you voted previously (if you voted) and adds or subtracts a point depending on how your latest vote. You can’t accumulate votes for the same post this way. The problem here is that when you place your vote you should only see the posting’s total vote count go up or down by one. Originally, I had this going back to the database and pulling whatever the score was on that post but if you had many people voting at the same time, as they do on Reddit, then that number could jump by however many users voted since you refreshed your page. You might click up and the number could jump by five or ten votes! Thus, I had to implement a system that just added one to the number already on your page while ensuring that you stay within the +1 to -1 voting range. This is one of those things I took for granted from other sites before making this one!
For me, this proves that you can learn to code (a very useful skill nowadays) for very little money. If you have access to a computer and the internet all it takes is being very curious and very determined.