
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.
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.
Refactor the starting project for a restaurant list app. Fetch restaurants from the server, map them into objects, sort by distance, filter out closed ones, and display them.
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.
Explore refactoring to make the show restaurant flow cleaner and more maintainable by splitting a long method and organizing logic into presenters, view models, and repositories.
Refactor the filter logic to use the built-in distance calculation for two locations, avoiding reinventing the wheel and converting meters to kilometers before updating the restaurant distance.
clean Android code after finishing a feature by reformatting, optimizing imports, removing logs and comments, renaming variables, and ordering lifecycle overrides first and public methods before private ones.
Remove unused imports, logs, and commented code after each feature. Maintain consistent naming, audit methods, and order of methods to improve readability with minimal daily effort.
Refactor the restaurants list using filter, map, and sortedBy to produce a distance-based, sorted result, and learn how on each returns the list after updating its items.
Identify refactoring opportunities, shorten long methods, simplify logic, and use collection operators to keep code clean, maintainable, and free of hardcoded content.
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!