Tuesday, November 11, 2003


Source: WebLogs @ SqlJunkies.com

A philosophy professor stood before his class and had some items in front of him. When the class began, wordlessly he picked up a very large and empty mayonnaise jar and proceeded to fill it with rocks, rocks about 2'' in diameter.

He then asked the students if the jar was full? They agreed that it was.

So the professor then picked up a box of pebbles and poured them into the jar. He shook the jar lightly. The pebbles, of course, rolled into the open areas between the rocks.

He then asked the students again if the jar was full. They agreed that it was.

The professor picked up a box of sand and poured it into the jar.

He then asked once more if the jar was full. The students responded with a unanimous -- yes.

The professor then produced two cans of beer from under the table and proceeded to pour their entire contents into the jar -- effectively filling the empty space between the sand. The students laughed...

"Now," said the professor, as the laughter subsided, "I want you to recognize that this jar represents your life. The rocks are the important things - your family, your partner, your health, your children--things that if everything else was lost and only they remained, your life would still be full. The pebbles are the other - things that matter like your job, your house, your car. The sand is everything else. The small stuff.

"If you put the sand into the jar first," he continued "there is no room for the pebbles or the rocks. The same goes for your life. If you spend all your time and energy on the small stuff, you will never have room for the things that are important to you. Pay attention to the things that are critical to your happiness. Play with your children. Take time to get medical checkups. Take your partner out dancing. There will always be time to go to work, clean the house, give a dinner party and fix the disposal. Take care of the rocks first -- the things that really matter. Set your priorities. The rest is just sand."

One of the students raised her hand and inquired what the beer represented. The professor smiled. "I'm glad you asked. It just goes to show you that no matter how full your life may seem, there's always room for a couple of beers."

[WebLogs @ SqlJunkies.com]
11:55:48 AM    trackback []     Articulate [] 

A great tool from Fabrice Marguerie.

A common need when building web sites is integrating the content in designed frames and not just in plain dumb grey panels. The difficulty with that is that we have to use HTML tables to enable the panels to be sizeable according to their content, and link this HTML tags to CSS styles.

I created a new WebControl that greatly simplifies this task. This control's source code is actually quite simple and can be used as an example if you want to take a look at how WebControls work.

With a control like the StyledPanel (that's its name), the developer manipulates only the control and its properties through the Property Inspector, all the design is defined in a CSS file.

Having all the style exported to a CSS file, the only difference between the two controls below is just one property value! Aslo, only the CSS need to be changed if you want to redesign the panels. Isn't that appealing to you?

Download the source code now!

Here is how to test this control:

  • Open and build the solution
  • Add the control to the Toolbox (right-click on the Toolbox, browse for Madgeek.dll and add it)
  • Add a new Web projet to the solution
  • Copy the Samples directory to your Web project directory
  • Add a link to the CSS in the WebForm (Format | Document Styles... then select Samples.css in the directory you just copied)
  • Drop a StyledPanel onto the WebForm
  • Set the CssSuffix of the StyledPanel to Sample1
  • Drop another StyledPanel onto the WebForm
  • Set the CssSuffix of the second StyledPanel to Sample2
  • Run the Web application
  • Change the first StyledPanel's CssSuffix property to Sample2 and save
  • Reload the page in the browser

Note: you can change the CssSuffix without recompiling as the ASPX file gets reevaluated after the change.


10:50:45 AM    trackback []     Articulate []