Thread: Android: another failed opportunity

  1. #1
    Registered User
    Join Date
    Mar 2020
    Posts
    12

    Android: another failed opportunity

    How in the name of blazes is the recommended toolchain for developing apps so ........ing bloated and slow that compiling a hello world program in C within a virtual machine of a full blown desktop OS for example takes less resources and far less time than an Android hello world?

    More importantly, why is it that an Android vm for testing requires so many resources and yet is so slow? Launching a desktop linux vm takes much less resources and runs much faster for example.

    And much much more fundamentally, why is Java tied in such a fundamental way to the core of the OS? What in the name of blazes was going on in their heads? Not only was Java probably much slower and resource heavy during those days: both big nos for limited hardware mobiles but more fundamentally, why isn't the important part of the OS implemented in say C or similar and exposes C APIs like any other OS (Windows, Linux, etc)? One is then free to build and use any language including Python, Perl, C++, Java, Rust, etc for the platform just as one is free to use any language in desktop systems. Why tie yourself irreplaceably to a JVM environment at such a fundamental level? With such kinds of thinking is it after all a surprise that something like upgrading an OS or reformatting and flashing something else is somehow fundamentally tied to a particular model? Ever heard needing to buy a new model of computer for a new version of Windows or Linux and a particular version only running on a particular hardware and not being able to add peripherals to it to boot?
    Last edited by cronus; 04-20-2020 at 10:59 PM.

  2. #2
    Registered User
    Join Date
    Apr 2020
    Posts
    14
    I share your thoughts, but don't forget that some people is working at having Linux on mobiles. Let's hope it becomes real someday. In the meantime, I consider Android just a deployment platform. I've not built for it yet, but I'll do it sometime in the next years. Of course without a line of Java, but with the NDK instead (and not even using the NDK directly from my C++ code, but through a toolkit/framework instead).

  3. #3
    Registered User
    Join Date
    Mar 2020
    Posts
    12
    The thing is Android is super popular now phone hardware is very secretive vs the relatively standardized and openish hardware in laptops, desktops, servers etc. Would be really hard to get the market leverage for phone hardware. Even so my point is why the ........ did these ........ing retards take such a ridiculous and unnatural, extra work model from the start and essentially seal the ruination of the mobile platform? It seems the people who invented Android as well as it's whiny defenders are the same species as "web developers"/"javascript developers" if you get what I mean.
    Last edited by cronus; 04-21-2020 at 03:08 AM.

  4. #4
    Registered User
    Join Date
    Apr 2020
    Posts
    14
    Quote Originally Posted by cronus View Post
    The thing is Android is super popular now phone hardware is very secretive vs the relatively standardized and openish hardware in laptops, desktops, servers etc. Would be really hard to get the market leverage for phone hardware. Even so my point is why the ........ did these ........ing retards take such a ridiculous and unnatural, extra work model from the start and essentially seal the ruination of the mobile platform? It seems the people who invented Android as well as it's whiny defenders are the same species as "web developers"/"javascript developers" if you get what I mean.
    It's easy to follow the temptation of feeling angry at something, but life is too precious for that, so it's better to learn and to invest the time where it can be more fruitful. I won't use Android both because of performance and design, and because of security and privacy. But, as you mention, there are a lot of people using it, so even if I dislike its design, it's a platform to be considered if you want to reach a lot of potential users. And you can do it without using any Android technology if you want: For example if you write with a simple toolkit like SDL+ImGui, you can build the same code for a lot of platforms, Android included.

    In my case I'd have the temptation of feeling angry at Apple, but when you get angry or sad, you waste your time. So, I won't follow that temptation, even if Apple transformed a platform originally designed for users who cared about freedom, not being controlled, and don't upgrading when things worked ok, into a very different platform where you lost a lot of freedom you used to have (no standards: OpenGL and OpenCL deprecated, Vulkan as thirdparty only, no way for using external NVIDIA GPUs, etc, etc), it's built on a new services-based business model that gets your data no matter how they promise they don't, and that forces you to update even if you don't want when things work fine. Should I be angry? It's better to invest my time wisely instead of wasting it being angry: So I'm getting all my environment ready for jumping to Linux as my main OS if things go worse (and it's likely they'll go worse). For the moment I can still work in MacOS and I have all my tools with a very comfortable setup, but if next month I need to use Linux as my main OS, I can do it.

    Another very important thing that tech work teaches you with the years is to completely avoid using platform-dependent APIs in your source code. Use multiplatform toolkits/APIs instead. That way, your source code will be valid for much more years, because even if you love and trust a brand nowadays, it can disappoint you sooner than you think, and render your code obsolete if you trusted "how great their new API was" just to be abandoned a couple of years later. If you really need to use platform-dependent APIs, encapsulate it into a really limited and enclosed directory in your source tree.

    After all these considerations, any reason to be angry with some OS or brand? Not at all... well you can say "it was sad they ruined this or other platform provided how great it was", but that's all, just take the best of your time and use the best OS for your everyday work. The rest of OSs, just use them for deployment or for testing, inside virtual machines, as well as for searching for potential future OSs for your work.
    Last edited by ccafe; 04-21-2020 at 04:32 AM.

  5. #5
    Registered User Sir Galahad's Avatar
    Join Date
    Nov 2016
    Location
    The Round Table
    Posts
    127
    Quote Originally Posted by cronus View Post
    How in the name of blazes is the recommended toolchain for developing apps so ........ing bloated and slow that compiling a hello world program in C within a virtual machine of a full blown desktop OS for example takes less resources and far less time than an Android hello world?

    More importantly, why is it that an Android vm for testing requires so many resources and yet is so slow? Launching a desktop linux vm takes much less resources and runs much faster for example.

    And much much more fundamentally, why is Java tied in such a fundamental way to the core of the OS? What in the name of blazes was going on in their heads? Not only was Java probably much slower and resource heavy during those days: both big nos for limited hardware mobiles but more fundamentally, why isn't the important part of the OS implemented in say C or similar and exposes C APIs like any other OS (Windows, Linux, etc)? One is then free to build and use any language including Python, Perl, C++, Java, Rust, etc for the platform just as one is free to use any language in desktop systems. Why tie yourself irreplaceably to a JVM environment at such a fundamental level? With such kinds of thinking is it after all a surprise that something like upgrading an OS or reformatting and flashing something else is somehow fundamentally tied to a particular model? Ever heard needing to buy a new model of computer for a new version of Windows or Linux and a particular version only running on a particular hardware and not being able to add peripherals to it to boot?

    At this point the whole toolchain is rather just a hodge-podge of coexisting technologies. The good news is it's not as bad as you think. You can in fact compile and run a simple C program on just about any device. It's called JNI. But it isn't actually Java or even Dalvik that's running "under the hood" there. These days the APK is usually just converted directly to an ordinary binary by the Android subsystem "on the fly", with others (usually system apps) being be stored on disk, precompiled, a fully-linked ELF.
    Code:
    #include <stdio.h> 
    #include <stdlib.h>
    #include <time.h>
    #include <math.h>
    long x(long y,long z){if(!z)return y;return x(z,y%z);}int 
    main(void){long t,u,w=0,v=0;srand(time(0));for(;;){t=rand();
    u=rand();if(x(t,u)-1);else++v;system("clear")&&system("cls");
    printf("\n\n\n %g\n\n\n",1/sqrt(((double)v)/((3<<1)*++w)));}}

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Opportunity for C++ Developers
    By JM SPtech in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 10-31-2010, 03:01 AM
  2. Well this is a sweet opportunity
    By BobMcGee123 in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 09-08-2006, 12:57 PM
  3. Sydney .NET 2.0 Contract Opportunity
    By nickname_changed in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 06-05-2005, 08:19 PM
  4. Global Investment Bank Opportunity
    By coza in forum Projects and Job Recruitment
    Replies: 7
    Last Post: 04-08-2005, 11:37 AM

Tags for this Thread