Wednesday, January 9, 2013

I Was Wrong

I mean, I was right… the first time.

When I first started working on SlickText, I converted the code that the CEO/Designer had written such that it would use Smarty templates. It was the right way to do things. However, he pushed back, saying it was “too complex”, and I caved and reverted back to the PHP/HTML files and output buffering that he was using previously.

That’s where I was wrong.

I shouldn’t have done that. It’s decreased the satisfaction and the pride I have in our code base. I can point to certain parts and be reasonably proud of what’s written. These are the down-and-dirty, low-level parts; the data access and class structure. But I simply can’t point to individual pages and be proud of what is there.

Most of it is messy. Fixing a bug in the presentation can cause a bug in the logic, and vice-versa. Code that could have been abstracted to an included template is instead repeated in several places across the site. There is PHP interspersed with HTML, and it looks like hell. This unfortunate occurrence has also bled over into the JavaScript on several pages. It’s become less likely that I’ll include a script from a separate file; they are often in-page (though not inline).

So, I was wrong.

And I will begin the work to correct my mistake.

No more Mr. Nice CTO.

No comments:

Post a Comment