Jeff's SQL Server Blog

Random Thoughts & Cartesian Products with Microsoft SQL Server
posts - 157, comments - 2686, trackbacks - 64

My Links

Advertisement

News

Welcome to my weblog. My name is Jeff Smith, I am software developer in Boston, MA and I was recently named a 2009 SQL Server MVP. Check in frequently for tips, tricks, commentary and ideas on SQL Server and .NET programming.


Subscribe





Archives

Post Categories

Programming

Sports

SQL

Programming is a funny thing ....

In most industries, beginners work on simple, short projects, using only the most basic concepts that they have learned. The experts in those industries, meanwhile, work on things that are very large, complicated, difficult to manage, and require lots of time, energy and resources. The end result is that the experts produce results that are very complicated, while beginners produce results that are very simple.

For example, take an architect. A beginning architect might design a simple house. You might look at the plan for the house and say, "it's basic, simple, easy to understand ... clearly the work of a beginner." An expert, meanwhile, designs a sky scraper, or an airport, or a sports stadium, that boggles the mind in it's complexity. You would look at the plan for the sky scraper and not even begin to comprehend it -- you truly would recognize that it must be the work of a professional and you'd admire and be intimidated by its complexity.

Yet, in programming, it's the beginners who end up creating large, complicated, unmanageable projects that require lots of resources. Instead of using only the basic concepts, they usually completely disregard them! Looking at a beginner's code, it is often amazing at how much work and complexity they forced upon their project, and how much harder they worked than they needed to. Someone might look at a 1,000 SQL statement with 5 levels of nested cursors that requires 2 1/2 hours to run and think "clearly, this is advanced, complicated stuff written by an expert! It requires a super-computer to run!"

A expert programmer, meanwhile, uses those basic, simple fundamentals to write very short, compact, clear code. That same 1,000 line SQL statement will end up being a simple 1 line SELECT. Looking at that code, one might say "that's it? Seems too simple ... it runs in only a few seconds ... clearly, it was written by a beginner!"

Programming is kind of backwards compared to lots of professions, isn't it?


see also:


Print | posted on Thursday, March 30, 2006 1:58 PM | Filed Under [ Miscellaneous Techniques ]

Feedback

Gravatar

# re: Programming is a funny thing ....

so very true jeff... so very true...
3/30/2006 3:43 PM | Mladen
Gravatar

# re: Programming is a funny thing ....

But you dont discuss how the smaller more cleaner code (written by the expert) is so much better. For instance, you talk about the architect creating a stadium and clearly its nice, because the finished product is beautiful, its large, looks nice, structured very well.

I think actually programming is the same thing and not backwards. The well short written code outperforms it, saves space, clearly indented, etc. etc. It may not be as lengthy but lengthy code doesn't mean its better code.

And you make reference to beginners using too many resources, etc. Large complex programs could end up using up a ton of resources as well.

So to me I think programming is MUCH like any other profession and life in general.


3/30/2006 5:03 PM | Jon Hermiz
Gravatar

# re: Programming is a funny thing ....

Thanks for the feedback, Jon, but I think you completely missed the entire point ... of course a simple 1 line SELECT is better than 5,000s of nested cursors! Where did you get the impression that I was saying that lengthy code is better code? It might pay to read it again a little more carefully.

The whole point is the often beginners work much harder on things that appear much more complex than the experts, since beginners usually over complicate things while experts tend to simplify things.
3/30/2006 6:04 PM | Jeff
Gravatar

# re: Programming is a funny thing ....

It may help if you reworded some things as well.

The end result is what matters, how well the stadium looks, how good the code is written. Everyone is a beginner once Jeff, surprisingly once you were a beginner to, pride sometimes defeats that.

Thanks!
Jon
3/31/2006 9:18 AM | Jon Hermiz
Gravatar

# re: Programming is a funny thing ....

Jon, you are again completely missing the entire point.

Can you please summarize for me, in a sentence or two, what my post is about and what you think my point is. I'm really not sure what you think I am saying, I'm very curious.

3/31/2006 9:25 AM | Jeff
Gravatar

# re: Programming is a funny thing ....

I think you have a very odd view of what architects do.

Experienced architects design houses and make whole, fullfilling careers out of it. Frank Lloyd Wright designed house late into his career, its not just for beginners.

And beginner architects work on big projects, like stadiums and sky scrapers, all the time. They are filling in lots of the details of the overall architecture design be the more experienced guys.
3/31/2006 1:35 PM | Not an architect, but still
Gravatar

