Coding languages - Other Operating Systems and Languages

Hi guys, can anyone explain to me why you can have different coding languages? I am going to try and explain it the best way possible. Pretty much I want to know why some people use other coding languages instead of others? Are some better for particular activities? Like I know cross compatibility like you can't use html to code a game online you need to use Flash or Javascript etc.
tl;d why use one language over another?

Every programming language has advantages and disadvantages. For example Java is portable but slower then, let's say, C++. C++ is less portable and needs to be compiled seperately for every OS but it's faster. Python is very easy and very portable but it's slower then Java. Html, Javascript and Go are for websites. PHP is designed for the use with databases. Prolog uses a completely different approach and is good for logical stuff.
You see, (almost) every language has its own field of application. Additionally, everyone has a favorite language for whatever reasons (e.g. because he thinks the code is pretty). So it's a matter of taste as well.

nikwen said:
Every programming language has advantages and disadvantages. For example Java is portable but slower then, let's say, C++. C++ is less portable and needs to be compiled seperately for every OS but it's faster. Python is very easy and very portable but it's slower then Java. Html, Javascript and Go are for websites. PHP is designed for the use with databases. Prolog uses a completely different approach and is good for logical stuff.
You see, (almost) every language has its own field of application. Additionally, everyone has a favorite language for whatever reasons (e.g. because he thinks the code is pretty). So it's a matter of taste as well.
Click to expand...
Click to collapse
Thanks for the high quality response.
As a beginner, someone who wants to start developing android applications..What coding language do you think I should start with? I understand android is basically Java?

Blakebn2012 said:
Thanks for the high quality response.
As a beginner, someone who wants to start developing android applications..What coding language do you think I should start with? I understand android is basically Java?
Click to expand...
Click to collapse
Well, it's Java with some extra stuff. That's why I would recommend starting with Java. It's portable, object oriented and you'll need it for Android later anyway.
When I learned Java, I used the Head First Java book which I can highly recommend.

Ok thank you very much you have been a great help.

Blakebn2012 said:
Ok thank you very much you have been a great help.
Click to expand...
Click to collapse
You're welcome.

