Related
I know Java fairly well and I would like to move onto mobile programming. I've read up on the aforementioned programming languages and my understanding is that C++ is hard and C#/VB are easier, but slower. The more I read the more I am confused however. In C++, I understand that there's Win32 programming, MFC, and ATL. In C#, there's .Net. Can someone please help me make sense of all of this?
i would suggest first go for C++
and then move further
Depends on what you are going to be developing.
C/C++ is better for performance critical applications with minimal GUI.
.NET + C#/VB is easier and safer at the cost of some overhead.
You'd want to learn all if you are serious about WM development.
The nearest language to Java is C#. The difference between VB and C# is more or less personal preference, as they both use the .NET framework. Most of your programming is creating the .NET objects, setting their properties, and calling their methods, to get them to do what you want. The language that this is done in, is more or less irrelevant.
Personally I would steer clear of C++ unless you are going down the Win32 route. Here your program has to respond to the WM_XXXX messages via the 'hdc' of the screen. (Hardware device context, you can't draw directly to it.) This method has a pretty steep learning curve. ATL and MFC are wrappers to make Win32 more object orientated, and supply more usable functions. .NET rendered ATL and MFC more or less obsolete, but they are still included for backward compatability, and are still prefered by some programmers.
The performance hit on a .NET program only occurs on its load, when the loader has to call the CLR JIT compiler to create the ARM native code. C++ Win32 will compile down to native ARM code from the start. If you do not have any ATL or MFC the compiled EXE can just be copied straight to the PPC and it will run without the need for any runtime libaries, dlls etc., as the core dlls are already part of the PPC operating system.
As mentioned above you may want to try both. The C# and C++ environments are completely different.
It all depends on what you want to do.
For more lowlevel and speed-dependant things, I'd say go the C++ route. Someone above here mentions that .Net is only slower at load time - this is most definitely not true. I have rewritten several apps that started out in .Net to native languages because they were too slow. The speed difference is fenominal - though less with .Net 3.5, but this is not available on all devices yet, especially not on stock ROMs.
C# is a lot easier than the overly complicated and cryptic C++, but again it has drawbacks. It is not as easy to do 'edgy' things in C# though often it is not impossible. C# is much easier than C++ for UI's as well, which can be a real PITA in C++. C# hides many of the more intricate lowlevels things for you and does these automatically. If needed, you can always create a C# user interface that calls C++ DLLs for the lowlevel stuff or whenever you need to.
As for VB, just don't go there.
I see you say you hail from Java. In that case, C# will not be very difficult for you. C# is generally taking the best of Java, C++, and Object (Delphi) Pascal, throws them together, mixes them up, and the result is pretty good.
Personally I am of the opinion that managed languages (C#, Java) do not a good programmer make, and you should know at least the basics of a native language (C, C++, Object Pascal, whatever), their quirks, and why these things are. This will teach you a lot about how things work on a lower level, and while you don't absolutely need to know these things they can still be very helpful when writing in a "higher" / managed language.
Then again, my personal preference for development is Object Pascal (FreePascal), which combines the power of native with the ease of RAD. I wouldn't advise anyone else to go there though, it's just what I grew up with (I have no issue with using C++/C#/whatever, they're just not what I prefer).
Chainfire said:
As for VB, just don't go there.
Click to expand...
Click to collapse
I don't understand why anyone would say this. In .NET, C# and VB have the same exact capabilities. They even use the same class libraries. Neither really has any advantages over the other.
@OP: I've done work in C# and VB.NET, and I can tell you that it's quite simplified and a fantastic OOP solution to mobile programming. The only drawback is that the loading time for a .NET application is a LOT slower than a C++ mobile app. A C#/VB.NET mobile app with one Form with nothing else takes a couple seconds to load, whereas a C++ mobile app will launch instantly. So, it's up to you. Do you want it to be simple, sacrificing a couple seconds at load time, or do you want to get down to the nitty gritty and work with C++ to save those couple seconds?
vb in general have a poor syntax which most programmers
stay clear off and vb have a long history of poorly designed and programmed
programs don by ½ armature's
and earlier vb's have had serious issues as not being real exe's requiring special
runtime dll's not being thread-safe and the likes
just too much ugliness and bad history in vb
for anybody to recommend it to anybody
Yeah, but that was then, and this is now. VB.NET is only slightly more wordy than C# .NET, and they both have the same capabilities and same speed. If the choice was between .NET and C++, I'd say go C++ though.
Cicatrize said:
Yeah, but that was then, and this is now. VB.NET is only slightly more wordy than C# .NET, and they both have the same capabilities and same speed. If the choice was between .NET and C++, I'd say go C++ though.
Click to expand...
Click to collapse
As Rudagar said, there's a lot of bad history. What remains in VB.Net is the syntax. IMHO it encourages sloppy coding and it's frankly plain silly. If you feel differently, that's fine by me. Either way, if you're going for .Net, why would you use anything else than a language specifically designed from the ground up for the framework: C# ? To boot, C# is an awesome language as well. I don't see any reason at all why you would use VB instead. Again, that's personal opinion.
Hi, I am very interested in learning C++ or VB. I had a VB class in high school, but I forgot it all...
I've got my feet dipped in water with Java, and I want to learn to make applications for my phone. I have no idea where to start. I was thinking of starting with a simple application like maybe a today plugin that will update my FB status.
Digging a little into it, it seems that's not as simple as I figured.
I really don't know where to start. Could someone point me in the right direction?
im looking to start developing android apps. should i start goggling how to develop android apps, or should i learn c++ first?
i have a 500 page PDF on c++ ( from the university that my brother goes to). the pdf is for beginner's learning to c++ it starts of with the common hello world code and advances.is this a good start?
ps: i hope this is the right section.
Damn! 500+ Pages and for Beginners. I couldn't write that much if I had a whole life time to do it. And maybe Android Q&A.
And yeah dude Google then Learn. Or maybe, Google and Learn. OR! Google what you should do first. SMART!
I would suggest you take a course on it then do some real world placement with seasoned programmers, you wont really develop all of the required skills using a beginners guide to programming.
Android is Java not C++.
I heard that a good Java introductory book is Head First Java. If you have some programming experience I would recommend Thinking in Java.
After you are confortable with Java, you could move to Android specific things. Good luck!
thanks for the replies. the 500 pages of C++ are pdf, and the font is kind of big. im ganna keep learning from that for a couple of weeks to get the very basics. then ill move on to java.
PS: another nub question, what dose Linux have to do with android? is it better to develop on Linux or windows 7?
Android is based on Linux. But you can develop in any platform you want. It is the same Linux, windows or OSX, whatever you have would work.
janfsd said:
Android is based on Linux. But you can develop in any platform you want. It is the same Linux, windows or OSX, whatever you have would work.
Click to expand...
Click to collapse
im a little confused .
andriod uses the syntax java,while andriod is based off linux which uses syntax c, c++, java and fortan. so dose andriod use the java part of linux only or what?
To be more specific, it is based on the Linux Kernel, which is written in C. All the apps are already Android specific, so written in Java. Google developed their own virtual machine (Dalvik) so the developers can use it. It is Java based (on the 1.5 version), but it doesn't support all Java classes. It is still possible to write in c++ with the NDK, but only if you need the extra performance or maybe write a game in OpenGL. So you would stick to Java.
If you need to communicate with kernel, or your application has to do something with great calculation (Such as encoding or decoding), you may need to through Java layer and native layer by JNI, than you need C/C++. Else you just need to write your application by Java.
okay that clears it up, thanks guys. now i just gotta give it time and dedication.
Hey everybody
I've been thinking about taking a computer programming class this semester to help start my knowledge in developing apps for android. My question, is which language tool would be the most helpful and why? Java, or C++? Right now, the college I am thinking about taking it through only has Java as an option (I want to take it online). I'm at the point in my college career where I need to decide a major because I have all of my general ed's out of the way, and I think taking a cheap class that might benefit me in multiple ways might be a good thing to do. Thanks in advance!
I'm new to programming but I do know a little bit I guess...someone may have a better answer. As I understand it, Java is based off C++ and based off of C. So there won't be much of a difference between the two, but either you will need to know some amount of C/C++ for the Java course, or they will teach you enough C/C++ for you to understand Java. I don't know how important it is to know all of the basics though, since the common languages today have much easier ways of coding basic things.
If it were my choice, I would have to decide if I wanted to learn the basics of coding, and then learn all the shortcuts that today's SDK's provide, or just learn everything current, and have a harder time understand how some things work.
Ironically, I've been learning Objective-C, despite owning only Android since the G1 first came out. It's my first programming language ever (although I do have background in HTML/CSS and what not, but that doesn't really count). I've got a good grasp on how everything works, but I never had quite the understanding of how everything worked until I started learning more about basic C. It may be the same for Java, in fact I imagine it is to some degree.
My opinion, take C/C++, and just learn a new syntax later.
Thanks for the reply! I will plan on taking C/C++, but that brings my to my next question: C or C++? I'm assuming C++ is just advanced C, so it would make sense to take C first, correct? Or am I missing something?
I guess you kind of answered my question in your post already . Looks like basic C should be the way to go for starters!
If your ultimate goal is to use C++ and/or Java, I wouldn't recommend learning C first. Java and C++ are object oriented languages, and C is not. If the first language you learn is C then it will simply teach you an approach that you'll have to 'unlearn' when you start on one of the other languages. A long time ago, C was often taught as a stepping stone to C++, but these days it is regarded as a bad idea that makes it harder to learn an OO language later.
I also don't see any benefit in learning C++ before Java, unless you really want to learn C++ for its own sake. Java is probably easier to learn than C++ so, if your real goal is to be a Java programmer, I'd start with Java.
Please don't get the impression that I've got anything against C or C++ by the way. I've used all the languages mentioned (as well as C#) and, if anything, prefer to use C++.
so whats the advantage of becoming C++ programmer over Java Programmer and vise versa ?
how about Visual basic?
arvinghost said:
so whats the advantage of becoming C++ programmer over Java Programmer and vise versa ?
how about Visual basic?
Click to expand...
Click to collapse
The platforms that are used by each. Java is a very versatile language, and is used in almost all mobile platforms. C++ is mainly used for desktop and stand-alone applications.
Truthfully, it doesn't matter which you learn first. The concepts and theories are the same in both, the only thing you have to re-learn is the syntax and specifics.
That being said, don't learn visual basic first, it is vastly different from the other two.
arvinghost said:
so whats the advantage of becoming C++ programmer over Java Programmer and vise versa ?
how about Visual basic?
Click to expand...
Click to collapse
I'm sure that Google will provide lots of info on Java vs C++ comparisons, so I'll only mention a couple of things! C++ can be more powerful and versatile, but is easier to screw up. It also provides better performance (since it is a compiled language) but, these days, the speed of the code is often less important than the speed of data access or comms. Both languages are theoretically cross platform, but in practice Java achieves that better than C++ (usually). Java has a better set of standard libraries - in C++ the libraries for things like user interfaces are usually platform-specific. On the other hand, C++ (and C#) gives you access to Microsoft's Visual Studio IDE and the .NET libraries, which are still by far the best IMHO although, clearly, are pretty much restricted to Windows development.
In more pragmatic terms, I've found both languages to be in more or less the same demand by employers. There's a lot of old legacy C++ code out there, however, so I'd say that, as a Java programmer, you've a better chance of working on nice new projects rather than maintaining ancient software! To be honest, I don't know which way I'd go if I was starting out now - sorry
Oh, and I can't think of a single reason to learn Visual Basic - it's totally different to everything else, not as powerful, and not much easier to learn than the vastly superior C# or Java.
Yea, gcogger has better answers than I do Hope I helped at all. Thanks gcogger
Honestly I prefer straight C for a lot of things because it has the most strict code. It is so strict that code in and of itself is easier to follow. C++ being a superset of C is nice, and of course it adds OOP functionality. I just think C++ can get a bit too confusing sometimes, and I am always learning about new ways to do things that I never knew before.
Java is quite the opposite with syntax and garbage collection (which I am generally not a fan of outside of scripting languages). It is easier to use OOP in Java than C++ sometimes you forget about performance that way. You start initialising objects left and right, forgetting about their overhead and faster, more creative ways to do things.
Alright before you all have a go on him, I know this isn't the right place to post neither this website but I am active in this site so don't want to create account on another site just to ask this question. I am student and n00b in terms of Programming. I am thinking of joining extra classes in summer vacation. Of course I want to become software engineer. I want to know which will be best language for me to start. C, C++ or dot net? Visual basic looks easy to use but not sure if it has much value in future. I am confused so thought I may get help from these experienced developers. I am in the last year of High School btw.
I am n00b so don't go hard on me If I said anything stupid
friend863 said:
Alright before you all have a go on him, I know this isn't the right place to post neither this website but I am active in this site so don't want to create account on another site just to ask this question. I am student and n00b in terms of Programming. I am thinking of joining extra classes in summer vacation. Of course I want to become software engineer. I want to know which will be best language for me to start. C, C++ or dot net? Visual basic looks easy to use but not sure if it has much value in future. I am confused so thought I may get help from these experienced developers. I am in the last year of High School btw.
I am n00b so don't go hard on me If I said anything stupid
Click to expand...
Click to collapse
Studying C/C++ will be kick start in programming. For future scope, studying Java is good, because Java has its own different fields like Standalone application, web application, and Android of course.
If you're opting for .NET, be sure you're learning the latest version, as .NET versions change from time to time.
And also there are several modern languages like Python, Ruby, Perl etc. Don't know much about its scope.
But everything just emerged from C or Java. So first making a base is what it matters.
EDIT: Don't study Visual Basic as a separate Course, if its included in .NET then its fine. As VB is somewhat a dead technology, most companies are not using it. Studying Silverlight with .NET would be a good choice though.
The best language for me and easy to learn is python programming even noob can create thier own project or apps. bcoz it is embedable in all apps u can understand even if u r n0t a programmer..
Actually any programming language is good to get to know programming in general and to exercise your brain to think/work this way.. oncve you advance a little bit, you will also have the knowledge to know which language to go specific on..
because of my studies, I started with assembler and C, C++, Java, C#.
it depends on what you want to do.
you want to program Android application, use Java, Windows Phone use C#...
i neglected programming on my studies.. i was too lazy. but now i want to be a developer somehow..
so Java for Android applications?
so how about Developing a Rom/Kernel?
Python will be easiest and once you know how to program in one language all others will be much easier to learn.
Sent from my HTC Vision using XDA
Thanks guys, looking forward to it.
The first programing language I used was C.
I've started with C++. But You should try .NET at the beggining. It's so simple. Almost drag&drop method. I used it to create a lot of code generators for my game and other projects.
You should also try AutoIt. Maybe quite harder, but still useable.
I would say, start either with Java or Python.
Why? No specific reason, but they are easy to learn and have a wide area where they can be used later.
I would start with ActionScript 3.0 and/or Java. The first one is the easiest and most fun to program in
If anyone is interested in applications for Android, you should try App Inventor.
http://www.appinventor.mit.edu/
You should try python, becase as others say, it's pretty easy, and if you want to be more motivated, try udacity.com. This is university that operate entirely online. You can view lectures, do quizes, there are also final exams. They start 101 Computer Science (where you learn basics) at 16 april. And guess what, they use python! Even on harder classes.
I wouldn't encourage starting with C or C++. Java and C# are a bit higher level languages and thererfore help you get started faster and let you consentrate on the things that matter most. I would prefer C# over Java as Java has gotten a bit messy in some places, has some gaps in it's standard library, and lacks in standard user interface tools.
Another option to C# would be JavaScript, CSS, and HTML, but the compiler in C# can help you by pointing out mistakes that JavaScript tools can not. Also, if you go this route, don't try to make your code run well on many browsers as that will only cause extra headiche while you are trying to learn the basics. Actually, if you want to use JavaScript over C#, Windows 8 WinRT programming could be a good place to look at. However, it's still in development and lacks in documentation and learning materials when compared to more mature technologies.
If u want work in buisness then go Java. But its very expensive to use because it needs large resources. If u want go for new language try Scala.
JAVA and C++ are the most widely used languages in the world of work today.
But if you want to do web, starts with PHP. It's fairly simple to understand and you can quickly get to Object Oriented concepts, and use simple Design Patterns.
Because, i'm reday for Korea olympiad, learning about C language...
And, i'm learning about JAVA for Android Application studying...
It's very hard for me...
The back is so hard to come around so difficult, right?
Don't give up
me too, want to discovery but i'm stupid
I mastered Java and C by training the concepts of programming in languages like Python.
After that, I was much more skilled.
What exactly don't you understand? Did you red a book about it?
Trying to learn 2 languages at the same time is very difficult especially for some one who has not coded before. I would start with one language first. Python is the first programming language they teach at my local university followed by Java. If you want to start with either C or Java, I would recommend Java. Once you are comfortable in Java then learning C would be much easier.