Telling a Story

There was a gang rape in Rio de Janeiro three days ago. A young woman was abused by thirty men in a slum in the western town. This crime shocked the country because savagery of people. It's another scenario of brutality of men. The police are still investigating the crime and arrested 4 suspects. We, Brazilians, await the outcome of the case.
May 27, 2016

Enjoy
Marcos Carvalho

Giving a Recommendation

To whom it may concern:

I am writing to highly recommend Tammy Pires. I had class with her in University and I was delighted. She is an excellent Physical Teacher. She is pretty dedicated to students and tries take better possible class. She always takes new materials for the students and knows the moment and the name of each student. The way of evaluate her students are always enrich the best of each one. Please feel free to contact me about Tammy at [email protected].

Sincerely,
Marcos de Carvalho Oliveira
System analyst of Telefonica
May 25, 2016

Talking About Upcoming Events

Today, there is going to be a show of Wesley Safadão. He is famous singing hits of the moment in Brazil and people like him because his music is excellent to dance. The show will happen in Pedreira Paulo Leminsky at 8 p.m. There are tickets for admission. Half price costs R$ 80,00 and normal price costs R$ 160,00. There are exclusive tickets too. This tickets has the possibilities of drinks are included. The price is R$ 550,00 for more. I'd like to go because will be an excellent moment to dance, but I prefer the normal ticket. Common, Would you like to come?
May 25, 2016

Enjoy
Marcos

[ESA-02] Manifesto Metodologia Ágil

Muda a perspectiva do capitalismo

Não ter retorno financeiro.
ter outros tipos de retorno
recompensas / metas

======================================

débito técnico --> diferença técnica
Necessário equilibrar o conhecimento para não ficar refém de pessoas
é necessário uma infra estrtura básica para modificar o meio e a política tem alto poder social nesse sentido.

======================================

alinhamento de expectativa
Inception
Impacto gera conflitos (Positivos e Negativos)
Fuja de conflitos silenciosos (mais perigoso) (fofocas, )

======================================

Pareto
20% das funcionalidades solicitadas serão realmente usadas.
Dessas 20% --> 80% do tempo cairão nelas.

======================================

Ambientes complexos utilizam metodologias ágeis (Quase Caótico)
Riscos serão trabalhados no meio do desenvolvimento
Processos empíricos (baseado na experiência) e iterativos

Caso haja um risco e seja todo pensando no início
ele não é complexo.

======================================

experiência (Montando-se o quebra-cabeças) + Valores --> Modelo Mental (base de experiências)
Flexibilizar valor para mudar --> Resiliência
Quando consigo mudar sem quebrar
Processo para ser adulto

até que ponto você pode aguentar?
até que ponto você pode aceitar?
Até que ponto são seus valores?
Você pode quebrar um valor??
É necessário romper?? Mais as pessoas estão dispostas a romper?

Coaching ontológico transformacional

======================================

******* Mais fácil pedir desculpas do que que pedir autorização --> Intra empreendedor

Sistema Adaptativo complexo
Você tem a necessidade de entregar um produto, mesmo sofrendo todas as influências do meio.

== Valores Ágeis ==
Treinamento --> Habilidade / Domínio

Sinergia / Domínio / Comprometimento / Confiança / Ferramentas / Treinamento / Propósito

C - Conhecimento
H - Habilidade
A - Atitude
J - Julgamento

************** Ninguém nasce competente

== Manifesto Ágil ==
Indivíduos e interação
Software em funcionamento (desempenho)
Colaboração com o cliente
Responder a mudanças

******** Contrato / Culpadologia XXXXXX Colaboração

**** Metodologia Prescritiva
O documento é que vale
Recurso e não pessoa
Minimiza os erros

********* Análise Transacional
Pai / Adulto (fatos e dados) / Criança

======================================

== Ágil ==
- Escopo / Pequenas entregas
- ambientes quase caóticos
- escalabilidade
- imprevisibilidade
- Estimativas empíricas
- Valores pessoais

== Tradicional ==
- Pode ser usado em manutenção pequenas e médias
- Estabilidade dos Requisitos
- Previsibilidade
- Estimativas "Análise de ponto de função"

======================================

12 Princípios
pautar forma de trabalho

01. Software funcionando. Satisfazer o cliente. Entrega adiantada e contínua do software
02. Aceitar mudança a qualquer instante (externalizar a mudança)
03. Entregar software funcionando com períodos mais curtos
04. Todo mundo junto, incluindo o pessoal de negócios
05. Construir projetos ao redor de indivíduos motivados... dando o ambiente e suporte necessário e confiar que farão seu trabalho.
06. O método mais eficiente e eficar é transmitir informações através de uma conversa cara a cara
07. Software funcional (funcionando e que possua valor) é a medida primária de progresso
08. ambiente sustentável. manter a cadência. passos constantes.
09. contínua atenção à excelência técnica e bom design, aumentando a agilidade
10. Simplicidade: a arte de maximizar a quantidade de trabalho que não precisou ser feito.
11. Melhores arquiteturas, requisitos e designs emergem de times auto-organizáveis
12. Em intervalos regulares... pensem em como o time pode ficar mais efetivo. Ajuste e otimize o seu comportamento de acordo

