Friday, April 10, 2009

Cache-Control Header

The Cache-Control HTTP header directive is used to specify the behavior of proxy servers or caches for caching data.

Public
This setting enables caching on shared as well as single-user caches

Private
This setting disables caching on shared caches but allows caching on single-user caches

No-store
Prevents caching by storing to persistent storage

No-cache
Prevents caching entirely

Sunday, April 5, 2009

An Architect Is...

I came across this on a set of slides on SlideShare, but only one of the seven slides had actual content so instead of embedded the entire presentation, I just posted this text:

Accepting my responsibility as an architect, I will strive daily to learn and perfect my trade.

Readily will I defend my organization’s I.T. investments from complexity, our greatest enemy.

Changing requirements will not break my design for it will be flexible and able to change with the requirements.

Helping developers to understand the reasons for the architecture and seeking their input is of great importance to our success.

I will never use acronyms or suggest technologies that are not pertinent to the problem at hand.

Technologies evolve and I know that solid architectures should accommodate and enable these evolutions.

Every day, I will strive to help our software achieve ideals that will make it flexible and easy to maintain.

Concern for the success of my organization’s I.T. investments will drive me to make appropriate decisions.

Teaching others about my trade will be an overarching responsibility that I accept as a part of my duties.

Twitter Tools For Recruiting

10 Social Media Resources for Executive Job Search

PostgreSQL 8.4



Thursday, April 2, 2009

Top-N query

I've been Googling for how you would implement a Top-N query with different databases and here's what I could find on a discussion thread at StackOverflow:

IBM DB2:
SELECT * FROM emp FETCH FIRST 10 ROWS ONLY

Informix, InterBase/Firebird:
SELECT FIRST 10 * FROM emp

MS SQL:
SELECT TOP 10 * FROM emp

MySQL, PostgreSQL, SQLite:
SELECT * FROM emp LIMIT 10

Oracle:
SELECT * FROM emp WHERE ROWNUM <= 10

Unfortunately, ANSI-SQL doesn't provide any way to do this :-(