v2 - OOP is the key huh?

Code | Tuesday May 24 2005 3:31 pm |

Once again, reviewing thus far what I have accomplished in v2 I came across another small revelation.

    After glancing over the same page of roughly 200 lines of code I figured I'd take a break from it and read code from other content management systems to help get an idea of how things are laid out from someone elses perspective. It didn't take long before it dawned on me that my code is still sloppy and repetative. I need to work from the end to the beginning. My blog posts about the progress of v2 even represent how my actions work from beginning to end which inevitably leads to recoding from beginning to end.

– Thinking out loud –
    I've never been one to map out an entire project and the goals behind it before beginning it. Taking this blog site for example. I took a quick overview of what I was using from PHPx and started a small list in a blank text document of my thoughts to get me started. Something like this:

v2 - info
1) I need to pull info from PHPx db system or learn and use the structure that was created.
2) I need to create an image gallery that didn't use the form upload method. (personal preference)
3) Entirely new graphics. I want it to represent me, I'm the one that lives here. heh.

    The solutions came quick and without thought. I figured using PHPx's database structure would be a good start as it might be the easiest route while clueing me into some helpful details I would otherwise overlook. Associating paterns between tables and detailing it's ties to the information within comes automaticly even if this hadn't been structured to store my own thoughts. Zippy had already hacked up some killer graphics for BMT before I started v2 which promoted a 100% attitude change towards coding all together. The awsome graphics and time spent together working on them set the simple yet overqualified base I needed to represent myself to myself from.
    My dad sent me an email with a comment I *hazily* quote, “I've been reading your blog. I've checked out the whole site, theres a lot of information on there, but I get the feeling there is a lot more I'm not seeing?”. As a matter of fact your right. At work I am infront of a PC all day and watch a stable network. At home we lack interest in TV so we entertain individual computer screens from the couch with a small 14″ television in between them connected to the DVD player & occasionaly Zippys 2nd desktop. I'm infront of a PC all day, everyday. If I don't accidently fall asleep on the couch or in my recliner infront of my pc I'll still wake up within 10' of one. I can and do log virtualy everything I can manage putting to text. If a thought peeks my interest for 5 minutes it may suddenly be found as a new forum in my private list with 100 topic threads entertaining 2 or 3 post threads each. I could tell you how many hours of sleep I've had in the past month. I log a lot. Here's a quote I'm sure someone else came up with “If destiny isn't what makes me log as much as I can now then it's what I log now that will help me control what gets logged later” if that makes any sense to ya.

v2 - rethought
1) calendar - date/time/events/ sms-reminders?
2) I want to build cross associative links from images to news/forum posts
3) I want to incorperate mirroring & archiving link associated websites
4) …

    You'd think somehow I would have been smart enough to see the whole picture and work from the inside out but I didn't. I cut up the images to create a template header & footer. I started by creating a couple empty template files representing the simple things like forums.php, index.php, gallery.php, about.php, etc, and then started working on organizing news posts and displaying them in index.php. Then came a little work on the header and navigation. Forums.php popped up along with a bunch of less usefull pages representing my car, bike, projects, etc.
    I was talking to Blayne when he mentioned that he looks at other peoples code a lot when working with a specific language so I just started wading through code of a few content management systems to roughly realize the general quality I was lacking. I read through a small amount of code from sites purely OOP to those that used none. I noticed however, there was an orginization representing the quality of objects and how often they are used in the program when viewed and analyzed as a whole before the first lines of code hit the paper.
    With that in mind I'm going to get a notebook real quick and organize the project as a whole. If I had organized correctly then the first thing I might have coded would be a function that prepares text for display to the screen. Everything is based on displaing text so I'd assume that is inherently where I should start right? Either way, wether you understand what clicked in my mind or not, I am once again starting over from ground zero. Short of the notes I wrote I'll be archiving it all away under another learning experience.
– Done Thinking out loud –

    I believe that focusing on OOP with a new look on orginizing the project as a whole before working on the parts I will produce a neater, more efficient, program. The code will be more organized thus easier to read and maybe even easier to show other people. heh. If everything comes out in the end the way I'm seeing it now I should have a very healthy library of reusable, organized, and effective code. Hopefully I'll come out with better overall habbits and technique. I might not bore myself so much re-writing everything for every project I take on. Arf. *Paradigm Shift*

No Comments

No comments yet.

RSS feed.

Sorry, the comment form is closed at this time.