********* Você está no buraco... pare de cavar!!! Levanta e pede Ajuda!!!!
======================================

- Mudanças que não alterem custo e prazo
- Escopo - cadeado aberto
- Custo - cadeado fechado
- Prazo - cadeado fechado

======================================

- Necessidade de um processo adaptável
- Disciplina é essencial
- Fono no talento e habilidade
- Habilidade de resolver problemas
- Auto-organização

======================================

"Bando"
"Grupo"
"Equipe"

Líder + Pessoas

Líder tem que ter as seguintes qualidades
- Atitude
- CHA
- Comprometido
- Inspirador
- Envolvido
- Objetivo
- Comunicativo
- Responsável
- Engajado
- Visão Sistémica
- PSI
- Gestor

O Líder possui tem que possuir tantas qualidades que não aguenta o número de demandas... tornando-se imcompetente... Não quer dizer que ele é!!!!!

Então no time... é melhor não existir essa pessoa. todos devem exercitarem isso... amadurecimento e criação de cultura.

======================================

== Teoria da Complexidade ==

******** Nível de análise alto
Complexo
A --> ?
Práticas emergentes
Scrum cabe muito bem

Complicado
B <-- A --> C
Boas práticas
Práticas comuns como cascata, iterativos e entre outros.
Gerência de riscos tem uma importância mto importante

******** Nível de análise baixo
Caótico
? --> ?
Práticas inovadoras
Kanban (excelente para prioridades de atendimento)

Simples
A --> B
Melhores práticas
PMBok

Já a previsibilidade é maior para cenários complicados e simples (Sou resistente a mudanças)
Não há previsibilidade em cenários complexos e caóticos (Mudanças são bem vindas)

[ESA-01] Autonomia – Motivação – Propósito

Simplicidade
Multidisciplinar

======================================

Resultado X Objetividade X Agilidade

Autonomia
Propósito
Flexibilidade
Confiança (Base da metodologia ágil)
Compartilhar
Adaptação
Caminho (caminhar é mais importante do que concluir o caminho)
Prazer
Sucesso
Competitividade
Felicidade

======================================

Gerenciador de cronograma

0 não comecei
20 iniciei
60 metade
80 acabei

=====================================

Ondas de inovações são importantes...
É necessário criar a onda...
Se não criar a onda... é necessário surfar a onda....
Não pegou a onda... pegue a próxima onda!!!
Não seja a barreira que impedirá outras pessoas de pegar suas próprias ondas!!!

=====================================

Autonomia é necessária para as pessoas trabalharem de forma mais responsáveis e incentivadas
Pessoas tem que entender porque tem que fazer isso --> Propósito
Pessoas precisam de tempo para estudar para chegar a algum lugar --> Domínio

=====================================

Interdependência

=====================================

Teoria das restrições
"A Meta"
"Corrente crítica"
"5 doenças da gestão de projetos"

=====================================

Empreendedorismo e startup
Produto bom é produto entregue
Mínimo necessário
Produto mínimo viável

=====================================

Comunicação é muito importante na metodologia ágil
Comunique-se
Entenda
Interaja
Crie propósitos

=====================================

Autonomia
Domínio
Propósito


Daniel Pink

Excelentes Práticas com Git

gitEstou adicionando esse post porque através do Git, consegue-se elevar o nível de trabalho e cuidado com o código.

 

Esse diagrama de estados através de comandos é o princípio básico da ferramenta, e através dele conseguimos abstrair o cotidiano.

Git-transport

Caso precise de algo mais, esse diagrama de atividade abaixo é o ideal. Existe bastante informação e está um pouco bagunçado, mas se você quer seguir em frente na ferramenta, dê pelo menos uma olhada!!!

git-pretty

Todas as imagens foram tiradas da internet e peguei só para eu não precisar ficar procurando.

Enjoy
Marcos Carvalho

[Android] Notes About View, Layout and Adapters

View
Key building block for UI components
Occupy a rectangular space on screen
Responsible for drawing themselves and for handling events

Common View Operations
Set visibility: show or hide view
Set Checked state
Set Listeners: Code that should be executed when specific events occur
Set properties: opacity, background, rotation
Manage input focus: allow view to take focus, request focus

