Git is a popular distributed version control system, which helps keeping track of changes less hassle. In some scenarios, we might want Git to ignore some changes or hide them from Git. In this post, we’ll explore a couple of ways to do so. Basics Let’s go back basics first. There’re 3 states in Git, namely modified, staged and committed. These states apply to files on which Git has an eye. For those Git doesn’t track yet, we have another state named untracked—they are listed under ...| Vinh Nguyen's Blog
Recently, I’ve been getting more involved in front-end development. The more I do, the more my mind and my soul get lost in its chaotic world. Even a simple To–Do–List app can easily require a bunch of tools—ESLint, Babel, Webpack, to name a few—and packages just to get started. Fortunately, there’re many starter kits out there so we don’t have to do from the ground up. With them, everything is already set up so we can start writing the first line of code right away. It saves ti...| Vinh Nguyen's Blog
Writing an iOS app nowadays is pretty simple, however, a performant one requires more effort in many aspects from algorithm optimization to system related actions. The rule of thumb for most of cases is to keep heavy, time-consuming jobs away from main thread yet ensure that calls to UIKit or UI-related happen in the main thread. That helps the app be responsive and avoid sluggishness while using to bring a better experience to users. Dispatching jobs to the corresponding thread is actually d...| Vinh Nguyen's Blog
In a recent project, I needed to display and edit bullet lists on iOS, i.e. as part of a rich text editor. After rounds of searching on Google and Stack Overflow, I could not find any satisfying answers. The most common solution is adding a bullet character right in front of each item in the list, which is good enough in most of cases, but not in mine. So what exactly are my requirements? Quite straightforward, just few things: First, of course, display a bullet list. When changing text align...| Vinh Nguyen's Blog
Either you are an iOS, macOS developer or developing something in Apple ecosystem, you must be familiar with one file called Info.plist. At some point in development, for sure you want to release a new version of your app and increase that version number. With the recent find of the existence of PlistBuddy, it would be interesting to give it a try and also a small exercise for my shell scripting skill. As so this post will be about to create a simple shell script to bump version with help Pli...| Vinh Nguyen's Blog
“Should I use struct or class?” is a common question of Swift developer. There may be something you also hear over and over again like: struct is value-semantic, struct is faster. Is it really as it being said or is there anything hidden behind? Let’s find out! Value-semantic It is obvious to say that struct is a value type. That means you don’t need to worry about unintended changes of value when passing around variables. For example: structBackpack{varnumberOfCompartments:Int}letmyB...| Vinh Nguyen's Blog
In previous part, we talked about 4 properties of UIView and relationships between them. This part we cover operations with transform and how to persist UIView information. Let’s go! transform operations transform is type of CGAffineTransform and it represents a matrix used for affine transformation. Speaking of the matrix and and affine transformation, it is beyond context of this article, but if you wonder and want to learn more, this wiki would be a good start. In brief, transform includ...| Vinh Nguyen's Blog
Working with transform property of UIView might be frustrated at the first time. Confusion of using transform leads to difficulty in controlling UIView as well as persisting UIView information. This article helps demystify this. Basics Before going clarify transform property and how it works, let’s remind some basics. With a bunch of properties and methods in UIView, there are only four that we need in context of this article and the rest of it focuses only these four properties to try to e...| Vinh Nguyen's Blog
Learn and share to become better| Vinh Nguyen’s Blog
ReSwift, a weird use case| Vinh Nguyen’s Blog