# re: Programming is a funny thing ....

I'm partially agreeing with you on this. I've blogged about it:
http://macournoyer.blogspot.com/2006/03/backward-incompatibility.html
3/31/2006 3:14 PM | macournoyer
Gravatar

# re: Programming is a funny thing ....

Here is a list of things I am *not* saying in my post:

1) I am not sayign that I am an expert coder.

2) I am not saying that beginners are "bad people", or should be made fun of, or that they are somehow inferior to me.

3) I am not saying that beginners are assigned large, hard projects, while experts are assigned on small, simple projects.

4) I am not saying that lenghy code is better code.

5) I am not saying that long, convoluted, complicated code is *good* while short, concise code is *bad*.

6) I am not saying that only beginner architects design houses.

I am commenting on the perceived complexity of the *work* produced by programmers of different levels of experience, and how a beginning programmer often ignores fundamentals while an expert programmer embraces them.

Most professions, in my opinion, you learn the fundamentals and use them, and eventually you learn more complicated techniques. Thus, the longer you work in most professions, the more "work" you do and the more complicated things get.

In programming, it seems the fundamentals are often ignored by beginners, and they needlessly work much harder than they should. Maintaining their code, finding bugs, figuring out how to sort dates stored as VARCHAR's, etc, means they are working extremely hard to accomplish things. Meanwhile, the expert programmer, who has carefully designed his system and used best practices and often the most basic of techniques, who has a system that is easily maintainable and adaptable, is usually *not* working as hard as the beginner.

I can't blame others for not understanding my point, I suppose, since it is pretty hard to explain. Hopefully this helps to clear some things up.

- Jeff


3/31/2006 3:37 PM | Jeff
Gravatar

# re: Programming is a funny thing ....

It's just like math. Only the geniuses fnd the short, concise and beautiful proofs.

Wish i were one of them.
3/31/2006 5:30 PM | beza1e1
Gravatar

# re: Programming is a funny thing ....

It seems to me that we actually have an equivalent situation with regard to the thread itself. Those that carefully read and considered the original post understood it completely; while those that skipped through or lacked a complete understanding of the language found all sorts of non-existent and unrelated things to complain about.

It amazes me the simple observation that summarizes as "beginners tend to produce unnecessarily complex code" could result in such a convuluted, off-topic discussion.

In the interests of not adding even more complexity to the discussion, I will stop here--

4/3/2006 12:13 PM | Bren
Gravatar

# re: Programming is a funny thing ....

I think I understood what you were getting at from the go. Not sure why anyone would take offense to it. I think you're mostly right about programming being different from other occupations. Programming is supposed to be complicated right? So right off the bat, your code should reflect that, right? Wrong! Unfortunately I started out this way too only to realize that coding didn't have to be complex or lengthy. The more precise and readable the code is, the easier it is to manage, period.
4/3/2006 4:30 PM | Jon Rice
Gravatar

# re: Programming is a funny thing ....

I only program in deeply multi-tiered cursor functions!!! Only the shallow programmers can do it in one SELECT statement.

:>
4/4/2006 11:11 AM | Michael E. Baker
Gravatar

# re: Programming is a funny thing ....

Agree wholeheartedly.

One thing I also find interesting about the programming profession is that beginners in the industry feel that they immediately have the expertise to build sky scrapers. Imagine if the software industry had the equivalent of an A.R.E. or CPA exam...

(BTW... not to incite a war, but in regards to the poster that got nothing more out of this than a reference to architects... unlike beginning developers, NO beginning architect gets to work unfettered on big projects. At least, not for a firm that does more than one project...)
4/4/2006 7:31 PM | Bullseye
Gravatar

# re: Programming is a funny thing ....

Most programmers know this, unfortunatly the thing is that the people who have to judge your work don't know this.
People like project managers, designers could have an incling, but customers certainly don't.
So when a project starts to get into trouble, a good coder gets blamed for being "incompatend", because of his elegant code is being judged as "simple beginner stuff".

The only thing that helps is getting certified ;)
Go for MCSD or go crazy?
Well they always said that genius bordered on insanity ;)

4/14/2006 5:05 PM | Marcel
Gravatar

# re: Programming is a funny thing ....

Thanks for the feedback and the link, Tim. I am not quite sure what the connection is between what you are saying and what I am saying, unfortunately ... I don't recall mentioning anything about needing to tweak things needlessly or how that relates to good or bad programmers.
4/26/2006 12:35 PM | Jeff
Gravatar

# re: Programming is a funny thing ....

