Kotlin: A Language for Modern Multi-platform Applications
Kotlin is a multi-platform programming language that is concise, safe, interoperable and tool-friendly. It is a statically-typed programming language that runs on the Java virtual machine and can also be compiled to the JavaScript source code or can use the LLVM compiler infrastructure.
The choice of a programming language is a crucial factor in the effective implementation of any software project. In the modern multi-platform era, it is important that a language has the capabilities to address the specific needs of the platform being used. Kotlin is an emerging programming language with which you can build applications belonging to any of the following categories—native, browser-based, Android and JVM based. This article explores the rich array of features that Kotlin offers.
Programming languages play an important role in deciding the speed at which the applications are built. Apart from deciding the development time, the optimality of the implementation is also affected by the choice of the programming language. These days, there are many programming languages to choose from. However, there are various factors that determine which language one selects, such as platform support, availability of support libraries, community help, documentation, etc. So let us explore Kotlin in this context.
The Kotlin language was designed by JetBrains, and there are many open source developers who have contributed to its evolution. It was released in 2011 and its latest stable release, version 1.2.30, came out in March 2018. Kotlin is an actively maintained programming language with a growing developer support base. It is a statically typed programming language, and the licensing associated with it is Apache 2. Its design is influenced by other popular programming languages such as Java, Scala, etc. One of the design philosophies behind Kotlin is to develop a language that combines the feature set of Scala with the compilation speed of Java.
7 Super Useful Aliases to make your development life easier
npm install --save express
sudo apt-get update
brew cask install docker
Commands like these are our daily routine. Software Developer, Dev ops, Data Scientists, System Admin or in any other profession, we need to play with a few regular commands again and again.
It’s tiresome to write these commands every time we need them ?
Wouldn’t it be better if we could use some kind of shortcuts for these commands?
Meet Your Friend — Alias
What if I tell you that you can use
nis express
Instead of
npm install --save express
Stay with me, we’ll find out how ?
What’s alias ?
It’s a text-only interface for your terminal or shell commands that can be mapped with longer and more complex commands under the hood!
How ?
Open your terminal and type alias then press Enter
You’ll see a list of available aliases on your machine.
If you look closely you’ll find a common pattern to use aliases –
alias alias_name="command_to_run"
So, we’re simply mapping commands with names! (almost)
Let’s Create a few
NOTE: For the purpose of this tutorial, please keep your terminal open and use one terminal to test these aliases. use cd if you need to change directory.
1. Install node Packages
npm install --save packagename ➡ nis packagename Type the command below in your terminal and press Enter –
alias nis="npm install --save "
Now, we can use nis express to install express inside your node project.
alias update='sudo apt-get update && sudo apt-get upgrade'
Persistant Aliases
You’ve learnt how to create aliases. Now it’s time to make them persistent throughout your system. Depending on what type of shell/terminal you’re using you need to copy-paste your aliases inside ~/.bashrc or ~/.bashprofile or ~/.zshrc if you’re using zsh as your default terminal.
Example:
As I’m using zsh as my default terminal, I’ve to edit ~/.zshrc file to add my aliases. First of all let’s open it with admin access with sudo vim ~/.zshrc .
Now, I need to paste my alias/aliases like alias hs='history | grep' then exit with saving by entering :wq inside vim
Then to take effect I need to execute source ~/.zshrc and restart my terminal. From now on, the hs command will be available throughout my system ?
Bonus
oh-my-zsh is a great enhancement for your terminal which comes with some default aliases and beautiful interface.