View Event Sources
User interaction
- Touch
- Keyboard/trackball/D-pad
System control
- Lifecycle changes

Displaying Views
Views are organized in a Tree
Displaying has multiple steps
Measure – get dimensions of each View
Layout – Position each View
Draw – Draw each view

ViewGroup
An invisible View that contains other views
Used for grouping & organizing a set of views
Base class for view containers & layouts

Adapters & AdapterViews
AdapterViews are views whose children and data are managed by an Adapter
Adapter manages the data and provides data views to AdapterView
AdapterView displays the data Views

Layout
A generic ViewGroup that defines a structure for the Views it contains

LinearLayout
Child views arranged in a single horizontal or vertical row

RelativeLayout
Child views are positioned relative to each other and to parent view

TableLayout
Child views arranged into rows & columns

GridView
Child views arranged in a two-dimensional, scrollable grid

Menus and ActionBar
Activities support menus
Activities can
- Add items to a menu
- handle clicks on the menu items

Menu Types
Options
- menu shown when user presses the menu button
Context
- View-specific menu shown when user touches and holds the view
Submenu
- A menu activated when user touches a visible menu item

Creating Menus
Define menu resource in XML file
- Store in res/menu/filename.xml
Inflate menu resource using Menu
Inflater in onCreate…Menu() methods
Handling item selection in appropriate on…ItemsSelected() methods

Menus
Many other features supported
- Grouping menu items
- Binding shortcut keys to menu items
- Binding Intents to menu items

ActionBar
Similar to Application Bar in many desktop applications
Enables quick Access to common operations

ActionBar.Tab
Screen is divided into tab & content areas
Allows multiple Fragments to share single content area
Each tab is associated with one Fragment
Exactly one tab is selected at any given time
Fragment corresponding to the selected tab is visible in the content area

Dialogs
Independent subwindows used by Activities to communicate with user
- AlertDialog
- ProgressDialog
- DatePickerDialog
- TimePickerDialog

Questions

An application's user interface can include more than just the visual components on the display screen.
True

Which of the following statements correctly describe the View class.
A View is a basic building block of user interfaces.
A View is responsible for drawing itself.
A View is responsible for handling events directed to it.

AdapterViews collaborate with Adapters to manage and display information. Which of the following statements are true of the Adapter interface? See: http://developer.android.com/reference/android/widget/Adapter.html for further documentation.
Adapters provide data using methods such as getCount() and getItem().
Adapters provide Views to the AdapterView.

Layouts are ViewGroups that arrange or organize the position of their child Views.
True

The child Views contained in a LinearLayout can be made to overlap each other by specifying a fractional value for android:layout_weight. See: http://developer.android.com/reference/android/widget/LinearLayout.html for more information.
False

The UIGridView application reads a bunch of Bitmaps into the application and then displays them. For example, one Bitmap is stored in a file called image1.jpg. What Java identifier was used to access this Bitmap file?
R.drawable.image1

Which one of the following statements correctly describes a difference between Context Menus and Options Menus?
Context Menus are generally associated with individual Views, while Options Menus are generally associated with the entire application.

If your application contains a Fragment and that Fragment wants to place actions in the Action Bar, which of the following methods will that Fragment likely call or implement?
onCreateOptionsMenu().
setHasOptionsMenu().

The example application you just saw created and displayed an AlertDialogFragment. This Object was created by using an AlertDialog.Builder Object. Take a look at the documentation for AlertDialog.Builder. Which class is most often used as the return type of this class' methods?
See: http://developer.android.com/reference/android/app/AlertDialog.Builder.html.
AlertDialog.Builder.

Which of the following statements describe key responsibilities of a View?
To respond to events directed to them.
To draw themselves.

Which of the following are properties that can be set on a View?
Position.
Visibility.
Opacity (transparency).

An AutoCompleteTextView is a subclass of ViewGroup. Hint: Consult the Android documentation at http://developer.android.com/reference/classes.html
False

Which of the following statements describe the relationship between and AdapterView and its Adapter?
The Adapter manages a data set for the AdapterView.
Adapters can notify the AdapterView when the Adapter data changes.

Suppose a layout file declares a LinearLayout called LL that contains two child Views, View1 and View2. In the layout file View1 is given an android:layout_weight of 2 and a layout_width of 0dp. View 2 is given an android:layout_weight of 3 and a layout_width of 0dp. In this example, which of the following statements must be true?
View 2 takes up 3/5 of LL's width.

When a user long clicks on a View that has registered to show a Context Menu, which one of the following methods will be called?
onCreateContextMenu().

Suppose that an application wants to create and display a Dialog. If the application embodies the Dialog in a DialogFragment, which DialogFragment method will it call to make the Dialog visible to the user?
show()

