October Caption Contest Entry

My submitted entry has the person saying,

“Would it help if I went to work for Bain Capital?”

Before We Had Cold Activated Beer Cans

Courtesy of

http://getsecondlunch.com/2012/10/01/before-_______-we-had-________/

Reverse Engineer Create Table Schema for Sybase or SQL Server

QUESTION:  Is there any way to fetch the create table schema including the textual representation of actual Sybase datatypes (instead of the number)?

ANSWER: Yes

Pretty In ………… Yellow?

Joanne and Richard were expecting a baby soon.  They knew this was going to be their last baby.  Even though they secretly wanted a boy, they did not want to know the sex of the newborn.

Consequently they decorated the baby’s room completely in a neutral color …  yes you guessed it… yellow.

Well this frustrated the grandparents to no end.  They had heard myths about yellow being a depressing color or making babies angry.

When the baby was born and to the parent’s delight, it was a boy they named Jason.

No more than one hour went by after the birth when the grandparents rushed out and bought everything baby-related they could find.  In the color blue.

Steak Lovers Stand Your Ground

Stacy has been making sure she and her husband, Jim, eat healthy.  For Jim’s birthday, Stacy decided to take Jim out to dinner for the best steak in town.

Inside the restaurant, Jim and Stacy immediately noticed all the deer and antelope heads mounted on the walls.

When it was the couple’s turn, the hostess asked Stacy where she wanted to sit.  She replied, “Somewhere where we won’t be stared at.”

 

 

Sybase Query Analyzer – showplan

QUESTION:

I’m querying Sybase database from C# code. Is there any good query analyzer to understand the exact queries being generated like the Query Analyzer for Sql Server?

ANSWER:

You can set some Sybase variables to see the Query Plan such as the following:

set showplan  on
set statistics io on
set statistics time on
exec my_proc (my_arg1, my_arg2, ...)
go

I have put this into a shell script to pass the command line arguments including stored procedure name and parameters.

isql  -Uxxx   -Pyyy   <<-_EOF_
set showplan  on
set statistics io on
set statistics time on
exec $*
go
_EOF_

You use this to see if there are any table scans which should be avoided at all costs.

Good SQL, good night.

Sweat Equity

My wife spends the evening slaving over a hot stove to prepare a special chicken dish for a company potluck.

At the potluck, Jeff says, “This chicken dish is really good.  What is in it?”

I respond, “Sweat.”

To which Jeff responds, “Yummm.  Sweat.”

 

Airplanes Can Be Fun

Remember that flight where the kid behind you would never stop crying or kicked your seat?

Well here is an airplane story of a different color.

Tommy was well-behaved during the entire plane flight.  His parents kept him quiet with a handheld game player and a soda.  Passengers admired Tommy’s behavior.

But when it was time to leave, Tommy started shouting.

“I DON’T WANNA GO.  I GET FREE SODA HERE.  MY MOMMY MAKES ME DRINK GREEN STUFF AT HOME.”

Sybase Error Codes

Problem: Need to distinguish between Sybase RDBMS related exceptions and user data exceptions .

 

Solution:  Since Sybase uses error numbers less than 2000, you can choose to use numbers larger than 3000. You can control the returned error code by using the raiserror function. Yes that is not a misspelling.

Note: Sybase with many of its functions, tried to save keystrokes by eliminating duplicate characters. Here Sybase did not allow double “e”s but left the double “r”s in. Oh well.

For more info see http://stackoverflow.com/questions/7482383/distinguish-sybase-expections-types

Good SQL.  Good night.

Stuck In The Middle of Middleware?

Have you ever felt stuck with something?

stuckThere have been products in the software industry that have been a little less than spectacular.  For instance, Motif was supposed to be the new holy grail for developing graphical user interfaces (GUIs).  (I know I am showing my age.)  But it was slow coming up to the screen.  Why?  Because the Motif designers, decided to load everything into memory at start up.  Even rarely used functions.

Now comes middle ware products.  And guess what?  The designers of those products decided to load everything into memory upon start up.  You know what happened?  Yep, they were slow at start up.  You would think developers would learn from past mistakes.

But in addition, middle ware products were bogged down because the functions stayed in memory.  That is because they were designed and tested for middle sized problems.  Yes the name for these products was “Middle Sized Ware”.  But marketeers decided the name limited the market for sales, so they dropped the “sized” part.

So why don’t software companies load functions into memory “as they are needed”?

So why aren’t software systems designed in case they are used by a thousand users?

It is because software companies are in a hurry and want to keep costs down.  So they hire cheap, inexperienced developers.

The solution is to hire a few experienced people (not all) and take some time to design a killer app like Steve Jobs did.  Nobody ever said they got stuck with an iPhone.