Click here to Skip to main content
15,889,491 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralBridging ObjectDataSource to Entity Framework with a Generic BusinessObject Pin
Woppelmann P9-Jun-12 2:32
Woppelmann P9-Jun-12 2:32 
GeneralRe: Bridging ObjectDataSource to Entity Framework with a Generic BusinessObject Pin
_Amy28-Jun-12 22:23
professional_Amy28-Jun-12 22:23 
GeneralThe lazy way to check if the file is present. Pin
Ammar_Ahmad8-Jun-12 11:11
Ammar_Ahmad8-Jun-12 11:11 
GeneralRe: The lazy way to check if the file is present. PinPopular
Pascal Ganaye8-Jun-12 11:23
Pascal Ganaye8-Jun-12 11:23 
GeneralRe: The lazy way to check if the file is present. Pin
Eddy Vluggen8-Jun-12 11:40
professionalEddy Vluggen8-Jun-12 11:40 
GeneralRe: The lazy way to check if the file is present. Pin
PIEBALDconsult9-Jun-12 6:00
mvePIEBALDconsult9-Jun-12 6:00 
GeneralRe: The lazy way to check if the file is present. Pin
Pascal Ganaye9-Jun-12 6:39
Pascal Ganaye9-Jun-12 6:39 
RantAttack of the stord proc Pin
virang_217-Jun-12 16:59
virang_217-Jun-12 16:59 
I have this project which is so nasty I don't even want to touch it but as a jock on my professional life I inherited it from a master developers. Application is so pathatically written it makes my mind go crazy whenever there is a fix required. So here is one example of hundreds of stord proc it uses or not uses ( some stord proc are just there for fun Mad | :mad: ).

SQL
CREATE PROCEDURE [dbo].[uspInsertUpdateDeleteFltcode]
 @fltCode varchar(8),@fltDesc Varchar(20),@fltGrp varchar(8),@casterRelated bit,
 @fltType varchar(2),@flag char(1),@shortDesc Varchar(8),@rptOrd Numeric(9,0)
AS
declare @Operation char(1)

BEGIN    
	SET NOCOUNT ON;   
	SET @operation=@flag  
	IF @operation='I'  
		BEGIN  
			INSERT INTO FltCode (Flt_Code,Flt_Desc,Flt_Grp,Caster_Related,Flt_Type,Sh_Desc,Rpt_Ord)  
			VALUES(@fltCode,@fltDesc,@fltGrp,@casterRelated,@fltType,@shortDesc,@rptOrd)  
		END  
	IF @operation='U'  
		BEGIN
....
...
.. 


Some of them call some other stord procs internally. Some are at least 500 lines long and loop within loop within loop and so on but this is insane why in the world you have one strod proc that do every CURD operation ? Why ..Mad | :mad:
Zen and the art of software maintenance : rm -rf *

Math is like love : a simple idea but it can get complicated.

GeneralRe: Attack of the stord proc PinPopular
Manfred Rudolf Bihy7-Jun-12 22:11
professionalManfred Rudolf Bihy7-Jun-12 22:11 
GeneralRe: Attack of the stord proc Pin
virang_218-Jun-12 2:52
virang_218-Jun-12 2:52 
GeneralRe: Attack of the stord proc Pin
Pascal Ganaye8-Jun-12 11:28
Pascal Ganaye8-Jun-12 11:28 
GeneralRe: Attack of the stord proc Pin
Eddy Vluggen7-Jun-12 23:28
professionalEddy Vluggen7-Jun-12 23:28 
GeneralRe: Attack of the stord proc Pin
loctrice8-Jun-12 3:46
professionalloctrice8-Jun-12 3:46 
GeneralRe: Attack of the stord proc Pin
Eddy Vluggen8-Jun-12 11:32
professionalEddy Vluggen8-Jun-12 11:32 
GeneralRe: Attack of the stord proc Pin
Pascal Ganaye8-Jun-12 11:32
Pascal Ganaye8-Jun-12 11:32 
AnswerRe: Attack of the stord proc Pin
Eddy Vluggen8-Jun-12 11:39
professionalEddy Vluggen8-Jun-12 11:39 
RantRe: Attack of the stord proc Pin
Jan Steyn14-Jun-12 1:36
Jan Steyn14-Jun-12 1:36 
GeneralRe: Attack of the stord proc Pin
Eddy Vluggen14-Jun-12 1:51
professionalEddy Vluggen14-Jun-12 1:51 
GeneralRe: Attack of the stord proc Pin
Pascal Ganaye8-Jun-12 11:35
Pascal Ganaye8-Jun-12 11:35 
GeneralRe: Attack of the stord proc Pin
virang_218-Jun-12 12:39
virang_218-Jun-12 12:39 
GeneralN00btacular PinPopular
AspDotNetDev7-Jun-12 15:12
protectorAspDotNetDev7-Jun-12 15:12 
GeneralRe: N00btacular Pin
Paul Conrad8-Jun-12 12:02
professionalPaul Conrad8-Jun-12 12:02 
GeneralRe: N00btacular Pin
Brisingr Aerowing9-Jun-12 7:41
professionalBrisingr Aerowing9-Jun-12 7:41 
GeneralPro Cache Usage PinPopular
Member 41627846-Jun-12 5:03
Member 41627846-Jun-12 5:03 
GeneralRe: Pro Cache Usage Pin
RobCroll6-Jun-12 17:42
RobCroll6-Jun-12 17:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.