📜 ⬆️ ⬇️

Analysis of the quiz contest on Android from the HeadHunter booth at Mobius 2018 Moscow

Today we are sorting Android quiz from the conference for mobile developers Mobius 2018 Moscow.

The format was pretty standard: 15 questions with 4 possible answers. Time limit 30 seconds for each question.


')
Go!


Question 1


Answer
Astra boy/Bender 


Explanations
Everyone knows that each new version of Android gets a code name on the theme of sweets and they are assigned in alphabetical order (Cupcake, Donut, Eclair, etc.).
However, initially, the developers planned to give versions of the name using the fictitious names of robots. Therefore, the first versions of Android were called Astra boy and Bender . These were internal releases before the release of the nameless version 1.0. However, for certain reasons, the vector changed and version 1.1 was decided to call Petit Four . This was the first sweet version of Android. And already starting with the next version (Cupcake 1.5), the names began to be assigned observing the alphabetical order.

A source

Response statistics





Question 2


Answer
 Marshmallow 


Explanations
With the release of API 23 (Marshmallow), Android introduced a new concept of runtime permissions . This feature was supposed to add transparency for users to the permissions granted to the application. Prior to the release of the “marshmallow”, the issuance of permits occurred at the time of installation of the application.

A source

Note that Android contains over 100 unique permissions.


Response statistics





Question 3


Answer
 measure() 


Explanations


measure () is called to determine the size requirements of the View and all its child elements.

onMeasure () - called from measure () to do the actual work of determining the size of the View.

onLayout () - called to position the element inside the container

onDraw () - called to render the View content.

More information on rendering View can be found here .


Response statistics





Question 4



Answer
 isUserSmell() 


Explanations
There is no isUserSmell () method in the SDK. Perhaps in the future, with the appearance on the devices of the respective sensors ...

Let us examine what other methods do:

isUserMonkey () - the method is designed to check whether the user is a test one within the automated monkey test.

isUserAGoat () - since API 21, checks if the Goat Simulator GoatZ (“Goat Simulator”) application is installed. On versions below, the method always returns false. Located in the class android.os.UserManager .

isFinalCountdown () - the method opens the Europa clip “The Final Countdown”. Added it to API 26. Located in the android.widget.Chronometer class.


Response statistics





Question 5



Answer
 private static final int mobius = 2018 


Explanations
This checked the knowledge of the const keyword, which is used to declare compile time constants . In the Java world, this corresponds to static final modifiers.


Response statistics





Question 6


Answer
 sdpi 


Explanations
If xhdpi and mdpi are at the ear of developers, then things are different with tvdpi . It did not gain popularity, and therefore there were very few devices in the tvdpi category, but they were. The most famous of them is Nexus 7 (2012).

Source of

Note that tvdpi has a coefficient of 1.3 relative to mdpi.


Response statistics





Question 7


Answer
       apk 


Explanations
AAPT (Android Asset Packaging Tool) is an Android tool for creating .APK files.

Conventionally, the work of this utility can be divided into two stages:
- Compilation. At this stage, resources are being prepared: class R is being generated, XML resources are being converted to binary format, PNG processing, etc.
- Packaging (linking). All intermediate files created at compile time are packaged in an APK.

As for the rest of the answer:
- obfuscation code is usually engaged in proguard.
- Java bytecode is the result of the Java Compiler, which translates the source code into Java bytecode.
- Dalvik bytecode is the result of the Dalvik Compiler (DX, D8), which translates .class (Java bytecode) to .dex (Dalvik bytecode). The source code in Dalvik bytecode is not translated directly.

The process of building an Android application is in general terms described in the documentation .


Response statistics





Question 8



Answer
 RIGHT OUTER JOIN 


Explanations
Of these, RIGHT OUTER JOIN is not supported.

Source of


Response statistics





Question 9



Answer
 2x 


Explanations
NameDensity
ldpi0.75
mdpione
tvdpi1.3
hdpi1.5
xhdpi2
xxhdpi3 and 2.6
xxxhdpi4 and 3.5



Response statistics





Question 10


Answer
 ART 


Explanations
ART (Android Runtime) is a new DEX bytecode runtime that replaces Dalvik. The most significant difference between Dalvik and ART is that Dalvik is based on the JIT ( Just-in-Time ) compilation, while ART is based on AOT ( Ahead-of-Time ). In general terms, this means that Dalvik translates dalvik bytecode into machine code every time the application is executed, and ART does it once, during the installation of the application, storing the result in the device’s memory. This leads to the fact that on ART there is a faster launch and execution of applications compared with Dalvik, but this increases the installation time of the application. In addition, ART conducted GC optimization, and also added a number of features to improve the development and debugging of applications.

ART and Dalvik


In addition, it is worth noting that ART also includes a JIT compiler, which complements AOT. Read more about it here .


Response statistics





Question 11


Answer
 YAGNI 


Explanations
KISS (Keep It Simple, Stupid) - do not complicate!

DRY (Don't repeat yourself), DIE (Duplication Is Evil) - do not repeat!

WTF (number of “chesana” per second) is a measure of the quality of a code for a review.

YAGNI (You are not gonna need it) - you will not need it!


Response statistics





Question 12


Answer
 Application Not Responding 


Explanations
ANR (Application Not Responding) - a problem that occurs when the main flow of the application cannot handle user events and redraw the UI.

In Android, the application’s responsiveness is monitored by the ActivityManager and WindowManager system services. If one of the following conditions is met:

- there is no reaction to input events (touch and key pressed events),
- BroadcastReceiver will not complete execution within 10 seconds,

the system will notify the user of the problem by displaying the corresponding ANR dialog.


Response statistics





Question 13


Answer
 Size & mode 


Explanations
MeasureSpec is designed to transfer size requirements from the parent to child view components. These requirements are drawn up in two dimensions: width and height. The values ​​for each of the dimensions are composite: the first part contains information about the available space (in pixels), the second part - restrictions on the use of available space. These restrictions may be as follows:

MeasureSpec.UNSPECIFIED — no limit, the view can take on any size it needs.

MeasureSpec.EXACTLY - the exact dimensions are defined, the view will be given exactly these boundaries.

MeasureSpec.AT_MOST - maximum sizes are defined. The view can be as large as it wants, but to the specified size.


Response statistics





Question 14


Answer
 Linux Kernel 


Explanations

Linux Kernel (Linux kernel) - this layer provides the functioning of the system and is responsible for security, memory management, processes, and also provides a network stack and driver model (Display Driver, Camera Driver and other drivers).

Libraries (libraries) is an intermediate software layer designed to provide basic functionality for applications such as supporting file formats, encoding and decoding information (for example, codecs), drawing graphics, and much more (Surface Manager, Media Framework, SQLite and others).

Android Runtime - located on the same level with Libraries. The key components here are Dalvik VM and a number of core libraries (Core Libraries).

Application Framework - application framework level. It is through application frameworks that developers get access to the lower-level APIs. These include: ActivityManager, Package Manager, Window Manager, etc.

Applications - the level of applications, both basic (pre-installed on the OS: browser, calendar, contacts, etc.) and user-installed.

To the note, the authors of quiz oldscules, because in the official documentation, the layers are highlighted in another way: source.android.com/devices/architecture .


Response statistics





Question 15


Answer
 invokeabstract 


Explanations
goto - go to another instruction.

invokeinterface - used to call interface methods.

invokestatic - used to call static methods.

Description of the remaining instructions .


Response statistics



Source: https://habr.com/ru/post/434210/


All Articles