Skip to content

Instantly share code, notes, and snippets.

View alorma's full-sized avatar
🤡

Bernat Borrás Paronella alorma

🤡
View GitHub Profile
@Sloy
Sloy / local.settings.gradle.kts
Last active October 25, 2022 10:56
Replacing libraries with local projects in Gradle. More https://publicobject.com/2021/03/11/includebuild/
val CaptainCrunch = Lib("../android-common--lib-android-captain-crunch", "com.adevinta.android:captaincrunch" to ":captaincrunch")
val AndroidExtensions = Lib("../android-common--lib-android-extensions", "com.adevinta.android:android-extensions" to ":android-extensions")
val Barista = Lib("../Barista", "com.schibsted.spain:barista" to ":library")
val AbTestingRunner = Lib(
"../android-common--lib-abtesting-runner",
"com.adevinta.android:abtesting" to ":abtesting",
"com.adevinta.android:abtesting-apptimize" to ":abtesting-apptimize",
"com.adevinta.android:abtesting-optimizely" to ":abtesting-optimizely",
"com.adevinta.android:abtesting-debug" to ":abtesting-debug",
"com.adevinta.android:abtesting-debugdrawer" to ":abtesting-debugdrawer",

Reverse interview

Engineering

  1. What tech stack do you use? Are you rolling out new technologies or sunsetting older ones? Do you have any legacy system that you need to maintain?
  2. What is your maturity stage? Finding a direction, feature work, maintenance...
  3. What are the next big engineering challenges you will face?
  4. How are requirements delivered to the engineering teams? How are technical decisions made and communicated?
  5. What level of involvement do engineers have in relation to architecture and system design? How much freedom for decision making do individual developers have? What happens if an engineer identifies areas of improvement?
  6. What is the junior/senior balance of the team?
@aballano
aballano / ThenRx.kt
Created November 16, 2018 09:09
Mockito & RxJava extensions to facilitate mocking
@JvmName("thenErrorObservable")
fun <T> OngoingStubbing<Observable<T>>.thenError(throwable: Throwable) {
thenReturn(Observable.error(throwable))
}
fun OngoingStubbing<Completable>.thenComplete() {
thenReturn(Completable.complete())
}
@JvmName("thenErrorCompletable")
@amake
amake / android-7-localization.org
Last active July 25, 2023 22:34
Correct localization on Android 7

Correct localization on Android 7

Prior to Android 7, the system had a single preferred locale, and fallback behavior was quite rudimentary. Starting with Android 7, the user can now specify a priority list of locales, and fallback behavior is improved.

However, in many cases it is still surprisingly difficult to make full use of locale fallback, and there are some hidden gotchas when trying to fully support both Android 7 and earlier versions.

/*
* Copyright 2016 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@alxsimo
alxsimo / RxFirebaseRemoteConfig.java
Last active December 15, 2016 16:42
[Rx] RxFirebaseRemoteConfig
package com.milanuncios.milanunciosandroid.common.remoteconfig;
import com.alexsimo.toolbelt.optional.Optional;
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
import com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings;
import com.milanuncios.milanunciosandroid.BuildConfig;
import java.util.Map;
import rx.AsyncEmitter;
import rx.Observable;
@pkramme
pkramme / getch.h
Created July 3, 2016 14:48
getch.h
#ifndef _GETCH_H_
#define _GETCH_H_
#include <termios.h>
#include <unistd.h>
#include <stdio.h>
/* reads from keypress, doesn't echo */
int getch(void)
{
@gabrielemariotti
gabrielemariotti / README.md
Last active March 1, 2024 15:46
How to manage the firebase libraries in a multi-module projects

Centralize the firebase libraries dependencies in gradle

ext {
      firebaseVersion = '9.0.0';

      firebaseDependencies = [
              core :         "com.google.firebase:firebase-core:${firebaseVersion}",
              database :     "com.google.firebase:firebase-database:${firebaseVersion}",
              storage :      "com.google.firebase:firebase-storage:${firebaseVersion}",
@pedrovgs
pedrovgs / MVP_discussion.md
Last active August 2, 2023 16:53
Interfaces for presenters in MVP are a waste of time!

##Interfaces for presenters in MVP are a waste of time!

It's been a long time since we started talking about MVP. Today, the discussion is about if creating an interface for the Presenter in MVP is needed.

This is the Model View Presenter pattern's schema:

MVP Schema

In this schema the Model box is related to all the code needed to implement your business logic, the presenter is the class implementing the presentation logic and the view is an interface created to abstract the view implementation.

public final class Result<S, F> {
private final Optional<S> success;
private final Optional<F> failure;
public Result(Optional<S> success, Optional<F> failure) {
this.success = success;
this.failure = failure;
}