The ActionBar has four functional areas: The App icon, a View control area, an Action Buttons area and an Action Overflow area. What is the purpose of the Action Overflow area? See; http://developer.android.com/design/patterns/actionbar.html for more information.
When Action Buttons cannot fit in or should not be placed on the Action Bar, they are displayed in a separate View that is accessible by touching the Action Overflow area.

Enjoy
Marcos Carvalho

[Android] Notes About Intent Class, Permissions and Fragment Class

Intent Class
A data structure that represents
- An operation to be performed
- An event that has occurred

Intent as desired operations
Intents provide a flexible language for specifying operations to be performed.
Intent is constructed by one component that wants some work done
Received by one activity that can perform that works

Intent Fiels
Action
- action_dial - dial a number
- action_edit - display data to edit
- action_sync - synchronize device data with server
- action_main - start as initial activity of app
Data
- Data associated with the intent
- Formatted as a URI (uniform resource identifier)
Category
- Additional information about the components that can handle the intent
Type
- Specifies the MIME type of the intent data
Component
- The component that should receive this intent
- Use this when there's exactly one component that should receive the intent
Extras
- Add'l information associated with intent
- treated as a map
Flags
- Specify how intent should be handled

The target activity
Can be named explicitly by setting the intent's component
Can be determined implicitly

Implicit activation
When the activity to be activated is not explicitly named, Android tries to find activities that match the intent
This process is called intent resolution process
- An intent describing a desired operation
- IntentFilters which describe which operations an activity can handle
-- Specified either in AndroidManifest.xml or programmatically

Intent Resolution Data
Action
Data (Both URI & TYPE)
Category

Priority
Android:Priority - Priority given to the parent component when handling matching intents
Causes Android to prefer one activity over another
Value should be greater than 1000 & less than 1000
Hiver values represent higher priority

Permissions
Android protects resources & data with permissions
Used to limit access to:
- User information
- cost-sensitive API's
- System resources
Permissions are represented as strings
In AndroidManifest.xml, apps declare permissions
They require of other components

Using Permissions
Apps specify permissions they use througha <uses-permission> tag
Users must accept these permissions before an application can be installed

Defining Permissions
Suppose your application performs a privileged/dangerous operation
You might not want to allow just any application to invoke yours
So you can define & enforce your own permission

Component Permissions
Individual components can set their own permissions, restricting which other components can access them
Component permissions take precedence over application-level permissions

Activity permissions
restricts which components can start the associated activity
Checked within execution of
- startActivity()
- startActivityForResult()
Throws SecutityException on permissions failure
onCreateView() must return the View at the root of the Fragments's layout
This view is added to the containing activity

Fragment Class
Represents a behavior / portion of UI within an activity
Multiple fragments can be embedded in an activity to create a Multi-pane UI
A single fragment can be reused across multiple activities
Fragment lifecycle is coordinated with the lifecycle of its containing activity
Fragments have their own lifecycles and receive their own callbaks

Adding Fragments to Activities
Two general ways to add fragments to an activity's layout
- Declare it statically in the activity's layout file
- Add it programmatically using the FragmentManager
Layout can be inflated/implemented in onCreateView()

Adding Fragments Dynamically (Frame layout)
While an activity's running you can add a fragment to it's layout
- Get reference to the FragmentManager
- Begin a FragmentTransaction
- Add the fragment
- Commit the FragmentTransaction

Dynamic Layout
Fragment transactions allow you to dynamically change your app's user interface
Can make the interface more fluid & take better advantage of available screen space

Configuration Changes
If you call setRetainInstance(true), Android won't destroy the Fragment on configuration changes
Results in some changes to lifecycle callback sequence
onDestroy() will not be called
onCreate() will not be called

Questions

Which of the following statements describe common uses of the Intent class?
To specify an operation to be performed.
To represent an event that has occurred.

If you want to send a message to a particular person using an Intent with the Intent.ACTION_SENDTO action, what one other piece of Intent information do you have to set?
See: http://developer.android.com/reference/android/content/Intent.html#ACTION_SENDTO for more information.
Data.

Which one of the following flags will help you get more information about how Android determines which Activities can respond to a given Intent?
Intent.FLAG_DEBUG_LOG_RESOLUTION.

Which of the following Intent fields are used as match criteria during Intent resolution?
Category.
Action.
Data

Which of the following describe situations where permissions might be used?
To restrict access to costly operations.
To restrict accesps to device hardware features.
To restrict access to user data.

Which XML tag does an application use to specify permissions that the device's user must grant to the application before that application can run on the user's device.
<uses-permission>

Which XML tag or attribute is used to specify an application-specific permission that an application may require of any other application that wants to interact with it?
<permission>

