Click here to Skip to main content
15,905,614 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 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 
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 
Georgi Atanasov wrote:
it is not good to show such attitude when talking with other people.


I'd agree certainly, however my original statement wasn't intended in perhaps the way it was percieved.


Georgi Atanasov wrote:
one how says Java is the worst code ever


I never said that (I hope), that would be Haskell perhaps. However as a programming language that claims to produce software for all purposes (essentially) then compaired to .NET it does have significant performance and memory limitations that to my mind at least make it all but crippled.

Georgi Atanasov wrote:
Java world is larger than the .NET one


I have heard that quoted before, and I wouldn't be as bold as too disagree, however I would say that just because it's used more doesn't make it good. Ask a linux advocate and they would use a similar argument perhaps.

Georgi Atanasov wrote:
it is actually PLATFORM INDEPENDENT


I don't dispute that Java some benefits, however I would argue that things like platform independance is very low on my list of priorities.

Georgi Atanasov wrote:
does not have Interop calls in the class library


If it doesn't make the language more complicated to use or of lower performance where is the advantage of not doing that?

Georgi Atanasov wrote:
I think you miss some of my statements


I was pretty careful to read your posts (and have double checked them before posting this), however while you are technically right in the aspects of java benefits you state, I question however they are of any significance to the average progremmer or perhaps even to industry. If a language is simple to use, works well, and performs well, does it really matter the underlying implementation issues?


Georgi Atanasov wrote:
OK, about the Value and Reference types - these are the two basic types in .NET. Value types are special objects, which reside on the Stack and are accessed by copying their values (of course you may always pass a value type by ref). Reference (or instance) types on the other hand are objects, which reside on the managed heap, reserved by the CLR, and are accessed by reference. These objects are target of the Garbage Collector. There are other differences which are not in this scope. So, they have NOTHING to do with ICloneable, value types are not ICloneable implementors. This interface is used when an exact copy of a Reference type is required and it is each type's task to implement the "Clone".


Thank you for clarifying that, always happy to learn. I orriginally said something along the lines of

x = y;
y.some_method(); *

if (x == y) then reference type
else value type

* where some_method alters the value of y

Disregarding the section about the various stacks of the .NET CLR, what part of my orriginal statement is incorrect? or perhaps were you refering to when I said something along the lines of...

when x = y and y and x are value types then effectively they implement ICloneable

To summarise what I meant wasn't (e.g.) int implements ICloneable but rather if x and y were referance types not value types then x = y is the equivilent of x = y.Clone() and so in a way values types perform in a manor similar to that of an ICloneable object.

Georgi Atanasov wrote:
Thank you for taking the time to talk with me


Likewise, I look forward to you reply.
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 
GeneralRe: Anonamous delegates gone mad! Pin
leppie22-Mar-08 7:58
leppie22-Mar-08 7:58 
GeneralRe: Anonamous delegates gone mad! Pin
Derek Bartram22-Mar-08 10:37
Derek Bartram22-Mar-08 10:37 

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.