I understood perfectly what it was you were saying, not sure what these people are on about.
5/9/2006 6:53 AM | PL
Gravatar

# re: Programming is a funny thing ....

i agree whats jeff said.
beginner VS expert
unreadable code VS readable code
hard to update VS easy to update
6/1/2006 9:51 AM | el_marsheil
Gravatar

# re: Programming is a funny thing ....

Most of you guys have way too much time on your hands. Why don't you write something intelligible instaed of bickering amongst yourselves? Jeez.
7/25/2006 2:07 PM | Bored to death
Gravatar

# re: Programming is a funny thing ....

I guess it takes being a software engineer and having an analytical mind to comprehend what Jeff was saying in his post because I truly can't understand how it is that complex. You guys need to stop taking things so literally and look for the underlying point in Jeff's analogy. If you can't see it, then stop worrying about it =)
10/22/2006 12:57 AM | Jeff Smith
Gravatar

# re: Programming is a funny thing ....

That's a very good example. Although I can't remember the exact wording, I read something along the lines "Any fool can make the simple complex, only a smart person can make the complex simple".

Above what you mentioned, often its cheaper to get a couple of experts rather than a horde of in-experienced developers. Above taking less total time to building the system, it will be a lot less code, and a lot simpler to manage.
8/2/2007 11:10 AM | Stephane Grenier
Gravatar

# re: Programming is a funny thing ....

Sad yet true.
8/2/2007 1:20 PM | Pensador
Gravatar

# re: Programming is a funny thing ....

Another difference is that when you want to build a sky scraper, you make sure that the architect is competent. You don't hire a carpenter just because he is cheaper. But in software development, some companies go for the cheapest alternative.
8/2/2007 3:01 PM | Anon
Gravatar

# re: Programming is a funny thing ....

It is true, especially in the enterprise software where there are layers on top of each others and many "reusable" components, etc. etc. (Java or .NET anyone?).

Yet there is an exception which called Python. With python, as long as you follow the Zen Of Python, you simply cannot go complicated! The following post was written about Java but it is the same with .NET

see at http://dirtsimple.org/2004/12/python-is-not-java.html

So, if you don't feel like you're at least ten times more productive with Python than Java, chances are good that you've been forgetting to use the time machine! (And if you miss your Java IDE, consider the possibility that it's because your Python program is much more complex than it needs to be.)
8/2/2007 5:34 PM | Tzury Bar Yochay
Gravatar

# re: Programming is a funny thing ....

There are at least two other occupations that are remarkably similar to programming in that aspect, writing and teaching. Good writers reduce their text with every revision, pruning every unnecessary word. Likewise, good teachers can explain very hard concepts to make them sound obvious.
8/2/2007 6:37 PM | rubinelli
Gravatar

# re: Programming is a funny thing ....

I think I understand what you're saying but I still think its a poor analogy.

To go with the architecture: a great architect may be the one who looks at the concept of a skyscraper and designs one that simplifies the design while improving its functionality such that the people who inhabit it are stricken by how they ever worked in a cookie-cutter sky scraper.

The amateur looks at the concept of a skyscraper and tries to make improvements to it, however instead of finding simple solutions he adds level upon level of complexity in a way that he thinks will solve many problems in an ingenious way but in fact adds more problems than it solves. The people who inhabit this building are stricken at first sight by how impressive and complex it is and how a genius must have designed this. Then they try to use it every day and discover how much trouble comes from this complexity and they long for the simple time-tested building they used to work in.

The best solution is the simplest solution that is in fact a solution. I find this to be true in most facets of life and industry.

Unfortunately as another commenter noted, this fact is not generally appreciated by most people leading to the needless over-engineering in many projects in all industries.
8/2/2007 7:04 PM | fcp
Gravatar

# re: Programming is a funny thing ....

I think a programmer is like a tailor... beginners waste too much materials, take much longer to finish, use simple stitches, and have awful seams... to a non-expert, it looks just as good.

Or like a brick-layer, a beginner keeps building and tearing down when it's not right...

... metaphors do not work here ... move along.
8/5/2007 2:32 AM | Agreeing
Gravatar

# re: Programming is a funny thing ....

I think of a beginner programmer as a carpenter... You wouldn't want one architecting your skyscraper. And an advanced programmer who understands things like design patterns as an architect.

P.S. I understood the blog my first read, wasn't hard to grasp what you were saying.
12/16/2008 4:37 PM | John Isaacks
Comments have been closed on this topic.

Powered by:
Powered By Subtext Powered By ASP.NET