Which Exception is thrown if one Activity tries to start another Activity for which it does not have the appropriate permissions?
SecurityException.

When designing an application's user interface, it's a good practice to design a single, identical user interface for both Tablets and Phones.
False

Which one of the following Fragment lifecycle callback methods occurs at the earliest point in the Fragment lifecycle?
onAttach().

In which method does a Fragment normally create its user interface?
onCreateView().

When an application programatically adds a Fragment to an Activity, it normally performs the four steps shown below. Which of these steps is done last?
Commit the FragmentTransaction

When a Fragment is programmatically added to an Activity, by default Android adds the new Fragment to the Task backstack.
False

Which one of the following Fragment methods tells Android not to destroy a Fragment when a device configuration change occurs?
setRetainInstance().

Suppose that an application includes an Activity named A, and that the application declares an <activity> tag for A within its AndroidManifest.xml file. If Activity A should be the main entry point for this application, then it will specify an <intent-filter> element, containing an <action> element. What value should you include to complete the following <action> element definition - <action android:name= "…."/>?
android.intent.action.MAIN

Suppose that an application includes an Activity named A and that the application declares an activity tag for A within its AndroidManifest.xml file. If Activity A will be the main entry point for its application and if an icon for this application/activity should appear in the top-level launcher, how should you complete the following <category> element - <category android:name="…"/>?
android.intent.category.LAUNCHER

The MapLocationFromContacts application created an Intent with the Action, Intent.ACTION_PICK and a with data URI representing the contacts database. It then invoked an Activity using startActivityForResult(). What type of data will the started Activity return?
A String Uri.

Suppose you create an application that uses the Vibration Service to make a device vibrate as a deadline approaches. To receive permission to use the Vibrator Service, you will need to add a <uses-permission> element to your application's AndroidManifest.xml file. What permission value should you use to complete the <uses-permission> element - <uses-permission android:name="…"/>?
See: http://developer.android.com/reference/android/Manifest.permission.html for more information.
android.permission.VIBRATE

Suppose you create an application that captures and stores personal information from the user, such as the medicines they are currently taking. Other applications may want to use this information and then provide add-on services over it, for example, to create 'time to take your pill' reminders. Which of the following tags would you put in your application's AndroidManifest.xml file to define a new application-specific permission for accessing your application.
<permission>.
The Fragment class is a subclass of the Activity class and replaces Activities on large screen devices such as Tablets.
False

In which method do Fragments typically create their user interfaces?
onCreateView().

Which of the following are good reasons for dynamically modifying application layouts at runtime, rather than by using static layout files.
Dynamic layouts can take advantage of contextual information that's not tracked by Android's configuration system (such as current location, usage time, or ambient light measurements).
Dynamically-created user interfaces can adapt to an application's runtime state, such as the amount of data that needs to be displayed at any one time.

Suppose you have an Activity that hosts a Fragment. This Fragment has invoked the setRetainInstance() method, passing in the parameter true. Which of the following Fragment lifecycle methods will not be called if the Activity is later killed and restarted due to a reconfiguration?
onDestroy().
onCreate().

Enjoy
Marcos Carvalho

Application Fundamental Android

Activity
Primary class for user interaction
Usually implements a single, focused task that the user can do

Service
Run in the background
To perform long-running operations
To support interaction with remote processes

BroadcastReceiver
Component that listens for and responds to events
The subscriber in publish/subscribe pattern
Events represented by the intent class and the broadcast
BroadcastReceiver receives and responds to broadcast event

Content Providers
Store & share data across applications
- Uses database-style interface
- Handles interprocess communication

Build-simplified-android

Participation in the build process will usually involve the four steps:
Define Resources
- Resources are non-source code entities
Implement Application Classes
Package Application
Install & run application

