Results 1 to 5 of 5

Thread: Code art.

  1. #1
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592

    Code art.

    I propose the following principle:
    "The quality of code is inversely related to how aesthetically pleasing it looks when properly formatted."

    Code:
    SELECT	'MinDaysSinceActivity'=
    	(CASE WHEN	DaysSinceNoteActivity <= DaysSinceTaskAdd AND 
    			DaysSinceNoteActivity <= DaysSinceTaskClose AND 
    			DaysSinceNoteActivity <= DaysSinceLettersAdd AND 
    			DaysSinceNoteActivity <= DaysSinceServiceRequestsAdd AND 
    			DaysSinceNoteActivity <= DaysSinceUtilizationsAdd THEN DaysSinceNoteActivity ELSE
    		CASE WHEN	DaysSinceTaskAdd <= DaysSinceNoteActivity AND
    				DaysSinceTaskAdd <= DaysSinceTaskClose AND
    				DaysSinceTaskAdd <= DaysSinceLettersAdd AND
    				DaysSinceTaskAdd <= DaysSinceServiceRequestsAdd AND
    				DaysSinceTaskAdd <= DaysSinceUtilizationsAdd	THEN DaysSinceTaskAdd ELSE
    			CASE WHEN	DaysSinceTaskClose <= DaysSinceNoteActivity AND
    					DaysSinceTaskClose <= DaysSinceTaskAdd AND
    					DaysSinceTaskClose <= DaysSinceLettersAdd AND
    					DaysSinceTaskClose <= DaysSinceServiceRequestsAdd AND
    					DaysSinceTaskClose <= DaysSinceUtilizationsAdd THEN DaysSinceTaskClose ELSE 
    				CASE WHEN	DaysSinceLettersAdd <= DaysSinceNoteActivity AND 
    						DaysSinceLettersAdd <= DaysSinceTaskAdd AND
    						DaysSinceLettersAdd <= DaysSinceTaskClose AND
    						DaysSinceLettersAdd <= DaysSinceServiceRequestsAdd AND
    						DaysSinceLettersAdd <= DaysSinceUtilizationsAdd THEN DaysSinceLettersAdd ELSE
    					CASE WHEN	DaysSinceServiceRequestsAdd <= DaysSinceNoteActivity AND 
    							DaysSinceServiceRequestsAdd <= DaysSinceTaskAdd AND
    							DaysSinceServiceRequestsAdd <= DaysSinceTaskClose AND
    							DaysSinceServiceRequestsAdd <= DaysSinceLettersAdd AND
    							DaysSinceServiceRequestsAdd <= DaysSinceUtilizationsAdd THEN DaysSinceServiceRequestsAdd ELSE
    						CASE WHEN	DaysSinceUtilizationsAdd <= DaysSinceNoteActivity AND
    								DaysSinceUtilizationsAdd <= DaysSinceTaskAdd AND
    								DaysSinceUtilizationsAdd <= DaysSinceTaskClose AND
    								DaysSinceUtilizationsAdd <= DaysSinceLettersAdd AND
    								DaysSinceUtilizationsAdd <= DaysSinceServiceRequestsAdd THEN DaysSinceUtilizationsAdd
    		END END END END END END)
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    This springs to mind
    George
    Home | Blog

  3. #3
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    When I am forced to do code reviews, sometimes I screw with people by saying "there is not enough pink".
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  4. #4
    Join Date
    Dec 2013
    Posts
    1
    don't do that

    http://www.verveinc.com/
    Last edited by christinescott; 01-01-14 at 01:26.

  5. #5
    Join Date
    Dec 2013
    Posts
    1
    yeah, it's so ironic isn't it? Haha..

    http://www.onlinegokkasten.me/index.php
    Last edited by cameronmiles; 01-13-14 at 02:39.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •