• Java anyone ?
    56 replies, posted
[QUOTE=andersonmat;20485814]You just made your statement to start with Lua completely useless with the above statement. Learn Java / Visual Basic / PHP.[/QUOTE] I meant start learning Lua to get the hang of programming.
[QUOTE=turb_;20489567]An analogy is a way of explaining something by making references to something else in a similar scenario.[/QUOTE] Sorry, I replied the wrong post, I wanted to reply the analogy of the other guy !
[QUOTE=TechnoFou;20479004]But what about Delphi ?? Some of my friends programmed some really cool stuff with it ?[/QUOTE] It was pretty much the second language I got in touch with.. I still use it for some of my private projects. I've never seen any GUI design tool that gets even close to what Borland/CodeGear has done, the compilers are fast and generate fast code. Delphi/Pascal itself provides you with a lot of stuff, similar to C/C++. There are tons of beginner tutorials and code references/examples out there. Before anyone tries to tell me Delphi/Pascal isn't as powerful... It's pretty much the same as C/C++ and others, you only need to know the possibilities of the language/compilers a little better. You can even write X86 bootloaders/operating systems with it.. it's just some more work ^^ It also gets some goo active development from CodeGear.. latest version uses Unicode by default :P OT: I never felt like starting with Java until I had to learn it. Now I think it's a good start with programming. You get a lot of useful libraries. Really nice helpers to get multithreading done. Only downside you could see in it that it's somewhat bloated... For one thing you can find tons of ways on how to do it and each way has it's pro's and con's. Best choice would be to start with a language where you can easily get a good IDE and compiler and that someone you know knows, so he can tell you some basics and can help you with your first programs :)
[QUOTE=Borsty;20498753]Best choice would be to start with a language where you can easily get a good IDE and compiler and that someone you know knows, so he can tell you some basics and can help you with your first programs :)[/QUOTE] Which is ?? I think the good advantage with Java is the Head First book really seems to explain it well with pictures, comics etc... everything to make sure you understand it ! But what's your word on it ?
Instead of just arguing over languages, why not tell him the obvious? Just START, you're not going to learn anything by sitting there asking which language to start with. Seriously.
[QUOTE=TechnoFou;20503790]Which is ?? I think the good advantage with Java is the Head First book really seems to explain it well with pictures, comics etc... everything to make sure you understand it ! But what's your word on it ?[/QUOTE] Only book I ever used for programming is a C/C++ library reference book, everything else I learned from others or figured it out myself so I can't help you with what book to choose, sorry :/ [QUOTE=databee;20505074]Instead of just arguing over languages, why not tell him the obvious? Just START, you're not going to learn anything by sitting there asking which language to start with. Seriously.[/QUOTE] Agreed.
I'll be learning Java when I go into Computer Science
1. Do C# 2. Make iPhone applications 3. Sell them on the App Store 4. No question marks here 5. Freakin' profit. As long as you make something even half worth while that is. If you sell it for 59p people will buy it. Heck, people buy the iPod heating application and that's just a picture of a fire.
iPhone apps are written in Objective-C, not C#. Big difference.
Aren't ZuneHD apps written in C# and Android's in Java?
[QUOTE=The DooD;20513948]1. Do C# 2. Make iPhone applications 3. Sell them on the App Store 4. No question marks here 5. Freakin' profit. As long as you make something even half worth while that is. If you sell it for 59p people will buy it. Heck, people buy the iPod heating application and that's just a picture of a fire.[/QUOTE] not much profit after apple takes some
You can actually write iPhone apps in C#. [url]http://monotouch.net/[/url] Not free though.
[QUOTE=The DooD;20513948]1. Do C# 2. Make iPhone applications 3. Sell them on the App Store 4. No question marks here 5. Freakin' profit. As long as you make something even half worth while that is. If you sell it for 59p people will buy it. Heck, people buy the iPod heating application and that's just a picture of a fire.[/QUOTE] This is just so wrong, in every conceivable way. From my experience, objective-c is a horrible looking pig of a language, and the iPhone market is stuffed full of every conceivable form of app, with, I think, hundeds more released each day. To actually make big money with iPhone apps, I think you need to have a fairly special app. You can't just expect to breeze your way into easy monies.
What's "Objective-C" ?
A programming language.
[QUOTE=TheBoff;20530570]From my experience, objective-c is a horrible looking pig of a language[/QUOTE] From my experience, C++ is a horrible looking pig of a language Objective-C nicely squares away the OOP semantics. It's message passing that gets dispatched at runtime, never function calling or direct member access and there is simply no proper piece of syntax that already exists that is equivalent.
yeah, OK apple fanboy.
[QUOTE=efeX;20560703]yeah, OK apple fanboy.[/QUOTE] Considering the language wasn't made by Apple, I doubt he's praising its design because of that.
[QUOTE=Chad Mobile;20478764]Notes: As usual I'm using a sprite from something else until I get my own lol Background is all white lol I don't own the sprites. [IMG]http://i50.tinypic.com/3590ntk.jpg[/IMG][/QUOTE] Isn't that the XNA Platformer starter kit? [img]http://media.bestofmicro.com/xna-framework,O-B-217307-13.png[/img] At the very least, it has identical spacing between all the sprites.
Oh god we got a blynx # 2 in the works
[QUOTE=Shanethe13;20563137]Isn't that the XNA Platformer starter kit? [img]http://media.bestofmicro.com/xna-framework,O-B-217307-13.png[/img] At the very least, it has identical spacing between all the sprites.[/QUOTE] Whaddaya know, yet another one of Chad Mobile's amazing projects is based on a tutorial
[QUOTE=Shanethe13;20563137]Isn't that the XNA Platformer starter kit? [img]http://media.bestofmicro.com/xna-framework,O-B-217307-13.png[/img] At the very least, it has identical spacing between all the sprites.[/QUOTE] And you can see the scribbled out name of the project ends with something suspiciously like 'mer1'...
I'm learning the most basic stuff and I hate it, it's so tedious.
Didn't think that this question would be big enough for its' own thread, but in Java is it possible to insert code based on a condition? (i.e. using a "Settings" class and instead of checking a single variable hundreds of times in a loop, only checking it once and inserting a specific block of code (i.e. method)). I'm trying to make my fractal flame more efficient, and checking a static variable a million times is useless. I guess having a really long if/elseif or switch with the loop inside would work, but it's not "neat" and redundant. If not possible in Java, then is it possible to do this in C++? Thanks guys.
[QUOTE=Hak;20610939]Didn't think that this question would be big enough for its' own thread, but in Java is it possible to insert code based on a condition? (i.e. using a "Settings" class and instead of checking a single variable hundreds of times in a loop, only checking it once and inserting a specific block of code (i.e. method)).[/QUOTE] If I understand this correctly, you have a loop that's going to run many times, and you have a condition that'll either always be true or never be true, so rather than checking it each time through the loop, you want to check it once but still have it influence every iteration of the loop. You could do that by having two loops, one to run if the condition is true and one to run if it's false. I wouldn't recommend that if there's a lot of code in the loop, though; the code duplication would hurt maintainability. You could also define an interface and two classes that implement it: one that contains the code that should be run when the condition is true, and one for when it's false (possibly just an empty method). Check the condition once before the loop and set a variable to an instance of one of the two classes, then use that variable in the loop. I wouldn't recommend this if performance is important, because the indirect (aka "virtual") method call would likely be less efficient than just putting an "if" statement in the loop. Just checking a condition every time through the loop isn't really a big deal though. I'd check the "real" condition once and store the result in a local boolean variable in the method that contains the loop, so that if the compiler decides to unroll the loop it can be sure that the value can't change between iterations and can avoid inserting some unnecessary checks. But in the loop, checking the variable each time around with "if" should be OK; the processor's [url=http://en.wikipedia.org/wiki/Branch_predictor]branch prediction[/url] should defray most of the cost. [QUOTE=Hak;20610939]If not possible in Java, then is it possible to do this in C++?[/QUOTE] The two-loops approach and the interface approach are both possible in C++. (The "interface" would be a class with a pure virtual function, of course.)
[QUOTE=Wyzard;20611574]If I understand this correctly, you have a loop that's going to run many times, and you have a condition that'll either always be true or never be true, so rather than checking it each time through the loop, you want to check it once but still have it influence every iteration of the loop. You could do that by having two loops, one to run if the condition is true and one to run if it's false. I wouldn't recommend that if there's a lot of code in the loop, though; the code duplication would hurt maintainability. You could also define an interface and two classes that implement it: one that contains the code that should be run when the condition is true, and one for when it's false (possibly just an empty method). Check the condition once before the loop and set a variable to an instance of one of the two classes, then use that variable in the loop. I wouldn't recommend this if performance is important, because the indirect (aka "virtual") method call would likely be less efficient than just putting an "if" statement in the loop. Just checking a condition every time through the loop isn't really a big deal though. I'd check the "real" condition once and store the result in a local boolean variable in the method that contains the loop, so that if the compiler decides to unroll the loop it can be sure that the value can't change between iterations and can avoid inserting some unnecessary checks. But in the loop, checking the variable each time around with "if" should be OK; the processor's [url=http://en.wikipedia.org/wiki/Branch_predictor]branch prediction[/url] should defray most of the cost. The two-loops approach and the interface approach are both possible in C++. (The "interface" would be a class with a pure virtual function, of course.)[/QUOTE] Yeah, it's already a boolean var from the "Settings" class. However, remember that I'm doing millions of iterations of this loop, so I think it would have at least (some) bearing on performance. Especially since there's multiple vars that have influence over the contents of the loop. However, does that Branch predictor thing is good to know. It means that it probably has much less bearing on performance than I originally thought.
[QUOTE=Hak;20611771]Yeah, it's already a boolean var from the "Settings" class. However, remember that I'm doing millions of iterations of this loop, so I think it would have at least (some) bearing on performance. Especially since there's multiple vars that have influence over the contents of the loop.[/QUOTE] I'd recommend copying any relevant values into local boolean variables before the start of the loop. Method calls in the loop will need to be run every time, because the compiler has no way of knowing whether they'll return the same value every time. If [I]you[/I] know it'll always return the same value, then you can move the method call out of the loop. Branch prediction works at the level of CPU branch instructions; it doesn't know anything about objects or methods.
Sorry, you need to Log In to post a reply to this thread.