以下、どっちがいいか。
void setScore(int score) {
this.score = score;
}
void setScore(int score) {
mScore = score;
}
もう、ええわ。
ありがとうございました。
Does Android team starts to abandon Hungarian Notation? : androiddev
以下、どっちがいいか。
void setScore(int score) {
this.score = score;
}
void setScore(int score) {
mScore = score;
}
もう、ええわ。
ありがとうございました。
Does Android team starts to abandon Hungarian Notation? : androiddev
今回もまた、和暦と西暦の変換の方法とか。
昭和:元号に25を足すと西暦。
平成:元号から12を引くと西暦。
?? : 元号に18を足すと西暦。
面倒ですね。
一方、Android OS (API) バージョンの呼び方。
19 KITKAT 4.4 - 4.4.4 KitKat
21 LOLLIPOP 5 Lollipop
22 LOLLIPOP_MR1 5.1 Lollipop
23 M 6 Marshmallow
24 N 7 Nougat
25 N_MR1 7.1 Nougat
26 O 8.0 Oreo
27 O_MR1 8.1 Oreo
28 P 9.0 Pie
Android バージョンやコードネームなどからのシェアの一覧取得
I want a lint check that bans the use of Build.VERSION_CODES constants. I don't care about letters or the (even worse) codenames. API docs, lint output, build.gradle files, and AS use numbers. There's a difference between magic constants and constants and these are the latter.
— Jake Wharton (@JakeWharton) 2018年10月8日
同じ意味なのに別の呼称があることは、少し考えての変換が必要になる。
いらなくね? 元号とかコードネームとか。
まあ、コードネームを付けることで話題として取り上げやすくはなるわな。
キャバ嬢の「平成生まれ」をうれしがってた時もあったけどなあ。
jitpack で配布しているライブラリに不必要な怪しい通信処理を入れて
Bintray -> jcenter() 経由で同じアーティファクトidで配布してる「Jake Whaarton」さん。
これは、神と呼ばれるJakeWarthonさんの偽物です。
Jake Wharthon → 本物
Jake Whaarton → 偽物
少し話題になってましたね。
A Confusing Dependency : androiddev
JitPackで配流しているライブラリと同じidのマルウェア入りアーティファクトがjcenterにあってそれが使われたという件。 / “A Confusing Dependency” https://t.co/cY3at8ZIzh
— FUJI Goro (@__gfx__) 2018年12月13日
すると、本物JakeさんのTwitterが!!
Jake Whaarton(@JakeWharton)さん | Twitter
なりすましてます、本物が偽物に。
この話を、解説しています。
Artifact integrity verification aside, not only should jcenter() always be last, but you need to put mavenCentral() before them. JCenter and Bintray keep proving they're not a trustworthy artifact host. Ideally you fetch nothing from them.https://t.co/5R6qS2cxQv
— Jake Whaarton (@JakeWharton) 2018年12月13日
アーティファクトの整合性の話は別にして、jcenter() を常に最後に置くだけでなく、mavenCentral() をそれらの前に置くことも必要です。
JCenter と Bintray は、信頼できるアーティファクトホストではありません。理想的なのはそれらから何も取得しないことです。
上から読んでいくリポジトリ群指定の最下位にオープンすぎる jcenter() を置くべし、と言っています。
repositories {
//...
mavenCentral()
jcenter()
}
しかし、ワロタ。
android - Why does the Google maven repository exist and when should I use it? - Stack Overflow