Android Interview

– Can you introduce yourself to us and tell us a bit more of your Android experience

Aris: Hello, my name is Aris Tsevrenis and I am a mobile developer for 4 years and have been mostly been working on the
games industry sector of mobile apps. I have worked with Android for some children games with the Penguin Editing House
and in the gambling games section with Product Madness.

– What are the three primary reasons you use the android platform?

Aris: Android devices are usually cheaper so sales have skyrocketed the last few years. To develop an android application
you can use any Microsoft Windows platform and that speeds up development. The android platform is relatively new so
there is a lot of space for improvement and innovation

– What are the differences one could find on working on another platform and on what aspects?

Aris: The apple platform is the big rival of android devices and it has its prons and cons;There is a multidude of
differentiations on the android devices on their sizes, processing power and other specifications and that makes the app
development more complex where as with Apple everything is pretty much standardized helping the developers concentrate
on creating the app without using up their time with resizing the textures and other similar wasteful activities.

– What could be potential improvements of the android platform? Can you find them in any of its competitors?

Aris: Again, screen resolution and other technical aspects of the devices in a standardized format, maybe doubling
each time the previous numbers. Apple does that a lot.

– Do you believe that smartphone operating systems affect end users and on what aspects?

Aris: Obviously they do and on a lot of sectors, whether those are games and entertainment, lifestyle and news or
even information on medical issues and health.

– What do you think of android’s developments through time? Is android responding to developers needs/feedback?

The Samsung devices have been helping out a lot with android platform development as they are pretty much
following Apple’s standards and are standardizing everything. The problem is that there are so many developers
apart from Samsung using Android that will not adhere to those standards even today.

– What aspects would a potential platform switching affect?

Aris: Everything more or less. The developer will need to work on different stores to publish their app, code in
different programming languages as one is Java for Android, Objective-C for iOS and C# for Windows devices.

– Do you think that the cost of switching platforms would be large? Why?

Aris: Depends on how you start the original project. There are packages that allow you to develop on all device platforms
at the same time rather than using each individual one’s original coding language and features. If one decides to
use traditional means then the costs would simply just more or less double as it will be as if one would be creating
a new application from scratch.

– Do you think there is any connection between android features and end-consumers (smartphone users)? If yes, could you give an example?

Aris: The end users are always the ones who will mostly affect the android features and not as much the other way around
since gathering the information that users return to developers, one is able to improve the user interface to
provide a higher quality of interaction for the user. The user is what moves the market and his needs are the #1
factor that need to be fulfilled.

– What do you think is the future of android? Can it be ruled out or overcome? If so, by what?

Aris: The statistics show that the android market has been blooming and have been increasing to lengths higher that of Apple’s
iOS but because of the minimal testing those apps get before they get released the Android store is filled up with apps
that have minimal or no functionality at all, making difficult for the rest of the good apps to shine. Apple is the biggest
competitor and Microsoft is getting there with their new Windows 8 platform which looks very powerful.

– How do you see the future of the Smartphone industry in terms of its operating system adoption?

Aris: Microsoft’s Windows have swapped recently their traditional look to a more smartphone-like look-
and-feel and that shows how the smartphone industry has affected the operating systems and how
the data the developers have gathered the last few years from the mobile market has shown how
minimal look gives more to the end user. I think the smartphone industry will continue to grow
to lengths that could even be a threat ( they already are ) to the console and PC gaming industry.

Advertisements
Aside | Posted on by | Leave a comment

Lesson 1: How to write clean code

I believe that code has to be written in a particular way regardless of the language. To do so I have taken rules from different languages and put them together in order to have a cleaner result. My examples will look familiar to C# and Java and less C++
just because C++ sometimes frightens new people and it would ruin the purpose of this post although I will include it in the future as C++ is the language of “real” men! =D

Basic rules to always follow to write clean code:

  • Variables should always be following the same rules throughout the project, this is important for larger teams where coders are used to different styles
  • Brackets and spaces are your friends, the more you use the merrier, I know when new coders start to get the hang of programming they tend to try to write less code so they lose the brackets. DONT.
  • I am a fan of not writing comments, maybe because I’m lazy but the important factor is to write code that has VERY understandable namings on the variables so that you won’t have to explain code through comments. Comments should only be added if something is not very straightforward.
  • Quick code is good, but quick, well written and bugless code is better. Easier said than done but if you make the basics your second nature the rest will follow.

The rules that I follow can be seen in the following example:

  1. Constant variables: I_AM_A_CONSTANT
  2. Local Variables: iAmALocalVariable
  3. Private variables: m_IamAPrivateVariable, m stands for member of the class, they are more accessible than local variables but they should not be confused with the global ones that can be found in C++ and similar languages
  4. Public variables: IamPublic
  5. Enums: Just like Public as it’s cleaner that way, enums are integers disguised anyway
public class GameManager
{
    public static readonly int NUMBER_OF_PLANETS = 12;
    private const string PATH_TO_IMAGE = "Assets/Library/";
    private float m_IntroLerp = 0.0f;
    private static int s_StaticExample;
    public int Iterator;
    private int[] m_IntegerArray = new[]{ 1, 2, 3, 4 }; // Instantiates an array with predefined values, doing it like this doesn't work for all languages

    public enum GameState
    {
        Intro,
        Menu,
        InGame
    }
    private GameState m_CurrentGameState;

    private void Update()
    {
        switch( m_CurrentGameState )
        {
             case GameState.Intro:
             {
                 // TODO: Add Code for Intro
                 break;
             }
             case GameState.Menu:
             {
                 // TODO: Add Code for Menu
                 break;
             }
             case GameState.InGame:
             {
                 // TODO: Add Code for InGame
                 break;
             }
         }
     }

     private int GetExampleInt( int index )
     {
          int example = 0; // local variables should always be instantiated
          example = m_IntegerArray[ index  ];
          return example;
     }
}

All this is to be able to have reusable and clean code that will help your team understand your code and help to improve it or even use it,
and even for yourself if you leave the project for some time and wish to return to it for any reason in the future it will make it easier
to find what each variable does straight away and not lose any precious time trying to remember why things were done in what way.

Posted in Uncategorized | Tagged , , , | Leave a comment