Be Kind - Please Rewind Yourself

It's been a long time since I've really smiled while programming.  Fortunately, I've recently had the joy of being able to rewind myself to back when I started programming in 1997.

Let me explain.

At work, we've been looking to hire a PHP programmer that knows their stuff.  Since we've just started interviewing candidates and we already settled once for someone that won't be with us in the development area, I felt it was my duty to have some artillery for the interview process.  I was able to come up with some simple challenges that address core concepts I expect someone to know if they're going to be able to work on our project (thanks to Jeff Atwood and Steve Yegge).

In the midst of all of this, I came across some badly written C++ code that made me think about the joy I had programming in that language back in college.  Now, having access to Visual Studio 2010, you might think I started to work on some simple programs in my long lost love language, but instead I diverted myself and started learning Python. I really recommend grabbing a copy of Invent Your Own Computer Games with Python - Second Edition (available as a free PDF) and spending time just getting re-acquainted with how simple programming can be.  Truthfully, it feels like I'm back in high school learning to program with Turbo Pascal all over again.

Media_httpimgsxkcdcom_ucdmd

Media_httpimgzemantac_xzkyh

Know Your Skills - You Can Be Dangerous In Bad Ways Too

Application development is a skill that some people are taught, and while others try their best, it's often evident when someone has no experience (or is following bad precedence). I came into the PHP world straight from C++ focused college over 6 years ago, and have been learning that ever since. From the first "a college student started it and now you have to support it" day at my previous commitment to the "business application built against a deadline by people that used a text editor" (I almost wish that was a joke).

So I recently had a module in our web application that I've been tasked with revising, so I took the opportunity to port it to another section of the code where all the other modules reside.  Why would I do such a thing?  Because it was poorly designed. In a non-object language, I guess it could make sense, but even then, this program was designed during the crux of PHP 4 and there would have been better options than what was chosen.

The way it worked was that it had one main file handle the direction of the script, with many others included to dictate their function.  Files like actDeleteItem.php, actUpdateItem.php or even actAddItem.php - all accessed via a large switch statement. When you add in the fact that it was also set apart from the main module of the program and was in an obscure area, it boggled my mind even more.

So I went to task (as I have been doing over the past year for other sections of this web application), and have been working on taking those many pages and compiling them into a properly designed PHP class/module.  Now I've got nearly 2000 lines of code that have been re-tuned to fit together properly.  Likely not near as clean as I could have written it from scratch, but this being such a huge step and it being production-oriented code, functional equivalence was my goal.

And so far, it's working as it was before.  But now it's better put together, out of the abstract area of our system and put with the other classes I've developed over the years.  If my predecessors had made the proper decisions, I could have saved a decent amount of time on this module alone.  Thankfully, I tend to enjoy a coding challenge, and the best part of this is that the extending that I'm going to be working on tomorrow will now be much easier.  Here's hoping the people that will inevitably follow me in this job don't think the same thing about my code as I've thought about what I've been left to take care of.

Media_httpimgzemantac_ethzm

Learning New Tools - Part 1

I've been wanting to work with C# for literally years, and now, I've finally taken some of the initial steps to not only learning it, but more importantly, using it in my day to day work.

Just this past week I had the privilege to finally purchase Visual Studio 2010 Professional for my day job.  It may be the lowest on the totem pole of Visual Studio editions, but all things being accounted for, it's a huge step in the right direction for us. As a company whose flagship product is an aging PHP web application that we're continually extending, to say this is a breath of fresh air would be an understatement.

Media_httpimgzemantac_fjhai

New Tools Don't Always Mean Better Productivity

I've been working with PHP now for over 6 years, and for about 5 of them I've been using the Zend Studio IDE. Written in Java, it's gone from Windows to Mac and back to Windows with me, and has been a fantastic tool. The only problem is that I'm still using version 5.5, the last of Zend's non-Eclipse-based editor.

Awhile back, someone at Zend thought it would be a wonderful idea to merge their ideas into Eclipse and push out a newer, different Zend IDE instead of maintain their current path.  I guess some folks really like it, but as is the issue with all major development path changes, there are those of us that refuse to conform, either because of stubbornness or, believe it or not, the new tool isn't near as good as the older.

Now occasionally I visit the official support forums and read the cries of many developers pleading that Zend change their course and get back to supporting a lighter, less bulky solution.  Some even look to change IDE's when their support subscription is up, but I've not done that because I've yet to find another editor that works so fantastically well (and the support subscription is totally optional).  I've tried Netbeans, Komodo, PHP IDE, and countless others, all of which have paled in comparison to Zend Studio 5.5.

