-
Print Logs Without Code Change in Android
While developing an application, you need to check if it works as you expected. Typical points to check are variable values and method calls. For that, you can add some logs and verify whether a value is correct or a method is called. In Android, Log class provides logging with different levels (e.g. error, warn, info, debug). @Override protected void...
-
Amend Your Commit than Make Follow-up Commits
GitHub supports good ways to collaborate with other engineers. Especially, pull requests let you tell others about your changes. Based on a pull request, you can get a review from others or can discuss. When reviewers give you feedback, you can create another commit to apply it. These commits are called follow-up commits. This is a typical and suggested flow...
-
Share Your Bash Configuration for All Your Computers
In the bash configuration (.bash_profile or .bashrc), you can set up useful things to help your command line interface. For example, alias and function can be set to make a shortcut command for a longer command. Environment variables are also configured so that other applications can refer a proper value. .bash_profile # Alias ll='ls -lh' # Function print-last-release() { git...
-
Never Used? @UsedFromNativeCode
Android NDK(Native Development Kit) is a tool that allows you to implement parts of your application in native code, using C and C++ language. The main reason to use native code is performance. Native code is complied to a binary and it runs directly on OS. In Android, Java code is translated into Java byte-code. Unlike native code, it is...
-
How to Set Up Picasso for Robolectric Test
Running tests on an emulator or device is slow. For Android, Robolectric brings faster and reliable unit tests because it runs on the JVM. With Robolectric, you can test Android components such as Activity and Fragment. When you test those components, you need to consider something more because they are not a pure business logic class. For example, it could...
-
Using Git Worktree to Deploy GitHub Pages
GitHub Pages is a website hosted directly from your GitHub repository. Generally, it is used together with static site generators. Static site generators (e.g. Jekyll, Hugo, and Gitbook) make the process of making a site easily and the generated HTML pages can be hosted on GitHub Pages. When you use static site generators, there would be sources and generated files....