Kotlin Tutorial #2: Installing Kotlin and Your First Program

In the previous tutorial, you learned what Kotlin is and why developers love it. Now it is time to install Kotlin on your computer and write your first program. In this tutorial, you will: Install IntelliJ IDEA (the best IDE for Kotlin) Create a Kotlin project Write and run your first programs Try the Kotlin REPL Use the Kotlin Playground (no installation needed) Option 1: Kotlin Playground (No Installation) If you want to try Kotlin right now without installing anything, go to the Kotlin Playground. ...

March 19, 2026 · 8 min

Kotlin Tutorial #3: Variables, Types, and Type Inference

In the previous tutorial, you installed Kotlin and wrote your first programs. Now let’s learn about variables and types — the building blocks of every Kotlin program. In this tutorial, you will learn: The difference between val and var All basic types in Kotlin How type inference works How to convert between types How to use constants with const val val vs var Kotlin has two keywords for declaring variables: ...

March 19, 2026 · 7 min

Kotlin Tutorial #4: Null Safety — Kotlin's Best Feature

In the previous tutorial, you learned about variables and types. Now let’s learn about null safety — the feature that makes Kotlin truly special. NullPointerException (NPE) is the most common crash in Java and many other languages. Tony Hoare, who invented null references in 1965, called it his “billion-dollar mistake”. Kotlin solves this problem at compile time. ...

March 19, 2026 · 7 min

Kotlin Tutorial #5: Functions, Default Parameters, and Named Arguments

In the previous tutorial, you learned about null safety. Now let’s learn about functions — the building blocks that organize your code into reusable pieces. Kotlin functions are more powerful than Java methods. They support default parameters, named arguments, single-expression syntax, and much more. In this tutorial, you will learn: ...

March 19, 2026 · 7 min

Kotlin Tutorial #6: Control Flow — if, when, for, while

In the previous tutorial, you learned about functions. Now let’s learn about control flow — how to make decisions and repeat actions in your code. Kotlin’s control flow is similar to Java, but with important improvements. if and when are expressions that return values. when replaces switch and is much more powerful. ...

March 19, 2026 · 8 min

Kotlin Tutorial #7: Classes, Objects, and Data Classes

In the previous tutorial, you learned about control flow. Now let’s learn about classes — the foundation of object-oriented programming in Kotlin. Kotlin classes are more concise than Java classes. What takes 50 lines in Java takes 1 line in Kotlin with data classes. In this tutorial, you will learn: ...

March 19, 2026 · 8 min

Jetpack Compose Cheat Sheet 2026 — Every Component and Modifier

Bookmark this page. Use Ctrl+F (or Cmd+F on Mac) to find what you need. This cheat sheet covers Jetpack Compose components, modifiers, state, navigation, and common patterns. Last updated: April 2026 Core Composables Composable Usage Text("Hello") Display text Text("Bold", fontWeight = FontWeight.Bold) Styled text Button(onClick = { }) { Text("Click") } Clickable button OutlinedButton(onClick = { }) { Text("Outlined") } Outlined variant TextButton(onClick = { }) { Text("Text") } Text-only button IconButton(onClick = { }) { Icon(...) } Icon button TextField(value, onValueChange = { }) Text input field OutlinedTextField(value, onValueChange = { }) Outlined text input Image(painter, contentDescription) Display an image Icon(Icons.Default.Home, contentDescription) Material icon Checkbox(checked, onCheckedChange) Checkbox Switch(checked, onCheckedChange) Toggle switch RadioButton(selected, onClick) Radio button Slider(value, onValueChange) Slider CircularProgressIndicator() Loading spinner LinearProgressIndicator(progress) Progress bar HorizontalDivider() Horizontal divider line (replaces deprecated Divider()) Spacer(modifier = Modifier.height(16.dp)) Empty space Layouts // Column — vertical stack Column { Text("First") Text("Second") } // Row — horizontal stack Row { Text("Left") Spacer(Modifier.weight(1f)) Text("Right") } // Box — stack on top of each other Box { Image(...) // background Text("Overlay") // on top } // LazyColumn — scrollable vertical list (RecyclerView replacement) LazyColumn { items(list) { item -> Text(item.name) } } // LazyRow — scrollable horizontal list LazyRow { items(list) { item -> Card { Text(item.name) } } } // LazyVerticalGrid — grid layout LazyVerticalGrid(columns = GridCells.Fixed(2)) { items(list) { item -> Card { Text(item.name) } } } Common Modifiers Modifiers change the appearance and behavior of composables. Order matters — modifiers are applied top to bottom. ...

