Tuesday, January 16, 2007

Just works right.

In my day job a reasonable percentage of my time I tend to have to check the same things, in some cases fix or monitor the same problem.
I have a need for automation and I spend time making scripts so I don't have to type, using dynamic sql is a good example. I dislike GUIs which force too much of the workflow onto you by not handling the general case well.

If you don't know the power of dynamic sql, it is sql which generates sql.

Example:


select 'alter session kill session '''||sid||','||serial#||''';'
from v$session
where username is not null and last_call_et > 3600;

Produces a list of SQL commands to kill all non-Oracle sessions who are idle for more than hour Note: Use sqlnet.expire_time=60 instead

alter session kill session '24,34567';
etc...

So my script library is a spawling bunch of sql and sh scripts, I find myself not remembering the syntax of the command (I know the table/view and command I need) but I just go and grep for the command or table and 9 times out of 10 I find a script I have already written.

If I combine several scripts into one, I now have a tool. Suddenly what took 2 mins to run and diagnose takes 10 secs, I am investigating the why sooner. No stuffing around getting the info I need.

When I am working I tend to listen to dance music, apparently the specific genre is vocal trance. As I have mentioned in the past I use Pandora as their range of music is superior to anything I have here. Other times I listen to podcasts, they just go in the background and I continue working, occasionally stopping and rewinding a bit (using the slider) to listen to a bit.

This podcast was good. I would recommend you too listen to it, a couple of times.

I love unix and the power of the pipe. Locate and grep can find files and contents faster than anything Windows XP can do.
I hate how PC Linux still exposes too much underlining hardware/software conflicts. The expectation is you will drop everything and debug the device driver or even better patch and recompile the kernel.
I am a techy I can handle it, noone else in my family, including my wife who is a techy as well can be bothered with it. I don't use linux now, I use cygwin which has all the unix I need.

The message from the podcast was really to ask what the user wants, what task is the user trying to achieve. Just make it work.

Have Fun