Log in

View Full Version : Are there Android coders out there?


darkwoon
July 5th, 2011, 05:47 PM
I'm writing a small game on Android with two friends, learning how the code for that platform along the way (yeah, I know, I've really weird ways to fill my free time... ;))

Is there anybody else here also coding stuff on Android?

TheMatrix
July 5th, 2011, 07:25 PM
Not me - but maybe I will someday.

Is it possible to code in Perl for Android?

HaydenM
July 5th, 2011, 11:24 PM
i know the unity 3d game engine has android capabilities. On the "unity community" forum there is bound to be many people who could code for android.

darkwoon
July 7th, 2011, 12:56 PM
Not me - but maybe I will someday.

Is it possible to code in Perl for Android?
Yes, through perldroid (http://code.google.com/p/perldroid/). I didn't try it, though, as I don't really know anything about Perl. The main programming language for Android is a dialect of Java.

TheMatrix
July 7th, 2011, 03:49 PM
Bah. I hate Java. Too complex.
I mean, just to print "Hello world", you have to go about decalaring public and static functions and all that.
Compare this Snippet in Java:

public static hello world {
System.out.println( "Hello world" );
}

to this in Perl:

#!perl -w
print "Hello World!\n";


I just dislike Java.

darkwoon
July 8th, 2011, 02:19 PM
Bah. I hate Java. Too complex.
I mean, just to print "Hello world", you have to go about decalaring public and static functions and all that.
Well, Java is object-oriented, which means that yes, everything you write needs to be encapsulated into classes, and yes, it means that you always have to write a class code structure before putting any functional code in it.

However, "Hello World" hardly matters for real-life programming language usages, except the most trivial ones - when you are starting to deal with complex code (I'm speaking of code size in the thousands of lines here), verbosity hardly matters anymore; what really counts at such a scale is maintainability, clarity of the design, reusability, or strength of the testing chain. Those are areas where languages like C++ or Java shine compared to Perl or Python. On the other hand, Perl, Python or Bash are way better when it comes to automation scripts, string analysis or file batch-treatment.

Oh, BTW, your java example is not correct - the correct "Hello World" would rather be:


public class Hello
{
public static void Main(String[] args)
{
System.out.println("Hello World!");
}
}

Maybe you hate it so much because you don't know it well, and thus don't see its advantages and drawbacks against Perl?

TheMatrix
July 8th, 2011, 02:24 PM
Well, Java is object-oriented, which means that yes, everything you write needs to be encapsulated into classes, and yes, it means that you always have to write a class code structure before putting any functional code in it.
Yeah, I prefer simpler things.


However, "Hello World" hardly matters for real-life programming language usages, except the most trivial ones - when you are starting to deal with complex code (I'm speaking of code size in the thousands of lines here), verbosity hardly matters anymore; what really counts at such a scale is maintainability, clarity of the design, reusability, or strength of the testing chain.
Perl is really good at testing things.

Those are areas where languages like C++ or Java shine compared to Perl or Python. Such as...?


[QUOTE=darkwoon;1334920]On the other hand, Perl, Python or Bash are way better when it comes to automation scripts, string analysis or file batch-treatment.
And CGI stuff. That's what I mostly do.


Oh, BTW, your java example is not correct - the correct "Hello World" would rather be:


public class Hello
{
public static void Main(String[] args)
{
System.out.println("Hello World!");
}
}

Does it really matter? That just makes it more complex.
Assigning variables you don't intend to use....*shudders*


Maybe you hate it so much because you don't know it well, and thus don't
see its advantages and drawbacks against Perl?
Maybe..................maybe not.....

darkwoon
July 9th, 2011, 03:03 AM
Yeah, I prefer simpler things.
On that, we definitely agree ;).

Perl is really good at testing things.
By "testing", I meant "checking automatically if the program algorithm works as intended" ("unit testing" and the likes). "Testing things" as you say is probably quick prototyping, which is indeed something scripting languages like Perl are usually very good at.

Such as...?
As I said: reusability, unit testing, runtime modularity, object-oriented programming, etc. There is no absolute best language, though - each has its strong and weak points.

And CGI stuff. That's what I mostly do.
Yep.

Does it really matter? That just makes it more complex.
No more than the C's "void main()" or Pascal's "begin - end". They are basic entry point syntax found in most programming languages. Nothing really fancy.

Assigning variables you don't intend to use....*shudders*
lol ! Well, Main is the only place where you're forced to declare something you don't use, so that's hardly a big deal on the long run.

TheMatrix
July 10th, 2011, 02:57 AM
it is for me! a HUUUUGE deal, that i go bonkers when perl gives me a 'variable $DBH used only once in index.cgi, line 57', and despise that code while rewriting it.

and plus, it's harder to make proprietary software with perl.
you use debian, right? i would call you a traitor if you have ANY proprietary software on your machine o_O

runnerz
July 12th, 2011, 12:07 PM
I know a little java. Do you have the android emulator on your computer? I'm trying to learn C# for the Windows phone 7 or Windows mango when it's released.

TheMatrix
July 12th, 2011, 01:19 PM
I'm trying to learn C# for the Windows phone 7 or Windows mango when it's released.
Isn't C# an ancient Microsoft language?
And what the hell is a "Windows Mango"?

runnerz
July 12th, 2011, 01:26 PM
oh its not called windows mango, just mango http://news.cnet.com/8301-10805_3-20073110-75/microsofts-mango-praised-but-has-much-to-prove/

TheMatrix
July 12th, 2011, 01:44 PM
oh its not called windows mango, just mango http://news.cnet.com/8301-10805_3-20073110-75/microsofts-mango-praised-but-has-much-to-prove/
Oh, I thought you meant:
http://topnews.co.uk/images/imagecache/main_image/windows-mango.png

anonymous.john
July 16th, 2011, 09:38 PM
You never have to declare any variables in java that you don't intend to use. public class Hello and public static void Main are a class and method (respectively). When the Java application is run, it instantiates the class "Hello" into an object and calls its entry method, "Main." Those are used. It's the C++ equivalent of int main(). Java's (in my opinion huge) advantage in the game is that it's very fast AND cross platform. A java program written on windows will run in OSX or any linux flavor of your choosing as long as you have a Java VM.

TheMatrix
July 16th, 2011, 09:51 PM
You never have to declare any variables in java that you don't intend to use. public class Hello and public static void Main are a class and method (respectively). When the Java application is run, it instantiates the class "Hello" into an object and calls its entry method, "Main." Those are used. It's the C++ equivalent of int main(). Java's (in my opinion huge) advantage in the game is that it's very fast AND cross platform. A java program written on windows will run in OSX or any linux flavor of your choosing as long as you have a Java VM.
I know how it works. I use C sometimes, and that's very similar.

I just think Java is much too complicated. But that's me, and anyone should do whatever works the best for them.

unixmitosis
July 16th, 2011, 10:54 PM
Resident Java Helper and Android Developer, how can I help you.

TheMatrix
July 17th, 2011, 12:17 AM
Resident Java Helper and Android Developer, how can I help you.
I wasn't under the impression that he needed help, he was just saying that he was making a program.
Read the posts next time, 'kay? Thanks! :)

unixmitosis
July 17th, 2011, 04:18 AM
I wasn't under the impression that he needed help, he was just saying that he was making a program.
Read the posts next time, 'kay? Thanks! :)

No of course not. It was an unsolicited offer of help.

TheMatrix
July 17th, 2011, 01:47 PM
No of course not. It was an unsolicited offer of help.
I see.....

Oh, and what happened to the OP?