User Interface Layout
UI layout specified in xml files
XML files typically stored in res/layout/*.xml
Accessed in Java as: R.layout.layout_name
Can specify different layout files based on your device's orientation, screen size, etc.

R.java
At compilation time, resources are used to generate the R.java class
Java code uses the R class to access resources

Implement Classes
Usually involves at least one Activity
Activity initialization code usually in onCreate()
- Restore saved state
- Set content view
- Initialize UI elements
- Link UI elements to code Actions

Package Application
System packages application components & resources into a .apk file
Developers specify required application information in a file called
AndroidManifest.xml

Navigation through activities
Android supports navigation in several ways
Tasks
- a task is a set of related activities
- These related activities don't have to be part of the same application
- Most tasks start at the home screen
The task backstack
- when an activity is launched, it goes on top of the backstack
- when the activity is destroyed, it is popped off the backstack
Suspending & resuming activities

The Activity Lifecycle
Android-Activity-Lifecycle

onCreate()
Called when activity is created
Sets up initial state
- Call super.onCreate()
- Set the activity's content view
- Retain references to UI views as necessary
- Configure views as necessary

Starting Activities
Pass newly created intent to methods, such as:
startActivity()
startActivityForResult()
- Invokes a callback method when the called activity finishes to return a result

Questions

The Android documentation describes an Activity as "a single, focused thing that the user can do." Which one of the following statements best expresses why this statement might be somewhat ambiguous today?
Some devices, such as Tablets, are large enough to accommodate multiple screenfuls of data at one time.

Which one of the following statements might explain why the Music application plays songs using a Service, rather than by using one of its Activities?
The user might want to listen to music and do something else at the same time.

The MediaPlaybackService class that we looked at earlier in the lecture is a Service. Did you notice that it also contains a BroadcastReceiver called mIntentReceiver? What BroadcastReceiver method is overriden in the MediaPlaybackService.java file by mIntentReceiver?
onReceive

Which of the following statements about the ContentProvider class are true?
ContentProviders can perform interprocess communication.
ContentProviders encapsulate data sets.
Android supports several system-wide ContentProviders.

Which one of the four fundamental components of Android applications is designed to provide an interface to the user?
Activity

Which one of the four fundamental components of Android applications is designed to listen for and respond to events?
BroadcastReceiver

Which one of the four fundamental components of Android applications is designed for sharing data across applications?
ContentProvider

Which one of the four fundamental components of Android applications is designed to in-the-background and remote operations?
Service

Resources are non-source code entities within your application. Which of the following statements capture advantages of using resources, rather than managing entities directly within application source code?
Resources can be changed without recompiling source code.
Sets of resources can be created for different devices, user preferences, and devices configurations.

If you create a resource, such as a string resource, in an XML file, how can you access that resource in your Java code?
In your Java code you can refer to a string, called "string_name", as R.string.string_name.

In which level of the Android Platform would you find the Activity, Service, BroadcastReceiver, and ContentProvider classes?
The Application Framework Layer

Customizing strings for different languages allows more people to use your application, but it's not always that easy to do. Have you thought about some of the difficulties that might come from trying to support users of many different languages? Which of the following might be examples of such difficulties?
Left-to-right vs. right to left ordering of words
Differing word lengths for the same concept.
Differing date and time formats.
Ensuring that the translation is correct.

In which directory did we put the main.xml layout file that specifies MapLocation's layout when the device is in landscape mode?
res/layout-land

The Button.onClickListener interface defines a "callback" method. A callback method is a method that will get called at a future time, in this case, whenever the user clicks on a particular Button. What is the name of the callback method where you put code to be executed when a user clicks on a Button?
onClick

In which method are Activities usually initialized?
onCreate

Which of the following are examples of element tags that you might find in an AndroidManifest.xml file? See: http://developer.android.com/guide/topics/manifest/manifest-intro.html for more information.
<application>
<uses-sdk>

Which of the following are advantages of using an emulator instead of using a device?
You don't have to buy an actual device.
The emulated hardware is reconfigurable.
Changes to the emulator state don't make permanent changes to a device.

Which one of the following statements best captures a common design theme or principle for Android Activities?
Each Activity should support one focused thing that the user can do.

Which one of the following steps is typically done in onCreate()?
Set the Activity's content view.

When an Activity calls startActivityForResult(), it will eventually receive a callback to which of its methods?
onActivityResult().

When one Activity wants to start another activity it creates an Object that specifies which Activity it wants to start. What is the type of this Object?
Intent

Enjoy
Marcos Carvalho

Notes About Android Course

The Android Platform comprises several components.
Software Developers Kit
Software Stack
Documentation

Android's Linux Kernel is not exactly the same as the Linux Kernels typically running on desktop machines. Why would Android make its own Linux Kernel?
Mobile devices require features not usually needed on traditional desktop devices.

In which of the following programming languages are Android's Native libraries typically written?
C/C++

The Resource Manager helps with internationalizing applications. Which of the following might explain why that's important to Android developers?
Android phones and applications are sold to and used by people who speak languages other than English.

Which of following kinds of information does the Location Manager provide to applications?
User movement.
User location.

Enjoy
Marcos Carvalho

Notes About NoSQL Databases

Which of the following are true of NoSQL databases?
At a very basic level, they are similar to hash tables

What is database normalization?
The process of ensuring that a piece of data is not duplicated multiple times in a database

What is the role of denormalization in NoSQL database optimization?
Denormalization can be used to make reads faster by duplicating data and requiring fewer key-based lookups

Which of the following are ways to optimize reads for specific queries?
Grouping all data needed for a specific query and attaching it to a single key

How does a sharded counter work?
A counter is broken into multiple shards that are each stored under a different key. When the counter is read, each shard is fetched and the sum of the counter shards is returned. On writes, a counter shard is randomly chosen and incremented. Write parallelism is proportional to the number of shards.

What is the relationship between read and write optimization in NoSQL databases?
Many write optimization strategies require denormalization, which can increase read complexity
Many read optimization strategies require denormalization, which can increase write complexity

Enjoy
Marcos Carvalho

Notes About Clouds

Which of the following are reasons that username/password logins and session cookies are not ideal for mobile clients?
It isn't possible to easily revoke access to a single app
Changing your password can revoke access to every app that uses it

Which of the following analogies is most appropriate for describing OAuth 2.0?
A valet key for a car

What is the purpose of a password grant in OAuth 2.0?
To obtain a token required for access to one or more resources on the system
To authenticate the user

How is a bearer token used?
It is provided in the Authorization header of a request to prove a client's identity

Which of the following is an example of horizontal scaling?
Adding a new server to support additional load for an application

Which of the following are accurate statements about stateless applications?
They typically allow requests to be routed to any node running an application instance

What is auto-scaling?
Automated addition or removal of computing resources to adapt to changes in an application's load, failures, etc.

Enjoy
Marcos Carvalho

Notes About Spring e Retrofit

Which of the following are true statements about the Retrofit library?
It can be used to provide strong typing for interactions with HTTP-based cloud services
It can automatically marshall Java objects into HTTP request bodies

Which of the following are reasons to use dependency injection?
To reduce the amount of manually written configuration code that is needed to "wire" an application together
To help decouple one or more classes from their dependencies

What is @Autowired used for?
To indicate that one or more of a class' dependencies should be automatically provided through dependency injection

Which of the following are true of object relational mapping?
It is used to aid in persisting instances of Java objects into a database

Which of the following statements are true of the code shown below:

@RequestMapping("/some/path")
public @ResponseBody List<Video> findVideos(@RequestParam("title") String videoTitle){
String query = "select * from video where video.title = '"+videoTitle+"'";
return executeDatabaseQuery(query)
}

@RequestParam will NOT filter the title parameter and the code could suffer from an SQL injection attack
Arbitrary logic could potentially be injected into the query

Which of the following are true of Spring JPA Repositories?
The implementations of repository interfaces are automatically created by Spring

Enjoy
Marcos Carvalho

Notes about Spring Dispatcher

Which of the following are true of Java annotations?
They can be used to provide metadata for methods and other Java constructs.

 

Which of the following are true statements regarding the Spring DispatcherServlet?
It is used to route requests to Spring Controller objects.
It can invoke different methods on a Controller object depending on the request path.

 

Which of the following are uses of the @RequestBody annotation?
To indicate to Spring that the body of an incoming HTTP request should be unmarshalled to provide the value for a parameter of a method annotated with @RequestMapping.

 

@RequestParam can be used if the HTTP request has a multipart body.

 

Which of the following are true of @ResponseBody?
@ResponseBody helps to decouple Controller method logic from HTTP-specific protocol details.
@ResponseBody indicates that the return value from a Controller method should be used to produce the body of the HTTP response.

 

Which of the following are true statements about an Application class, such as the Application class in the examples?
It can be used to provide configuration information to Spring.
It does not have to inherit from a Spring-specific super class.
With Spring Boot and the appropriate annotations, it can be used to setup a Dispatcher servlet.
It can provide a main() method to launch Spring Correct.

 

Which of the following are true statements about JSON?
It can be used to express the state of a Java object.
It can be used to express arrays of objects.
It is a text-based format.

 

Enjoy
Marcos Carvalho

[Composing – 14] Transcendence

Transcendence is an excellent movie and it leads us to thinking in important problems about our existence. Worldwide problems like the lack of food, pollution in earth, health system e etcetera were solved on nanotechnology and the best of the movie is discussing it. So, I will get started.

In the beginning, a brilliant computer scientist adding succeeds artificial intelligence in a monkey. His name is Dr. Will Caster. He started a discussion about that and led the academic community to thinking about future of technology and showing the benefits of artificial intelligence in saving the planet. What the AI could do and held evolution enough to save the planet. However, many people did not believe that this could be happen in such a simple form. Probably, the artificial intelligence would devastate the world. So, one group tried killing him without success. But the bullet was poisoned with radiation and began affecting him. Will Caster's wife did not want to see him dead. So she persuades him to transfer his intelligence and personality to the computer so it could be liberated in the internet and dispersed in the world.

This new computer discovered nanotechnology, the secret of millions of diseases, helps policies solving many cases and reconstructed the human body perfectly. Someday, Will Caster's work suffered an accident and he save his life. Will Caster's wife felt bad with what happened and she gave her opinion about it with other computer scientist.

These scientists wanted to destroy the computer because after the computer saved lives, it could control people that it saved. They discovered that Will Caster’s nanotechnology disseminated throughout the planet and they started a plan to destroy him. The plan turned off permanently all electricity of the world. Scientists got it and after discovered that the machine saved the planet. Deserts were transforming in to wide forests. The water was purified. Toxic wastes disappeared. The sky was free of pollution. In the end, his wife became part of his code and we, watchers, discovered that one part of them continued alive.

Marcos Carvalho
21/07/2014

[Composing – 13] Oliver Twist

Oliver Twist is story happened at the nineteenth Century in England. He is an orphan boy and poor child. He lived in a workhouse. A workhouse was a place where poor people lived. They had to work a lot to eat and live in these places.

Someday, Oliver asks for more food and he was foully hurt. He decided run out of the workhouse and found out a simple way to live. Suddenly, he met a boy that pays food of him. This boy led him to a dirty house and Oliver met Fagin. Fagin is a robber but Oliver did not know that. Fagin taught Oliver how to be a thief. However, Oliver has a pure heart and thought that they were joking.

Three days after meeting Fagin he went out with other boys to thief. The boys tried to steal without success and ran away. Oliver was caught by the police and an old man helped him. The old man was Mr. Brownlow. Oliver went to Mr. Brownlow’s house and began to live happy. Someday, when he went out for the first time, a woman grabbed him and led him to Fagin´s house.

Fagin was angry and we, readers, found out that Oliver had a brother. The brother paid Fagin to teach Oliver how to a thief. Oliver’s brothers wanted Oliver arrested or hanged.

When Oliver is taken away to his second robbery, he was left behind and met a new woman. This woman saw him and knew that this boy was not a thief. She tried helping Oliver and took care of him. Oliver told his story and they decided to talk to Mr. Brownlow. Mr. Brownlow was very happy when he saw for Oliver. He found out that the boy was his friend’s son that died some years ago. Oliver’s father was a rich man and left an inheritance for Oliver and his brother.

In the end of the book everybody that were helping Oliver’s brother to be arrested or hanged. Mr. Brownlow bought a house nearby for Oliver and they lived happy again.

Marcos Carvalho
30/06/2014

[Composing – 11] Why is family so important?

My mom separated from my father when I was two years old. In my childhood, I did not know how it was like having a father. I was growing and I made news friends. Their parents find out my story and they tried decreasing this feeling. In my adolescence, I started to date with my actual wife and my father-in-law did the same. Now I will be a father. What is the feeling now?

I want to be the best father in the world. I want to have experiences with my sons that I have not had. However, how will I do that if I do not know it? I got to the conclusion that it is possible. I am ready. My wife and I have three godchildren. I have some experience in my life. I am more mature than five or ten years ago. We live alone in Curitiba and we want this more than all. We have plenty of love give to our children.

I love my wife. She thinks the same things as me. I hate untutored children. I will be an angry father but not stupid. I have to create my sons for the world. My children will grow up and I want them to say that they had a good life. It is our goal. I got married for it.

People think that I not having had a father was bad for me. Nevertheless, my mom was very special for me. She knew how to take care of my brother and me. Today, we are good men and we are sure, we are to make a better world for us and our sons. My mother has worked hard and we used to travel a lot. She gave education for us. She has love and courage for us and it was essential.

Marcos Carvalho
27/06/2014

[Compossing – 06] Why France is such an interesting country?

I have been reading a lot about history in recent years and it became an admiration for the country. I love stories about Napoleon, old wars, the fight of the rights of man and citizens. Because of that, today, my dream is visit to France. First, I would like go to Paris. Second, I would like to see the Tour de France and it could be in Alpe d’Huez. Third, I would like to have good moments with my wife in Paris.

How are you going to start a tour in Paris? This is an excellent question. I read many things about that and there are many city tours free in Paris. I would like to get one and listen to the history from “Parisienses”. After, I would like to go to the Eiffel Tower, Louvre Museum and Les Invalides Museum where Napoleon was buried.

However, it is difficult to visit Paris and do not remember the charm that city offers. Take an excellent coffee in a beautiful place and after, sit in a park and take many photos. My wife would love it. Maybe, going to a restaurant for dinner.

I love to ride bicycle and when I was a child, I have always watched the Tour de France. In that time, I loved Lance Armstrong. He was a fantastic athlete and he climbed mountains as nobody else. I have known that he took drugs to win because he did impossible things. Now, I would like to see other athletes climbing the mountains that I love it. The name is Alpe d’Huez. 13 kilometers of endless climb.

Because of Paris, the Louvre, the French History and the continent, I would love to take this trip and I will visit it in the next 2 or 3 years.

Marcos Carvalho
09/06/2014