deathrid
deathrid
No body
62 posts
Don't wanna be here? Send us removal request.
deathrid · 6 years ago
Text
Move to the new blog
Move to the new blog
Hey, my dear readers, I’ve moved my WordPress blog to here. I really appreciate that you love to read my articles. Please keep following me!!
Merry Chrismas.
View On WordPress
0 notes
deathrid · 6 years ago
Text
[Tips] Something interesting about foreach() in TypeScript
[Tips] Something interesting about foreach() in TypeScript
This is just a note for myself. There are several ways to visit every element in a list. The most known way is for-loop. There are two different kinds of for-loop. One is foreach loop. Another one is traditional for-loop. Let’s check some examples.
foreach()
const array1 = ['a', 'b', 'c']; array1.forEach(item => { console.log(element); });
(more…)
View On WordPress
0 notes
deathrid · 6 years ago
Text
Composition over inheritance
I recently got a question about why using interface would be better than using inheritance. I got this is because we defined lots of interfaces (behaviors) in recent project. And, I am not saying this is good or bad, but just wanted to think of it deeper why we do that. Another reason that makes me think is that, I confuse if some classes share the same behaviors, my first thought from Java world…
View On WordPress
0 notes
deathrid · 6 years ago
Text
TypeScript - Interface (I)
TypeScript – Interface (I)
I found the concept of Interface is quite fun, cause no matter what kind of languages, e.g. Golang, Java, Kotlin, etc. Even Swift/Objective-C also provide similar concept protocol to support the polymorphism. Then, let’s check what power TS interface gets.
One of TypeScript’s core principles is that type checking focuses on the shape that values have. This is sometimes called “duck typing” or…
View On WordPress
0 notes
deathrid · 6 years ago
Text
Load test by Artillery.io - Concept Introduction
Load test by Artillery.io – Concept Introduction
As a noob’s note, I think it’s really necessary to record how to use Artillery for loading test. I think there are so many loading test library, check these out:
Gatling
JMeter
Locust
Wrk
k6
You can read this postto get more detail information. I choose Artillery is not because I love this tool, it’s just because we use that in our project. After doing some researches and actually adapting to…
View On WordPress
0 notes
deathrid · 6 years ago
Text
[Notes] Editor.Rules in VS Code
[Notes] Editor.Rules in VS Code
Just a note for myself to remind to how to setup a vertical ruler to notify me, a developer, the code character limitation.
Tumblr media
The right most vertical white line is the ruler. I am using the VS Code Version: 1.38.0.
Here is the way to set:
Preferences -> Settings -> In User tab, or Workspace tab.
Search editor.ruler.
insert “editor.rulers”: [100] to the settings file:
{ "window.zoomLevel":…
View On WordPress
0 notes
deathrid · 6 years ago
Text
[Devops] Continuous Integration + Issue Tracking system + Git settings
[Devops] Continuous Integration + Issue Tracking system + Git settings
Just a note for myself to remind me how to setup the CI/CD, git commit message template and integrating both Github and YouTrack for mobile projects. Let’s start from the easiest part – Git commit message template.
(more…)
View On WordPress
0 notes
deathrid · 6 years ago
Text
Tips - object in Kotlin
Tips – object in Kotlin
You might know the Singleton design pattern. And also, I guess you should also know how to use singleton pattern in Kotlin. But if you don’t know, don’t worry about that. Let me show some examples first.
(more…)
View On WordPress
0 notes
deathrid · 6 years ago
Text
Tips - object in Kotlin
Tips – object in Kotlin
You might know the Singleton design pattern. And also, I guess you should also know how to use singleton pattern in Kotlin. But if you don’t know, don’t worry about that. Let me show some examples first.
(more…)
View On WordPress
0 notes
deathrid · 6 years ago
Text
buildSrc folder for Android Project
buildSrc folder for Android Project
I think android developers nowadays are using the Gradle as the default build tool and manage the build process. For multiple modules in your project, you might have several ways to manage your import dependencies.
(more…)
View On WordPress
0 notes
deathrid · 6 years ago
Text
[Notes] import from V.S. import require in TypeScript
[Notes] import from V.S. import require in TypeScript
This is just a note for myself to explain what’s difference between import from and import require.
In the TypeScript project, you might sometimes see people use:
import uuid = require('uuid');
But you can see another way like this:
import uuid from 'uuid';
(more…)
View On WordPress
0 notes
deathrid · 6 years ago
Text
Dagger tips: the potentiality of Constructor Injection
Dagger tips: the potentiality of Constructor Injection
Remember my posts [Dagger tips for using AndroidInjector] and [Dagger tips for modularization]? I didn’t talk too much about the constructor injection way in the project. But it has great potentialities to let your injection more robust and more flexible. Let’s see how we can use constructor injection for providing multi-source injection for the different release version.
Check the repo[click here
View On WordPress
0 notes
deathrid · 6 years ago
Text
Generic Programming in Go - Interface {}
Generic Programming in Go – Interface {}
I used to write Java, Kotlin, ObjC, and Swiftlanguages before, cause I am basically a mobile engineer. After doing the backend stuff in Go, I start thinking that’s totally another world. Golang is really an interesting language. I learn a lot from it and I have to say, fortunately, it’s an open source language which means you can directly read the source code to see what the fuck is going on…
View On WordPress
0 notes
deathrid · 6 years ago
Text
[time limited offer] Alaska Airlines Visa® Credit Card 40,000 miles + 100 statement credit
[time limited offer] Alaska Airlines Visa® Credit Card 40,000 miles + 100 statement credit
算是滿高的 offer. 要申請的參考這邊 (time limited offer)
卡片特色:
開卡 90 天內花 USD 2000 可以得到 40k miles 跟 USD 100 的 statement credit (不是直接給你錢, 是給你 credit 折抵).
每年繳完年費(含開卡年)可以花 USD 121 (USD 99 plus taxes and fee from USD 22) 的同行機票 (俗稱基友票), 適用所有的 Alaska 航線.
Alaska Airlines 相關消費 得到 3x Alaska miles, 其他消費得 1x.
Free checked bag (最多六個同行者).
新增福利: 50% off 的 Alaska Lounge 以及 20% back on all Alaska Airlines inflight…
View On WordPress
0 notes
deathrid · 6 years ago
Text
[Notes] Import path in TypeScript
[Notes] Import path in TypeScript
My colleague mentioned about one question:
why do we do our imports as relative paths rather than absolute paths? It’s not easy to figure out what’s the correct path.
We then start discussing about the what are the pros and cons for using absolute path or relative path. In my understanding, I always voted for relative path, cause that won’t cause a problem when we try to deploy the service into…
View On WordPress
0 notes
deathrid · 6 years ago
Text
Kotlin Multiplatform Programming
If you remember that, I recently read the source code of Kotlin Coroutines, and share something I learned from the source code, [Introduction], [Suspend, Resume and Dispatch]. I found something really interesting but I’ve never use it before.
(more…)
View On WordPress
0 notes
deathrid · 6 years ago
Text
Android Coroutines - Suspend, Resume, and Dispatch
Android Coroutines – Suspend, Resume, and Dispatch
In the <a href="https://chauyanw.wordpress.com/2019/08/18/android-coroutines-introduction/">Introduction</a> section, we already know some detail about the Coroutines included what it is, how we can use it, and what’s the concept of the Coroutines. I think an important thing is:
What’s a suspend function?
Remember the example we use before:
suspend fun requestToken(): Token { ... } suspend fun…
View On WordPress
0 notes