Hey there, I am back again. Ops I forget to share a lot of tech articles and to share my tech journey and some stories behind it. Yesterday , it was an awesome day for many developers. What was really special yesterday, right ? So, let me share for you and you can also learned from it.
How many of you know about GDG Kathmandu?
So GDG Kathmandu is a group of developers, Google technology enthusiasts, and Googlers from around Kathmandu valley and other parts of Nepal. This active community gives the platform to developers and tech enthusiast to discuss, share their ideas, learn and plans related to tech. Wanna know more about it. Check this out .
Great right? I was having both good news and bad news !!!
So what was about bad news right?
The bad new was that our country was disrupted by natural disaster and still. You may have heard news about flood not only in Kathmandu valley , all over the place of Nepal. Some lost their families ,and many things. God bless you too to live happy life. Stay alert. And one more thing, I thought that the GDG Kathmandu event is not gonna run enough because of rain and many developers don’t wanna participate in these event due to it. But Nothing stops for Developers, tech enthusiast. They came up, enjoy a lot and finally event was successful.
What did I learn in Kotlin session?
First of all, I would like to thanks to GDG for giving this platform. I was selected in both Codelabs of Kotlin and Flutter .I just knew only basic programming concepts and willing to explore more on it. Kotlin and Flutter comes up like a dual awesome food . Yes, I was going to look up flutter sooner. But it catches me early from yesterday. There were session on Welcome Keynote too by Suresh Ghimire who is the current organizer of this event. Thanks for welcoming and knowing more about GDG Kathmandu. Announcement was performed by Nashala Joshi, who is current leader of tech women makers. I met senior who share in what they are passionate about. I attend last session after it of Kshitiz Rimal about ML on the edge of Tensorflow Lite. It was great session. After that I went to kotlin session. I missed other session too. There were great session too told by others developers who attend on it. Thanks to all.
Kotlin was new for me. Our mentor was Santosh Dhakal. He is an Android Developer at Young Innovations. He loves developing apps in Kotlin. He also has an interest in hybrid app development with Flutter. Currently, he is developing an app which facilitates post-earthquake reconstruction . So after the end of session, I went to my hostel and I researched something on it . And let me share it if you are interested in it.
Do you wanna know or not?
If not then you can skip this topic.
Let’s go from the noob level.
Kotlin has statically typed programming language for the modern multi-platform application.You can build an app for JVM (Java Virtual Machine), Android devices and browser too.
So, Why to learn Kotlin ?-
Actually , I am not an expert in Kotlin. But these are the views shared by seniors developers. It is the best option for new beginner developers who wanted to switch to android development as career. Kotlin is the official programming language for Android Development too. Community is still growing exponentially. And there is a huge support for beginners too.
Hello world program
Most of the developers start their specific programming journey by hello world. I mean you write simple code to print hello world in order to understand it. This is common to developers.
Feeling bore right ?
Setup your environment in any platform either in windows, macOS or Linux distributions. Right now , I am using Ubuntu. You can use any one. First of all , you should install Java Development Kit and IDE for Kotlin .
You have to install java development kit which is suitable for my computer OS. Right now, I will not talk more about JDK and it’s ecosystem. Sooner, new article will come up on it. You can install through this link.
Congratulation, you are one more step ahead
To check out whether your system has installed JDK or not, you can try in your command-line interface.
In windows, go to search and type cmd. New terminal will popup and type java.
In Linux, go to terminal and type java.
There are many IDE for kotlin. IntelliJ is the best and most popular IDE for Kotlin. You can go to official site to download and install. I prefer you to install community edition. Here is the link for download.
Boom, you set up your environment.
The above program was was weird right. Now go to IDE and run it. Here is the link to how to set up Kotlin projects.
Write below code and run it.
In the below, we see text as Hello, world ! ! !. Here,
// denotes the comment in code.
This is the function
main, which is mandatory in every Kotlin application. The Kotlin compiler starts executing the code from the function
The function takes array of strings as a parameter and returns Unit. You will learn about functions and parameters in later articles.
println() prints the given message inside the quotation marks and the new line to the standard output stream. In this program, it prints with
- Kotlin and Java can be used together in the same project.
- Object of Java can be created in Kotlin and vice versa too.
- You can also convert Java code to Kotlin code.
Semicolon is optional in Kotlin
There were many topics which I haven’t share from Object Oriented to Functional programming concept. Sooner, I will be sharing on those too.
Today this is enough or may not be enough for you. There was Flutter session too. I will be sharing on that too. Stay tuned and happy coding.