Image for post
Image for post

Grow new habits instead

A goal is the final result of a successful habit. By methodically adopting a new habit you’ll end up achieving a goal, but not the other way around. You first need the habit and then the goal will come, eventually. Setting a goal without thinking about the habit that will get you there is like deciding to travel to a new city without looking at a map. What road do you want to take? How many kilometers do you want to walk each day? What are you going pack for the journey?

At some point, you will even realise that the goal doesn’t really matter much. What you want is to incorporate habits you enjoy doing into your life. Because that’s where the change and the joy will come from. The idealistic new year’s resolution is the end result of doing something new every day. Setting just the goal won’t work in most cases. By contrast, a new habit you enjoy doing will move you closer to that goal one step at a time. …


Throughout my professional career so far, I’ve worked in a big variety of companies — startups, small companies, large companies, agencies, and everything in between. In August 2020, I accepted an offer to join Barcelona-based startup TravelPerk and I was a bit nervous. After all, changing companies in the middle of a global pandemic adds another layer of stress to the already stressful environment we’re all living in.

I’ve been onboarded remotely to several teams in the past, so I was already mentally prepared to feel lost in every step of the process, or even a bit unsure about my own engineering skills. …


Surface DUO is the most exciting device I’ve seen in years. Built by Microsoft, it will run Android on a dual-screen setup which allows for apps to run side by side or extended, using both screens.

In this article, I want to take a look at what do we need to build a Master/Detail app for dual-screen devices.

To prepare the post, I’ve rewritten from scratch this Master/Detail sample provided by Microsoft to help me better understand the Surface Duo and to:

  • Reduce the number of fragments used in the sample and (hopefully) make it easier to understand.
  • Explore how ViewModel & LiveDatacan be used in dual-screen setups. …

Image for post
Image for post
Evolución y crecimiento de los mercados Estado Unidenses y Australianos en los últimos 30 años

En el post anterior vimos que para el inversor medio que busca seguridad y un crecimiento sostenido, la mejor estrategia para invertir en Bolsa es comprar y no vender.

Sin embargo esta estrategia plantea un problema inmediato: ¿qué acciones comprar? ¿Cuáles son las mejores empresas para invertir?

🤔 Compra y no vendas, pero ¿qué comprar?

El problema de la estrategia Buy & Hold seleccionando empresas individuales es que requiere mucho mantenimiento para una diversificación adecuada.

Como vimos en el artículo anterior, el valor de las acciones sube en general pero obviamente hay empresas que suben, otras que bajan y otras que quiebran y desparecen.

Comprar acciones y mantenerlas siempre requiere estar pendiente de la evolución de la empresa en cuestión, por si hubiera que deshacerse de ellas. Antes de comprar ya habremos hecho un análisis previo para determinar si la empresa es sólida y aumenta su dividendo año tras año. Pero nada garantiza que las cosas vayan a ser así en el futuro. Una vez comprada una empresa necesitaremos seguirla frecuentemente para saber si sigue siendo sólida, si su negocio marcha bien y si es previsible que su dividendo se mantenga con el tiempo. …


Image for post
Image for post
Photo by Aron Visuals on Unsplash

La inflación se come nuestros ahorros a un ritmo de 3% anual de media

La inflación es el aumento generalizado y sostenido del nivel de precios cuando el nivel de vida sube; y esto de media está en torno al 3%.

En Estados Unidos (donde hay más datos registrados sobre esto) la inflación media en todo el periodo entre 1913 y 2019 ha sido 3,12%.

Aquí podemos ver un gráfico de cómo se ha movido en España desde la década de los 50.


A look back at what I accomplished (and what I failed to) in 2018

Image for post
Image for post
Photo by Kyle Glenn on Unsplash

✅ I’ve done this or it’s now part of my skills/habits
🔷 Work in progress, I still need to actively work on this in 2019 if I want to learn it
❌ I failed to start working on this or I started but the outcome wasn’t useful

1. Things I’ve tried to learn

This is a list, in no particular order, of the things I wanted to learn this year.
Each one of them has an icon to indicate if I succeeded, failed or I’m still working on it.

✅ Kotlin

🎉 2018 resolution

Kotlin was made first-class citizen for Android last year and since then it has grown exponentially, making it the fastest growing language of 2018, according to Github’s 2018 Octoverse…


Image for post
Image for post
Photo by Vladimir Kudinov on Unsplash

…and how can Firebase help you find it?

The North London’s most famous farmer’s market takes place every Sunday from 10 am to 3 pm near the Alexandra Palace.

Locals come here for fruit and vegetables, meat and sausages, cakes and biscuits, and, of course, handmade pies. There’s also a large selection of street food, including vegan Indian food, Chinese dumplings, British beef burgers and even Spanish tortillas. My favourite, though, is the Moroccan chicken wrap.


Image for post
Image for post
Buzludzha, Bulgaria by Naletu on Unsplash

We, developers, are constantly trying out new stuff. Testing the latest framework, tool or library. Playing with the new shinny toy for a weekend and quickly forgetting it when Monday brings us back to The Reality™.

If you’re not careful your computer quickly becomes an expensive digital graveyard. You can, of course, spring clean your hard drive removing working in progress projects you’re never going to finish. If you’re more disciplined than me, you’ll probably have a./workspace/wip directory to group all of them.

The problem is not the projects though. It’s the environment. The hundreds of little dependencies and libraries those projects need. That weekend you spent trying to build your own blog with Ghost is only a memory now, but Homebrew, Node, Grunt, Ghost and God-knows-what are still installed in your computer. …


Scenario

Image for post
Image for post

Our Android app needs to display a list of articles stored in a Firebase RemoteDatabase.
What are the options we have?


Image for post
Image for post

What do we need in the app?

  1. Create a view (dialog, popup, card, …) to ask for rating. In this example, we are using a simple dialog with Yes or Not Now options
  2. Place the rating view behind a Remote Config condition:
if (firebaseRemoteConfig.getBoolean(SHOULD_SHOW_RATING_DIALOG)) {
showRatingDialog();
}

3. Check for remote config updates. This can be done every time the app is launched or when opening a specific activity.

firebaseRemoteConfig.fetch()

What do we need in Firebase?

  1. Define a Remote Config boolean property. This property will have a default value of false and will only become true if a certain condition is met.

About

Luis G. Valle

I do Android @Travelperk

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store