March 18, 2026 · 6 min

Jetpack Compose Tutorial #6: Lists — LazyColumn and LazyRow

Every app has lists. A chat app has a list of messages. A store app has a list of products. A settings app has a list of options. In the old Android world, you used RecyclerView — which needed an Adapter, a ViewHolder, a LayoutManager, and a lot of boilerplate code. In Compose, you just use LazyColumn. That’s it. LazyColumn vs Column — Why Not Just Use Column? You already know Column from Tutorial #2. Why not use it for lists? ...

March 18, 2026 · 9 min

Git Commands Cheat Sheet 2026 — Every Command You Need

Bookmark this page. Use Ctrl+F (or Cmd+F on Mac) to find what you need. This cheat sheet covers Git commands from basics to advanced workflows. Last updated: April 2026 Setup and Config Command Description git config --global user.name "Alex" Set your name (shown in commits) git config --global user.email "alex@example.com" Set your email git config --global init.defaultBranch main Set default branch name git config --list Show all config settings git init Create a new repository git clone <url> Clone a remote repository git clone <url> <folder> Clone into a specific folder Basic Workflow Command Description git status Show changed, staged, and untracked files git add <file> Stage a file for commit git add . Stage all changes git add -p Stage changes interactively (hunk by hunk) git commit -m "message" Commit staged changes git commit -am "message" Stage tracked files and commit (does NOT stage untracked files) git commit --amend Modify the last commit (add files or fix message) git diff Show unstaged changes git diff --staged Show staged changes (ready to commit) git diff HEAD Show all changes (staged + unstaged) Working Directory → git add → Staging Area → git commit → Repository Viewing History Command Description git log Show commit history git log --oneline One line per commit git log --oneline --graph --all Visual branch graph git log -5 Show last 5 commits git log --author="Alex" Filter by author git log --since="2026-01-01" Commits after a date git log -- <file> History of a specific file git show <commit> Show details of a commit git blame <file> Show who changed each line Branching Command Description git branch List local branches git branch -a List all branches (local + remote) git branch <name> Create a new branch git branch -d <name> Delete a branch (safe — won’t delete unmerged) git branch -D <name> Force delete a branch git branch -m <old> <new> Rename a branch git switch <name> Switch to a branch git switch -c <name> Create and switch to a new branch git checkout <name> Switch to a branch (older syntax) git checkout -b <name> Create and switch (older syntax) Branch Workflow (ASCII Diagram) main: A --- B --- C --- F (merge commit) \ / feature: D --- E - Merging Command Description git merge <branch> Merge branch into current branch git merge --no-ff <branch> Force a merge commit (no fast-forward) git merge --squash <branch> Merge all commits as one (does not auto-commit) git merge --abort Cancel a merge in progress Resolving Conflicts When Git cannot auto-merge, it marks conflicts in the file: ...

March 17, 2026 · 6 min

Jetpack Compose Tutorial #5: State — The Most Important Concept

This is the most important tutorial in the entire series. If you don’t understand state, nothing in Compose will make sense. If you do understand it, everything clicks. State is the reason the login form from the previous tutorial worked. It is the reason buttons can toggle, text fields can update, and screens can change. Without state, your UI is frozen — it shows something once and never changes. Let’s fix that. ...

March 17, 2026 · 10 min