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.

SQL

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?

Feedback

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.

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.

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.

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--

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.

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...)

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 ;)

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.

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 =)

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.

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.

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.)

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.

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.