Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. The worst code i've ever seen....

The worst code i've ever seen....

Scheduled Pinned Locked Moved The Weird and The Wonderful
javacomtoolsperformance
54 Posts 17 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S slammers4

    THE HORROR!!!!!!

    John

    F Offline
    F Offline
    FocusedWolf
    wrote on last edited by
    #26

    The stuff that nightmares are made of! Thank Bill for smiting java with C# :D

    1 Reply Last reply
    0
    • D Derek Bartram

      It's slow... it chews memory like a beast.... it boosts productivity like a monkey eating a dog......... http://www.java.com/en/[^]... If you want your application to be slow and not very good, use Java.

      J Offline
      J Offline
      Jordanwb
      wrote on last edited by
      #27

      Last symester in High school I learned Java. It was so annoying. For our final sumative we had to make a game (We're kids oaky) and due to time constraints I had to work on it at home. At home I have JRE 1.6, at school they have JRE 1.5. Java 1.5 wouldn't display my game properly, it was all screwed up. I like C# way, way better.

      1 Reply Last reply
      0
      • P Paul Conrad

        In both my Bachelor's and Master's programs, we were forced to use it...

        "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

        J Offline
        J Offline
        Jeff Dickey
        wrote on last edited by
        #28

        For a post piling on Java (which is the best proof yet against my theory that no language is proof against sufficiently determined idiots; cf. "outsourcing"), to use a .sig line with a dead-accurate evaluation of VB just made my morning. (Yes, you can write idiotic code in other languages; you just have to work much harder at it.)

        Jeff Dickey Seven Sigma Software and Services Phone/SMS: +65 8333 4403 Yahoo! IM: jeff_dickey MSN IM:    jeff_dickey at hotmail.com ICQ IM:    8053918 Skype:     jeff_dickey

        1 Reply Last reply
        0
        • C Chris Maunder

          ...and all the java crowd say the same thing about .NET. Move on, nothing to see.

          cheers, Chris Maunder

          CodeProject.com : C++ MVP

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #29

          Exactly Chris. I for one applaud the work your team does, and creating a separate Java home is another excellent idea which will be appreciated by most of us. To those of you who hate (or are frightened of) Java, please don't waste space in this forum airing your prejudices.

          1 Reply Last reply
          0
          • D Derek Bartram

            It's slow... it chews memory like a beast.... it boosts productivity like a monkey eating a dog......... http://www.java.com/en/[^]... If you want your application to be slow and not very good, use Java.

            Z Offline
            Z Offline
            zildjohn01
            wrote on last edited by
            #30

            But.. but... it's portable... so it has to be good

            1 Reply Last reply
            0
            • D Derek Bartram

              It's slow... it chews memory like a beast.... it boosts productivity like a monkey eating a dog......... http://www.java.com/en/[^]... If you want your application to be slow and not very good, use Java.

              E Offline
              E Offline
              elektrowolf
              wrote on last edited by
              #31

              Huh, I don't know Java. But I don't think it's that bad. C# isn't too fast, too. But there are pretty much features in C# now I don't want to miss like (automatic) properties, WPF, LINQ, extension functions,...

              D 1 Reply Last reply
              0
              • G Georgi Atanasov

                Java has many adnvantages over .NET and disadvantages as well - one of the most problematic (in my opinion) being not supporting value types, everything is object. But, you state that it chews lot of memory and is slow; having seen your latest articles do you have the courage to say that WPF and especially your code runs faster and with less memory than Java Swing GUI for example? P.S. I write in .NET also.

                Thanks, Georgi

                E Offline
                E Offline
                elektrowolf
                wrote on last edited by
                #32

                I don't know Java, tell me, which advantages has it? Not supporting value types of course is annoying, but this isn't solved very well in C#, too. You can't clone objects by default, they all have to implement ICloneable, which is not even generic!

                G 1 Reply Last reply
                0
                • E elektrowolf

                  I don't know Java, tell me, which advantages has it? Not supporting value types of course is annoying, but this isn't solved very well in C#, too. You can't clone objects by default, they all have to implement ICloneable, which is not even generic!

                  G Offline
                  G Offline
                  Georgi Atanasov
                  wrote on last edited by
                  #33

                  Dude, I am not sure you are familiar with value and reference types at all; it has nothing to do with ICloneable... As a GUI developer I may speak of the following advantages of Java Swing over .NET 2.0: Java is completely detached from the underlying OS - .NET is using Interop primarily; 99% of the controls are wrappers of their Win32 equivalents; you need to know Win32 API in order to create commercial controls. Let me mention that things are different in WPF - there is actual bridge which separates OS from the GUI. But still, WPF consumes lot of memory and is not the platform a company, which cares about performance, would choose on... That is my personal opinion of course.

                  Thanks, Georgi

                  E D 3 Replies Last reply
                  0
                  • G Georgi Atanasov

                    Dude, I am not sure you are familiar with value and reference types at all; it has nothing to do with ICloneable... As a GUI developer I may speak of the following advantages of Java Swing over .NET 2.0: Java is completely detached from the underlying OS - .NET is using Interop primarily; 99% of the controls are wrappers of their Win32 equivalents; you need to know Win32 API in order to create commercial controls. Let me mention that things are different in WPF - there is actual bridge which separates OS from the GUI. But still, WPF consumes lot of memory and is not the platform a company, which cares about performance, would choose on... That is my personal opinion of course.

                    Thanks, Georgi

                    E Offline
                    E Offline
                    elektrowolf
                    wrote on last edited by
                    #34

                    I think is the main difference between value and reference types is, that if you write x = y and y is a value type, x contains a copy of y, while when y is a reference type, x contains a reference to y. To copy y, y is required to ICloneable. Is that false?

                    D 1 Reply Last reply
                    0
                    • E elektrowolf

                      Huh, I don't know Java. But I don't think it's that bad. C# isn't too fast, too. But there are pretty much features in C# now I don't want to miss like (automatic) properties, WPF, LINQ, extension functions,...

                      D Offline
                      D Offline
                      Derek Bartram
                      wrote on last edited by
                      #35

                      elektrowolf wrote:

                      C# isn't too fast, too

                      Uh, ***trying not to sound rude***, how inefficiently do you code?

                      E 1 Reply Last reply
                      0
                      • G Georgi Atanasov

                        Dude, I am not sure you are familiar with value and reference types at all; it has nothing to do with ICloneable... As a GUI developer I may speak of the following advantages of Java Swing over .NET 2.0: Java is completely detached from the underlying OS - .NET is using Interop primarily; 99% of the controls are wrappers of their Win32 equivalents; you need to know Win32 API in order to create commercial controls. Let me mention that things are different in WPF - there is actual bridge which separates OS from the GUI. But still, WPF consumes lot of memory and is not the platform a company, which cares about performance, would choose on... That is my personal opinion of course.

                        Thanks, Georgi

                        D Offline
                        D Offline
                        Derek Bartram
                        wrote on last edited by
                        #36

                        Georgi Atanasov wrote:

                        That is my personal opinion of course.

                        And which is why you can get away being so wrong ;P On a little more serious note...

                        Georgi Atanasov wrote:

                        Java is completely detached from the underlying OS

                        So? If it works then why not?

                        Georgi Atanasov wrote:

                        99% of the controls are wrappers of their Win32 equivalents; you need to know Win32 API in order to create commercial controls

                        I'm not sure i'd agree; I've created a Office Fleunt Ribbon control library using nothing more than WPF, which i'm happily using in a commercial grade application, with no problems (http://www.codeproject.com/KB/WPF/ribboncontrol.aspx[^], see also CIRIP).

                        Georgi Atanasov wrote:

                        WPF consumes lot of memory

                        It's a new technology, and so not full optimised yet; hey if you want to moan about something *new* then why not have a go about the lack of an open and save dialog. I'm sure exactly the same was said of MFC, Swing, etc.

                        Georgi Atanasov wrote:

                        is not the platform a company, which cares about performance, would choose on...

                        There are companies using it, admitadly few currently but growing by the day. Yes, performance is shocking until you learn how to use it properly and then it's more than fast enough. Companies in my eyes don't care about performance, they care about cost to produce something that does the job, and from my experience WPF reduces development time (after over 4-5 years of Windows Forms (and Java Swing for that matter) and only <6 months WPF programming).

                        1 Reply Last reply
                        0
                        • E elektrowolf

                          I think is the main difference between value and reference types is, that if you write x = y and y is a value type, x contains a copy of y, while when y is a reference type, x contains a reference to y. To copy y, y is required to ICloneable. Is that false?

                          D Offline
                          D Offline
                          Derek Bartram
                          wrote on last edited by
                          #37

                          perhaps a better example might be x = y y.a_property = some_value if (x.a_property == y.a_property) then referance type else value type

                          E 1 Reply Last reply
                          0
                          • P Pete OHanlon

                            Chris Maunder wrote:

                            ...and all the java crowd say the same thing about .NET. Move on, nothing to see

                            But of course, they are wrong and we are right. Why? Well, because we are, well.... us.

                            Deja View - the feeling that you've seen this post before.

                            My blog | My articles

                            D Offline
                            D Offline
                            Derek Bartram
                            wrote on last edited by
                            #38

                            Pete O'Hanlon wrote:

                            Chris Maunder wrote: ...and all the java crowd say the same thing about .NET.

                            ***to the tune of big ben*** Wrong wrong wrong wrong..... wrong wrong wrong wrong...... wrong.... wrong... wrong....

                            P 1 Reply Last reply
                            0
                            • D Derek Bartram

                              perhaps a better example might be x = y y.a_property = some_value if (x.a_property == y.a_property) then referance type else value type

                              E Offline
                              E Offline
                              elektrowolf
                              wrote on last edited by
                              #39

                              OK, but basically it's the same. So what did I understand wrong? It does have something to do with ICloneable, or not?

                              D 1 Reply Last reply
                              0
                              • D Derek Bartram

                                elektrowolf wrote:

                                C# isn't too fast, too

                                Uh, ***trying not to sound rude***, how inefficiently do you code?

                                E Offline
                                E Offline
                                elektrowolf
                                wrote on last edited by
                                #40

                                .. I mean compared to C++. I don't think it's too slow, I've never had problems with C#'s performance, but for some algorithms you need C++.

                                D 1 Reply Last reply
                                0
                                • E elektrowolf

                                  .. I mean compared to C++. I don't think it's too slow, I've never had problems with C#'s performance, but for some algorithms you need C++.

                                  D Offline
                                  D Offline
                                  Derek Bartram
                                  wrote on last edited by
                                  #41

                                  elektrowolf wrote:

                                  but for some algorithms you need C++.

                                  like what? Yes, i'd agree there is a slight performance decrease compaired to c++ but it's neglible.

                                  1 Reply Last reply
                                  0
                                  • E elektrowolf

                                    OK, but basically it's the same. So what did I understand wrong? It does have something to do with ICloneable, or not?

                                    D Offline
                                    D Offline
                                    Derek Bartram
                                    wrote on last edited by
                                    #42

                                    referance and values types have very little to do with ICloneable... values types a guess are effectively implementors of ICloneable as x = y produces essentially a clone of x

                                    G 1 Reply Last reply
                                    0
                                    • D Derek Bartram

                                      referance and values types have very little to do with ICloneable... values types a guess are effectively implementors of ICloneable as x = y produces essentially a clone of x

                                      G Offline
                                      G Offline
                                      Georgi Atanasov
                                      wrote on last edited by
                                      #43

                                      It is obvious that you are not familiar (to be honest your guesses amused me pretty much :)) with Value and Reference types - you may try the following article (the first found one after search). http://www.codeproject.com/KB/dotnet/Primitive_Ref_ValueTypes.aspx[^] If I may advise you - you need read more about the basics of .NET such as Common Language Runtime (CLR), IL, value and reference types, etc. And do not be that arrogant:

                                      Derek Bartram wrote:

                                      Uh, ***trying not to sound rude***, how inefficiently do you code?

                                      . Having in mind that you even dare to compare the performance of native C++ against .NET and after examining some code from your "Famous" Ribbon library I am not completely sure that you are an efficiency master...

                                      Thanks, Georgi

                                      modified on Sunday, April 13, 2008 4:52 PM

                                      D 1 Reply Last reply
                                      0
                                      • D Derek Bartram

                                        .net slower than java or java slower than .net.... I can justify java slower than .net with about 10 minutes of coding (and 30mins of java tools downloads). Please don't ask me too though, really don't want the hassel of downloading java stuff.

                                        R Offline
                                        R Offline
                                        rockNroll
                                        wrote on last edited by
                                        #44

                                        HI Can you show me some written proof(Link to the articles, journal's, books etc) that C# is better than Java or vice versa. You can not comment on anything unless there is any written evidence for it. I am waiting for the proof... :) ta

                                        modified on Sunday, April 13, 2008 8:42 PM

                                        1 Reply Last reply
                                        0
                                        • G Georgi Atanasov

                                          Dude, I am not sure you are familiar with value and reference types at all; it has nothing to do with ICloneable... As a GUI developer I may speak of the following advantages of Java Swing over .NET 2.0: Java is completely detached from the underlying OS - .NET is using Interop primarily; 99% of the controls are wrappers of their Win32 equivalents; you need to know Win32 API in order to create commercial controls. Let me mention that things are different in WPF - there is actual bridge which separates OS from the GUI. But still, WPF consumes lot of memory and is not the platform a company, which cares about performance, would choose on... That is my personal opinion of course.

                                          Thanks, Georgi

                                          E Offline
                                          E Offline
                                          elektrowolf
                                          wrote on last edited by
                                          #45

                                          OK, basically, they have nothing to do with ICloneable. But if you want to create a copy of a reference type, this type needs to implement ICloneable, whilst in C++, reference types can be both referenced and copied by default and you can define a copy constructor to change the copying process. I think this is solved much better in C++.

                                          D 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups