Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
How to write cleaner Android code with Kotlin
Highest Rated
Rating: 4.5 out of 5(131 ratings)
20,248 students

How to write cleaner Android code with Kotlin

Learn how to clean your Android code and become a better Kotlin Android developer that writes clean and better code!
Created byCatalin Ghita
Last updated 9/2021
English

What you'll learn

  • How to write clean Android code
  • How to create a clean coding mindset
  • Awesome Kotlin features
  • How to clean up an existing project
  • Hidden Android Studio shortcuts

Course content

1 section26 lectures2h 51m total length
  • Welcome5:06

    Have you ever gone back to your code and understood nothing because it was too messy and unorganized? Have you spent tons of time trying to figure out what in the world have you written in that app?

    This has happened to me many times as well and I know how frustrating this is, but we are here to actually fix it and prevent it from happening again!

    Class objective

    This course is about writing clean Android code which will save you a lot of time. You will be able to write much better and consistent code, so you will never end up wasting so much time trying to understand your projects.

    We will work together on your programming mindset. We are going to create a way of thinking so when you write code you also refactor it afterwards, because cleaning your code after you finish a feature is as important as having the ability to write it in the first place.

    This course also features many tips and tricks on how to write clean and readable code.

  • Teaching style3:04

    Downloadable project resources

    There are 2 main ways of accessing the materials for this class. You can use any of them to access the Android Studio projects for each solution of each coding chapter.


    Option A. Download the project files for each coding chapter directly from the lesson’s resources. For each of these lessons you will find the project attached as a ZIP file:

    • 5. Importing project and running the app.

    • 8. Shortening and splitting methods.

    • 9. Keep your logic simple with real example.

    • 11. Use Enum for static content.

    • 13. Clean your code.

    • 15. Collection operators: map and filter.

    • 17. Collection operators: sort and find.

    • 19. When to check for null and Fail Fast strategy.

    • 21. Split app's responsibilities.

    • 24. Structuring packages by feature.

          Finally, import the project in Android Studio.


    Option B. Check out the Github repository page URL in this lesson's resources for all the coding solutions  and select the corresponding branch for each coding chapter you currently are at. After that, click Code and then select  Download ZIP. Finally, import the project in Android Studio.

  • Install Android Studio1:43
  • Getting to know the starting project1:29
  • Importing project and running the app4:33

    Download the project files for the starting point from this lesson’s resources. Then, import the project in Android Studio.

    You can alternatively check out the Github repository page URL in this lesson's resources and select the refactor-code-starter branch. After that, click Code and then select  Download ZIP. Finally, import the project in Android Studio.

  • Looking at the code and deciding what is wrong8:07
  • Shorten methods by splitting them6:48
  • Shortening and splitting methods12:04
  • Keep your logic simple with real example5:30
  • Keep your logic simple Summary2:59
  • Use Enum for static content7:49
  • Enums for static content Summary3:25
  • Start cleaning your code more often9:50
  • Clean your code Summary2:29
  • Collection operators: Map and filter9:49
  • Map and filter operators Summary2:25
  • Collection operators: Sort and find11:46
  • Sort and find Summary2:41
  • When to check for null and Fail Fast strategy9:23
  • When to check for null Summary3:40
  • Split application's responsibilities17:56
  • Split application's responsibilities Summary2:34
  • Structure your packages by using structuring strategies7:00
  • Structuring packages by feature5:40
  • Start using coding styles for Java and Android19:32
  • Wrap up3:45

Requirements

  • Basic Android and Kotlin experience

Description

Have you ever gone back to your code and understood nothing because it was too messy and unorganized? Have you spent tons of time trying to figure out what in the world have you written in that app?

This has happened to me many times as well and I know how frustrating this is, but we are here to actually fix it and prevent it from happening again!

Class objective

This course is about writing clean Kotlin Android code which will save you a lot of time. You will be able to write much better and consistent code, so you will never end up wasting so much time trying to understand your projects.

We will work together on your programming mindset. We are going to create a way of thinking so when you write code you also refactor it afterwards, because cleaning your code after you finish a feature is as important as having the ability to write it in the first place.

This course also features many tips and tricks on how to write clean and readable Kotlin code. This course also features many tips and tricks on how to write clean and readable Kotlin code. You will learn about inline functions and trailing lambdas as well as other awesome Kotlin extensions.

What are you waiting for? Jump in and let's clean some code!

Who this course is for:

  • BeginnerAndroid Developers
  • Intermediate Android Developers
  • Expert Android Developers