Up late again with shenanigans under way. Have recently decided to re-write all the code for 4cache.net as the current code is pretty terrible and it is possible for me now to code it in a decent and well optimised way.
The current code base is pretty terrible because I was teaching myself PHP as I was building it. The idea for it started off very simply, while working at a previous job we could pretty much browse whatever sites we wanted and since years of that had reduced my ability to enjoy normal things, I and my co-workers were very often found on /b. For those of you who don’t know, the images on /b can sometimes stay around for days, other times that can disappear in minutes. So I built 4cache so that when we found funny images to share we could store them on 4cache and send that link instead of sending the direct link and hoping that the image didn’t 404.
Getting suggestions from fellow co-workers the site ambled along, new features being implemented as we went along. The sprawling code base morphed as I learned how to do more and more with PHP until it “matured” into what it is today. A horrible mess of code that somehow works but can be a nightmare to modify now.
So that brings us to tonight, I am currently up way past my bedtime but I am doing something that I used to love doing a lot and am loving again. I attribute this new desire to rebuild to the immense satisfaction I have in my current employment, working for someone that actually cares about my well-being and team members who are as nerdy as I am.
Once I hit a happy alpha I will start getting users to test it out for me, hopefully image viewing will be faster, caching will be easier, and comments will work again. I’m tossing up whether to keep the tagging system or not as it hasn’t been implemented very well and needs an entire re-working and it’d be quite a job to go back and re-tag all 34,847 images that are currently in the database.
New features will include a method to report images and then be able to delete them. Currently I have to leave the record in the database because the pagination and Previous/Next links just assume that every link is just the current ID plus or minus one.
But having written up this post I think it is a good time for bed.