Click here to Skip to main content
15,891,777 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: The worst code i've ever seen.... Pin
elektrowolf12-Apr-08 8:28
elektrowolf12-Apr-08 8:28 
GeneralRe: The worst code i've ever seen.... Pin
Georgi Atanasov12-Apr-08 9:35
Georgi Atanasov12-Apr-08 9:35 
GeneralRe: The worst code i've ever seen.... Pin
elektrowolf12-Apr-08 10:26
elektrowolf12-Apr-08 10:26 
GeneralRe: The worst code i've ever seen.... Pin
Derek Bartram12-Apr-08 14:10
Derek Bartram12-Apr-08 14:10 
GeneralRe: The worst code i've ever seen.... Pin
elektrowolf12-Apr-08 21:36
elektrowolf12-Apr-08 21:36 
GeneralRe: The worst code i've ever seen.... Pin
Derek Bartram13-Apr-08 3:37
Derek Bartram13-Apr-08 3:37 
GeneralRe: The worst code i've ever seen.... [modified] Pin
Georgi Atanasov13-Apr-08 9:58
Georgi Atanasov13-Apr-08 9:58 
GeneralRe: The worst code i've ever seen.... Pin
Derek Bartram16-Apr-08 2:26
Derek Bartram16-Apr-08 2:26 
Georgi Atanasov wrote:
It is obvious that you are not familiar (to be honest your guesses amused me pretty much ) with Value and Reference types


I've just read the article and can't see anything wrong with my earlier post specifically; perhaps you could be more specific please.
Thank you for the link however as it does clarify a few implementation details of how value and type referances work; however those details didn't relate to the orriginal question.


Georgi Atanasov wrote:
need read more about the basics of .NET such as Common Language Runtime


As a developer of .NET for 5-6 years I've never had a problem yet, and amongst my peer group I am considered a good programmer, so perhaps I question this.


Georgi Atanasov wrote:
And do not be that arrogant:


I wasn't being arrogant, in fact I was deliberatly trying not to be; however writing efficient code and algorithms is challenging (and I would happily admit i'm no expert, however subjectively I would say I'm pretty good). Efficiency of coding often impacts performance more than code, and as someone from an innitial Java background there was were many things I used to do 'wrong' in .net initially when I transfered languages that did have an impact on performance. I appologise if offence was taken.


Georgi Atanasov wrote:
Having in mind that you even dare to compare the performance of native C++ against .NET


Firstly doing a comparison of high level libraries such as my Ribbon Control Library is generally not a suitable test as too many implementation issues are often prevalent. A number of years ago (and this has been repeated by a number of my colegues) we developed a series of rather primative tests to analyse the performance of a few main basic language functions (data read, addition, subtration, multiplication, division, list sorting etc), and for Java vs. C# .NET the .NET language out performed Java by a significant degree and more importantly consistantly. While I havn't perform a similar test myself I have heard of colegues performing the test upon .NET and native C++ and the difference is not that significant (although granted C++ did outperform consistently).



Georgi Atanasov wrote:
after examining some code from your "Famous" Ribbon library I am not completely sure that you are an efficiency master...


Firstly great, I hope you did. I'll go look at the comments you left in the article so that I can improve the library further. Secondly, the library has been developed relatively quickly for functionality primarily and efficiency as not really been considered at this stage. Thirdly i'm not sure what you comparied the efficiency of the system with (and I assume you used the local version rather than the web version which is far older and slower due to lack of an important update), however on my system (and testing be third parties on a number of other systems) my library performs well within the boundaries of office performance (and even better in a few cases). Fourthly, it's "famous"?

Finally, you mention being arrogant yet frankly you message smacks of arrogancy. I'm happy to admit i'm wrong when someone shows me evidence to the opposite, however at no stage you have done this; instead you have done nothing more than a unproved attack against myself. This is a community of developers supporting each other, perhaps if you can't or don't respect that you should consider finding a different site to occupy. Thank you, Derek.
GeneralRe: The worst code i've ever seen.... Pin
Georgi Atanasov16-Apr-08 22:32
Georgi Atanasov16-Apr-08 22:32 
GeneralRe: The worst code i've ever seen.... Pin
Derek Bartram18-Apr-08 5:51
Derek Bartram18-Apr-08 5:51 
GeneralRe: The worst code i've ever seen.... Pin
Derek Bartram12-Apr-08 14:09
Derek Bartram12-Apr-08 14:09 
GeneralRe: The worst code i've ever seen.... Pin
elektrowolf14-Apr-08 2:48
elektrowolf14-Apr-08 2:48 
GeneralRe: The worst code i've ever seen.... Pin
Derek Bartram16-Apr-08 2:29
Derek Bartram16-Apr-08 2:29 
GeneralRe: The worst code i've ever seen.... Pin
elektrowolf16-Apr-08 8:13
elektrowolf16-Apr-08 8:13 
GeneralRe: The worst code i've ever seen.... Pin
Jordanwb1-Apr-08 2:10
Jordanwb1-Apr-08 2:10 
GeneralRe: The worst code i've ever seen.... Pin
zildjohn0110-Apr-08 17:16
zildjohn0110-Apr-08 17:16 
GeneralRe: The worst code i've ever seen.... Pin
elektrowolf12-Apr-08 8:25
elektrowolf12-Apr-08 8:25 
GeneralRe: The worst code i've ever seen.... Pin
Derek Bartram12-Apr-08 14:00
Derek Bartram12-Apr-08 14:00 
GeneralRe: The worst code i've ever seen.... Pin
elektrowolf12-Apr-08 21:39
elektrowolf12-Apr-08 21:39 
GeneralRe: The worst code i've ever seen.... Pin
Derek Bartram13-Apr-08 3:36
Derek Bartram13-Apr-08 3:36 
GeneralAnonamous delegates gone mad! Pin
Derek Bartram21-Mar-08 12:20
Derek Bartram21-Mar-08 12:20 
GeneralRe: Anonamous delegates gone mad! Pin
PIEBALDconsult21-Mar-08 13:10
mvePIEBALDconsult21-Mar-08 13:10 
GeneralRe: Anonamous delegates gone mad! Pin
Derek Bartram21-Mar-08 15:22
Derek Bartram21-Mar-08 15:22 
GeneralRe: Anonamous delegates gone mad! Pin
leppie22-Mar-08 7:01
leppie22-Mar-08 7:01 
GeneralRe: Anonamous delegates gone mad! Pin
Derek Bartram22-Mar-08 7:38
Derek Bartram22-Mar-08 7:38 

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.