Basics of Git for beginners


You can use this article to revise and copy-paste the git commands quickly if there’s a need. This article is For the beginner, By a beginner, and to the beginner.

What is Git

Git is the coolest thing when it comes to tracking changes in any set of files, coordinating work among programmers during software development. Developers rely on Git for version control.

What is Version Control?

Version control, also known as source control, is the practice of tracking and managing changes to software code. It records changes to a file or set of files over time so that you can recall specific versions later.

Git is…

Programming Language for Android

Kotlin Overview

  • Kotlin is a JVM language.
  • It needs Java Virtual Machine to execute its bytecode.
  • Compatible with Java (and Android APIs).
  • Modern language features.
  • It has support to provide NullPointerException.
  • It is an Object Oriented Programming language.
  • Functional Programming Language. We can pass a function as a parameter to another function. Or a function can return another function.
  • Concise, Less boilerplate.

Declaring variables

In Kotlin, variables are declared using var keyword and constants are declared using val keyword.

Life of Android Activity

Android activity
Android activity

Well it’s not the tinder app but “any screen shown to the user is an activity”. In this case, we are seeing the log in activity of Tinder.

We know activity but what’s lifecycle?

Activity goes through many states. These states represents activity lifecycle. For example, a car has states like engine is off, engine is on but not moving, in motion, at rest, etc. You get the idea.

Understanding concepts of Touch framework

Android Touch

Hello fellow developers, in this article I am going to discuss about the Android touch framework, how the touches flow through the application and how Android handles all of those events.

How Android deals with Touch

Every touch event into your application is wrapped up as a MotionEvent. These MotionEvent contains description of action and some metadata such as location of touch event on the screen. Some of the actions are as follows :

  • ACTION_DOWN : when finger touches the screen
  • ACTION_UP : when finger leaves the screen
  • ACTION_MOVE : when moving finger on the screen


Programming Language for iOS

Swift 5
Swift 5
Swift for iOS

Swift Overview

Swift is a general-purpose, multi paradigm, object-oriented, functional, imperative and block structured language.

Some additional features of Swift include:

  • Closures unified with function pointers
  • Tuples and multiple return values
  • Generics
  • Structs that support methods, extensions, and protocols
  • Functional programming patterns, e.g., map and filter
  • Powerful error handling built-in
  • Advanced control flow with do, guard, defer, and repeat keywords

Swift uses Automatic Reference Counting (ARC) to manage memory.

Swift is a type safe language, means you cannot assign an integer value to a string variable, this will be detected at compile time.

If you’re not using type…

Android Interview for small businesses

android interview
android interview

Since I’m an Android developer I’ll be using the term ‘android’ but this article is still relevant to any engineering candidates.

I will be sharing about an interview for the role android developer that I have gone through. This interview was for a small organization, a startup. Some big organization interview pattern may be very different from this.

There are generally three parts to an interview:

  1. Introduction
  2. Technical
  3. HR round

1. Introduction

Organizing your Android App

android architecture
android architecture

The way in which a new Android developer organizes the code becomes problematic as soon as the size of the app increases. Almost all of the code resides in an activity and the activity becomes too much congested. The activity acts as both view and the controller.

All the functions, views and business logic is managed by a single activity. This is a very bad architecture. Some of the problems in such architecture are as follows :

  • No clear separation of concern
  • Difficult to unit test
  • Tight coupling
  • Unmanageable, congested and pain in the eyes

To solve this problem the…

Programming Language for Android


Hi, welcome to the second part of the article. You should also look at the Part 1 of the article.


In Kotlin, by default classes are public and final i.e. it is not open for inheritance. We need to make it open for inheritance by using open keyword.

When we open a new activity from an activity itself, we can send data to it by using an intent and putExtra() method. But what if we also want to get something back? This is what the startActivityForResult() method is for. By opening our child activity with this method and overriding onActivityResult() we can send data back to our parent activity after we set it with setResult() in our child activity before we close it.

Step 1 — Starting a new activity for result

MainActivity.javaint REQUEST_CODE = 1;
Intent intent = new Intent(MainActivity.this, ChildActivity.class);
intent.putExtra("number1", number1);
intent.putExtra("number2", number2);
startActivityForResult(intent, REQUEST_CODE);

We need the REQUEST_CODE to identify the request…

Since the Android system uses the default no-arg constructor when recreating a fragment, we should not pass values over an overloaded constructor with arguments when we instantiate it.

The correct way to instantiate a new fragment and passing values to it, is by creating a bundle, setting arguments on this bundle using setArguments() method and then passing it to our fragment. Inside the fragment we then retrieve this bundle and get the values out of it. A clean way to do this is by creating a “factory method”.

I hope you learned something! Thank you for reading.

You can find me on Twitter and Linkedin!

Click the 👏 to show your support and share it with other fellow Medium users.

Adil Khan

Mobile Application Enthusiast, an Android developer and a keen observer of life

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store