There's different languages for different things, like Java vs. C++ (Java is portable/cross-platform, pure object-oriented, has automatic garbage collection, etc; C++ is platform dependent and needs to be compiled on each environment, wasn't built from the ground up as OO, you need to allocate and manage memory yourself, etc. Java isn't quite as fast/efficient as C++ but it's come a long way from it's beginnings and is pretty close now, for desktop apps IMO anyway.
Then, for web development, there's Python and PHP. Both accomplish the same thing (doing back-end logic for websites, like querying databases so the data can be displayed on the page) but have different syntax. People like either one for different reasons and it's mainly just personal preference when it comes down to those.
So to answer your question, the difference between some languages is pretty great (like assembly and C#) and they're used for different purposes. And the difference between others, like PHP and Python, is for the most part superficial and it's just personal preference between the two.

The main reason we do have programming languages is that working directly on the bare hardware is pretty difficult. Working directly with machine code is difficult in many ways: it is hard to be kept bugfree, even harder to be read and understood, and there is also the problem that it's only working on a specific machine. Programming languages cope with those problems by introducing programming paradigms, which make several things easier, but it turned out that there is no paradigm which covers all needs. C/C++ for instance makes it possible to work pretty close to the machine while producing quite readable code, which can be ported easily from one plattform to another (compared to using assembly language). In contrast Java introduces a Virtual Machine on top of the actual system such that it's even a lot easier run code across several systems (compile it on one machine, run it everywhere ... as long as a JVM is available), and it brings the object oriented paradigm with it. Furthermore there are declarative languages for database programming, functional programming languages or logical programming languages for mathematical problems around, and so on ... . Sometimes you might not be interested in writing understandable portable code, such that assembly language is your best pet, but that's most probably not true in most situations.

123123132

Really good compact responses. I also want to recommend learning some shell programming, i.e. linux terminal programming for file/process management and low-level hardware manipulation in the kernel. Shells are usually mksh, zsh, bash, busybox ash, or symbolically linked to sh. This is known as a scripting language because you can run your programs/scripts on-the-fly without any compiling. Adding some shell scripts to your java app can make it very powerful such as with apps like trickster, synapse, performance control, etc., .. basically any kernel/hardware control apps.

Also you can try Ruby language. Its great for some everyday tasks, very simple and powerful(especially string processing). Also Ruby On Rails is very simple framework for web-developing. A week and you can try to code your own github. And the IRB console is good enough. But i duuno, is there any mobile-app-dev modifications of Ruby. Anyway, its still great enough.

Blakebn2012 said:
Hi guys, can anyone explain to me why you can have different coding languages? I am going to try and explain it the best way possible. Pretty much I want to know why some people use other coding languages instead of others? Are some better for particular activities? Like I know cross compatibility like you can't use html to code a game online you need to use Flash or Javascript etc.
tl;d why use one language over another?
Click to expand...
Click to collapse
That would be perfect, if we lived in a place where only one language is enough for all works XD
However, the really life isn't perfect.
Some works need complicated language to achieve and some don't.

Related

Native C# Android?

Has anyone seen this?
http://blog.xamarin.com/2012/05/01/android-in-c-sharp/
This could be the bomb... coding in C# for Android natively!! Even maybe some of the good developers here at XDA could make a C# native Android ROM with a Dalvik machine for compatibility with non-C# market apps??
They have made tests and it seems that C# ROMs run like 5-8 times faster and leech much less power ...
Cheers!!!
Java and C# is brother actually. Both have virtual machines, both came from C++. But creating a new variation of one of these is so unreliable. Dalvik is Basically Java's clone but not very succesful clone. Mono is C#'s VM's clone and very reliable. Linux, Mac and Windows has Mono Ports (actually windows has .net framework) Mono is great but you know microsoft doesn't like UNIX like systems especially linux based ones. Thus C# programming could be harder for people. Also C# for phones could be awesome. Since 2000's We already have javaVMs on phones. Why Not C#. (python is good too but google wants a new language called GO)
Repeal said:
...Mono is great but you know microsoft doesn't like UNIX like systems especially linux based ones...
Click to expand...
Click to collapse
I think the problem is much greater with Google since they won't want a M$ programming language in their OS ... and that's a reason for which I'm sure they won't never support C# Android, but another thing are community ROMs.
Let time judge it.. but I think its good stuff...
Not only they do not 'want', they probably are not allowed as c# has patents. Look what is happening to google with java now owned by oracle..

[Q] As a complete noob to coding and Android development (could use some advice)

Hey folks!
Yes, this is my first post, and yes, it may be in the wrong section. If so, I would kindly ask some moderator to move it to the correct section.
Anyway, let me just get right to it:
I have NO coding experience whatsoever! I have never coded anything but a bit in html when I was 16 or something. I have a good understanding
of Android from a user-end perspective, and same goes for computers and website management - I've just never coded anything.
Now, I would really love to learn how to code applications for Android, as I feel like it would be a great challenge to take upon myself + I have a lot of ideas for apps, which I believe will be fun.
Now, I know that Android runs on Java, so I suppose I should start learning the basics of Java before moving into learning Android development, right?
In my search for great free / somewhat cheap online resources, I've found that "thenewboston .org" has a Java and an Android development section with video guides. I believe I should start with the Java section and then move on to the Android one.
Would you recommend using that site, or should I start somewhere else?
And also, is it correct for me to start diving straight into Java, or is there something I should know beforehand?
Or should I learn any other coding languages?
Please take into consideration that I know no coding language as of right now.
All help is very much appreciated! :fingers-crossed:
Java is the best option to start with!
All native applications of the android OS are written mainly in Java, which makes it a good option to start with. Also, as you already know some HTML Coding, you might not find it problematic using "XML".
Head over to this link: http://forum.xda-developers.com/forumdisplay.php?f=2195
You might find it useful to begin with.
vineethraj49 said:
All native applications of the android OS are written mainly in Java, which makes it a good option to start with. Also, as you already know some HTML Coding, you might not find it problematic using "XML".
Head over to this link: http://forum.xda-developers.com/forumdisplay.php?f=2195
You might find it useful to begin with.
Click to expand...
Click to collapse
First of all, thanks a lot for your reply.
What I take from your answer is, that it would be just fine to start diving right into Java, and also take a look at XML whenever I have extra spare time. Is that correct?
And also, what part of an application is built on/in XML?
The layout mainly comprises of xml
ltsune said:
First of all, thanks a lot for your reply.
What I take from your answer is, that it would be just fine to start diving right into Java, and also take a look at XML whenever I have extra spare time. Is that correct?
And also, what part of an application is built on/in XML?
Click to expand...
Click to collapse
Check any android app's source code. The application's interface mainly is made using xml's.
Welcome to this world, you'll have fun here for sure
Anyway, to your questions:
Yep, you need basic Java knowledge. Any website will be great to get started (actually, if you have a doubt and can't find the solution there, simply use Google. There are so much developers out there, is difficult to find an unanswered doubt).
You can get started with Java directly, you don't need to learn any other programming language. Take in mind that only the syntax changes between languages, the logic behind the programs is identical.
Android apps use Java for its core, and XML for its GUI. Don't worry, Eclipse (and after, Android Studio as well) offers a visual environment to build your GUI, without touch XML directly (of course, you can edit the XML code if you wish, for example, to make a quick change).
Good luck, dude :highfive:
RoberGalarga said:
Welcome to this world, you'll have fun here for sure
Anyway, to your questions:
Yep, you need basic Java knowledge. Any website will be great to get started (actually, if you have a doubt and can't find the solution there, simply use Google. There are so much developers out there, is difficult to find an unanswered doubt).
You can get started with Java directly, you don't need to learn any other programming language. Take in mind that only the syntax changes between languages, the logic behind the programs is identical.
Android apps use Java for its core, and XML for its GUI. Don't worry, Eclipse (and after, Android Studio as well) offers a visual environment to build your GUI, without touch XML directly (of course, you can edit the XML code if you wish, for example, to make a quick change).
Good luck, dude :highfive:
Click to expand...
Click to collapse
This was a very helpful answer!
You basically answered all my questions, and a few more than I hadn't even written yet.
Thanks for letting me know about the option to edit the GUI directly from Eclipse, which is currently what I use to learn Java.
I've found a lot of great resources here at xda-developers as well, so I'm really looking forward to dive into this now!
Already learned the very basics of creating user inputs etc. (yes, that is a noob talking - I know), and I am thrilled to learn even more

[Q] How to start coding

Hello, everyone. Can someone please direct me, an absolute beginner with no experience in programming at all, where to begin learning. I would like to ultimately develop for Android.
I'm running Ubuntu 13.04; how can I set up an environment to learn programming, and what are some resources that I can use?
Install jdk on the comp then on your phone download the app learn java in 24 hours it walks you thru making your first program so you get the basics
Hello, I'm pretty much in the same boot as the OP.
I'm working in the medical field and get bored of not having the app I need to ease up paperwork, so I decided to make them myself.
However, exept a hangman game in high school I never coded. So yesterday i took my old laptop, put some Ubuntu on it, the sdk and created the famous "hello word" app.
The problem is, even in the tutorials, some thing were to complicated, so I called upon my cousin (a german develloper) and he gave me some advices.
Especially, he told me that java was maybe not the easiest way to learn to code with 0 background and suggest me to try python and other things.
Do you have advices for me, since I want to build simple app (somes textfields, somes checkboxes to get scores and the ability to export a result sheet in pdf) at first, but i do not want to use app inventor or similar tools since I ultimately want to fiddle with the AOSP agenda (get the contact list to pop up like the invite list when i click "description field" , change default duration of appointements etc...).
Any ideas, suggestions, or tutorial are welcome, just keep in mind that I know nothing (Jon Snow like).
http://forum.xda-developers.com/showthread.php?t=2388486
Jus go here
.........................................
visit www.fb.com/softcrush
If you want to become a professional android developer then it is advisable to learn Java and XML a bit better,,and there are bunch of resources available on How to build android apps !
If you really want to become a Programmer then it is advisable to start from the beginning i.e C and then Java
Thats how everybody starts learning coding !
Go through video tutorials for understanding how the coding works !
Happy to help !
Sanjay said:
http://forum.xda-developers.com/showthread.php?t=2388486
Jus go here
.........................................
visit www.fb.com/softcrush
Click to expand...
Click to collapse
This is a great list. I love to see my boy Derek Banas on there
alfredmuffin said:
Hello, everyone. Can someone please direct me, an absolute beginner with no experience in programming at all, where to begin learning. I would like to ultimately develop for Android.
I'm running Ubuntu 13.04; how can I set up an environment to learn programming, and what are some resources that I can use?
Click to expand...
Click to collapse
google it man you will thousands of website which will teach u programming for free. I would have put the links but dont wanna be treated as spammer
For now don't worry about making an app with the Android SDK or anything big like that. Just start simple with some little programs that print stuff into the terminal. It's a good thing that you have Ubuntu because Linux OS's are always great to learn programming on!
I'm also a noon and I found it easy to start with Batch on Windows and I have just been getting better and better!
Well I understand it's not easy to get started. One thing you will have to recognize that there's a lot of things involved getting prepared for Android programming. For example, while developing for Android you will need to be able to write a bit of XML as well, you will need to set up your IDE, get the necessary Java dependencies, get a little bit familiar with Maven to be able to use 3rd party libraries and so on. It's most definitely intimidating. So what I would recommend is to...
- Try to allocate time every day for learning this, even if it just means half an hour or less a day.
- Always take notes and don't be afraid to ask; nobody should assume you know the answer.
- Once you've learned something, help others to get ahead - seniors will probably recognize your efforts so you will be able to get help more easily.
- Try to talk about programming in person with people who are more proficient in it. Nothing helps as much as having a pro sitting in the same room, ready to help you.
- Try to join related communities as well, it can really speed things up.
- Baby steps. Many people get started in programming with having crazy big ideas only to meet failure later. It's not a good thing to frustrate yourself, so choose small goals first.
I can't emphasize the last point enough. Whenever you start learning new stuff - no matter whether you're a novice or an expert - you will need to focus on this, because the initial steps are always problematic. For example, when you start learning a new programming language: the syntax is new, the way for getting the app run is new, the IDE might be new, if the tool is web related then probably it uses a different kind of server than the one you're used to etc. etc. etc. so barriers all around. You must get comfortable with this first, then you will be able to speed things up.
How to start coding
How I started:
Basic Stuff:
1. Java, I used Java Complete Reference
2. Data Structures (most commonly used- Stacks, Queues, Linked list, HashMap, List) [Basic Understanding]
3. Algorithms (will help you to write efficient code) [Basic Understanding]
4. XML, just basic understanding is required, use internet to learn
Android Specific Resources:
1. The Busy Coder's Guide to Android Development [Very useful]
2. New Boston Videos
3. Android Cookbook, if you want a solution to a particular problem
Spend more time learning Java and other basic stuff, once your basics are clear, then you can easily adjust yourself on any platform.
Recommendations for Aspiring App Developers
Hi,
I was in your same shoes about 3 years ago so I can tell you what steps I took to start coding. I took the longer route but it was the correct route. Key suggestion is to learn the lower levels of coding first. (lower levels meaning base languages, binary being the lowest). Start with the C language as this is the core programming language which most other higher levels are based on. If you have the money take a structured online course on Udemy or CodeAcademy. If you're short on money and need to learn on your own don't worry there's plenty of resources out there to learn. That's how I did it. Start out with videos on youtube, try to find a complete structured course here's one with over 130 videos. Sorry, can't post links cause I'm new but just go to Youtube and type in "C Programming Complete Tutorial" to get the course with the structured 130+ videos.
The best way to learn any programming language is to find some free source codes in the designated languages and start tinkering, breaking and fixing the code. Once you learn this core language you will be able to programm\ desktop apps, simple software and mobile apps in other higher level programming languages.
Hope this helps.
-Jeff
alfredmuffin said:
Hello, everyone. Can someone please direct me, an absolute beginner with no experience in programming at all, where to begin learning. I would like to ultimately develop for Android.
I'm running Ubuntu 13.04; how can I set up an environment to learn programming, and what are some resources that I can use?
Click to expand...
Click to collapse
Hey Guys,
I love thenewboston website that you've pointed us to. But as a first step, should I learn some C or Java before progressing on to thenewboston Android tutorials?
I have no programming experience, but lots of motivation.
Thanks,
Donald,
New Zealand
Sanjay said:
http://forum.xda-developers.com/showthread.php?t=2388486
Jus go here
.........................................
visit www.fb.com/softcrush
Click to expand...
Click to collapse
recommend "head first java"

Writing in C++ for Android

Hello,
I'm looking for an easy way to write android apps in C++. I'm a begineer and I would apriciate a simple, easy to use metod. How can I do it? (Note: I don't know Java).
Regards,
Igor
Anybody?
You should start doing tutorials first if you have no programming experience. There are a lot of good resources available on YouTube. Search for Bucky and C++. Once you get the hang of it, you can try making some simple stuff.
Put coding programs for android to the side for a bit. Just try to master the language of c++. And then figure out how to code the grograms
Maybe you can start by developing with Qt on pc and then progressively switch to their Android framework .
Phurkus said:
Put coding programs for android to the side for a bit. Just try to master the language of c++. And then figure out how to code the grograms
Click to expand...
Click to collapse
Like this person said OP. Just master it first
In addition of what had been say and which is true, if you're targeting Android specifically, you should learn Java.
If you're going to dev, the language is not really important, when you master three language or more, you should be able to quickly master other needed languages. You should also read a bit about Algorithmic and Objects.
hi
First you need to know JNI,How to call function from c on java and opposite and Java is require !!!
go here : qt.io
windows , android , ios , osx , Linux and more
Definitely take a look at JNI. And this https://developer.android.com/tools/sdk/ndk/index.html
Sent from my XT1254
Is there some kinda ebook for it? ?
Dhruvam said:
Is there some kinda ebook for it? ?
Click to expand...
Click to collapse
Probably, there are ebooks for all sorts of things. Just be sure to understand you won't be able to write Android application in C++ (ok, you will be, but the struggle to call JNI won't be worth the effort). So do you want to learn C++ or to write an Android app?

Need help with decision on Cross-platform development

I'm developing an app for iOS and android that identifies songs. We have a matching engine in c++ that works well, but my question is about the rest of the app. We have a user interface design that allows the user to record, match and save, as well as share, edit, and see their recordings.
I'm not a coder - just a designer- and I'm getting conflicting advice about how to implement. One person wants to do the majority of the functions in c++ with just a thin native GUI skin, while the other says we should write in native IOS (swift) and Android and only have the engine in c++.
The argument for c++ is it will be a single code base to maintain - it would include doing the sharing, storing history, displaying sonograms, etc. The argument against is that in fact it will not be easier to maintain, and will also create a lot of problems making calls, for example, between the interface and the function modules. For example, we currently have a function for sharing (email, facebook etc) entirely in C++ which the interface calls to, and I'm not sure if that's the best way to do things.
Hope this is clear - it's a very hard thing for me to assess as ignorant as I am! Any advice would be greatly appreciated.
I'd have the engine being c++ only, and then code in the native language for the specific platform.
Here is why:
-Maintaining UI design in c++ is terrible, which can be bad for potential customers
-Not good for load times, you want your app to be as fast as possible
-While it is good for future support (one dev can handle both the engine and the UI, less devs = less spent money), leaving it all on one dev can; have terrible documentation for the code, which will make it harder for new recruits to begin.
-IDE support (no I am not joking), android studio can do the UI pretty darn good, and adding c++ will just make it either look old or ugly.
Those are just my 2 cents

Categories

Resources