Walk the Walk Before Talking the Talk
- 19
- Add a Comment
If developers think back (in some cases, WAY back), we can all remember a time when we knew very little about programming. Some will declare that there was never such a time for them, but they've just killed enough brain cells that they can't rememeber.
A question that eventually comes up for programmers who stick with it long enough is: Am I an expert yet? Do I have the chops to throw down with The Big Kids?
In some professions, such as the acting biz (where I came from before I started programming), you can fake it. You don't have to be an expert if you can just act like an expert long enough for a few people to believe you. Halfway decent actors will often become decent actors just by acting like decent actors. After all, they're practicing the craft in pretending to know the craft.
It doesn't work that way in professional development; You've either got the chops to call yourself a pro, or you don't. And more importantly, you either behave like a pro, or you don't. You can't just claim to be a professional software developer, and in the act of making that claim, become one.
I was reminded of my thoughts along these lines today after reading Ian Kallan and J. Scott Johnson's discussion regarding PHP Best Practices.
What professionalism boils down to in software development (and acting, for that matter) is one thing: discipline.
That's it, and that's all.
Thing is, the "that's it" of discipline covers a hell of a lot of ground. To name a few things:
- You must be disciplined enough to write good code. PHP, Perl and others are flexible enough to permit developers to write bad (or in some cases, really bad) code that still functions ... but a pro knows that there's rarely, if ever, a benefit to banging out crap just because it's permitted by the language. Quit blaming the tools. PHP isn't responsible for bad PHP code -- people using PHP are responsible for bad PHP code.
- You must be disciplined enough to write well-documented code. Yes, functionality counts, but if you're hit by a bus (or trampled by your fan club at an ego-rally) tomorrow, someone else has to take over your stuff and make sense out of it. For a pro, documentation isn't grunt work left to the community, or the peons. The pro just does it because it's what pros do.
- You must be disciplined enough to use source control. You don't talk about using it, or bitch about having to use it, you just do it. If you're spending a lot of time constantly fighting Subversion or CVS, and you think you're a pro, you probably need to think again. Source control is as natural to a pro developer as typing with all ten fingers. Get it figured out and adjust to the version-controlled world view if you want to be considered a pro.
- You must be disciplined enough to write unit tests. Pros realize that they're not perfect, and that their code should be tested properly before being rolled out. Bugs should have unit tests written for them to reproduce the bug so that you know when they're fixed, and as your collection of unit tests grows, you'll know that they stay fixed. Most pros don't refer to those who "get it" in regard to unit testing as freaks.
- You must be disciplined enough to write code with error reporting (by whatever name your language of choice calls it) cranked to the max. "use strict", "error_reporting(E_STRICT)" on PHP5 or "error_reporting(E_ALL)" on PHP4, whatever: these modes of development weren't created to annoy you, they were created to save your ass and hopefully help you evolve into a better developer. Writing new code under something as sloppy as "error_reporting(E_ALL ^ E_NOTICE)" should be an absolute last resort.
- You must be disciplined enough to be disciplined even if you're the only one working on a project. After all, we all hope that our next brainchild will either gain a cult following in the open source community, or drum up a truckload of cash via investment or acquisition. At the very least, prepare for the possibility that another developer will join you on a project and may expect some process to be in place. Don't fall into the trap of having an investor pass on your project because you chose not to be disciplined in your development. It ain't 1999 anymore: investors these days actually have real studs at their disposal to conduct due diligence, and word will get back to VCs and the like if your codebase and development habits are unprofessional.
Of course, there are a lot of other things that define a pro, but they all come back to discipline.
The other key ingredient of a professional developer? Humility.
That's right -- know when to say "I don't know." It's okay to say it more often than you may think. No one's expected to know everything.
Recognize that your peers and co-workers may have something valuable to contribute -- don't be afraid of them. Remember that it's all a learning process, and admitting mistakes and learning from them is more well regarded than pointing fingers at others and never fessing up to writing code that is bad, buggy, terminally broken, or incapable of handling even minor degrees of scale without a room full of hardware to run it.
The most professional developers I know -- the guys who really know what they're doing -- happen to be the ones who do the least amount of strutting around shooting off to the masses about how professional they are. Funny how that is.
To tie this all back into the discussion at hand, I'll say:
Ian, you sound like an excellent developer. Haven't had the chance to meet you yet, but I look forward to the day we eventually do meet. Take a look at SimpleTest as well as PHPUnit2 and plain 'ol .phpt -- I've found SimpleTest to be invaluable in the Feedster frontend re-write. Also, in your framework exploration, be sure to check out SOLAR; it's very well done, and E_STRICT compliant.
Also, I don't think it's necessary for any of us PHP developers to define Best Practices -- after all, the basics of Best Practices should apply to any language. Shelves full of books have been written on the subject; we shouldn't have to re-define it. Those who want to practice Best Practices will take the time to read that stuff and apply it to PHP development.
Since some will consider this post to be an arrogant one, I'll be the first to tell you that I am faking it. I'm a New York University-trained actor who's a "crossover guy" -- I started programming freelance when I didn't want to wait tables in Los Angeles.
I have never had formal development training, and I lieu of such training, I have devoured books like Code Complete, Rapid Development and Software Requirements. Only within the past two years have I added version control to my daily routine, and I finally got around to adding unit testing to the mix regularly about six months ago.
Becoming a true pro is an evolutionary process, and even though I've been developing since 1995 and using PHP(/FI) since 1997's 2.0b6, I've still got a long way to go and a lot more to learn.
Until I get there, I'm doing what actors do: "living the role" of a professional developer and focusing on walking the walk as closely as possible. I hope that what comes out of each day of refining my "performance" as a pro results in incrementally better code. Take stock at the end of each day, and try to improve the walk the next day.
19 Comments
Marcus
February 16th, 2006
at 12:52pm
Clay… don’t see any contact info anywhere, but I was wondering… would you be interested in doing a Podcast with me. The story of Feedster moving to php 5 sounds like it would make for a great conversation. Get in touch with me: http://podcast.phparch.com
- M
Shawn Coomey
February 16th, 2006
at 1:43pm
This is the best blog I’ve read all day. Your bullet points are now officially part of my development commandments. It would behoove all developers, at any level, to do a regular ‘look in the mirror’ in regards to these examples of disciplined coding. I, myself, am regularly guilty of not following half of them (documentation and strict error reporting in particular). I’d like to single out documentation in particular: there seems to be many formal ‘ways’ to document your code, be it javadoc (or phpdocumentor for us PHP folks), but even sprinkling comments about what your code does throughout the source is a good start. Good code is usually simple and well structured code… it will practically document itself if done right.
Well said Clay.
Ligaya Turmelle
February 16th, 2006
at 2:38pm
Nice list… and I even do the majority of them which kinda surprised me. I haven’t regularly used version control and have never done unit testing but they are on my todo/learn list (which never seems to get shorter – no matter how much I learn)…
Maybe when I’ve been doing this for 30 years I’ll feel comfortable enough to say I’m an expert – but I doubt it since there is always so much more to learn.
Clay
February 16th, 2006
at 5:05pm
Marcus: I’d enjoy that, thanks for the invitation. I’ll hook up with you via email. (And thanks for the reminder to get my email address up on this placeholder blog!)
Shawn: Thanks for the kind words.
Chris Shiflett
February 16th, 2006
at 5:32pm
> Spend more time reading the PHP online manual and less time
> booking speaking engagements billing yourself as someone
> intimately familiar with the language. Seriously.
So funny.
By the way, error_reporting(E_STRICT) doesn’t do what you think. E_STRICT has a value of 2048 and is independent of the others. E_ALL is 2047, which is the sum of all the others. So, if you want both E_ALL and E_STRICT, try this:
error_reporting(E_ALL | E_STRICT);
P.S. I’ll never be a pro, because I’ll never type will all 10 fingers.
Clay
February 16th, 2006
at 6:16pm
See? There ya go — learn something new every day. Thanks, Chris — I stuck with E_ALL in the Feedster frontend re-write since it depends on so many PEAR libraries which aren’t E_STRICT compliant.
Jason Sweat
February 16th, 2006
at 7:38pm
Great post! I could not agree more with your points. And here is a toast to all of us, may we hope to climb higher on your ladder of professional development.
Software Development at fusion94.org
February 16th, 2006
at 8:48pm
[...] One of my colleagues over at Feedster, Clay Loveless, has an interesting blog post regarding Professional Software Development and Professionalism in Software Development. [...]
Xing Li
February 17th, 2006
at 1:16am
What happened to LoveCookies.com? I don’t think you mentioned your sweet tooth business in your mini-biography. =)
My idea of a good project code:
1) Consistent code:
Style of coding should stay consistent.
2) Not everything has to be objects.
Use objects to re-use code, simplify usage, not because “objects” are better.
I blame programming books in glorifing the beauty of objectifying everything. Create objects for what you need, as you need them. Most web sites do not need to have everything as php objects with methods and event handlers. Code bloat, speed, bad readibility, code bloat.
Sometimes, I just need a shovel. I don’t need a shovel with constructors, destructors, parents, static/public/private attributes. Give me a shovel cause that’s all I need and will need for the future.
3) Speed/Performance equals one word: understanding.
You need to understand every single line of code in the project if you expect code performance and scalability.
I don’t buy the don’t reinvent the wheel concept. If an external open-source module does what you need but using 10K line of code with 90% useless methods to your needs, write the code yourself.
To control peformance is to shed fat, use lean code, and control i/o follow from point to point and through every single line of code.
Mike Willbanks
February 17th, 2006
at 6:15am
Xing Li (The comment before this one),
While I agree with your statement about not making everything into objects, however, if you are working on a bid enough project it makes more sense to make them into objects. Each object contains a layer of functionality along with a the code that implements these routines. This allows you to do many different things.
One of them being consistancy which you complain about earlier. Also in most objects you shouldn’t need to use a constructor. It might just be bad design when you are looking at some of those.
Allowing for static methods you can utilize an object somewhat like a namespace which then allows for much more consistancy. Controlling the flow of performance is almost just as great if you utilize your objects correctly, if not sometimes better.
Pet Pixels
February 17th, 2006
at 7:40am
Walking the walk…
Clay Loveless has an excellent article on professional PHP development attitudes.
I couldn’t agree more about the rules, especially that last one. My own PHP coding (in pretty much the exact circumstances described!) has come on by leaps and bounce…
Shawn Coomey
February 17th, 2006
at 7:51am
Clay:
> Shawn: Thanks for the kind words
You are very welcome. Thanks for the great blog.
> I stuck with E_ALL in the Feedster frontend re-write since it depends on so many PEAR libraries which aren’t E_STRICT compliant.
I’d love to know how this worked out for you in your development efforts. I too use a LOT of PEAR libs in my applications and almost all of them throw tons of notices when strict reporting is turned on.
Paul Crowley
February 17th, 2006
at 7:56am
No amount of discipline will altogether compensate for a lack of talent. Both are needed. For some projects other skills, such as empathy for your client/prospective user, also come into play.
Coomey.net
February 17th, 2006
at 8:01am
Walk the Walk……
I ran across a really good blog entry by Clay Loveless (of Feedster fame) yesterday that really cut to the heart of what it means to call yourself a software developer. In his words: discipline. I highly recommend everyone who considers themselves a de…
Clay
February 17th, 2006
at 8:29am
Jason: Cheers! I hope to climb higher on the ladder myself. I often still find myself at the crossroads of a new project being tugged by my old bad habits. I’ll think “nah, *this* doesn’t need to be in Subversion…” but really it’s much easier to just decide on everything going in, so your bases are covered.
Xing: You’re absolutely right about knowing what’s going on in each line of code. Ideally, in a well-formed class/package, there’s been some thought put into segmenting out the essential pieces so that you’re not required to load up a bunch of overhead crap just to use a method or two. As for LoveCookies.com — after putting on too much weight running that effort, plus having our first child, my wife and I decided to close that down.
Was a great learning experience, though!
Shawn: Ultimately I just came to the realization that for now, if you want to use PEAR libs, you can’t run under E_STRICT. Slowly but surely more and more PEAR packages are evolving to E_STRICT compliance, but I suspect it’ll be another year or two before we get there. In the meantime, I’ve been developing with Zend Studio 5 and running the “Analyze Code” routine over my code and checking to make sure that the debug output isn’t complaining about E_STRICT problems in what I’ve written. That way I’ll be in the clear when my dependencies are E_STRICT-ready.
Paul: I agree — some core competencies are certainly a pre-requisite. However, I feel like otherwise mediocre-to-poor developers can be made passable through the adherence to some Best Practices.
After all, even my grandmother can grasp a ’switch’ statement; she executes one every time she goes out to run errands. “If this store is too crowded, go to this one instead and pass back by the first one on my way home…” and so on and so on.
Point, Counterpoint at Random Strings
February 17th, 2006
at 10:45am
[...] About « Walk the Walk Before Talking the Talk [...]
Feedsterite Roundup at The Story of Feedster
February 22nd, 2006
at 7:04am
[...] Clay Loveless: “A question that eventually comes up for programmers who stick with it long enough is: Am I an expert yet? Do I have the chops to throw down with The Big Kids?” [...]
» Zaujalo mě
February 24th, 2006
at 12:29am
[...] Walk the Walk Before Talking the Talk [...]
A neat little piece by Clay Loveless
August 2nd, 2007
at 4:31am
[...] back to what I was really wanting to post about… I ran across an article of Clay’s today that I think that any PHP developer needs to read. If you do not know Clay, or have not read that post, give it a read. It is worth the time for any [...]