By Peter Bell

Programming is Hard: Get over it

One of the problems with Object Oriented programming is that it isn’t easy to learn. Figuring out the syntax of cfc's is easy, but gaining a deep understanding of OO principles and how and where to use design patterns is fundamentally hard . . .

The challenge is that scripting languages like ColdFusion (and before them, RAD tools like Visual Basic) allowed people without programming experience to get computers to do cool things like display information from a database onto a screen. However, as anyone who has tried to manage a typical VB4, ColdFusion or PHP app knows, having the ability to get a database talking to a web page is not the same as having the ability to architect a scalable or maintainable web application. Most people given the correct tools could build some kind of physical shelter on their own. Only a handful could design and build a 100 story high-rise. Same with programming.

This isn’t to say that someone without a formal CompSci education shouldn’t be coding complex apps. I learnt a lot more about programming by hacking games when I was 12 than I ever did in college and when I left college back in 1992, OO was not at all mainstream so I have had to learn OOP from books in the evening – the same as any self taught scripter. It does mean however that you should consider learning to program broadly equivalent to learning any other professional skill that takes a solid thousand hours of self-study to master (and that doesn’t include day to day coding – that is time spent learning and mastering new skills).

I don’t think anyone would reasonably read a “Dummies guide to architecture” and then expect to be able to successfully architect a high-rise, so I don’t think it is reasonable to complain at the effort required to learn OO programming. If you’re coding simple apps you don’t need to learn OO, and if you’re coding complex apps you just have to accept that you’re moving from a relatively unskilled job to a much more highly skilled one and go dig out that copy of Design Patterns and start learning!

Comments
That's what I am talking about. That's why I need like 4 more hours in the day! Is that too much to ask?

Current Book: Pragmatic Programmer
Next Book: HeadFirst's new OOP / design book
After that: ??? who knows

After a few more books and lots and lots of 7am-9am shifts spent programming and it might just start to make sense :)
# Posted By Ben Nadel | 12/22/06 2:20 PM
If you find them, let me know!

Current books FitNess Testing and two on TDD plus Domain Driven Design and Streamlined Object Modeling. Also a couple on usability and another on gathering requirements!

Oh, and just joined ACM and signed up for their digital librry, so 10 years of OOPSLA procedings to work through!

Merry Xmas anyway!
# Posted By Peter Bell | 12/22/06 2:24 PM
Nicely put. I'll be ordering Head First's new OOP book very soon.
# Posted By fro | 12/22/06 3:54 PM
And as the person with programmers working for you you got to be nuts! LOL

1. You don't understand simple code, but your programmer has a more complicated way to do things that is more powerful.

2. Your workload picks up and you need to hire a new guy to do what he is doing... but you find out the code that your company depends on is so complicated it's going to cost you two to three times the last guy to get someone who can do the job!!!

Another guy has a company like yours and he builds some apps that do the same things in the browser that yours do... but he can find help when developers move on... and they can get up to speed fast and do the job.

So, is programming hard or do programmers make something logical diffiult. Programming isn't hard any more than building good houses. You need experience for some of the simpler points you can miss, but if programming is hard you left design out of your work and substituted philosophy! LOL
# Posted By John Farrar | 12/22/06 4:42 PM
BTW... I think that is what a framework is about... building frameworks is HARD.

A good framework makes building applications easier!

Someone said, "It takes technology to make things simple." If we fail to make things simple, but all in all even things like IOC on the way to making things simple are another hard level. When it's appropriate, go for it. Sadly to often it's used as a resume builder not as a responsible programming technique. IMO
# Posted By John Farrar | 12/22/06 5:43 PM
Hi John,

Again, I'd have to ask you for some examples of people using IoC as a resume builder. I don't doubt that they exist, but most of the people that I talk to about IoC have problems getting their objects to construct in the correct order or have issues stubbing out their unit tests and choose ColdSpring (or LightWire :->) to solve those problems.

