Archive for February, 2009

Database: The Best Way?

Friday, February 27th, 2009

A TACFUG member recently asked the “what is the best way to organize my queries” question on the mailing list.

There are lots of factors that should go into deciding the ‘best way’ to access your application data.  Put these in order of importance for your application before you write any code:

  • runs fast
  • easy to read code
  • quick to write code
  • easy/quick to maintain lots of queries all in one place
  • handles a lot of traffic

There are probably infinite ways you could write your database query code.  I ask that you try to be considerate to the programmer that has to maintain the code next time.  Think about the DBA that will have to analyze performance issues in a few years.  Remember all the junior programmers that might read your code and write more of it by example.

***but***

If it’s gotta be out tomorrow, do the best you can with what you’ve got.

What Object Oriented Programming is All About… Really

Friday, February 27th, 2009

“OO is when you tell things to do things and ask things questions” -Dan Wilson

Add Cookies to Firebug

Wednesday, February 11th, 2009

firecookie_logoIf I were to make a list of useful things Firebug would be right up there with seat belts, calculators, sun screen, and forks. Today I found myself chasing a piece of data while tracking down an elusive bug in unfamiliar code when <cfcookie> stopped me dead in my tracks.

First stop with any problem is Google (add that to the list of useful things) which provided a list of hundreds of cookie tracking tools. After much deliberation I wound up selecting “Firecookie 0.7″ by Jan Odvarko.

Thus far I have to say I like it. Firecookie fits nicely into Firebug 1.3.1 without making me think about where to go find it. Cookie events get logged to console so I can see when cookies are created and deleted. The cookie tab lets me see all relevant cookies, add my own cookies, or delete current cookies. Just what I needed.

https://addons.mozilla.org/en-US/firefox/addon/6683

firecookie-sshots

Much thanks to Jan Odvarko!

What jQuery plug-in can you not live without?

Tuesday, February 3rd, 2009

jQuery UI is a HUGE timesaver when you need a solution to a common interface problem. Plug-ins make for easy addition of usability features like table sorting, searching, autocomplete, drag n drop, and tons more!

Picking out a jQuery plug-in can be a pain. Several different plug-ins to do the same job, which one do you choose?

Here are the tests that a plug-in has to pass to make it into my developer playbook:

  1. Is it easy to use? It had better be, that is why I’m using jQuery in the first place!
  2. Is it easy to read the syntax? My code does not need any help being confusing. As Brain C. would say: “don’t make me think!”
  3. Are other developers using it? Peer support is very important in jQuery and you can’t get much help from your peers if they don’t use the plug-in.
  4. Has it been around for a while? The latest and greatest is not so great when it’s unheard of in 6 months
  5. Has it been updated recently? If the author/maintainer doesn’t care about the plug-in anymore, why should I?
  6. Is it > version 1.0? I don’t have time to beta test your plug-in right now. Maybe later?

Gahh… thats a lot of work to check all that stuff out for 10 different plugins. I thought jQuery made everything easy.

Drop me a comment! which jQuery plug-ins do use most frequently?