Click here to Skip to main content
15,886,199 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.

 
GeneralRe: Quantity, not quality Pin
PIEBALDconsult1-Jun-09 1:42
mvePIEBALDconsult1-Jun-09 1:42 
GeneralRe: Quantity, not quality Pin
Jörgen Sigvardsson12-Jun-09 6:53
Jörgen Sigvardsson12-Jun-09 6:53 
GeneralRe: Quantity, not quality Pin
ClementsDan13-Jun-09 0:44
ClementsDan13-Jun-09 0:44 
GeneralRe: Quantity, not quality Pin
Vasudevan Deepak Kumar1-Jun-09 0:31
Vasudevan Deepak Kumar1-Jun-09 0:31 
GeneralRe: Quantity, not quality Pin
J4amieC3-Jun-09 0:11
J4amieC3-Jun-09 0:11 
GeneralRe: Quantity, not quality Pin
CPallini4-Jun-09 1:38
mveCPallini4-Jun-09 1:38 
GeneralRe: Quantity, not quality Pin
John R. Shaw19-Jun-09 20:28
John R. Shaw19-Jun-09 20:28 
GeneralOne instance of an application [modified] PinPopular
akyriako7826-May-09 21:48
akyriako7826-May-09 21:48 
Well...I wont share you the source code because its an enormous snippet. But i will narrate you the concept like a bedtime story. The technical director of our company - who is in parallel our head programmer (somebody save us)- decided to add a new feature to our super-dooper, high-end, wannabe-ERP product (riiiiiiiiiight!!!!). That was ... the very "advanced" requirement : "Our application will have only one instance.Listen how is going to be implemented..." .And then the problems just begun. "In order to implement it we'll take the ProcessId of our .exe and a timestamp of DateTime. Now to ensure its a today's instance of a process and save it to the database. So every new instance of the program will check the database to ensure if it will execute or not". I asked him very politely "What about using a mutex ?" . I almost got fired because : "You don't pay attention to the requirements and your only concern is to show off to me and to the rest of the development team with theoretical buzz-words. This is real-life programming buddy. Can you do this or not ?".

No comments from me. I leave them to you. I'll keep the dissappointment.

P.S. (1) The same day he forbid me to use again datasets, or LinQ to SQL because they are too complicated, too time consuming to construct, they don't ensure data integrity (???), and they oblige us to stick with a certain schema and "... I don't understand the reason for a disconnected architecture". So from now and on he commanded me to use only text queries through custom dbcommands and keep a database connection alive in a static object. (Hell yeah!!!)

P.S. (2) All the above are real. Cry | :((

modified on Wednesday, May 27, 2009 3:54 AM

JokeRe: One instance of an application Pin
AWdrius26-May-09 22:33
AWdrius26-May-09 22:33 
GeneralRe: One instance of an application Pin
Rajesh R Subramanian26-May-09 23:26
professionalRajesh R Subramanian26-May-09 23:26 
GeneralRe: One instance of an application Pin
akyriako7827-May-09 5:58
akyriako7827-May-09 5:58 
GeneralRe: One instance of an application Pin
killabyte27-May-09 13:44
killabyte27-May-09 13:44 
GeneralRe: One instance of an application Pin
Robert Surtees27-May-09 16:47
Robert Surtees27-May-09 16:47 
GeneralRe: One instance of an application Pin
_Damian S_27-May-09 16:55
professional_Damian S_27-May-09 16:55 
GeneralRe: One instance of an application Pin
RugbyLeague1-Jun-09 0:38
RugbyLeague1-Jun-09 0:38 
GeneralRe: One instance of an application Pin
The Real Geek26-May-09 23:39
The Real Geek26-May-09 23:39 
GeneralRe: One instance of an application Pin
Michael Bookatz27-May-09 0:57
Michael Bookatz27-May-09 0:57 
GeneralRe: One instance of an application Pin
akyriako7827-May-09 5:54
akyriako7827-May-09 5:54 
GeneralRe: One instance of an application Pin
Michael Bookatz27-May-09 5:56
Michael Bookatz27-May-09 5:56 
GeneralRe: One instance of an application Pin
akyriako7827-May-09 6:00
akyriako7827-May-09 6:00 
GeneralRe: One instance of an application Pin
Michael Bookatz27-May-09 6:28
Michael Bookatz27-May-09 6:28 
GeneralRe: One instance of an application PinPopular
_Damian S_27-May-09 14:21
professional_Damian S_27-May-09 14:21 
GeneralRe: One instance of an application Pin
BillW3311-Aug-09 8:37
professionalBillW3311-Aug-09 8:37 
GeneralRe: One instance of an application Pin
akyriako7827-May-09 5:59
akyriako7827-May-09 5:59 
JokeRe: One instance of an application Pin
Michael Bookatz27-May-09 0:58
Michael Bookatz27-May-09 0:58 

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.