Friday, April 07, 2006

Why SQL programming is so important to a CF Developer?

Right now I am listening to the ColdFusion Podcast, and I have to strongly agree with them, on the importance of learning to write correct and scalable sql code.

There are many different databases, and most cfers, start with access, which is great for beginners or very low traffic sites.

However if you want to build something that has to be able to handle lots of transactions.

Now the first part is to understand what causes blocks of performance?

Well for first off, any time you interact with the database with a cfquery or cfstoredproc, you are creating seperate blocks of memory, that need to be processed.

So how many cfqueries and correctly written queries is what really matters.

When you write the queries, identify the columns of data that you want to bring back. And Only have those columns in your select statement. In addition, having the columns in the correct order, as they are created in the tables, helps for performance...

Learn your table structures, make queries that work with the grain of their structure instead of warping it, making it go thru extra processing just because you were too lazy to put things in the correct order....

Now if it is just one table in the query, there are limits to what more you can do, to improve performance...

But with joins, you can take the query from the cfquery to a view or stored procedure. Views are usually the easiest, to create, from within sql enterprise manager.

Now when you run the page you can identify the performances of each cfquery, and over time you will get a hang for what query is causing problems or not...

For example if you are looping and doing a cfquery within that loop. That is actually causing a performance problem. The better approach is to combine the top query with the query in the loop, so that it is one connection with the server instead of looping.

Part of the problem is having the right tools and using them correctly...

But this all that i have time to discuss, please ask any questions. I'd be glad to help.

Tuesday, April 04, 2006

Charlie Arehart: A Pragmatic CFer

I know it's sad he's leaving Blue Dragon, and I know it feels like he's leaving. He isn't.

But perhaps this is our time, to give thanks and respect to one of the true leaders of our community.

I can still remember reading some of his first articles in cfdj, and I was really impressed, because to me, I wanted to learn more, do more, and be as efficient as possible.

To me, he seemed, how can I help people from any level of experience in cfml, program faster, easier and more efficiently.

From his tips about CF Studio and Homesite, to his different articles on developing.

I mean we all knew synax of Cf, but putting it together in a professional and efficient manner isn't something that we had the ability to take classes on.

So in bits and pieces, he is the guy that gave you that extra depth, made things faster for you to develop.

Gave you some undocumented features and knowledge of how CFML works.

I think that is is because of cf writers and programmers like Charlie Arehart, are the reason I wanted to blog and become a writer.

Remember your committment to the cf community is not just about how many articles or books, it's about your passionate committment to the craft of programming in cfml.

Thank you Charlie.....

Monday, April 03, 2006

Textpad: Still the best coding tool

It is still amazing, after 10 years, I still use textpad for my code editing. There are many reasons why it is superior to any ide.

* the ability to maintain block indents
* automatic code indentation (see indent style)
* regular expression based search and replace, including multiline regex
* Macro recording feature to facilitate complex text transformations and data processing.
o Macro feature supports multiple regex searches (and replacements) within a macro
* syntax highlighting (extendable to many different languages)
* ability to call external programs (such as Java compilers)
* large file support
* support for editing multiple files, with tabbed document selection
* block select mode
* synchronized scrolling of multiple files

Pure and simple it is the best text editor, at least so for me.

The interface is customizable, it has clip libraries so you can have snippets, auto commands etc.

But where it excels is the speedy file/folder search which can be enhanced by using Regular Expressions.

Why a text editor vs an IDE?

Well i believe in something called feature over-creep, where the at some point the application fulfilled all the core needs, but because they wanted to keep making money, they added more and more features, that probably would be best as a seperate application...

Do we really need an application that does everything? Or the best application for each specific need?

I guess it depends on your style, old school vs new school...

I'd rather have a fast and powerful editor, then something that did so many things i really could care less for. And look at how the memory requires of each is quite different...

What are the favorite old school software you still love to use?

Here is a few of my favorite's:

1. Namewiz - Batch file renamer for renaming digital photo files and any other files, according to masks or however you format it.
You can get NameWiz here.
2. Eyedropper - a system tray color grabber
3. IrfanView - greatest image viewer ever
4. Freenote - a notes system that i used to create all my notes for every task/project. It stays right in the system tray, ready when you need it. Get it here

That's enough for now...Please add your favorites as a comment...