-
Pagination with JSON
JSON(JavaScript Object Notation) format is a popular way to represent resources in order to communicate between a client and a backend. Compared to XML, it is more concise, compact and human-readable. JSON has two types: object and array. Array is the type to contain multiple objects. Depending on the number of resources you want to get, a different type could...
-
Gradle Plugin for Travis and Coveralls
If you think to make an open source project, Travis CI is a good choice for the continuous integration. It is well known and documented. Moreover, there is no charge for open source projects :). With the continuous integration, you can check easily whether your build is broken or not after you submit a commit or merge a pull request....
-
Use TimeUnit for Readability
One day is 24 hours. One hour is 60 minutes. One minute is 60 seconds, and One second is 1000 milliseconds. It is straightforward. Then, can you easily say hours from below milliseconds? 86,400,000 If this is a bit hard, how about this form? 1000 * 60 * 60 * 24 1000 * 60 is one minute. and one minute...
-
YAML vs JSON
JSON JSON(JavaScript Object Notation) is wildly used for a client and a server communication. It is a simpler way to represent the data compared to XML(Extensible Markup Language). As you can see the below example, JSON is significantly less verbose than XML. Especially, there is no opening and closing tags in JSON. JSON { "person": { "firstname": "Tom", "lastname": "Smith",...
-
Don't Use System.currentTimeMillis() for Time Interval
Measuring time interval is implemented in many application. For example, Running application measures a runner’s record. How can you implement it? In Android, System.currentTimeMillis() returns the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. Using this method to measure the time interval sounds quite reasonable. So, you can simply think below implementation. // Store...
-
Continuous Integration, Delivery, and Deployment
A team need to build and deliver software more rapidly. By doing it, it is easier to understand what users want and to build a successful software. It sounds easy but reality is not. Especially, the more programmers are working, the more difficult it is. Several software development practices have been introduced to ease the process, and those can be...