So I finally decided to start a complete re-write of the code that drives The Bushwick Dream from scratch. Not a single piece of existing code is going into the new site in hopes of cutting down on some of the fat that its developed over the course of two years. Upon looking through the code I’ve realized that there were whole classes floating around for managing podcasts, source code and various other things that were used when I originally started Pure Defect. A quick check shows that the site has grown to a whopping 7,063 lines of code over the course of its lifespan, and some of that definitely needs to go.
The re-write also lets me address issues with the site that have been long-standing but would take far too much effort to fix in the current code without potentially breaking everything else in the process, such as the outdated and archaic template engine that accounts for roughly 1400 lines of code across two different files. The WYSIWYG used for editing content is also a kludged together mess that seems to break just about everything it touches unless handled with kid gloves, with the re-write its going away in favor of a much more unified system with a proper media management component.
Last and hardly least are the new features like modular plugins allowing for new features to be integrated into the site without breaking existing features. Currently two monolithic files do about 80% of the work for the site, but with the new design everything will be broken out into separate files based on the role of the code allowing for a much cleaner back end when I have to make changes. This approach also means I won’t have to rip my hair out of my head when a certain someone asks for a new and exciting feature because it will be a matter of dropping the plugin file into a folder, adding a few quick tweaks to the template and then going back to watching Netflix or staring into the abyss that is reddit.
Its probably going to be a long process to do properly, but in the end not only will this make my life much easier from an administration standpoint but it will also allow me to use the code base in the future to deploy other sites much faster and improve my coding chops by forcing myself to learn new methods and styles.