Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Code Writing Code

By Steve Jones, 2010/03/10

Total article views: 344 | Views in the last 30 days: 4

http://en.wikipedia.org/wiki/File:Advanced_Automation_for_Space_Missions_figure_5-29.gif I ran across a post from Buck Woody recently about code writing code, which I thought was a great post. It talks about writing code generation routines that save you time. An example given is writing code the reads your table definitions and then can produce triggers for auditing.

To me, this is one of those areas that starts to separate out the beginners from the mid-level, from the senior people that write code. It's when you realize that not only can the computer do work for you, but also write the code that tells it what work to do.  When you are getting started, you often don't realize that the investments in writing code to write code pay back many times over. It takes some time to learn that this is a way of becoming more efficient in the way you approach your craft.

However it's more than just getting more work done. One of the great things about letting the computer write code is that it produces consistent code, adhering to your standards perfectly without typos and minor changes that you might introduce if the routines were rewritten one at a time. The style, the indents, naming, etc. are followed exactly as you've coded the routines.

And if you improve your code to eliminate bugs or run more efficiently, you can easily regenerate all code quickly!

There are numerous advantages, with the only disadvantage being if you cannot write this code itself relatively quickly. However as you that usually changes with a little practice, and a lot of experience.

If you find yourself unwilling to write code to write code, perhaps you ought to stop and re-evaluate where you are in your career, and if you are really progressing over time.

Steve Jones


The Voice of the DBA Podcasts

Everyday Jones

The podcast feeds are available at sqlservercentral.mevio.com. Comments are definitely appreciated and wanted, and you can get feeds from there.

You can also follow Steve Jones on Twitter:

Overall RSS Feed: or now on iTunes!

Today's podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. Support this great duo at www.everydayjones.com.

By Steve Jones, 2010/03/10

Total article views: 344 | Views in the last 30 days: 4
Your response
 
 
Related Articles
BLOG

Podcasting

A new video setup is on the way!!!! Actually I'll do a couple podcasts on podcasting over the hol...

ARTICLE

Podcast Announcements

Podcast Feeds

ARTICLE

The Daily Routine

Steve Jones compares his daily routine now to that of being a DBA.

BLOG

Community Podcast CALL FOR CONTRIBUTIONS

If you’re already a MidnightDBA Groupie, then you’ve probably already heard about my fabulous inspir...

BLOG

Powerscripting Podcast 2

I was interviewed by Jon (@JonWaltz) and Hal (@Halr9000) in episode 106 of the PowerScripting Podcas...

Tags
editorial    
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones