New Project Time

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.

Site Re-Design and Launch Complete!

Well after months and months of work I finally launched a brand new Bushwick Dream site this afternoon.  Its been a long time coming since the site first started and I’m glad its finally over with so that I can go back into maintenance mode, but damn was it a fun run to make the new features work and iron out all the bugs.  For anybody interested you can visit the new and improved site here.

A calendar in less than 50 lines of php

It ain’t pretty by a long stretch, but the fact that it can fit into less than 50 lines of code and could be easily converted to a function for use in existing projects makes me a very happy camper, hopefully it will make it into the TheBushwickDream in the near future.

Bored Code: Primes in Perl

Yet another boring day at the office, so I decided to dust off my Perl book and try to relearn some basic chops in the language and maybe find a good use for it.  Unfortunately that was not the case and in the process of getting myself familiar with it I ported some old code I wrote for artificially creating a load on my servers by crunching prime numbers.  Its a pretty ghetto piece of code and I’m not sure about its limitations so if it causes your machine to catch fire or start making noises like a dying goat I’m not responsible, actual bad code after the break.

Read moreBored Code: Primes in Perl

Bitnami