Initially, when it came out, I tried Zend Studio 6. I really wanted to like it, and Zend was pushing out the first version of their framework at the time, but overall, I was very unimpressed.  You have to remember, my day job is development and support on a rather large, business to business application written with support from PHP 3 to the current PHP 5.3, with the project laid out in a rather non-standard way.

So, I waited.  I went back to version 5.5 and forgot about it.  When Zend Studio 7 deployed, I jumped in for the obligatory 30-day trial.  Again, it was very similar to version 6, and I again was sorely disappointed.  I even went through an article Zend put together on transitioning from the aging 5.5 version to the newest, yet still hit many issues that simply weren't an issue before.

Now Zend Studio 8 is in beta, and I'm getting ready to take another look.  After two lackluster versions, I'm not hopeful, but I'm willing, and I'll let you know my thoughts.

Media_httpimgzemantac_uecqs

Retrospection

Some people really enjoy the work they do, and while generally that is true for me, I find that there are times where the grass definitely seems greener somewhere else.  Especially when I see things like job postings from Microsoft.

Don't get me wrong, PHP has served me well over many years but there's the major issues I have with it that really causes me to yearn for something better.  If that means learning .Net in my current job position (or on the side, which looks likely), then I seriously need to get to it.  I should also point out that I was forced to learn PHP as a job requirement 5 years ago, just like I was forced to learn Java for a programming class in college I barely squeaked by in.  I should note that I never felt forced to learn C++ as I fell in love with it as I got high A's, and even VB6 was a joy at times.

It seems for all my love of the programming style of Microsoft's languages, I've been forced into other areas - specifically this PHP one.  My first real programming gig was PHP / MySQL on Apache on Xserves.  My second programming gig was initially PHP / MySQL on Apache on Xserves, and has migrated to PHP / MySQL on Apache on Server 2008.  If I can migrate to at least ASP.net / C# / MySQL on IIS on Server 2008, I'll have made lots of progress.

But one thing I've never truly done well is being steadfast in pushing forward in one area when feeling comfortable in another.  Sure, we migrated from Apple Xserv's to Windows Server 2008, but that's because it was my only chance to throw myself a bone, as we needed to get some sort of managed hosting.

PHP works and I'm comfortable, why change?  There's so many reasons why I still use PHP instead of ASP.net / C#. For one, because I feel like starting a rewrite of our current web application is something that can never be completed.  I am only one man (and there is nobody else) and with my current implementation plans on the PHP side of things, I feel like having to redevelop these items plus re-implement the system from scratch could cause.  For two, I'm having a bugger of a time getting .Net 3.5 setup properly on our machines.

Learning new stuff shouldn't be an issue, but it is.  And it's not like I don't have the tools - I have digital copies of C# 2008 and Learning ASP.Net 3.5 with C#. I've gotten into the BizSpark program so I have access to all the developer tools I could ever need, including Visual Studio 2008 (and the soon-to-be-released 2010).  I even have access to some great hosting I hardly utilize over at Reliablesite.net, and to top it all off, we've even migrated to Windows Server 2008 for our production web servers that are utilizing Apache for PHP and MySQL.

Instead of taking charge and leading the way, I've felt small and unimportant in my role at work.  I'm currently struggling with a module implementation that I keep wanting to put off.  The economy hasn't helped as I have tons of responsibilities that have been added during my tenure yet I've gotten only one raise and only when it was a mission critical moment (when my CTO was let go and I assumed many of his responsibilities). And when I'm at work, I'm fully secluded (which is great) but I make up the IT team nearly 100%, so there are no programmer or even techie co-workers anywhere close to where I am relegated to exist.

I guess, in short, it feels like I have been a passenger on this journey, just along for the ride, allowed to offer advice for directions at time, but never fully in control.  I think it's time for me to take the wheel.

Understanding The Process

As a programmer, I tend to have times where I need to report to someone that isn't aware of how the entire design process may work.  There are times when I'd like to be able have them sign some big disclaimer or, better yet, hand them a guidebook on how a process is to work.

Thankfully, not all people I've had to report to are overly critical of what I do on a day-to-day basis

Right now I'm in the process of overhauling the reporting section of the web application that I maintain, and since this is day 3, it seems like I should be past the "create the plan of attack" phase, but I'm not.  I keep myself (somewhat) busy, as I'm the only IT guy at my job, but I'm also not just taking my time on making sure the implementation process looks correct.

If I wait too long, yeah, I could over analyze.  But, if I start coding too soon, there is the high probability that I'll end up having to redo areas that weren't fully thought out.  I don't like designing the process anymore than the next guy, but it saves a huge amount of development time if I know up-front how each aspect will work and how they will interact with each other.

So, while I'd rather be coding, I'd rather not be fixing my own mistakes either.  I just wonder if that's how the person(s) reading my reports see it...