Lots of Wrong Experience
A number of years ago I was doing research on juvenile gang violence.* Over a period of about 12 years I went out with a police gang unit and gathered data on gang-related violence. During that time, personal computers were coming into vogue, and I thought that it might be a good idea to set up a database for the gangs so that the gang unit could help prevent gang violence and solve cases of gang violence. The cops in the gang unit liked the idea because they could have a database that pin-pointed the kind of crime they were tasked with preventing and investigating. The more general police department computer ran on a VAX and while they had a decent database, it was more for administrative goals than investigative ones, and the investigative elements were far too general to be of much use to the gang unit.
During the discussion with the head of the gang unit, one cop came up and said, “I’ve got over 20 years experience dealing with these punks, and they only thing they understand is a thump on the head.” His comment was duly noted, and after he left, the head of the gang unit turned to me and said,
He doesn’t have 20 years experience. He’s got 1 year experience 20 times.
He was telling me that after his first year, this guy never bothered to learn anything new; he just kept recycling the old knowledge.
A PHP Programmer with 1 Year Experience 20 Times
Over the years that I’ve been programming, I’ve learned new languages and new techniques in languages as they developed. Like most others, I started with sequential programming and quickly graduated to procedural programming. However, I got stuck with procedural programming and for the next 20 (or so…) years that’s what I did. I programmed in several different languages, but other than an experimental flourish in OOP, I just cranked away with my old habits that I had learned when I first started programming. However, in 2005 while doing some work for another programmer, Jonathan Kaye, who has a PhD in computer science from University of Pennsylvania, I was introduced to State Machines. Now State Machines (or Finite State Machines), require a different approach to programming. Using statecharts was a lot different than those old flow charts (that I never used anyway), and I had my first epiphany in looking at a program from a wholly different perspective. From State Machines, I found the State design pattern, and very quickly I found myself immersed in OOP.
I had been like that cop who had 1 year experience 20 times. Not only did I know a lot of languages, but I was advanced in several. However, I was not advanced in my thinking about programming. I was back doing procedural programming that I had learned my first year of programming.
A Trip to the 10th Floor
Once I got going, it was not an incremental climb.
It was like taking an express elevator from the basement to the 10th floor.
Anyway, the process was liberating. Instead of getting 1 year experience 20 more times, I was getting new experiences and finally growing as a programmer. Now, when I look at a programming problem, I look at it differently than I did for the first 20 years….and from the 10th floor.
I would be very interested in hearing any of your experiences. Use the comment section to relate your PHP experiences with OOP structures and the pros and cons of OOP approaches to PHP programming.
*(I really did gang research for over a decade. Check out this book.)
Copyright © 2013 William Sanders. All Rights Reserved.