I have definitely come across programmers that make things more difficult than necessary. I usually either avoid them of (if they work for me) fire them. Most design patterns are created by developers who like making hard problems easier, but that does not mean we will instantly make all problems trivial.
# Posted By Peter Bell | 12/22/06 8:25 PM
Even if you fully understand oop, you might not be able to create complex software. OOP is just a tool like a hammer - what youdo with it, is much more important. Think about book authors: How many people can read and write, but only a choosen few are able to write nice books.
# Posted By john miles | 12/23/06 2:43 AM
Hey, all -

Love the "current books" theme! I just finished Pragmatic Programmer and am in the middle of Generative Programming. Up next: Mythical Man Month. I'm of the same history as Peter - graduated in '91 from a math program, took a couple of years off in the Peace Corps and stayed out of country for a couple more, then came back and Lo and Behold - BITNET had turned into the WWW while I was hanging out in the Third World. It's been a long, fun ride catching up!

I'm really looking forward to 2007, and reading great blog posts and comment threads like this one adds to the enjoyment.

Peace,
/ejt
# Posted By Edward T | 12/23/06 9:41 AM
@John, Good point. There is art as well as science in programming and not all of us can achieve elegance in our designs - it is a fundamentally hard thing to do. However, it is easier if you have not just a hammer (OO) but also a complete proven toolkit from the smartest developers that precede us (Design Patterns).

@Edward, Cool, nice to find another old fogie :-> Mythical Man Month is a great read - especially the "no silver bullet" chapter. It is not up to the standard of PP, but it's a solid enjoyable and fairly quick read. Generative Programming was the breakthrough book for me on application generation. It is old, but still a little ahead of its time. Let me know what you think of it when you finish reading.

That must have been a shock coming back from the Peace Corps and finding this whole WWW thingie :-> Have a great holiday season and I look forward to keeping in touch next year.
# Posted By Peter Bell | 12/23/06 10:47 AM
I think that through it's simplicity ColdFusion has become a language of two cities. The entry point to the language is so low that the market is flooded with programmers with little appreciation for the architecture of a good app, while the other (much smaller) group are formally trained programmers or those who have worked closely with one. Frameworks have been an easy next step for those entry level programmers but until they ask questions about why it works the way it does and compare and evaluate candidate frameworks, they remain on the first step to enlightenment. The dot com boom helped proliferate the flood of CF developers and now we are in an interesting situation where we are trying to hire advanced CF developers from a pool which is grossly over-evaluated: there may be millions of web pages driven by CF out there and a large developer pool but if you eliminate the developers with elementary skills from the equation I believe we are running thin on experts.

Love the blog Peter and look forward to more excellent posts in the new year.

As a programmer with a tiny attention span of course I have several books on the go right now:
D H Lawrence - Sons and Lovers for the culture kick
Agile Web Development with Rails 2nd edition
The design of every day things
# Posted By Adam Howitt | 12/27/06 8:57 AM
Hi Adam,

Great comment. I agree 100%. Glad you like the blog, and cool set of books!
# Posted By Peter Bell | 12/27/06 2:21 PM
OO is an art... but it requires experience and a foundation to follow what the design patterns are about. And on the note of needing an example of someone using OO technology concepts wrongly... LOL, who would admit it? Do we have any retired programmers who want to admit they blew a project out of scope doing this? You must be a bit naive if you think geeks only do what is required and don't get excessive with theory!
# Posted By John Farrar | 12/28/06 3:27 PM
John,

I tried doing a project using OOP with CFCs and just about doubled the budget (but did come in the timeline)... luckily it was a small project and I didn't get fired over it but it was crazy! That is when I really learned that this stuff is MUCH harder than I thought it would be. I realized I had no idea what I was doing.

I am working on getting a MUCH better understanding before I try that again :)
# Posted By Ben Nadel | 12/28/06 3:31 PM
Hi Ben,

Been there, got the t-shirt. I would say that once you are really comfortable with OO architecting a good OO app takes maybe 50%-100% longer than hacking it, but LEARNING OO takes way too much time to charge to any one project.
# Posted By Peter Bell | 12/28/06 3:51 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.005.