Here my "minimal" setup to work on a Mac as an Android Developer
- Format disk as
Case sensitive, journaled
Why?- To be able one day to compile Android AOSP
- Install Mac OS
- Chose English language
- Skip the apple login
- Install Chrome
public abstract class Response { | |
private final int httpCode; | |
public int getHttpCode() { | |
return this.httpCode; | |
} | |
private Response(int httpCode) { | |
this.httpCode = httpCode; | |
} |
sealed interface Response { | |
val httpCode: Int | |
} | |
data class Success( | |
override val httpCode: Int, | |
val data: String | |
) : Response | |
data class Fail( |
public interface Response { | |
int getHttpCode(); | |
} | |
public final class Success implements Response { | |
private final int httpCode; | |
@NotNull private final String data; | |
public int getHttpCode() { | |
return this.httpCode; |
sealed class Response(open val httpCode: Int) | |
data class Success( | |
override val httpCode: Int, | |
val data: String | |
) : Response(httpCode = httpCode) | |
data class Fail( | |
override val httpCode: Int | |
) : Response(httpCode = httpCode) |
sealed class Response | |
data class Success( | |
val data: String | |
) : Response() | |
data object Failed : Response() |
enum class Response { | |
SUCCESS, | |
FAIL | |
} |
sealed class Response { | |
abstract val httpCode: Int | |
} | |
data class Success( | |
override val httpCode: Int, | |
val data: String | |
) : Response() |
Here my "minimal" setup to work on a Mac as an Android Developer
Case sensitive, journaled
Why?
Like Robert C. Martin (clean architecture) would say on this video,
Imagine I'm your CTO, as your CTO I expect you to follow this principles:
Please, first, checkout Developer: Principles. These Android developer principles are the "implementation details" of developer principles on the Android world.
The following advices are very opinionated. Before saying "bullshit", please read the why below in the Details section. One of the main ability of developer is to understand the why. (This advice apply to myself of course. Every tool I'm criticising exist because of a why that I consider less important than the alternative. But for sure, you can disagree).
The goal of this document is more to start a reflection than make you think twice of your code.