Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

A Debate for the experts

Options
  • 10-03-2008 5:09pm
    #1
    Registered Users Posts: 221 ✭✭


    Hi All,

    Usually I post on these boards about specific problem but today
    I’ve got something a bit more general. I want to start a debate about the future of programming.

    I'm a 'just out of college' programmer with little experience and little exposure to the many pros and cons of languages. It’s because of this I'd like to point you the following article: http://www.rhonabwy.com/wp/2007/01/19/iphone-java-and-flash/ in this article the writer outline the future as he sees it for programming languages.

    Seeing as I lack the experience to either agree or oppose this I would like if some of the experienced members of the board would weigh in on this debate

    - Elfman


Comments

  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    Well you can probably start with his lack of knowledge of Java in that he compares Java on PC to Java on a mobile device. Then follows up with "Java never did **** on the desktop".

    No substance to back up his claims.

    Also J2ME is one of the most popular programming platforms for mobile devices and is not the same as Java when it comes to UI. Opera on mobile device for example Opera Mini is written in Java. Numerous games written for mobile devices as well.

    Then goes on to compare Java to Python, Ruby, PHP when we are talking about mobile devices. The guy has no clue at all what he is talking about.

    Lastly adding another platform for rendering apps would not hurt the iPhone. If anything would help Apple and if your an avid java hater just don't install it on your iPhone.


  • Registered Users Posts: 568 ✭✭✭phil


    ECMAScript is being touted as the next big thing. It's a bit of a self-fulfilling prophecy, so definitely watch out:

    I was going to throw in my 2c, but remembered that this has pretty much been articulated previously by Steve Yegge better than I could. It's an interesting read whether you agree with it or not.

    http://steve-yegge.blogspot.com/2007/02/next-big-language.html

    The post is a lesson in and of itself. If you're able to understand every feature he's talking about, you're already ahead of the pack. If you're not, it's worth researching them properly.


  • Registered Users Posts: 221 ✭✭Elfman


    That's a really good article. I also agree witha lot of the points made about java.

    I'd like to broaden the scope of the debate

    which language would you use for the following projects :

    - Large graphic desktop app :

    - web app (small)

    - Web app (large maybe shopping trolley with DB backend
    And xml parsing)

    - Client - Server over internal network

    - Desktop app build for speed


  • Registered Users Posts: 25 DeJaMo


    There are a few things you need to weight up when deciding on a programming language e.g. does the language support the functional requirements, will it support future requirements, does the application have to plug into legacy systems... the list goes on...

    To answer your question I would choose:

    - Large graphic desktop app : For windows - Visual Studios C++, For MAC- java SWING

    - web app (small) - any language - whichever is quickest to develop

    - Web app (large maybe shopping trolley with DB backend
    And xml parsing) - Being a J2EE developer i would chosse J2EE technologies, although .NET would also be a consideration

    - Client - Server over internal network - Over the last few years these kind of internal apps seem to be going web/browser based (which has it own adv's/diss adv's)... same as previous answer

    - Desktop app build for speed - speed is just down to writting good code... if there is no GUI i would choose a low level language.

    DeJaMo


  • Posts: 0 ✭✭✭ [Deleted User]


    Well this says "a debate for the experts" but I'm gonna go ahead and jump even though I make no claims to being an expert.
    The fastest languages are C/C++ and other compiled languages (well, assembly and machine code, but.. I assume we mean high-level languages ;)).
    However, for not-so-large desktop apps dynamic languages such as python, ruby and php are great. I agree with the article in that Java is on the way out. I think we will see a lot of mixing together in the future. Using python with C++, for example. You have the readability and quick development of python and use C++ for the power. (Yes, this can be done.. I think :D)
    When I'm programming, I use Ruby. I say you pick your favourite language, although in the workplace this may not be possible.
    Languages like ruby and python are good in my opinion because they are designed to be read by humans. High level languages were invented to make it easier for programmers, otherwise we'd just program in binary for sheer power. So ruby and python fulfil the goal of high-level languages so to speak.


  • Advertisement
  • Moderators, Science, Health & Environment Moderators Posts: 10,079 Mod ✭✭✭✭marco_polo


    Well this says "a debate for the experts" but I'm gonna go ahead and jump even though I make no claims to being an expert.
    The fastest languages are C/C++ and other compiled languages (well, assembly and machine code, but.. I assume we mean high-level languages ;)).
    However, for not-so-large desktop apps dynamic languages such as python, ruby and php are great. I agree with the article in that Java is on the way out. I think we will see a lot of mixing together in the future. Using python with C++, for example. You have the readability and quick development of python and use C++ for the power. (Yes, this can be done.. I think :D)
    When I'm programming, I use Ruby. I say you pick your favourite language, although in the workplace this may not be possible.
    Languages like ruby and python are good in my opinion because they are designed to be read by humans. High level languages were invented to make it easier for programmers, otherwise we'd just program in binary for sheer power. So ruby and python fulfil the goal of high-level languages so to speak.

    Not sure that is Java was on the way out, it was never really "in" in terms of desktop development in any case, except on the MAC to a certain degree. And the fact that it has not made it on to the iPhone is not going to kill the language any time soon, this may yet turn out to be an error on Apples part. It is true that it's future most certainly lies mainly towards the Enterprise computing domain, competing with .NET

    Also modern VM based languages such as Java and C# programs are capable of running as fast as their C++ equivalents (there are a few exceptions of course, but this is due to issues with the way garbage collection, thread scheduling etc is performed by managed languages, not because of any advantage that C++ has by being compilled straight up).


  • Posts: 0 ✭✭✭ [Deleted User]


    Hmm, fair enough. Maybe I was a bit hasty.
    Don't get me wrong, I never mentioned C#. With the XNA games development kit from Microsoft C# is going into the 3d and games area, an area that Java was never quite suited to.
    I guess I'm a bit subjective. I love Ruby, and the interpreter implementation in the 1.9 release is on average 3x faster than it's 1.8.6 release!
    Ruby and other similiar languages are catching up in terms of pure power and are much easier to develop in, in my opinion.


  • Registered Users Posts: 1,922 ✭✭✭fergalr


    Also modern VM based languages such as Java and C# programs are capable of running as fast as their C++ equivalents

    I don't think this is true.
    I've seen the benchmarks that show Java running faster than C++, for some limited application domains. However, C++ is still faster in general, and will outperform the others in terms of execution speed. [By all means, if you've a good general source to the contrary, correct me]

    Anyway, as we all know, very few people care that much about speed any more. We care about features, and deadlines; super efficiency is rarely an issue. Computers are fast enough to run managed apps, and managed code is so much easier to work with, so we use it.

    Don't get me wrong, I never mentioned C#. With the XNA games development kit from Microsoft C# is going into the 3d and games area, an area that Java was never quite suited to.

    Game programmers do care about speed. C# and managed Dx has been around a while, more recently XNA, afaik everyone is still coding performance intensive games in C++. Do you know of one performance intensive game coded in C#?

    Anyway, this isn't really relevant to the discussion at large, except perhaps to speculate that whatever the next great language will be (and I agree it'll be managed) C++ and the other non managed languages (like C) will continue to hang around for a bit for high performance apps.


  • Registered Users Posts: 221 ✭✭Elfman


    Jez guy

    Thanks a mill for the responce just to note that since the original article
    was written Java is going to the iphone

    So from whats been said what can we say is a trend and what
    is still uncertain ?

    your comments ...


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    fergalr wrote: »
    I don't think this is true.
    I've seen the benchmarks that show Java running faster than C++, for some limited application domains. However, C++ is still faster in general, and will outperform the others in terms of execution speed. [By all means, if you've a good general source to the contrary, correct me]

    Your comments would of been true many years ago. Now that is not the case. JIT allows Java to perform as fast or faster then C++ (dependent on time running).

    Good article although many years old. Shows how long FUD lasts for.
    http://www.idiom.com/~zilla/Computer/javaCbenchmark.html

    This in theory should be the same for C#, although I don't use .NET. But not native is not fast is not true.
    Do you know of one performance intensive game coded in C#?

    Well a good example in Java is Jake2. Quake2 written in Java. Also here are some example Java games.

    http://www.puppygames.net/


  • Advertisement
  • Registered Users Posts: 1,922 ✭✭✭fergalr


    Your comments would of been true many years ago. Now that is not the case. JIT allows Java to perform as fast or faster then C++ (dependent on time running).

    Good article although many years old. Shows how long FUD lasts for.
    http://www.idiom.com/~zilla/Computer...benchmark.html

    Sure, I've seen that article, years ago... It's like the first thing that comes up when you google on the subject!


    I was referring to articles like that one in my original post when I said:
    I've seen the benchmarks that show Java running faster than C++, for some limited application domains.


    Looking at the faq from the 2004 article you quoted:
    [Some people say]Although Java does ok in a few low-level benchmarks, in large object-oriented programs C++ always wins. [But the author says...] There are no collections of benchmarks of "large object-oriented programs" available in both C++ and Java versions, and almost certainly there never will be, so this statement is speculation.

    And this is exactly my problem... this guy basically says that we can say Java is just as fast because there's no collections of large OO programs to use as benchmarks that prove it isn't just as fast...


    A lot of programmers continue to believe that the compiled language is faster in large OO systems (there's plenty of sound general arguments for this, although there's admittedly many advantages to JIT and managed memory to).

    As I said in my post, if you have some evidence to say that this belief is wrong, I would love to see it.

    In the mean time, most large performance intensive/critical apps continue to be written in C rather than Java; maybe this is because programmers are just been stubborn and in fact their common wisdom is wrong, but it'd be good to see have some evidence to show that.

    What I was trying to say in my first post is that, yes, Java and managed code in general is more than fast enough for the vast majority of what we want to do; and more importantly, is quicker to implement and less buggy. However, when performance is a critical or deciding factor, people often still choose C and C++ over Java in the real world; and I have seen no evidence to suggest that they are wrong.
    Well a good example in Java is Jake2. Quake2 written in Java. Also here are some example Java games.


    Jake2 isn't really interesting as I'm not saying Java is slow, or too slow, I'm saying it's slower than C/C++ for such apps.
    I mean, someone recently rewrote Quake 3 as a ray tracer!

    A good example would be if Carmack was writing Id Tech 5 in Java, (or even managed C++, for that matter). But of course he's not, because one of his key criterion is speed (and raw access to hardware etc, but again, that's for speed).


    The puppygames site might be good fun, but is hardly relevant, most of those games would run on a mobile phone, and can't really be used as examples of performance intensive games...


  • Moderators, Science, Health & Environment Moderators Posts: 10,079 Mod ✭✭✭✭marco_polo


    fergalr wrote: »
    I don't think this is true.
    I've seen the benchmarks that show Java running faster than C++, for some limited application domains. However, C++ is still faster in general, and will outperform the others in terms of execution speed. [By all means, if you've a good general source to the contrary, correct me]

    Anyway, as we all know, very few people care that much about speed any more. We care about features, and deadlines; super efficiency is rarely an issue. Computers are fast enough to run managed apps, and managed code is so much easier to work with, so we use it.




    Game programmers do care about speed. C# and managed Dx has been around a while, more recently XNA, afaik everyone is still coding performance intensive games in C++. Do you know of one performance intensive game coded in C#?

    Anyway, this isn't really relevant to the discussion at large, except perhaps to speculate that whatever the next great language will be (and I agree it'll be managed) C++ and the other non managed languages (like C) will continue to hang around for a bit for high performance apps.

    I am no expert on games programming but just from some reading I did a few months ago on the subject out of intrest.

    I was left with the impression that it was the last of control over threading and memory management in current managed languages that the majority games programmers dislike rather that the raw execution speed. I wasn't suggesting that Java or C# in their current form are nescesarly suitable for games programming but that in principle future versions of these or some other managed language could be viable prospects. Could be I read it all wrong of course :p.

    I think the biggest problem is that benchmarks that are fair to multiple languages are quite hard to find. In the case of managed languages the main problem is deciding where the VM ends and your actual Java / C# program begins. JIT proponents would argue that a VM needs time to warm up and optimize the code properly before a proper benchmarking can be made (which is certainly a fair point), whereas as the C/C++ guys would start the clock ticking while the VM is booting up :).

    Anyway I don't have to say on the language war, use whatever works to get the job done I say (once it's not VB).


  • Registered Users Posts: 1,922 ✭✭✭fergalr


    I was left with the impression that it was the last of control over threading and memory management in current managed languages that the majority games programmers dislike rather that the raw execution speed.

    Surely the reason they are using unmanaged languages, and working with the memory themselves, is for the speed..? That's sort of the point of what I was trying to say, anyway.


  • Registered Users Posts: 4,276 ✭✭✭damnyanks


    Maybe its easy to do paralell app's with C++.

    As far as the article goes - sounds like a typical MIS student as opposed to compsci (e.g I like programming... look at my cool web site).

    The guy doesnt have an understanding of anything beyond his limited scope. Wasnt eclipse or netbeans (Or both) written in Java? Lots of app's have been written in it. Lotus notes is one that I can think of.

    Why would someone use flash against something like windows presentation foundation for an actual desktop app.

    Python and Ruby are nice languages and let you do a lot but when it comes down to a serious app it just hasnt proven itself as cutting the mustard.


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    damnyanks wrote: »
    Lots of app's have been written in it. Lotus notes is one that I can think of.

    Well R8 standard is, although some of it makes JNI calls. The problem is the FUD to be honest. I have numerous apps running using Java and they work grand. But the second one of them has a performance issue (which is normally network) I get the usual "ooh its Java, thats why it is slow". From people who can't tell it's java or C++ because I use compiled batch file to launch the java. :)
    Jake2 isn't really interesting as I'm not saying Java is slow, or too slow, I'm saying it's slower than C/C++ for such apps.

    Jake2 is a good example pointing out that it isn't. As for the other site try the "Tribal Trouble" game.


  • Moderators, Science, Health & Environment Moderators Posts: 10,079 Mod ✭✭✭✭marco_polo


    fergalr wrote: »
    Surely the reason they are using unmanaged languages, and working with the memory themselves, is for the speed..? That's sort of the point of what I was trying to say, anyway.

    I was thinking more long the lines of controling when memory allocation and deallocation happens, you cannot control when the garbage collector runs thus potentially affecting performance levels at critical moments if it decides to run at the wrong time.

    But of course now you are absolutely right that manual allocation and deallocation memory management will always be faster as there are no algorithms needed to keep track of live and dead objects.


  • Registered Users Posts: 1,922 ✭✭✭fergalr


    It's a complicated area, discussing which is going to be faster, managed code or unmanaged. I'm not an expert on it by any means. I guess the answer is always going to be some form of 'it depends'. To some extent it mirrors the debate 10+ years ago about assembly versus C.

    Maybe its easy to do paralell app's with C++.

    I don't think this is why people are coding games in C++. C++ isn't the nicest language in the world for parallel coding. If this was the priority, they'd probably be using Erlang. That said, you make a good point in that parallel compute is getting real important in games, so maybe they'll be some sort of movement here in the future.
    One thing it's worth saying in response the OPs post (an actual on-topic point, wooo) is that if there's going to be another new language getting popular, as well as it being memory managed (which it would be), it'll almost certainly have to have good concurrency support, as that's something that's becoming a real priority at the moment.

    The problem is the FUD to be honest. I have numerous apps running using Java and they work grand. But the second one of them has a performance issue (which is normally network) I get the usual "ooh its Java, thats why it is slow". From people who can't tell it's java or C++ because I use compiled batch file to launch the java.

    Yeah, that's a problem. Java has a reputation for being slow in some quarters that is not deserved. There's still a bit of FUD floating around.

    However, I maintain that you can't get the same performance as from C++ for some applications... notably game programming.
    Jake2 isn't really interesting as I'm not saying Java is slow, or too slow, I'm saying it's slower than C/C++ for such apps.
    Jake2 is a good example pointing out that it isn't.

    On Jake2:
    First off, the fact that there's a Java quake2 implementation in itself doesn't tell us anything useful. A modern hardware setup could run Quake2 in excess of 1000fps. So there could be a 2 order of magnitude performance decrease in C++ to Java and it would still run smoothly.

    However, the benchmarks at: http://bytonic.de/html/benchmarks.html
    I did find surprising, and interesting.
    Notably, the top line of the table, where they very impressively show their java implementation is faster than the C one by a good 5%

    However... I'm not sure this is the proof we are looking for.
    I am concerned by several things, first off, the hardware they are running their tests on is vastly faster than the hardware the Quake 2 C version was targeted at, which I wonder about. (Q2 targeted at 133mhz pentium, Jake2 vs Q2 benchmarks done on athlon xp 2000). It's quite conceivable that as you ramp up the spec, the application fps becomes cpu unbound, and basically comes down to how fast you can submit frames to the gpu.
    The last note on the performance section of Jake2 would tend to support this, as moving to techniques such as vector arrays which serves to get down cpu->gpu communication time (basically optimising geometry submission) gave them big performance increases. Quake2 is unlikely to have been coded for the same priority set, given it's target hardware. (In other words, Q2 will have been optimised to balance the target cpu and gpu of the day, and the optimal balance will have changed over time).

    The other, more empirical reason to query their choice of a fast machine for benchmarking, is that if you look at their data when they used a slower machine (amd k6-2 350 - still a lot faster than Q2 target hardware), the Jake 2 performance vs native was only 55%; while the same version of Jake2 vs Quake2 on the faster machine was 86%. This would seem (ok, extrapolating from very few data points), that Jake2 did better against Quake2 as the machine speed got faster.

    For both these reasons, I would feel much more comfortable accepting their benchmarks if they were doing a direct comparison on Quake 2 target hardware.

    Anyone got a PC that old they want to run some benchmarks on?

    It's an impressive and interesting project though, and well worth thinking about...


    On the games on the puppygames site, eg, Tribal Trouble:
    I know that Java is fast, and capable of handling sophisticated apps, openGL apps etc. I'm just saying that for cutting edge games, unmanaged languages will continue to be the platform of choice for a while. Things like the games on the puppygames site aren't really interesting, I don't think, as they could probably be much much slower than their equivalent C++ implementations, and still run fine on modern hardware (same as Jake2; if the native implementation could get 1000fps, and the Java one 30fps, that doesn't mean Java is as fast as the native one, even if we only care about whether the app gets at least 30fps).

    It's more interesting that if you walk into a Game store, and look at all the big, flashy first person shooters and graphics intensive games, the large scale high budget commercial games sold as having the best graphics, they will all be written in unmanaged C++. Despite the fact languages such as managed C++, managed directx etc have been around a while.
    My argument is that that isn't because of FUD, it's for sound reasons. I also don't just think it's inertia in the technology choice (ie, game programmers know C++ so they write C++), but I could be wrong.
    I was thinking more long the lines of controling when memory allocation and deallocation happens, you cannot control when the garbage collector runs thus potentially affecting performance levels at critical moments if it decides to run at the wrong time.

    Yeah - this is certainly one of those problems that people cited a lot, as a reason to not have a garbage collection running - in that, while the typical case performance may be great, if the worst case spike while they GC runs is 10fps, it's useless. In fairness though, this isn't a major problem; the gc is very good these days, no longer brings the system to it's knees when it runs, and you can always run it preemptively (eg, run it regularly during any spare cycles you have at the end of a frame etc).
    But of course now you are absolutely right that manual allocation and deallocation memory management will always be faster as there are no algorithms needed to keep track of live and dead objects.
    Well... thats the argument - but it only holds in applications where programmers are concerned enough about performance, that they are spending time manually optimising their own allocation and deallocation. Unless they spend time on this optimisation, they probably aren't going to beat the automatic one for efficiency. My point is that games programmers, and others working in very high performance domains are probably willing to invest this time. And as others have pointed out, there's other advantages to using a (stack machine) jit compiled which compensate somewhat; the question is... how much?


  • Registered Users Posts: 1,922 ✭✭✭fergalr


    Why would someone use flash against something like windows presentation foundation for an actual desktop app.
    It's portable to osx, quicker to develop in, more familiar toolchain to artists.
    I dunno, I'd be a bit hesitant to bet against flash.

    First off, it's got 95%+ penetration worldwide... that's a scary figure. That means it's on a higher % of PCs than Windows, Internet explorer, firefox, pretty much most things.
    Next, AS3 is a hell of a lot better than AS2 to work with if you are a coder, and I think that is starting to get noticed.

    Next, it's not too scary of a technology if you are a big company like Apple or MS, compared to Java. MS maybe had a strategic interest in killing off Java on he desktop (and some would say took decisive action: http://www.news.com/2100-1001-855696.html) as the Java suite of technologies went all the way up into their enterprise market.
    Flash doesn't do this, it's just a presentation technology, so might be less threatening.

    Like the author says, adobe will probably play it's hand weirdly, and kill the whole thing off, but I don't think the article is without merit... Certainly if adobe were transfer control of flash to an open body, opensourced and gave away their flash editing tools and bought or built a decent IDE (eg ecpilse plugin) for strategic reasons, it could absolutely fly.


  • Closed Accounts Posts: 413 ✭✭sobriquet


    A great couple of posts, I'd agree regards C++ and Jake2, and that game devs are using C++ for more reasons than inertia. I've pointed out this POPL paper before: The Next Mainstream Programming Language by Tim Sweeney of Epic (Unreal, Gears of War). He covers the suckiness that using C/C++ results in, and what needs to be fixed. He doesn't rule out memory managed languages, saying the performance hit is worth it for the increased reliability. He'd like a functional style language that can handle lists easily but admits that it wouldn't likely take. Something like the D language solves a lot of those problems whilst retaining the power of C++. It might pick up in the next few years.
    fergalr wrote: »
    Certainly if adobe were transfer control of flash to an open body, opensourced and gave away their flash editing tools and bought or built a decent IDE (eg ecpilse plugin) for strategic reasons, it could absolutely fly.
    Agreed again. For large CRUD style intranet apps web programming isn't a good fit, but I think a lot of us doing that kind of work would like the ability to deploy that way to a heterogenous environment. The "Rich Internet Applications" thing might just fit - and there's competition there, with Flash 9/Flex, Silverlight and Adobe AIR too so hopefully it results in something useful.

    As to the OPs question about what should be used and when, well I think it's a kind of non-question. Languages and libraries native to a given environment will always have advantages, and straying outside that will always cause some pain. It's pithy, but it does come down to whether any pain caused by using or not using the native choices to the developers or users is worth it. Using C#/Windows Forms targetting the Windows desktop is grand, gives us a lot of benefits, but it still limits us substantially in other ways. So it goes really.


  • Closed Accounts Posts: 852 ✭✭✭blackgold>>


    Smalltalk > java:D


  • Advertisement
  • Registered Users Posts: 221 ✭✭Elfman


    Ok so before this thread is closed fro changing directions 2 many times one more approach :

    Language: <language name>
    Speed : (1-10)
    web apps : (1-10)
    Development Speed : (1-10)
    Interoperability : (1-10)
    Game Development : (1-10)
    Ide : (1-10)/IDE name
    Best used for : Project type
    Best Plugin : <name>

    Ok so sort of a rating system.

    p.s. this thread has been really interesting to me as a programmer starting out

    any chance of making this a sticky ?


Advertisement